Commit Graph

3934 Commits

Author SHA1 Message Date
ejurgensen
68022d5c10 [dacp] Change update id's more often
Sometimes the artwork changes, but the album does not (especially likely if we
are in a row of "Unknown album"-tracks)
2020-05-11 21:39:02 +02:00
ejurgensen
63ab446bd5 [pipe] Fix issue where Shairport progress metadata was ignored
Sometimes the progress has a negative position, which we were incorrectly
disregarding.
2020-05-11 21:39:02 +02:00
ejurgensen
1921a2401f [artwork] Fix memleak in source_item_pipe_get
Queue item not being freed on succes
2020-05-11 21:37:29 +02:00
ejurgensen
97a2165666 [lastfm] Fix forgotten include in commit de1b1c3
Closes #1001
2020-05-11 19:19:28 +02:00
ejurgensen
a6cb70fd66 [artwork] Don't use group handlers if unknown group (artist/album) 2020-05-11 17:24:05 +02:00
ejurgensen
de1b1c3805 [cfg] Remove hardcoding of strings for unknown album etc
Now configurable, since we don't have real localisation
2020-05-11 17:02:14 +02:00
whatdoineed2do/Ray
69c56f5971 [jsonapi] items/add?expression can take 'limit' param 2020-05-09 20:04:27 +01:00
whatdoineed2do/Ray
c5fe0d217b [jsonapi] support 'limit' on 'api/queue/items/add?expression='
Extend to support SMART query allows 'limit'

  curl -X POST "http://localhost:3689/api/queue/items/add?expression=genre+is+%22Pop%22+order+by+time_added+desc+limit+3"
2020-05-09 17:09:03 +01:00
whatdoineed2do/Ray
4147e302a8 [SMARTPL] add 'random' in 'order by' clause
'random' tag in 'order by' clause to request SQLite to random select data rows from result set

    "random 3 pop" {
      genre is "Pop" and
      media_kind is music
      order by random desc
      limit 3
    }
2020-05-09 15:47:30 +01:00
ejurgensen
86d49a7028 [artwork] Don't log Spotify artwork errors if user is not logged in
Ref issue #986
2020-05-05 16:23:55 +02:00
ejurgensen
07158cf2d5 [raop] Fix incorrect log domains 2020-05-05 16:06:06 +02:00
ejurgensen
b10434627a [player] Remove outdated comment 2020-05-05 16:04:39 +02:00
ejurgensen
778d6f4999 [config] Change speaker_autoselect default to no
The changes in commit 6612899 mean that we now do more to maintain selection of
a user selected speaker, even if it fails or is powered off for a while. Thus
this option is no longer relevant.

The option was also never very good for people with many speakers.
2020-05-04 17:41:57 +02:00
ejurgensen
b6dfb48100 [raop] Adjust keep alive interval 30s -> 25s
Testing with Homepod/ATV points at 25s working better, see:
https://github.com/ejurgensen/forked-daapd/issues/734#issuecomment-622959334
2020-05-03 23:15:44 +02:00
ejurgensen
57ff2e3124 [raop] Fix bug where we send start packets during teardown
The teardown send function was setting state to CONNECTED, which made
raop_write() believe that the device had just joined.
2020-05-03 00:00:26 +02:00
ejurgensen
661289990c [player] Migrate a lot of speaker handling to outputs.c
Moves speaker selection, volume handling and startup to outputs.c, plus adds
the ability to "resurrect" a speaker that disconnects.

The purpose of moving the code is to concentrate device handling in one place.

Also changes how we deal with speaker selection. The player will now generally
not alter a user selection, even if the device fails. The purpose of this is to
maintain selection both if the device briefly fails, and if the user switches
off the device (we stop playback) and later turns it on + starts new playback.
2020-05-03 00:00:18 +02:00
ejurgensen
0e19102efd [artwork] Define MEDIA_KIND_ALL as USHRT_MAX instead of individual num values 2020-05-02 00:52:52 +02:00
ejurgensen
37b4188c3c [artwork] Generalize handler configuration of supported media_kinds 2020-05-02 00:52:52 +02:00
ejurgensen
9d1f15d3c2 [db] Define MEDIA_KIND_ALL 2020-05-02 00:52:52 +02:00
whatdoineed2do/Ray
329c0620fc [artwork] query playlist-wide artwork if availble 2020-04-30 20:28:36 +02:00
whatdoineed2do/Ray
5a872dc436 [library] rss pulls channel->image->url if available 2020-04-30 20:28:36 +02:00
whatdoineed2do/Ray
e7c62086a2 [db] add artwork_url to playlist_info 2020-04-30 20:28:36 +02:00
whatdoineed2do/Ray
9a0c7e9ad2 [db] v21.4 - add playlist..artwork_url column 2020-04-30 20:28:36 +02:00
ejurgensen
d84ea2008f [pipe] Increase metadata pipe max read size + don't abort if exceeded
Closes #976
2020-04-29 23:02:05 +02:00
ejurgensen
a14a8458aa [scan] Remove iTunes_CDDB_IDs as album ID (closes #972)
Seems this ID is not reliable, it can be semi-empty, e.g. with a value of '16++'
2020-04-29 20:57:13 +02:00
ejurgensen
489b90e067 [rsp] Add comments with RSP sample requests 2020-04-29 20:55:46 +02:00
whatdoineed2do/Ray
52800b419a [smartpl] support song_length 2020-04-29 11:53:29 +01:00
ejurgensen
6d9cf5c1d7 [rsp] Fix commit 24e3ac1 so it filters properly (ref issue #944) 2020-04-28 22:27:36 +02:00
ejurgensen
d3fb451960 [player] Save seek position more often
Makes it possible for the user to resume playback from the correct position if
for instance the speaker disconnects -> pb_abort is called.
2020-04-27 21:29:51 +02:00
ejurgensen
153eb40b6d [db] Remove some definitions of ARTWORK_XXX
The artwork db field should only be used to save media file artwork metadata,
which mostly means whether it has embedded artwork or not. It should not be
used to save where we found artwork for the file, since that is not static.

So this commit removes for instance ARTWORK_OWN, ARTWORK_DIR etc., which we
weren't using anyway.
2020-04-25 22:07:10 +02:00
ejurgensen
daf3922650 [artwork] Remove http instance of artwork_source for embedded
Commit 8510f7e should mean that it is not required any more, since we won't be
probing http streams unless we know they have artwork.
2020-04-25 21:59:18 +02:00
chme
8510f7e5f2 [artwork] Only try embedded artwork if dbmfi has ARTWORK_EMBEDDED flag 2020-04-25 21:58:21 +02:00
ejurgensen
946853fdf4 [rss] Change feed virtual_path
Instead of /file:/https:/domain.podcast set it to /https://domain.podcast.com/xxxx
2020-04-25 21:51:00 +02:00
whatdoineed2do/Ray
f23ef1aa9c [library] RSS - protect against invalid pubdate 2020-04-24 19:04:45 +02:00
ejurgensen
b00e2655f0
Merge pull request #954 from chme/rss-scanner
[rss] Always use RSS feed title and author for album and artist
2020-04-24 19:02:48 +02:00
ejurgensen
7a9f66538a [raop] Extra comments + logging changes 2020-04-24 18:49:33 +02:00
ejurgensen
b78282db38 [player] Only send startup metadata once 2020-04-24 18:46:17 +02:00
ejurgensen
07972c28f7 [raop] Only send exact types of metadata requested by device
Airport Express announces md=2, meaning only progress metadata, so we shouldn't
send artwork and text metadata to it.
2020-04-24 18:46:17 +02:00
ejurgensen
4491928466 [player] Don't send metadata before the input has started
Otherwise we have a race condition between the worker and the input thread. If
the worker returns with metadata before the input thread has started reading,
then pb_session.pts will still be zero, which means metadata->pts will be zero
in finalize_cb(). That is an invalid time to give the outputs.
2020-04-24 18:46:17 +02:00
ejurgensen
e2205e2399 [raop] Fix calculation of metadata progress values 2020-04-24 18:49:03 +02:00
ejurgensen
8070c2f68c [outputs] Change rtp timespec arg to take value instead of pointer 2020-04-24 18:46:17 +02:00
ejurgensen
349b05bd4f [raop] Use progress metadata to keep ATV4/Homepod connection alive (issue #734)
Instead of using OPTIONS we use SET_PARAMETER with progress metadata to avoid
disconnects from Apple TVs, Homepods and possibly also Airport Expresses.
2020-04-24 18:46:17 +02:00
ejurgensen
01033c0662 [cast] Fix incorrect log level 2020-04-22 00:00:09 +02:00
ejurgensen
886557f946 [cast] Better logging of app not launching 2020-04-20 21:40:39 +02:00
Christian Meffert
a1cf32172a
Merge pull request #955 from chme/jsonapi-track-playlists
Add JSON API endpoint to fetch playlists for a track
2020-04-19 07:21:58 +02:00
chme
df0c36f4f4 [jsonapi] Add new endpoint to fetch playlists for a track
The new endpoint `api/library/track/{id}/playlists` allows to fetch all
playlists that contain the track.
2020-04-19 06:44:13 +02:00
ejurgensen
aa9a08aedb [alsa] Improvements to commit 0a08b93 2020-04-18 21:35:47 +02:00
ejurgensen
515232e7fc
Merge pull request #950 from whatdoineed2do/alsa-device-listing
[alsa] option to list alsa devices/mixers suitable for playback
2020-04-18 20:54:28 +02:00
whatdoineed2do/Ray
0a08b93c24 [alsa] list alsa devices/mixers suitable for playback 2020-04-18 11:36:41 +01:00
chme
5074b158bd [rss] Always use RSS feed title and author for album and artist 2020-04-18 11:46:44 +02:00
Justin Wong
c0b3782578 Updated websocket.c to notify once per event cycle 2020-04-18 15:11:39 +08:00
ejurgensen
3994ef0f2e [jsonapi] Add endpoint for playlist update of query_limit
Makes it possible to set number of podcasts retrieved for RSS feeds.

Closes #951.
2020-04-17 20:10:58 +02:00
ejurgensen
95bc6e3e70
Merge pull request #946 from whatdoineed2do/scan-rss-rescan-fix
[library] RSS bug fix - meta rescan resets "play count" and other fields
2020-04-17 11:21:29 +02:00
whatdoineed2do/Ray
3d869b0857 [library] RSS - reuse db file id when performing meta scan
Fixes issue when performing an 'api/rescan' (results in RSS_SCAN_META scan type
in this module) that would result in a library_media_save() -> a readd even for
entries that already exist in db.  This would result in dropping db record, incl
play_count etc instead of an update
2020-04-17 09:44:51 +01:00
ejurgensen
24e3ac1a80 [rsp] Filter out non-file sources since they can't be played 2020-04-15 22:05:19 +02:00
ejurgensen
1c08b75ce5 [httpd] Improve log and error message 2020-04-15 16:00:18 +02:00
ejurgensen
19358dc869 [mxml] Simplify mxml workarounds 2020-04-15 15:59:15 +02:00
ejurgensen
5ad5f85cc4 [mxml] Workaround mxmlNewTextf/mxmlSaveString segfault
Occurs on amd64 Debian 10.x with mxml 2.12
2020-04-15 15:59:15 +02:00
Justin Wong
938a19ff15 Update volume on device reconnect 2020-04-14 23:49:34 +08:00
ejurgensen
805cd16442 [pairing] Remove dead assignment 2020-04-13 21:39:59 +02:00
ejurgensen
90eb333f03
Merge pull request #933 from nhannam/raop-configurable-ports
[raop] Allow configuration of raop control and timing ports
2020-04-12 19:49:49 +02:00
chme
14b4081769 [artwork] Ignore streams with media kind != music in artwork sources
"stream", "discogs", "coverartarchive", "spotify"
2020-04-12 10:49:56 +02:00
Nigel Hannam
5d6c8d7b5b [raop] Fix spelling mistakes 2020-04-11 22:44:41 +01:00
Nigel Hannam
5f3103fae7 [raop] Move config into new airplay_shared block 2020-04-11 22:30:27 +01:00
ejurgensen
08b2eb8d4c [dacp/player] Change support for prevent-playback and busy (ref issue #934)
Adds support for dcmp.device-busy, and also changes handling of
device-prevent-playback so it matches iTunes better.
2020-04-10 21:01:41 +02:00
whatdoineed2do/Ray
e5ff30e11b [scan] support #EXTGENRE: 2020-04-09 17:43:09 +01:00
Nigel Hannam
19d1d4f67b [raop] Allow configuration of raop control and timing ports 2020-04-08 21:16:00 +01:00
ejurgensen
c4cc366e6f [artwork] Avoid slow nowplaying artwork response -> slow Remote connect
Lower priority of potentielly slow embedded artwork retrieval, plus make sure
we tell the transcode module about http data kind, so that it can probe
quicker.
2020-04-07 22:54:10 +02:00
ejurgensen
3a897afc44 [xcode] Use smaller probe size for remote tracks for quicker startup 2020-04-07 21:44:52 +02:00
ejurgensen
a8e6522a3c [xcode] Change workaround in commit a0ac66e for AIFF issue
This solution matches what we do for 'in' filter
2020-04-07 21:24:31 +02:00
ejurgensen
a0ac66e020 [xcode] Workaround for ffmpeg detecting channel_layout = 0 for AIF 2020-04-07 20:55:17 +02:00
whatdoineed2do/Ray
0baa0ac552 [smartpl] add samplerate 2020-04-07 18:46:33 +01:00
whatdoineed2do/Ray
1b354121c5 [smartpl] support birate,bits_per_sample,codectype 2020-04-05 14:42:01 +01:00
ejurgensen
4fcd0ba781 [daap] Adjust user_agent_filter() so code matches intention 2020-04-04 21:25:14 +02:00
ejurgensen
5651ce7694 [library] Use item title from RSS feed 2020-04-04 21:07:16 +02:00
ejurgensen
dbc798da4f [-] Workaround for mxml 2.10 memleak
2.10's mxmlDelete memleaks, and mxml is used in many parts of forked-daapd. So
to avoid that we ship upstream's fixed version of mxmlDelete and use that.
2020-04-04 21:07:16 +02:00
ejurgensen
2d8521139c [library] Add action to library_schedule_callback()
Makes it possible for the caller to request that a previous callback is
replaced, so we don't end up with more and more callbacks. Also add other
options for future use.
2020-04-04 21:07:16 +02:00
ejurgensen
2af7296723 [library] Ignore RSS items without URL's 2020-04-04 21:07:16 +02:00
ejurgensen
1a45a2acda [db] Fix db_pl_delete so it won't delete files belonging to other pl's 2020-04-04 21:07:16 +02:00
ejurgensen
16a3b8878f [jsonapi] Change library_item_add, add delete pl and drop library_item_remove 2020-04-04 21:07:16 +02:00
ejurgensen
59fa33311d [library] Refactor RSS scanner 2020-04-04 21:07:16 +02:00
ejurgensen
b19314e814 [db] Add cleanup to db_pl_delete(), remove db_pl_purge() 2020-04-04 21:07:16 +02:00
ejurgensen
2ee5f6d747 [library] Change implementation of item_add, event cb and drop item_remove. 2020-04-04 21:07:16 +02:00
whatdoineed2do/Ray
5cddf0e347 [jsonapi] RSS support: new /api/library/item_{add,remove} endpoints for adding items to library - for RSS at this time and extend PL_ search and queries to incl PL_RSS 2020-04-04 21:07:16 +02:00
whatdoineed2do/Ray
10b10f8037 [daap] RSS support: podcasts visible on IOS Remote app
IOS appl generates request for itunes.extended-media-kind: 4,36,6,7 when
navigating "Podcasts" item on menu
2020-04-04 21:07:16 +02:00
whatdoineed2do/Ray
d40131d38d [scan] RSS support: new library source - RSS scanner; periodically updates RSS feeds as found in db once subuscribed. Auto translates apple podcasts to RSS link 2020-04-04 21:07:16 +02:00
whatdoineed2do/Ray
8b02ea9d6b [library] RSS support: new library interface item_{add.remove} and all library modules to register (timer) events 2020-04-04 21:07:16 +02:00
whatdoineed2do/Ray
57b0626906 [db] RSS support: new PL_RSS db value and new pl purge 2020-04-04 21:07:16 +02:00
Rosen Penev
08b055dd2b
websocket: add header for errno
fixes compilation under newer musl.
2020-03-29 20:51:19 -07:00
ejurgensen
f61dfa0529 [db] db_pl_delete_bypath() must also delete disabled playlists
Otherwise we end up with a bunch of disabled playlists in the db.
2020-03-29 00:33:44 +01:00
Christian Meffert
5bd32135ee
Merge pull request #916 from whatdoineed2do/json-playlist-play-count-update
[json] enable playlist play_count
2020-03-28 07:41:24 +01:00
ejurgensen
114881cd1c [misc] Add comment for commit 27138ed 2020-03-25 16:13:55 +01:00
uvjustin
27138edd55
Update misc.c
Allocate extra byte for null termination of string
2020-03-25 14:57:23 +08:00
ejurgensen
cfecb4a5f5 [scan] Also support nested smart playlists (closes issue #923) 2020-03-23 23:46:52 +01:00
whatdoineed2do/Ray
a31430f671 [jsonapi] album/playlist inc uses db specific methods 2020-03-23 13:42:46 +00:00
whatdoineed2do/Ray
286525a85c [db] inc playcount using filter 2020-03-23 13:39:59 +00:00
whatdoineed2do/Ray
1a912d9808 [jsonapi] enable album track play_count update 2020-03-23 13:39:59 +00:00
whatdoineed2do/Ray
a6d8d55bd4 [jsonap] new PUT /api/library/playlists/[[:digit:]]+/tracks endpoint
enable playlist tracks play_count updates: 'increment', 'reset', 'played'
2020-03-23 13:39:59 +00:00
chme
ec8ce91baa [jsonapi] Use synchronous pairing request command 2020-03-18 14:56:05 +01:00
chme
accab800ac [pairing] Refactor remote_pairing to use cmdbase
This allows to call a sync command that returns the outcome of a pairing
request. And that will be useful for the JSON API and the web interface.
2020-03-18 14:56:05 +01:00