ejurgensen
3b27d50f97
Merge pull request #907 from chme/artwork_remove_libspotify_refactor
...
Remove libspotify as artwork source + refactoring
2020-03-15 18:27:18 +01:00
chme
67fd555b52
[artwork] Refactor artwork_get_dir_image
2020-03-14 07:03:06 +01:00
chme
c75ff89769
[jsonapi] Do not fail on /api/library/playlists/0
...
The root playlist folder does not exist in the DB therefor add special
handling and return some fixed data.
2020-03-08 19:13:17 +01:00
Christian Meffert
1bf094ed81
Merge pull request #906 from chme/playlist_folder2
...
JSON API - Support for Playlist Folders
2020-03-08 07:31:09 +01:00
ejurgensen
51b7a8854c
[scan] Add support for MUSICBRAINZ_ALBUMID tag (fixes issue #914 )
2020-03-06 19:07:06 +01:00
ejurgensen
37510db748
[mdns] Fix possible incorrect library ID in _dacp._tcp ( fixes #899 )
...
If the library ID started with one or more 0's then it would not be printed in
the announcement, which meant that DACP commands would not work due to
incorrect ID.
2020-03-02 19:53:43 +01:00
whatdoineed2do/Ray
81f4834814
[http] leak fix for curl_slist_append()
2020-02-28 21:57:10 +00:00
ejurgensen
64c6007aad
[db] Fix memleak from unexpected return value, closes issue #909
...
On success the function was returning SQLITE_OK = 100, not 0, which made
json_reply_library think that the operation failed.
Credit @whatdoineed2do
2020-02-25 21:58:18 +01:00
chme
6ba45e8d94
[artwork] Remove libspotify based artwork handler
2020-02-25 05:41:49 +01:00
chme
36ebf7d06c
[jsonapi] Add support for playlist folders
2020-02-24 21:27:53 +01:00
ejurgensen
248f82f3c8
[db] Fixup fixup in commit #00de0a3 (upgrade dbvers to 21.3)
...
Forgot to include db_upgrade to v21.3
2020-02-23 21:26:00 +01:00
ejurgensen
1ed10771f1
[artwork] Get enablement of online srcs from settings
...
Settings will take care of consulting the cfg file now
2020-02-23 20:30:35 +01:00
ejurgensen
9b9d2d0fb7
[settings] Add handlers to set default settings, e.g. from the cfg file
2020-02-23 20:30:35 +01:00
ejurgensen
5736217315
[db] Change prototype of db_admin_getxxx() functions
...
Makes it possible for caller to distinguish between "not set" and "set to 0".
2020-02-23 20:30:35 +01:00
ejurgensen
afa1a07a42
[artwork] Fix handling of cache + enable online srcs via config
...
* Don't save artwork for permanent items (file + Spotify) to the stash. The
stash is only for short term artwork.
* If a request comes with a different max_w/max then search the online source
again.
* Make artwork requests thread-safe by mutex protecting the search history.
* Add config option
2020-02-23 20:30:35 +01:00
ejurgensen
c674f84497
[json] Make clients reload artwork when we have new http metadata
2020-02-23 20:30:35 +01:00
ejurgensen
ad9ebb75c6
[artwork] Refinement of online artwork search
...
* Add system to avoid making too many futile requests + repeated requests
* Fixup Spotify artwork search (use type=track, type=album gave empty results)
* Include stash caching in artwork_get_byurl()
2020-02-23 20:30:35 +01:00
ejurgensen
8261fb8e59
[http] Don't return zero-length ICY title metadata
2020-02-23 20:30:35 +01:00
ejurgensen
9068c66dcd
[cache] Minor changes so "const char *" path arguments are accepted
2020-02-23 20:30:35 +01:00
ejurgensen
2651a979fe
[inputs] Fix issue where input metadata would not be erased
...
When playing a stream, the input metadata is transferred to the queue_item.
However, that was not done if there was no input metadata, which meant that
old metadata was not getting erased.
2020-02-23 20:30:35 +01:00
ejurgensen
b43e174baf
[logger] Show long log messages truncated
2020-02-23 20:30:35 +01:00
ejurgensen
a289135325
[artwork] Construct online src querys based on data_kind
...
For http streams we don't have an album name to search for. Plus we don't
want to cache those images.
2020-02-23 20:30:35 +01:00
ejurgensen
b73f33f8e9
[artwork] Use settings to enable online sources
2020-02-23 20:30:35 +01:00
ejurgensen
18cf2dbbbf
[misc] Change json_drilldown to _select and fix error case
2020-02-23 20:30:35 +01:00
ejurgensen
70f0ff1f61
[artwork] Support for online artwork sources - WIP
...
* Discogs
* Spotify
* Cover Art Archive
2020-02-23 20:30:35 +01:00
ejurgensen
15b18e26b7
[http] Let the curl https client follow up to 5 redirects
...
Requests for artwork to Cover Art Archive require redirects. Perhaps there are
also some playlist requests that will benefit from this.
2020-02-23 20:30:35 +01:00
ejurgensen
937f4431f8
[misc] Add json_drilldown() function
...
Will descend into a json object along the path set by a list of keys
2020-02-23 20:30:35 +01:00
ejurgensen
d86ca1176d
[misc] Add an in-place string replacement function
2020-02-23 20:30:35 +01:00
ejurgensen
00de0a3f76
[db] Fixup commit #1edfadc
2020-02-23 20:25:22 +01:00
whatdoineed2do/Ray
3a48864001
[smartpl] support date_realeased
2020-02-23 20:25:22 +01:00
whatdoineed2do/Ray
de665fc6c8
[daap] honor requests to sort by 'releasedate'
2020-02-23 20:25:22 +01:00
whatdoineed2do/Ray
78194807db
[db] add S_RELEASEDATE and idx
2020-02-23 20:25:22 +01:00
Christian Meffert
80921a71a4
Merge pull request #901 from whatdoineed2do/json-spotify-token-leak
...
Json spotify token leak
2020-02-22 08:27:32 +01:00
ejurgensen
b40e691e6e
[db] Fix memleak of mfi->url
...
Credit @whatdoineed2do
2020-02-16 21:16:33 +01:00
whatdoineed2do/Ray
3049b3e70e
[jsonapi] spotify token leak
2020-02-14 21:10:15 +00:00
ejurgensen
646dd44dd9
Silence unused var/func warnings for autogenerated ANTLR files
2020-02-08 21:24:25 +01:00
ejurgensen
f4cb0fb79d
[db] Error checking for alloc failure
2020-02-08 16:10:33 +01:00
ejurgensen
e9d1a2475e
[db] Fix memleak on error from prev commit
2020-02-08 15:17:34 +01:00
ejurgensen
541a1a6701
[db] Orphan nested playlists if parent is deleted/cleared
...
Also align db_pl_delete_bypath with db_pl_delete by making it a wrapper.
2020-02-08 13:41:26 +01:00
ejurgensen
84aced0a3d
[scan] Fix exit and error message if nested playlist is invalid
2020-02-08 13:38:24 +01:00
ejurgensen
6b007dcd26
[scan] Fixes for #d2f0d7b
...
* Don't treat m3u's with m3u URL's as nested playlists
* Dereference playlist paths in the m3u's
2020-02-08 12:11:14 +01:00
ejurgensen
5295d787ad
[scan] Change library_playlist_save return + fix Spotify
...
* fix Spotify invalid mem access
* fix clearing of Spotify files
2020-02-08 10:55:15 +01:00
ejurgensen
da29fa5f93
[scan] Make sure new, nested playlists are scanned
...
During scanning we might find a new, nested playlist (so inside another m3u),
which we will then save. When the scanner then reaches the actual playlist file,
we must make sure to scan the contents of it. This means the timestamp when
saving the first time has to be set to a dummy value.
2020-02-08 10:55:15 +01:00
ejurgensen
4b60da5fb4
[scan] Minor changes to smart pl scanner
2020-02-08 10:55:15 +01:00
ejurgensen
4c86798182
[scan] Fix bug added to iTunes scanner
...
Incorrect title for meta playlist used in commit 9be7d8f
2020-02-08 10:55:15 +01:00
ejurgensen
77a8de3bea
[scan] Fix db_pl_add() so it always returns correct id
2020-02-08 10:55:15 +01:00
ejurgensen
d94cf3f07f
[scan] Add option to let m3u tags override ICY metadata (issue #891 )
2020-02-08 10:55:15 +01:00
ejurgensen
cac4b14e6f
[conf] Add missing stdint.h include
2020-02-08 10:55:15 +01:00
ejurgensen
189370df91
[scan] Update smartpl scanner to use filescanner util functions
2020-02-08 10:55:15 +01:00
ejurgensen
2a69869816
[scan] Update iTunes scanner to use new filescanner util functions
2020-02-08 10:55:15 +01:00
ejurgensen
46a9114948
[scan] Support for nested playlists
...
Also includes some refactoring of the playlist filescanner and some
rearrangement of filescanner.c functions.
2020-02-08 10:55:15 +01:00
ejurgensen
ba1c536ca3
[library] Let library_media_save() return errors
2020-02-08 10:55:15 +01:00
ejurgensen
c5988665b0
[db] Expose db_pl_fetch_byid()
2020-02-08 10:55:15 +01:00
ejurgensen
abdc0d6d27
[library] Some refactoring of the library module
...
Misc refactoring, e.g. alignment of how modules save tracks and playlists, incl
use of mfi and pli. Also try to avoid direct calls between library and player.
2020-02-08 10:55:15 +01:00
ejurgensen
08e89ffd4f
[db] Use prepared statements for playlists (add/update)
2020-02-08 10:55:15 +01:00
ejurgensen
942628f914
[library] Check for all scanning methods in library_init()
2020-02-08 10:53:59 +01:00
whatdoineed2do/Ray
a1a49b9497
[library] validate mandatory methods for source or die
2020-02-06 19:37:16 +00:00
whatdoineed2do/Ray
6120551cf5
[spotify/library] add missing metarescan
2020-02-06 18:38:21 +00:00
ejurgensen
b565df1d87
[raop] Add ATV 4k mdns announcement
2020-01-19 13:50:16 -08:00
ejurgensen
16cfca1bfe
[scan] Remove some id3 tags that ffmpeg parses better (issue #882 )
...
ffmpeg parses TDA, TDAT, TYE, TYER and TDR these days, so there is no need
to do that in forked-daapd. Also the parsing of TDA/TDAT was incorrect,
since it is MMDD.
2020-01-14 20:33:39 +01:00
ejurgensen
dfd2a4ab14
[dacp] Increase current revision number even if there are no open requests
...
This change aligns with iTunes behavior. It also means that a client that is
not long polling can use the revision number (cmsr) value to check for changes.
2020-01-12 01:06:34 +01:00
ejurgensen
919906233c
[logger] Adjust log repeat max
2020-01-12 01:06:34 +01:00
ejurgensen
92dee0386d
[daap/dacp] Workaround so that libevent cleans up when a long poll is disconnected
...
See https://github.com/ejurgensen/forked-daapd/issues/870
2020-01-12 01:06:34 +01:00
ejurgensen
87cb3b8b58
[logger] Always limit repeated logging no matter the log level
2020-01-12 01:06:34 +01:00
ejurgensen
4fa7eb98a0
[daap/dacp] Fix for memleak when client hangs up
2020-01-12 01:05:59 +01:00
ejurgensen
8d21a66493
[logger] Suppress logging of many similar repeated messages
2020-01-12 01:05:59 +01:00
whatdoineed2do/Ray
609cba5f04
[alsa] multi alsa cfg section SEGV with no nickname - use 'card' when not specified
2020-01-06 15:38:32 +00:00
ejurgensen
cc78926721
[dacp] Support for volumeup, volumedown and mutetoggle (issue #873 )
...
Mute toggle only supported via enable/disable
2020-01-03 23:40:16 +01:00
whatdoineed2do/Ray
7ea8eeae05
[alsa] cfg section typo using 'mixer_device_name'
2020-01-03 19:37:07 +00:00
ejurgensen
e61e98bcbb
[player] Reverse args to player_speaker_get_byid() for consistency
2020-01-03 19:38:52 +01:00
ejurgensen
af1bc27dd5
[dacp] Support for dmcp.device-prevent-playback (issue #855 )
2020-01-03 19:36:35 +01:00
ejurgensen
80b183c7ff
[dacp] Fix for genres that have single quotes in their name ( fixes #869 )
2020-01-03 19:05:48 +01:00
ejurgensen
4e1e5efedc
[alsa] Changes to commit 0cb4e0b
: multiple devices
2020-01-03 19:02:39 +01:00
whatdoineed2do/Ray
0cb4e0b862
[outputs/conf] New multiple 'alsa' sections split from 'audio'
2020-01-02 23:51:59 +01:00
ejurgensen
8248d2fe9f
[scan] Fix access violation if pls line has no '='
2019-12-27 23:58:57 +01:00
ejurgensen
251080344e
[alsa] Fix missing unsubscription when closing session (ref. #866 )
2019-12-27 11:29:36 +01:00
ejurgensen
0c08e83811
[outputs] Fix segv due to incorrect array size (fix for issue #866 )
...
If the number of quality subscriptions reaches max then this bug will be
triggered, because we will incorrectly use the last element of the
output_buffer for a subscription, thus losing the zero terminator.
2019-12-27 00:10:32 +01:00
ejurgensen
33f97f55f3
[player] Fix for #860 , going to next track when consume is enabled
2019-12-17 20:58:47 +01:00
ejurgensen
b83023356b
[db] Fix for time_added incorrectly updated (issue #852 )
2019-12-04 20:57:21 +01:00
Will Saxon
f3ebb574ba
Recognize '@' as an operator identical to ':' ( #841 )
...
* Recognize '@' as an operator identical to ':'
* Add comments
* Add shortened example query
2019-11-16 12:27:43 +01:00
ejurgensen
f5e59c9b26
[pipe] Allow sample rate of 88200
...
Ref. issue #838
2019-11-05 00:13:33 +01:00
ejurgensen
6f3c315dfc
[db] Add missing declarations of media_kind column in commit 40c7522
(fixes issue #836 )
2019-11-03 00:16:20 +01:00
ejurgensen
a4f9bb576d
[xcode] Increase read timeout 15s -> 30s (ref. issue #728 )
2019-11-02 08:56:10 -07:00
Christian Meffert
cafdb96329
Merge pull request #833 from chme/cache_control
...
[httpd] Force browsers to always revalidate their cache
2019-11-02 07:57:55 +01:00
ejurgensen
40c7522baa
[db] Make Apple Music on Catalina work - part 2 (fix for issue #834 )
...
Extends the playlist table with media_kind to handle playlist queries like
this from Apple Music:
/databases/71/containers?session-id=12345678&revision-number=4&delta=0&query=('dmap.itemname:Library%20name','com.apple.itunes.extended-media-kind:1','com.apple.itunes.extended-media-kind:32','com.apple.itunes.extended-media-kind:128','com.apple.itunes.extended-media-kind:65537')&meta=dmap.itemid,dmap.itemname,dmap.persistentid,dmap.parentcontainerid,com.apple.itunes.is-podcast-playlist,com.apple.itunes.special-playlist,com.apple.itunes.smart-playlist,dmap.haschildcontainers,com.apple.itunes.saved-genius,dmap.objectextradata
2019-11-01 15:44:53 -07:00
ejurgensen
a69e79e5ec
[daap] Make Apple Music on Catalina work - part 1 (fix for issue #834 )
...
Like with iTunes, it has adverse effects to announce support for DAAP groups,
so with this change we also check if user-agent is "Music" before deciding what
to announce.
2019-11-01 15:43:56 -07:00
ejurgensen
dd24c35b2f
[misc] Add missing comparison in quality_is_equal()
2019-10-26 23:30:44 +02:00
ejurgensen
051e526b2c
[pipe] Disallow 24 bit input, doesn't work currently
...
If 24 bit input needs to be transcoded, like it will for AirPlay, it
will fail in transcode.c, because XCODE_PCM24 actually produces 4-byte
samples.
2019-10-26 23:28:05 +02:00
chme
662bfa529b
[httpd] Force browsers to always revalidate their cached versions
...
Setting Cache-Control to "no-cache" tells a client to always make a
request to check if the version in the client cache is still valid
(response code 403 not modified).
2019-10-26 12:01:15 +02:00
ejurgensen
85ab7c3057
[alsa] Fix playback of 24 bit audio (issue #830 )
...
The player will write 24 bit samples using 3 bytes, not 4, so the appropriate
sample format is SND_PCM_FORMAT_S24_3LE, not SND_PCM_FORMAT_S24_LE.
For extra protection we also use snd_pcm_bytes_to_frames() instead of BTOS(),
because that way we can be more certain that the buffer is not too short for
snd_pcm_writei().
2019-10-22 19:51:51 +02:00
ejurgensen
41f51d43ac
[pipe] Allow configuration of 32 bit input format (issue #830 )
...
Should work with e.g. arecord -f S32_LE -r 96000 -c 2 -t wav
2019-10-21 21:54:12 +02:00
chme
4c835f4435
[player] Remove dead code and rework check if fetching queue item failed
2019-10-20 14:36:21 +02:00
chme
69d3c97b7e
[player] Fix freeing of queue item if error happens during seek
...
Plus fix some code style issues and add more documentation
2019-10-20 14:36:21 +02:00
chme
6e5d6791ff
[player/dacp/mpd/jsonapi] Combine seek commands into one with mode param
...
Also changes relative seeking behavior:
- seeking behind the the current track only switches to the previous
track, if we are not more than 3 seconds into the current track,
otherwise starts current track from the beginning
- seeking beyond the current track will start the next track from the
beginning
2019-10-20 14:36:21 +02:00
chme
d69f328973
[jsonapi] Support relative seeking
2019-10-20 14:36:21 +02:00
chme
ced11ef0c1
[player] Allow seeking by a relative amount of milliseconds
2019-10-20 14:36:21 +02:00
chme
dc9396886c
[jsonapi] Set correct artwork url for pipe input
2019-10-20 08:39:18 +02:00
chme
7e6b8f740d
[db] Add missing mapping of queue version into queue item on fetch
2019-10-20 08:38:40 +02:00
ejurgensen
547222ec2b
Merge pull request #821 from chme/master_vol
...
[player] Fix missing update of master volume in web interface
2019-09-26 22:17:37 +02:00
chme
e3edcb5b96
[player] Fix missing update of master volume in web interface
...
Activating/deactivating an output might change the master volume,
therefor send a volume change notification.
2019-09-26 08:11:29 +02:00
chme
2846287169
[jsonapi] Add endpoint "/api/outputs/{id}/toggle" to toggle outputs
2019-09-26 08:00:03 +02:00
ejurgensen
8cff93ce55
[streaming] A bit of fixing up
2019-09-22 23:08:35 +02:00
whatdoineed2do/Ray
586dc4342d
[streaming] mem leak fix on client initiated disconnect; close callback cleans
...
up the session but not the evhhttp_request object alloc'd in
httpd()-> event_base_loop() -> ... -> evhttp_request_new()
2019-09-22 23:08:35 +02:00
whatdoineed2do/Ray
c2ba1fdb63
[streaming,conf,xcode] review fixes
2019-09-22 22:58:32 +02:00
whatdoineed2do/Ray
008e11bfb8
[streaming] review: remove bps/channels from cfg, undoc icy_metaint cfg option
2019-09-22 22:58:32 +02:00
whatdoineed2do/Ray
7ccd32c354
[streaming] validate cfg for supported ffmpeg/mp3 sample_rates
...
$ fmpeg -h encoder=mp3
...
Supported sample rates: 44100 48000 32000 22050 24000 16000 11025 12000 8000
Supported sample formats: s32p fltp s16p
Supported channel layouts: mono stereo
2019-09-22 22:58:32 +02:00
whatdoineed2do/Ray
8762891145
[streaming] configurable icy_metaint
2019-09-22 22:58:32 +02:00
whatdoineed2do/Ray
f5c3eb0c14
[streaming] refactor for sperate in/out streaming qualities and configurable streaming params
2019-09-22 22:58:32 +02:00
whatdoineed2do/Ray
07d297aaca
[streaming] increase icy-metaint interval to 16k bytes
2019-09-22 22:58:32 +02:00
whatdoineed2do/Ray
554799ebc3
[streaming/xcode] configurable MP3 streaming bitrate
2019-09-22 22:58:32 +02:00
ejurgensen
cae790ed7e
[pipe] Harden pict_tmpfile_recreate() against invalid input, take 2
2019-09-22 22:56:18 +02:00
ejurgensen
d2921e9444
[pipe] Harden pict_tmpfile_recreate() against invalid input
2019-09-22 20:27:47 +02:00
ejurgensen
56d3f42598
Fix a few gcc 8 / scan-build compiler warnings
2019-09-22 00:51:17 +02:00
ejurgensen
cf927e7daa
[pipe] Fixup missing condition
2019-09-20 21:51:09 +02:00
ejurgensen
e1a0e366cf
[dacp] Make sure Remote updates images from metadata pipes
2019-09-20 21:47:17 +02:00
ejurgensen
7316c060b8
[pipe/artwork] Support for artwork via Shairport metadata pipes, take 3
...
This implementation uses a tmpfile for storage of the artwork, plus it uses
artwork_get() which means that it scales the image as requested by the client.
It also does not create a tmpfile unless we actually receive artwork.
2019-09-20 21:47:17 +02:00
ejurgensen
ddb91e61ef
[pipe/artwork] Support for artwork via Shairport metadata pipes, take 2
...
This implementation uses a tmpfile for storage of the artwork (instead of the
cache, which may not be enabled).
2019-09-20 21:47:17 +02:00
ejurgensen
69fafd873d
[pipe/artwork] Support for artwork via Shairport metadata pipes
...
This implementation uses the cache for storage. Might change that to use a
tmpfile instead.
2019-09-20 21:47:17 +02:00
ejurgensen
2e149273e5
[cache] Clear stash if called with called with NULL
2019-09-20 21:47:17 +02:00
ejurgensen
1752901529
[misc] Change b64_* to wrap ffmpeg's base64 encoder/decoder
...
Using ffmpeg's is probably better than having our own, plus it provides us with
decoded length, which we will need to support artwork via pipe.
2019-09-20 21:47:17 +02:00
ejurgensen
e654276262
[alsa] Fix incorrect use of abs() for float, use fabs() instead
2019-09-18 21:28:15 +02:00
ejurgensen
6836a0f277
[mdns] Fix incorrect error check for getaddrinfo (can cause segfault)
...
Non-zero return from getaddrinfo is an error, so since *ai could be a null
pointer when derefenced in the following socket() call.
2019-09-18 21:18:01 +02:00
ejurgensen
4ab734343c
[-] Free events on exit (turns out event_base_free does not free them)
...
Credit @whatdoineed2do, ref. pr #797
2019-09-09 22:23:00 +02:00
chme
d88182820c
[mpd] Fix initial value of 'songpos' in play command
2019-09-07 08:31:31 +02:00
Christian Meffert
7925639f5b
Merge pull request #790 from chme/admin_settings
...
Introduce new settings for displaying the composer in the now playing page
2019-08-31 09:05:49 +02:00
Christian Meffert
73470113b6
Merge pull request #795 from whatdoineed2do/jsonapi-memleak
...
[jsonapi] potential memleaks on query_params.filter object
2019-08-30 19:31:44 +02:00
whatdoineed2do/Ray
6ad3d8dbef
[jsonapi] potential memleaks on query_params.filter object
2019-08-28 21:35:29 +01:00
ejurgensen
ef9c0117c9
[input] Fix pipe playback bringing cpu to 100%
...
When pipe playback is started, but no data is written to the pipe, the input
loop would bring the cpu to 100%. This fix limits the loop like it was before
player refactor.
2019-08-28 22:23:11 +02:00
chme
a5c2d6c0f8
[spotify] Return widest image if no max width is given
2019-08-25 11:24:14 +02:00
chme
2cc310b646
[jsonapi] Expose reading and updating settings through the JSON API
2019-08-25 10:39:16 +02:00
chme
02dd0a9445
[settings] Add settings component
...
This adds a new settings component for user configurable options that
can be changed through the JSON API.
The settings are stored in the admin db table and not in the conf-file.
2019-08-25 10:39:16 +02:00
ejurgensen
78373af201
[cast] Add a simple delay to stream to a have little bit of sync
...
Since it is unknown how to do real sync on Chromecast, this commit instead adds
a primitive delay to the stream, so that it is at least somewhat closer to
Airplay/local audio.
Also some cleanup of unused stuff.
2019-08-23 19:45:17 +02:00
whatdoineed2do
a5987addd4
[db,jsonapi] case insensitive directory/file listing ( #784 )
...
* [db,jsonapi] case insensitive directory/file listing
* [jsonapi] file listing of playlist uses same VPATH ordering as per directory and files
* [db,jsonapi] sorting via existing S_VPATH
* [db] replace LOWER with COLLATE NOCASE
2019-08-21 22:54:34 +02:00
ejurgensen
9cb5810e9a
[player] Avoid repeated resets on output delay when changing track (issue #781 )
2019-08-18 23:12:10 +02:00
ejurgensen
19ba9d106a
[input] Buffer full callback should also be made when source reading ends
...
Otherwise the player will wait infinitely
2019-08-18 23:10:56 +02:00
ejurgensen
b9b2874a2e
[player] Possible fix for issue #781 where playback status is incorrect
...
pb_suspend() + pb_resume() during track changes made the playback status
incorrect, i.e. pb_session.source_list/playing_now would not match what the
input was actually writing. This attempts to solve it by resetting the
session when pb_suspend() is called, so that the input, input_buffer and
source_list come into sync.
2019-08-17 01:44:45 +02:00
ejurgensen
86339eee87
[input] Make input_resume() not reopen tracks that have finished playing
...
If playback was paused during the very last part of the track, the rest of the
track would be read into the input buffer and the input would be closed. With
this commit the input will not be reopened.
Also allow input_flush to be called with null argument.
2019-08-17 01:37:39 +02:00
ejurgensen
7dfe4c2b65
[daap] Always use S_PLAYLIST ordering for Q_PL (ref issue #785 )
2019-08-13 21:35:07 +02:00
ejurgensen
f9bfec180f
[raop] Fix possible infinite loop + wrong packet resend (fixes issue #775 )
...
Fixes bugs which were due to incorrect handling of unsigned integer wrap-around:
1. Calling packet_resend() with seqnum + len greater than UINT16_MAX => infinite loop
2. Calling rtp_packet_get() with session->seqnum - seqnum greater than pktbuf_next => wrong packet
2019-08-10 22:41:04 +02:00
ejurgensen
6578f28621
[raop] Logging change to find cause of issue #775
2019-08-09 23:58:45 +02:00
chme
a87059265d
[spotify] Require Spotify web API scope playlist-read-collaborative
...
Also exposes granted and required Spotify web API scope through the
forked-daapd JSON API.
2019-08-03 12:55:53 +02:00
Christian Meffert
d996b1ff09
Merge pull request #772 from whatdoineed2do/smartpl-dynamic-dates-context
...
[smartpl] generate dynamic dates for SMARTPL queries
2019-08-03 08:51:57 +02:00
whatdoineed2do/Ray
50232bc091
[streaming] icy-meta overflow fix (for artist+song title > 4064 bytes)
2019-08-01 12:42:20 +01:00
whatdoineed2do
0941cf51ff
[streaming] support sending ICY metadata (title) ( #732 )
...
* [streaming] obey Icy-MetaData directive and send icy title
* [streaming] fix 'streaming_sessions' race conditions/dbl frees on shutdown
* [streaming] simplify icy meta sending logic
* [streaming] 'icy request' variable cleanup
* [streaming] icy-meta comment/logging cleanup
2019-07-31 16:34:11 +02:00
ejurgensen
cf173df805
[outputs] Fix issue where RTP packet is not available for retransmit
...
Check for sequence number did not account for wrap around, so e.g. a
request for seqnum 65335 when first was 65100 and last was 100 would
not work.
2019-07-20 20:37:22 +02:00
chme
772b18479d
[smartpl] Refactor appending date expression to sql query
2019-07-14 20:51:46 +01:00
ejurgensen
5307c6d94b
[player] Fix commit 3e9f8ef
, input_resume() must be non-blocking (possibly issue #773 )
2019-07-14 00:02:50 +02:00
ejurgensen
2f3ec36c6a
[input] Fix for playback pause on http streams
...
This fixes a bug from commit 37ce8dd6
where seek_http (which is called when
pausing playback) for non-seekable streams would return -1, thus signalling
an error, even though it is not. The player would think that the stream
could not be played and then skip to the next item.
2019-07-12 19:15:31 +02:00
ejurgensen
3e9f8effa0
[player] Better fix for resuming playback af long pause (issue #766 )
...
The fix in commit 3928ab6
broke resuming from an underrun, since it meant that
pb_resume() would flush the input buffer. With this fix it is possible to call
input_resume(), which will not flush the buffer if the source is already open.
Also renamed some functions in player.c for consistency.
2019-07-12 19:11:48 +02:00
whatdoineed2do/Ray
02d4ba1eaa
[smartpl] remove dupl code from interval AFTER/BEFORE DATE
2019-07-11 18:48:29 +01:00
whatdoineed2do/Ray
62201e4128
[smartpl] handle intervals in 'week' as days due to lack of SQLite modifier support
2019-07-11 18:25:01 +01:00
whatdoineed2do/Ray
3dcd826513
[smartpl] date 'interval' handling defered to db/not using potentially inaccurate time_t calcaulations
2019-07-11 18:25:01 +01:00
whatdoineed2do/Ray
d31a8c1e05
[smartpl] generate dynamic dates for SMARTPL queries
...
For dates that require context (ie today, yesterday, N days ago etc) we want the
underlying SQL to respect the current time when running query; a query that
requests items for 'today' should only find matches for the time it was run.
Current implementation would generated a fixed date (at the time the SMARTPL is
inserted into db) in the playlist table where as this commit understands the
context of the date.
2019-07-11 18:25:01 +01:00
ejurgensen
3928ab6f82
[player] Fix for resuming playback after long pause (issue #766 )
...
After a long pause the input would close the source (due to INPUT_OPEN_TIMEOUT).
This change makes the player restart the input when resuming.
2019-07-09 23:12:20 +02:00
Christian Meffert
e608b763ef
Merge pull request #752 from whatdoineed2do/db-queue-quality
...
db queue to incl media quality info
2019-07-09 20:19:10 +02:00
whatdoineed2do/Ray
e0a18082f7
[web-src/jsonapi] move endpoint /api/update as PUT operation
2019-07-09 13:54:59 +02:00
whatdoineed2do/Ray
8c024387ae
[web-src/jsonapi] endpoint GET /api/update/meta -> PUT /api/rescan
2019-07-09 13:54:59 +02:00
whatdoineed2do/Ray
e9c1a59ad2
[jsonapi] expose force metadata rescan via /api/update/meta endpoint
2019-07-09 13:54:59 +02:00
whatdoineed2do/Ray
8f311d4360
[library] support forced metadata scan of library, via '.meta-rescan' file
2019-07-09 13:54:59 +02:00
whatdoineed2do/Ray
9baba8f8db
[smartpl] use start of today (ie 00:00) for DATE calculations
2019-07-06 18:52:58 +01:00
ejurgensen
528a175d99
[main] Conditionally disable functions deprecated by ffmpeg 4.0
...
av_register_all, av_lockmgr_register and avfilter_register_all
2019-07-03 20:29:31 +02:00
ejurgensen
a321667201
[xcode] Remove deprecated ffmpeg AVFormatContext filename field
2019-07-02 21:48:34 +02:00
ejurgensen
bc8e6794ad
[cast] Fix some compiler warnings
2019-07-02 20:42:31 +02:00
ejurgensen
51d85d0975
[alsa] Fix for ALSA issues when source quality changes (issue #722 , issue #744 and issue #754 )
...
* Fix "clicks" during playback, especially on low buffer size devices
Bug had two causes: Trying to write to the prebuf ringbuffer when it was full
and writing new audio to the device without first having drained the prebuf,
thus writing out of order.
* Use snd_pcm_drain() so alsa doesn't report underrun on playback session end
Removes SNDRV_PCM_IOCTL_SYNC_PTR errors
* Fix missing error check of the return value from snd_pcm_avail (now use snd_pcm_avail_delay)
2019-06-22 21:53:09 +02:00
ejurgensen
a28e370c4f
Merge pull request #748 from chme/conf_deprecated
...
[conf] Gracefully handle the change of config options for modifying playlists
2019-06-16 22:05:08 +02:00
chme
94af51f19b
[conf/logger] Log error message from libconfuse in forked-daapd log
2019-06-15 12:21:27 +02:00
chme
9351d905f2
[mpd] Handle deprecated config options gracefully
2019-06-15 12:21:27 +02:00
chme
7853f80269
[conf] Readd old config options in mpd section as deprecated
2019-06-15 12:21:27 +02:00
ejurgensen
0cb8907201
[streaming] Logging fix
2019-06-12 22:51:25 +02:00
whatdoineed2do/Ray
f194145b8e
[jsonapi] queue/track responses incl type/bitrate/samplerate/channels
2019-06-12 16:52:46 +01:00
whatdoineed2do/Ray
e2d62a62a4
[scan] extract 'channels' from (files) audio and type/bitrate/samplerate/channels from streams
2019-06-12 16:52:02 +01:00
whatdoineed2do/Ray
b126a2fbc0
[db] add 'channels' to file/queue tbl
2019-06-12 16:52:02 +01:00
whatdoineed2do/Ray
c796db251d
[db] schema v20.01 support codec type/bitrate/samplerate in queue tbl
2019-06-12 16:50:52 +01:00
Scott Shambarger
20f5118f75
[alsa] asoundlib.h should be alsa/asoundlib.h
2019-06-11 20:10:04 -07:00
chme
d35333139e
[jsonapi] Fix segfault if no default playlist directory is set in conf
2019-06-01 08:12:38 +02:00
ejurgensen
4f5966c9ff
[db] Speed up Q_PL query used by e.g. '/databases/1/containers' request
...
The previous solution would use subqueries to count the number of items and
streams in each playlist, which means that response time gets pretty slow if
there are many playlists.
This commit also includes a number of lesser db code changes.
2019-05-30 21:19:40 +02:00
chme
4434fe7a2c
[jsonapi] Check for empty playlist name in queue/save
2019-05-30 11:23:22 +02:00
chme
2b4b9c747f
[jsonapi] Add config options for saving playlists to config reply
2019-05-30 11:23:22 +02:00
whatdoineed2do/Ray
d28f7f43b7
[jsonapi,mpd,conf] save playlist via JSON api
...
- new endpoint api/queue/save?name= to .m3u via library_save()
- refact for common cfg for playlist save options
2019-05-30 07:23:04 +02:00
ejurgensen
380f1358d5
[xcode] Disable reconnect_at_eof, does not work with m3u8 ( fixes #745 )
...
Only fixes #745 with newer versions of ffmpeg. With ffmpeg 3.4 playback
will still get interrupted because av_read_frame returns an error.
2019-05-21 21:19:03 +02:00
ejurgensen
7bf90eb8cb
[xcode] Fix for reading mono sources (ref issue #742 )
2019-05-19 22:45:39 +02:00
Christian Meffert
cbd8d8a44d
Merge pull request #740 from whatdoineed2do/library-https-stream
...
[library] accept https:// streams
2019-05-18 07:36:45 +02:00
ejurgensen
b3d6211371
[db] Upgrade db schema to 21.0
...
Commit b3bfb0a
and e1993bc
change the triggers and calculation of id's in a way
that is not backwards compatible, so we need to make major schema upgrade.
2019-05-17 23:07:48 +02:00
ejurgensen
e1993bc7b6
[db] Comeback for the files-table insert trigger
2019-05-17 23:03:05 +02:00
ejurgensen
35a585c23e
[scan] Use MusicBrainz and other tags to set songalbumid
...
Credit to @whatdoineed2do for finding tags and suggesting this change.
2019-05-17 23:03:05 +02:00
ejurgensen
b3bfb0a5f6
[db] Move calculation of artist/album id's from sqlite to code
...
The purpose of this is to support library backends making their own
calculation of these id's, which is relevant if they have more information
available than just album_artist and album.
This also removes a bunch of sqlite extension code plus some triggers, which
in itself is probably an improvement.
2019-05-17 23:03:05 +02:00
ejurgensen
c8650a0450
[cast] Put back Chromecast exclude option
...
Was removed by mistake in commit f8b0147
2019-05-16 23:04:33 +02:00
ejurgensen
31d852993f
Merge pull request #741 from whatdoineed2do/seekable-http-streams
...
Seekable http streams
2019-05-16 15:26:32 +02:00
ejurgensen
cd7bf45749
[alsa] Return ALSA the error code from buffer_write, not -1
2019-05-15 11:53:13 +02:00
whatdoineed2do/Ray
37ce8dd607
[inputs] enable seek on non-live http streams
2019-05-12 11:08:42 +01:00
whatdoineed2do/Ray
bc8a156132
[library] accept https:// streams
2019-05-12 11:07:08 +01:00
ejurgensen
c36df4fb8e
[raop] Bring back forgotten keep-alive for Apple TV's
...
The keep-alive was accidently disabled by the player refactor (after v26.5).
2019-05-12 00:11:07 +02:00
ejurgensen
a208604c86
[player] More comprehensive attempt at fixing short tracks (issue #733 )
...
Replace reading_next and reading_prev with a list of sources, so that we can
deal with short tracks, i.e. tracks where reading ends before playback starts.
2019-05-11 23:16:22 +02:00
ejurgensen
f793ad9f3e
[player] Fix incorrect player state while buffering (partial fix for #738 )
...
Player would return PLAYER_PLAYING when resuming playback after a pause, but
it should initially return PLAYER_PAUSED because it is still buffering.
2019-05-10 16:47:18 +02:00
ejurgensen
1948dcb959
[player] Quick fix for short track segfault (issue #733 )
...
With short tracks reading ends before playback starts, so event_read_eof comes
before event_play_start, which causes playing_now to point to a null
reading_now.
With this change it will point to a non-null reading_prev, but note that in the
hopefully rare case of multiple short tracks, the playing_now pointer will
still be incorrect.
2019-05-05 23:21:28 +02:00
Ali Graham
c7cab8ef6f
[websocket] disable ipv6 in ws_init if disabled in config
2019-05-05 22:45:28 +09:30
ejurgensen
9fcc3d2c01
[pipe] Fix double free of metadata strings ( fixes #724 )
2019-05-04 23:07:22 +02:00
ejurgensen
bc4b5275f3
[input] Make sure marker list is always ordered by pos
...
Otherwise the read size in input_read() becomes invalid and we segfault.
2019-05-01 23:11:39 +02:00
ejurgensen
c7b8b94163
[alsa] Set quality in device_open() (possible fix for issue #720 )
2019-04-12 22:24:48 +02:00
ejurgensen
ce2be1a724
[-] A bit of cleaning up
2019-04-10 22:38:48 +02:00