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
ejurgensen
dc65cb5b76
[alsa] Make sync and sync evaluation period configurable
2019-04-09 21:45:16 +02:00
ejurgensen
40934e7162
[cast] Remove/disable some unused code
...
Leaving some of the MEDIA commands in, even though they are not used any more.
Might come in handy later.
2019-04-09 21:03:14 +02:00
ejurgensen
55d9d9e6bd
[xcode/artwork] Drop support for ffmpeg legacy versions
2019-04-08 22:06:56 +02:00
ejurgensen
b33e2665a1
[xcode] Hardcode png/jpeg pix formats (fix for #717 )
...
ffmpeg changed the behaviour of avcodec_default_get_format() so that it picks
AV_PIX_FMT_MONOBLACK instead of AV_PIX_FMT_RGB24 for the png encoder. That
makes the function of no use to us, so now the pix formats are just hardcoded
in the settings instead.
2019-04-08 21:30:29 +02:00
ejurgensen
02cd65a992
[alsa] New resample-based sync correction
2019-04-08 00:50:20 +02:00
ejurgensen
781a3c16ed
[cast] Remove use of PAUSE, doesn't work with the mirroring app
2019-04-05 23:06:05 +02:00
ejurgensen
2c778a4da0
[cast] Remove check for appid, the session id check should suffice
2019-04-04 21:20:39 +02:00
ejurgensen
53780a7ef3
[xcode] Make sample rate + channels variable
...
This change is preparation to use ffmpeg's resampling capabilities to keep local
audio in sync (by up/downsampling slightly). This requires that sample rates are
not fixed for a transcode profile.
Added benefit of this is that we don't need quite as many xcode profiles.
2019-04-02 22:47:11 +02:00
ejurgensen
413ce25ec6
[cast] Fixup print mask
2019-03-28 23:22:49 +01:00
ejurgensen
9836280029
[player] Fix issue where sync timestamps are incorrect after pb_suspend()
2019-03-28 23:06:45 +01:00
ejurgensen
f1493db069
[player] Fix bug where device is always deselected before db_speaker_save()
2019-03-28 10:47:58 +01:00
ejurgensen
5f84fefd1b
[player] Remove pause timer remnants (moved to input/output in prev commit)
2019-03-27 22:48:09 +01:00
ejurgensen
d10e8ab1a2
[player] Fix proceed to next if track cannot be opened
2019-03-27 22:29:28 +01:00
ejurgensen
9773d9b840
[cast] Fallback if new mirroring app not present + metadata (not working)
2019-03-26 23:13:09 +01:00
ejurgensen
6930fdb28d
[alsa] Fix memleak: Missing free
2019-03-26 22:08:15 +01:00
ejurgensen
4a664cfa9f
[player] Fix playback start not showing in some clients
2019-03-24 22:53:01 +01:00
ejurgensen
ca56ac25ed
[input] Forgot to not timeout if player actually did read
2019-03-23 23:41:09 +01:00
ejurgensen
1b0892a53a
[player] Fix player losing quality + invalid return values from source_read()
2019-03-23 23:10:23 +01:00
ejurgensen
7d0ae01e84
[raop] Fixup forgotten free of pktbuffer
2019-03-22 23:25:34 +01:00
ejurgensen
aa36353480
[player] Fixup crash if playback stops while sending metadata
2019-03-22 23:24:11 +01:00
ejurgensen
95deef9c06
A bit of scan-build fixup
2019-03-22 22:15:13 +01:00
ejurgensen
4fb45e84f2
[player/outputs] New metadata handling (wip)
2019-03-18 23:06:08 +01:00
ejurgensen
ab0a6055b9
[input] Refactor metadata handling + add playback wait timeout
...
Previously input_metadata_get() would retrieve artwork from the source being
read currently, which might not be the one that triggered the FLAG_METADATA
event. So to fix this the metadata is now read by the input module itself when
the METADATA event happens, and the result is stored with the marker.
The commit also includes a timer so that the input thread does loop forever
if the player never starts reading.
Also some refactoring of metadata + abolish input_metadata_get and
input_quality_get. The latter in an attempt to treat the two in the same way.
2019-03-18 23:06:08 +01:00
ejurgensen
992ab90876
[xcode] Fix missing "&"
2019-03-18 23:06:08 +01:00
ejurgensen
b8e0280567
[outputs] Add a 10 sec stop timer + drop playback_stop()
...
In the output implementations playback_stop() was somewhat redundant,
since device_stop() does the same.
The timer should make sure that we always close outputs (previously
they were in some cases kept open).
The commit also includes some renaming.
2019-03-18 23:06:08 +01:00
ejurgensen
e3d39cff9b
[player] Fix incorrect setting of buffer size to outputs
2019-03-18 23:06:08 +01:00
ejurgensen
f7096890f6
[player] Fix incorrect calculation of timestamp due to integer overflow
2019-03-18 23:06:08 +01:00
ejurgensen
daf7d755eb
[input] Fix input writing too slowly for buffer to fill up after underrun
...
After an underrun the player doesn't read, so that meant input_wait would
wait a second before allowing the input to write, even though the input_buffer
was not full
2019-03-18 23:06:08 +01:00
ejurgensen
9b31264a3c
[xcode] Use av_get_bytes_per_sample instead of av_get_bits_per_sample
...
av_get_bits_per_sample(ctx->settings.audio_codec) may return 0 with some codecs
2019-03-18 23:06:08 +01:00
ejurgensen
01797662de
[cast] Fix segfault from cast_master_session not being reset
2019-03-18 23:06:08 +01:00
ejurgensen
f8b0147b12
[cast] First draft of Chromecast based on RTP (instead of mp3)
...
Includes adaptions to modified outputs interface
2019-03-18 23:06:08 +01:00
ejurgensen
9b6a892984
[rtp] Extra commenting about the RTP header
2019-03-18 23:06:08 +01:00
ejurgensen
d762bd0a56
[raop] master_session_free should allow null as argument
2019-03-18 23:06:08 +01:00
ejurgensen
3e4766ffaa
[outputs] Fix segfault if encode_reset() fails to setup an encode_ctx
2019-03-18 23:06:08 +01:00
ejurgensen
1285128b9a
[xcode] Fix incorrect source BPS detection + support for more audio qualities
2019-03-18 23:06:08 +01:00
ejurgensen
39037c7c8b
[player] Fix typo
2019-03-18 23:06:08 +01:00
ejurgensen
8cf717664d
[player] Don't call event_read_quality() twice
2019-03-18 23:06:08 +01:00
ejurgensen
63a2e750c7
[pulse] Convert Pulseaudio to new interface, incl support for native quality
...
First draft, probably has a few bugs
2019-03-18 23:06:08 +01:00
ejurgensen
3c2ff294a1
[player] Fix rewind problem where quality level was lost by player
...
+ remember to flush in source_start(), since the input won't do it if
input_now_reading has already been closed (e.g. if starting a new track
while playback is at the end of another track)
2019-03-18 23:06:08 +01:00
ejurgensen
50c7d96bc4
[raop] Remove flush timer, the player now takes care of stopping
...
Player now stops 10 secs after stop command and 10 mins after pause. At
that time the outputs have probably cut the connection themselves, but
that might be ok (needs testing).
2019-03-18 23:06:08 +01:00
ejurgensen
2893e597c3
[player] Partially revert commit ec9633c
, now don't do full stop straight away
...
It is normal for the player to be called with stop() and then start(), so we
should keep the outputs open for a while.
2019-03-18 23:06:08 +01:00
ejurgensen
4017ce8846
[player] Fixup to commit 8f39c65
, avoid crash when queue ends
2019-03-18 23:06:08 +01:00
ejurgensen
fc20b55a9b
[raop] Log sync packet times
2019-03-18 23:06:08 +01:00
ejurgensen
977f8570a5
[player] Fix handling of underrun/read_deficit
...
* Also call full_cb() from input_wait if buffer is full
* Make read_deficit count missing bytes instead of clock ticks
* Make read_deficit a part of the playback session
2019-03-18 23:06:08 +01:00
ejurgensen
143708368c
[alsa] Fix sync check
...
Sync correction still not implemented
2019-03-18 23:06:08 +01:00
ejurgensen
0f83b09ef7
[player] Fix incorrect setting of start timestamp
...
The time stamp was getting set too late, because if pos was zero the first
reads then it would be overwritten, but it shouldn't because the loop will
catch up even if the initial reads have zero samples.
2019-03-18 23:06:08 +01:00
ejurgensen
16469f6fa3
[player] Fixup missing fix from merge conflict resolution
2019-03-18 23:06:08 +01:00
ejurgensen
a37c9b4839
[player] Change name that was incorrect from merge conflict resolution
2019-03-18 23:06:08 +01:00
ejurgensen
2472aa9463
[player] Add timer to stop playback after being paused for a while
2019-03-18 23:06:08 +01:00
ejurgensen
b56b56af07
[input] Cleaning up
2019-03-18 23:06:08 +01:00
ejurgensen
107fa3634b
[spotify] Remove obsolete .start reference
2019-03-18 23:06:08 +01:00
ejurgensen
cfaceab9fe
[outputs] Misc fixup
2019-03-18 23:06:08 +01:00
ejurgensen
9d5555152c
[alsa] Implement new output interface + some refactoring
...
Sync still missing
2019-03-18 23:06:08 +01:00
ejurgensen
b811122566
[outputs] Rename output_buffer.frame to .data
2019-03-18 23:06:08 +01:00
ejurgensen
5c35e1a9db
[player] Completely stop devices on playback_stop()
...
Previously we just flushed, and local audio devices would never get closed.
Also a little fixup to the printing of session debug.
2019-03-18 23:06:08 +01:00
ejurgensen
19694ee1dd
[misc] Add ringbuffer utility to misc.c/misc.h
2019-03-18 23:06:08 +01:00
ejurgensen
9dfab16138
[streaming] Cleaning bugs from refactor
2019-03-18 23:06:08 +01:00
ejurgensen
201c97fdf8
Fixup 3 - remove small risk of crash if encode_setup called incorrectly
2019-03-18 23:06:08 +01:00
ejurgensen
de55acf797
[input] Fixup 2: Seeking when rewinding to 0
2019-03-18 23:06:08 +01:00
ejurgensen
c74b305983
[outputs] Fix crash, invalid reference to device after outputs_device_add
2019-03-18 23:06:08 +01:00
ejurgensen
b7add1d0fa
[inputs/player] Fixup part 1
2019-03-18 23:06:08 +01:00
ejurgensen
d008e241cf
[outputs] Make outputs_device_flush (per device flushing)
...
Works better with the callback mechanism
2019-03-18 23:06:08 +01:00
ejurgensen
87ca6363ae
[player/input] Refactor - WIP
...
* Open input sources earlier
* Gapless playback
* Remove fixed 44100/16 from player
* Complete restructure player internals
2019-03-18 23:06:08 +01:00
ejurgensen
e97ad7d970
[outputs] Reinstate device->activated, so that mdns flukes can't bring down playback
2019-03-18 23:06:08 +01:00
ejurgensen
936103f462
[outputs] Move device_add/rm to outputs and get rid of advertised flag
2019-03-18 23:06:08 +01:00
ejurgensen
a7e8476996
[outputs] Refactor outputs some more, eg change callback system
2019-03-18 23:06:08 +01:00
ejurgensen
e99f20992e
[player/outputs] Implement changed output interfaces in most backends
...
Still missing cast, alsa and pulseaudio, but these can so far just be
disabled with configure.
Otherwise still mostly untested.
2019-03-18 23:06:08 +01:00
ejurgensen
14a6d318f0
[outputs] Changes to interface of outputs module
...
* Drop output_sessions, was just a pointer to the actual session anyway
* Drop the old write, flush and stop prototypes
* Some minor changes/renaming
Purpose of this is also to fix a race condition in player.c where it
could try to start two sessions on the same speaker. This could happen
because outputs_device_start() in line 2093 is conditional on device->session
which however is false while a device is starting up.
2019-03-18 23:06:08 +01:00
ejurgensen
cee740ae51
[misc] Move MIN() macro from raop.c to misc.c
2019-03-18 23:06:08 +01:00
ejurgensen
94dfef6e78
[input] Return quality flag even if read size is zero
...
First input_read() has bufsize 0, because we don't know quality yet
2019-03-18 23:06:08 +01:00
ejurgensen
0cb3881621
[player/outputs/raop] Get rid of outputs_playback_start() (still WIP)
...
outputs_playback_start() had the problem that was not consistently invoked: If
for instance local audio playback was running and a Airplay device was then
activated, the raop's playback_start would never be invoked (and vice versa,
of course).
Instead, the player now writes the presentation timestamp every time to the
output, so it doesn't need to keep track of it from the start.
2019-03-18 23:06:08 +01:00
ejurgensen
a924a8dd66
[raop] Reorganise code a little
2019-03-18 23:06:08 +01:00
ejurgensen
fcc91ecd86
[player/outputs] Handle multiple quality levels + use rtp_common (WIP!)
...
* Untie Airtunes stuff further from player and non-Airplay outputs
* Change raop.c to use rtp_common.c (step 1)
* Change heartbeat of player to 100 ticks/sec, since we have untied from
Airtunes 352 samples per packet (which equals 126 ticks/sec at 44100)
Still a lot to be done in the player, since the rtptime's in it don't
are probably broken.
2019-03-18 23:06:08 +01:00
ejurgensen
cdd0aa884b
[outputs] Add ability to deal with multiple qualities
...
Output module can now take input data in multiple quality levels, and
can resample to those output modules that would require a certain quality
level, like raop.c would
2019-03-18 23:06:08 +01:00
ejurgensen
7e48887adc
[rtp] Add RTP utility module: rtp_common.c rtp_common.h
...
Expectation is to use this for both Airplay and Chromecast RTP streaming
2019-03-18 23:06:08 +01:00
ejurgensen
76bbfb6d2c
[streaming] Adjust httpd_streaming to new transcode interface
2019-03-18 23:06:08 +01:00
ejurgensen
4fe5c47526
[inputs] Change pipe and file_http inputs to use media_quality
2019-03-18 23:06:08 +01:00
ejurgensen
7048a72d86
[spotify] Use media_quality instead of input_quality
...
and allow more than 2 channels ... probably wouldn't actually work, hard to test
2019-03-18 23:06:08 +01:00
ejurgensen
a9085e978d
[input] Change input abstraction to use media_quality instead of input_quality
2019-03-18 23:06:08 +01:00
ejurgensen
462d787fab
[misc] Add media_quality struct for storing sample rate, bps and channels
2019-03-18 23:06:08 +01:00
ejurgensen
ad77a42dbb
[xcode] Adapt to allow for new raw PCM input profiles, e.g. 48000/16
2019-03-18 23:06:08 +01:00
ejurgensen
1696fc3384
[input] Adapt input_buffer so it can handle dynamic quality (sample rates etc)
...
Still WIP, player and outputs cannot handle this yet
2019-03-18 23:06:08 +01:00
ejurgensen
9182597605
[input/xcode] Write to input buffer with the sources native sample rate/format
...
Still WIP at this point since the player and output can't use the use improved
quality yet, and because rtptimes etc. are likely incorrect
2019-03-18 23:06:08 +01:00
ejurgensen
84e813038b
[player] Some additional comments
2019-03-18 23:06:08 +01:00
ejurgensen
d850c2e691
[xcode] Add OPUS encoding profile for RTP Chromecasting
2019-03-18 23:06:08 +01:00
chme
f85df07308
[jsonapi] Respect order defined in smartpl expression in queue/items/add
2019-02-23 11:02:12 +01:00
chme
e078ba8ed0
[jsonapi] Use same order by clause when adding queue items by
...
expressions as is used in search tracks by expression
2019-02-23 11:02:12 +01:00
chme
a3f2551eea
[jsonapi] Support starting playback from position in queue/items/add
2019-02-23 09:41:58 +01:00
chme
435df3fe8f
[spotify] Add support for adding spotify artist tracks to the queue
2019-02-20 10:10:53 +01:00
chme
3d494d5f58
[spotify] Switch to new web api playlist endpoints
...
The old playlist endpoints containing the user are deprecated and will
eventually be removed
(https://developer.spotify.com/community/news/2019/01/15/update-changes-to-playlist-uris/ ).
2019-02-20 09:30:02 +01:00
chme
7a2ba572f8
[streaming] Remove timeout for mpeg stream requests
...
Remove the need for clients to regularly reconnect to the mp3 stream. As
long as the connection is open, we are sending mp3 stream data.
2019-02-14 12:15:11 +01:00
chme
3343e9cfc8
[jsonapi] Rename queue item "albumartist_id" to "album_artist_id"
...
Keeps it in sync with the naming in the track object. Also introduce a
helper function to add an int64 as a json string.
2019-02-14 08:22:50 +01:00
Christian Meffert
90a7c120c3
Merge pull request #689 from chme/web_podcasts
...
Improve podcasts views in player web interface
2019-02-13 15:47:22 +01:00
Christian Meffert
a38a21e21e
Merge pull request #686 from whatdoineed2do/db-q-now-playing-modal
...
[db,web-src] support links to album,artist from queue item modal like others modals
2019-02-13 15:46:51 +01:00
whatdoineed2do/Ray
17022c9103
[jsonapi] expose albumid/artistid persistent id on queue object
2019-02-12 09:21:39 +00:00
whatdoineed2do/Ray
7e02eb510d
[db] add songartistid to queue tbl
2019-02-12 09:21:39 +00:00
chme
8840a65ee6
[smartpl] Add "songalbumid" as valid query field
2019-02-10 08:21:15 +01:00
ejurgensen
b1622b5b91
Merge pull request #687 from chme/spotify_artwork_2
...
[spotify/artwork] Add spotify webapi as an additional artwork source
2019-02-09 11:07:47 +01:00
chme
9b8bff45ab
[artwork/http] Check response code and content type
...
Extends the http_client_ctx to hold the response code for a request.
Also adds the content type header, if it was a https request (using
libcurl instead of libevent)
2019-02-09 08:35:20 +01:00
ejurgensen
cb49554608
[raop] Fix forgotten include of conffile.c in commit 18acb73
( fixes #688 )
2019-02-07 21:14:13 +01:00
chme
733a521df8
[spotify/artwork] Add spotify webapi as an additional artwork source
2019-02-05 16:04:08 +01:00
chme
0ded6d63bf
[db/jsonapi] New admin value for Last-Modified in JSON API header
...
This adds a new timestamp value "db_modified" into the admin db table.
In addition to the existing "db_update" admin value, this value is also
updated if rating, play-/skip-count or seek changes for a
media_info_file (files db table).
This should improve the caching behavior in clients of the JSON API
(especially the player web interface) in refreshing its data if some of
this values changes.
2019-01-31 09:42:53 +01:00
chme
3bc15e1278
[jsonapi] Add endpoint to update a tracks rating and/or play_count
...
New endpoint is PUT api/library/tracks/[id] and supported query
parameters are:
- rating: with values between 0 and 100
- play_count: with values "reset" (resets play_count and skip_count) or
"increment" (increments play_count)
2019-01-31 09:42:53 +01:00
chme
7d0e48eb0e
[db] Add support for resetting play- and skip-count
2019-01-31 09:42:53 +01:00
chme
b9a7ce7dd2
[jsonapi] Add endpoint to retrieve details for a single track by its id
2019-01-31 09:42:53 +01:00
ejurgensen
c70f96fdec
[db] Fix integer overflow in bind_mfi (ref issue #683 )
...
Also drop DB_TYPE_CHAR since it's not really being used.
2019-01-30 23:34:00 +01:00
ejurgensen
7abf68200d
[scan] Fix parsing of iTunes "Play Date" tag ( fixes #683 )
...
"Play Date" tag was seconds since 1904 (an Apple Mac HFS+ timestamp), not a
Unix timestamp as we assumed. Seems Apple themselves realised that wasn't a
great idea (+ not a proper plist date type), and therefore provide "Play Date
UTC" as an alternative.
2019-01-30 22:32:46 +01:00
chme
81753d44a7
[mpd] Report support for protocol version 0.20
2019-01-28 22:40:25 +01:00
chme
f77c216650
[mpd] Refactor parsing filter/window arguments and add support for
...
"group" argument in "list" command
2019-01-28 22:40:25 +01:00
chme
e015032292
[mpd] Add duration attribute with millisecond precision
2019-01-28 22:40:25 +01:00
chme
5bd94df4a6
[mpd] Add listfiles command
...
For now listfiles simply returns the same result as lsinfo (no support
for listing files not part of the library)
2019-01-28 22:40:25 +01:00
chme
937d1e3f5f
[db] Add "group" attribute to query_params and allow grouping files
2019-01-28 22:40:25 +01:00
chme
06aaacbe8f
[smartpl] Fix wrong where clause for date field queries with "before"
...
keyword
2019-01-28 20:46:04 +01:00
chme
9fff02841b
[jsonapi] Fix error in web interface files-view if the library directory
...
end with a trailing slash
2019-01-28 15:00:18 +01:00
chme
238361ea25
[player] Fix segfault when getting single speaker/output by id
2019-01-26 17:50:30 +01:00
chme
b000803fe3
[misc] Add compiler hint to check format parameters
2019-01-26 10:08:11 +01:00
chme
1f2b608d62
[mpd] Fix wrong number of format parameters for safe_asprintf
...
Fixes a segfault in cases where the default playlist directory config
(in the mpd section of the configuration file) was set/activated.
2019-01-26 10:07:48 +01:00
chme
116c315a84
[player] Rename struct spk_info to player_speaker_info
2019-01-22 17:47:15 +01:00
chme
343c583229
[jsonapi] Support changing volume by the given step (increase/decrease
...
volume)
2019-01-21 11:11:20 +01:00
chme
db7b9c689b
[player] Add command to get a single speaker info by its id
2019-01-21 11:11:20 +01:00
chme
c165c55b5b
[jsonapi] Add player/toggle endpoint
...
Toggles playback state depending on the current player state:
- playing --> pause
- paused, stopped --> play
2019-01-20 12:03:50 +01:00
ejurgensen
741825d086
[cast] Add option to exclude speakers ( closes #659 )
2019-01-09 20:26:31 +01:00
chme
fb60a05228
[jsonapi] Add support for "playback", "clear" and "shuffle" parameters
...
in
"queue/items/add" endpoint
2019-01-05 07:21:36 +01:00
chme
77a19a6df9
[jsonapi] Add checks for failed playback start and return error code
2019-01-02 09:51:54 +01:00
chme
0f4cbb3375
[http/jsonapi] Use strtok_r instead of strtok
2019-01-02 09:51:54 +01:00
chme
f23732945b
[websocket] Support "database" notifications
2019-01-02 09:51:54 +01:00
chme
b3853ef0f3
[jsonapi] Check for empty "uris" parameter in queue/items/add (prevents
...
a segfault) and log failed requests in error log
2019-01-02 09:51:54 +01:00
chme
2ead24a2f7
[jsonapi] Add optional expression parameter to queue/items/add endpoint
...
Adds support to add tracks by a smart pl query expression
2019-01-02 09:51:54 +01:00
chme
ca99bf8718
[jsonapi] Sort files by filename and return directories in api/config
2019-01-02 09:51:54 +01:00
ejurgensen
cd7af46c36
[db] Generic version of db_drop_indices/triggers + fix memleak
...
Memleak in db_drop_triggers() in error case (array "index" not being freed)
2019-01-01 21:34:29 +01:00
chme
010e8b2959
[db] Fix missing creation of triggers for persistent ids in db init
2019-01-01 09:38:02 +01:00
ejurgensen
19c39bf133
[scan] Always use compilation_artist for tracks in compilation dir
...
Reason is that tracks in compilation dir are not to be trusted when it comes
to album_artist.
See afee99d5db (commitcomment-31807556)
.
2018-12-31 15:55:49 +01:00
ejurgensen
9929832b5f
[db] Don't zero play_count, skip_count, seek, time_played, time_skipped on update
...
If a file gets updated/rescanned we generally don't want to reset the above
values. This commit adds DB_FLAG_NO_ZERO, which marks a field so that
db_file_update() will only update it if the new value is non-zero (i.e. the
caller probably has a "better" value).
2018-12-31 15:55:49 +01:00
ejurgensen
734b4e9851
[db] Transfer some library tag fixup to the db's generic fixup
...
Transfer setting defaults for media_kind and item_kind. Also sets
default media_kind for queue_items.
2018-12-31 15:55:49 +01:00
ejurgensen
c3eb95d201
[db] Change use of compilation_artist, so that album_artist has preference
...
This change means that we will use album_artist even if compilation_artist
is configured, thus compilation_artist will only be used to override artist.
2018-12-31 15:55:49 +01:00
ejurgensen
9fc2065ada
[db] Use album_artist if we have no artist metadata
2018-12-31 15:55:49 +01:00
ejurgensen
8043ca1291
[db] Drop upgrade support for pre-v17 db versions
...
Also drop the old way of recreating the files table, it is now replaced by
db_table_upgrade().
2018-12-31 15:55:49 +01:00
ejurgensen
a4c254e6e7
[db] Recreate v20 files table, so that new constraints take effect if upgrading
...
The constraints on songalbumid and songartistid where changed with v20, so we
need to make sure they take effect when upgrading.
This commit tries to do the table recreation like sqlite recommends and without
manually crafted copy queries that are probably prone to errors.
Since we are recreating anyway, this commit also reorders the columns slightly.
It also includes auto-drop/recreation of triggers (should really have been its
own commit) during upgrade, like is already done with indices.
2018-12-31 15:55:49 +01:00
ejurgensen
1de8f39264
[db] Generic fixup + align fixing up between mfi, pli and queue_item
...
The idea here is to make sure the fixing up of tags is done in a consistent
manner. For strings, this means stuff like trimming and empty strings -> null
are applied the same unless there are special exception rules set. It also
means that defaults are applied the same across structs, e.g. "Unknown artist"
for both mfi->artist and queue_item->artist.
The change is also necessary because we want to remove trimming from the sql
query and instead implement it ourselves.
2018-12-31 15:55:49 +01:00
ejurgensen
fc5a66f86d
[misc] New utility functions: trim, atrim and safe_snprintf_cat
2018-12-31 15:55:49 +01:00
ejurgensen
d3121f4ec7
[db] Use prepared statements for file insert, update and ping
...
Get rid of the SQL query strings, since they are prone to errors and are
probably also slower that using prepared statements.
2018-12-31 15:55:49 +01:00
ejurgensen
53d7005547
[pipe] Error check of b64_decode return value
2018-12-29 16:50:27 +01:00
ejurgensen
103dda29f3
[misc] Move CHECK_NULL inside b64_decode (around the malloc)
...
To stay in line with general use of the macro
2018-12-29 16:39:52 +01:00
chme
788cb6f133
[pipe/raop] Check for NULL to avoid scan-build issues (in case of oom)
2018-12-29 16:34:56 +01:00
ejurgensen
a37fc0916f
[alsa] Fix scan-build issue: Argument with 'nonnull' attribute passed null
2018-12-29 16:34:56 +01:00
chme
2ffb94c9d1
[db] Fix scan-build issue "Argument with 'nonnull' attribute passed
...
null"
2018-12-29 16:34:56 +01:00
chme
46b37b2c80
[daapd] Fix scan-build issue "Dereference of null pointer"
2018-12-29 16:34:56 +01:00
chme
75432ce73f
[rtsp] Initialize addr to avoid scan-build issue "Assigned value is
...
garbage or undefined"
2018-12-29 16:34:56 +01:00
chme
f3a495cd37
[player] Fix memory leak if opening new source failed
...
player.c:2032:11: warning: Potential leak of memory pointed to by 'ps'
2018-12-29 16:34:56 +01:00
chme
b7f3e71f7e
[db_upgrade] Fix memory leak in error case
...
db_upgrade.c:72:7: warning: Potential memory leak
2018-12-29 16:34:56 +01:00
chme
21ce281cd1
[filescanner] Fix Use-after-free error
...
library/filescanner_ffmpeg.c:396:7: warning: Use of memory after it is
freed
2018-12-29 16:34:56 +01:00
chme
2a76e888f0
[player] Send notification on output added/removed
2018-12-29 08:46:00 +01:00
whatdoineed2do/Ray
e9f92ba1a7
[jsonapi] correct count of tracks added returned
2018-12-24 19:27:19 +00:00
chme
dcbe503686
[jsonapi] Return number of items added in queue/items/add endpoint
...
response
2018-12-20 11:19:47 +01:00
chme
2b7ff60771
[jsonapi] Fix playing from position if player state is shuffled
2018-12-20 11:19:47 +01:00
chme
b558e3498d
[jsonapi] Add rating and title_sort to track object
2018-12-20 11:19:47 +01:00
chme
e6dc2a5845
[jsonapi] Add new endpoint "api/library/files"
...
This endpoint allows traversing the directory tree of the local library.
2018-12-18 08:28:19 +01:00
chme
070379edef
[db] Fetch directory id by path; use const for path and virtual_path
2018-12-18 08:28:19 +01:00
chme
dc020cc3ac
[db/filescanner/spotify] Set directory path
2018-12-18 08:28:19 +01:00
chme
42cbd721fd
[db] Minor version upgrade: new column "path" in directories table
2018-12-18 08:28:19 +01:00
Martin
b5606a2f5a
Added support for track and disc items in smart playlists
2018-12-10 13:20:20 +01:00
ejurgensen
4f6c9bb366
Revert "[player] Do not abort if pausing a stream or pipe playback"
...
This reverts commit fd84dd51b5
.
2018-12-03 23:59:31 +01:00
ejurgensen
bb1347f2c0
Revert "[raop] Listen for _airplay._tcp and make it a condition for device removal (issue #496 )"
...
This reverts commit 1e051407d5
.
2018-12-01 10:03:22 +01:00
whatdoineed2do/Ray
cfadcc184f
[jsonapi] support composer in queue and track objs
2018-11-30 17:22:21 +01:00
whatdoineed2do
488f52b04f
[db] schema v19.11 support composer in queue tbl
2018-11-30 17:22:21 +01:00
chme
fd84dd51b5
[player] Do not abort if pausing a stream or pipe playback
...
Instead we stop reading from the source and check on playback resume if
the source needs to be reopened.
2018-11-30 16:16:42 +01:00
chme
f6ddec3389
[player] On pause the current streaming item needs to be stopped, if it
...
is not the current playing item.
This happens if the input already switched to the next item in the queue
starting to stream it to the outputs (2 second buffer) while the outputs
are still playing the last seconds of the old item.
2018-11-30 15:41:28 +01:00
ejurgensen
357d346fce
Merge pull request #628 from chme/artwork
...
[jsonapi] Artwork url for non library items and streams
2018-11-30 10:12:41 +01:00
chme
234ccc2899
[http] Prevent adding empty artwork urls into icy metadata
...
Some radio streams send empty strings as "StreamUrl", prevent these from
beeing added into the queue database.
2018-11-30 06:39:22 +01:00
chme
041a87427c
[spotify] Set artwork url in queue items for spotify tracks
...
Fixes missing artwork for spotify tracks that are not in the user
library.
2018-11-28 20:31:50 +01:00
chme
534bbdb477
[artwork] Introduce constant for default artwork width/height
2018-11-28 20:28:38 +01:00
ejurgensen
1e051407d5
[raop] Listen for _airplay._tcp and make it a condition for device removal (issue #496 )
2018-11-26 20:24:28 +01:00
ejurgensen
18acb73fdb
[raop] Add option to make an Airplay speaker permanent in the speaker list (issue #496 )
2018-11-26 20:24:28 +01:00
chme
89ca5e8ba9
[jsonapi] Fix wrong artwork url for non library queue items and streams
...
Add check against the special file_id DB_MEDIA_FILE_NON_PERSISTENT_ID to
identify if a queue item is not in the library. And always prefer the
artwork url in the queue item before the artwork for the library file.
2018-11-25 10:07:55 +01:00
chme
bb959fdec9
[spotify] Use added_at as time_added and time_modified
...
Saved albums and playlist items have a "added at" attribut use it as
created instead of probably unexpected current time.
2018-11-24 06:31:39 +01:00
chme
0d8a764f41
Merge pull request #617 from chme/webinterface
...
Update player web interface
2018-11-23 14:31:24 +01:00
whatdoineed2do/Ray
14010eeb28
[smartpl] support searching by ssongartistid (list tracks for artist), artist_id and songartistid
2018-11-23 14:11:02 +01:00
chme
a8e8dc1999
[library/db/filescanner/spotify] Reshuffle after adding non library
...
items to the queue
2018-11-11 07:01:22 +01:00
chme
05141480e2
[player/db] Increment queue version if shuffle mode is turned off
...
This fixes showing the wrong queue in the player web interface after
turing shuffle mode off.
2018-11-11 07:01:22 +01:00
chme
4cf71bafcc
Merge pull request #605 from chme/play_next
...
[jsonapi] Add support for a position parameter in the queue/items/add endpoint
2018-11-02 18:38:10 +01:00
chme
8d8663e93d
[db/queue] Support adding non-library items at a given position to the
...
queue
2018-10-25 19:36:43 +02:00
chme
d2390933e9
[jsonapi] Support "position" parameter in queue/items/add endpoint
2018-10-25 19:36:43 +02:00
whatdoineed2do/Ray
3b10049d72
[filescanner] parse https streams for m3u
2018-10-23 10:06:11 +01:00
ejurgensen
df7456dc39
[mdns] Make connection test optional and only do it for Airplay ( fixes #602 )
...
Some remotes don't respond as expected to the test. Retune will give connection
refused, because the test is made too quickly, before the service is running.
Even if we delay the test it won't work because Retune crashes.
Since the false mdns advertisements are only seen on Airplay, we only do the
test there.
2018-10-14 22:13:58 +02:00
Don Cross
07e46d75c8
[alsa] Made resync period configurable 1..20 seconds, with default=10. ( #604 )
...
The unconfigurable resync period of 10 seconds was not frequent
enough to keep my own ALSA device in sync with the AirPlay stream.
Now the period is configurable. The default is still at 10
seconds, to prevent any change in behavior unless opted in by
the user.
Currently the adjustment causes a tiny "click" distortion in the
ALSA output, so it is better to make the check as infrequent as
possible, while still being frequent enough to stay in sync
over lengthy sessions of playback.
Added source_sample_rate, target_sample_rate to alsa_session.
This is a first step toward rendering ALSA at a different
sampling rate than the AirPlay stream, so that (a) we will
be able to dynamically adjust the ALSA sampling rate for an
improved sync algorithm, and (b) later, a more generalized
resampling algorithm can accommodate very different hardware
sampling rates like 22050 Hz or 48000 Hz.
Reworked alsa_session_free() so that it can be used to
tear down a partially initialized alsa_session if an
error occurs in the middle of alsa_session_make().
This simplifies the error handling logic in alsa_session_make().
This refactoring will be helpful later when resampling is added,
because more data structures will be dynamically allocated
during initialization.
Signed-off-by: Don Cross <cosinekitty@gmail.com>
2018-10-14 20:40:36 +02:00
ejurgensen
830d8594aa
[raop] Use et=4 to determine support for auth_setup (issue #557 )
2018-10-09 21:35:15 +02:00
ejurgensen
41126d7be4
[artworkapi/jsonapi] Retrieve artwork for track/album/artist
2018-10-07 21:54:38 +02:00
ejurgensen
c1619f7be0
[httpd] Increase max depth of path_paths ( fixes #599 )
2018-10-07 21:42:37 +02:00
ejurgensen
75dd9a5764
[daap] Fixup
2018-10-04 22:39:46 +02:00
ejurgensen
6109a5b6dd
[daap] Don't send two errors on auth problems + use 401 instead of 403 (issue #594 )
2018-10-04 22:33:30 +02:00
ejurgensen
75743bea80
[daap] Fix missing prompt for library password for non-remote DAAP clients ( fixes #594 )
2018-09-30 22:39:53 +02:00
ejurgensen
b54c9ff1c6
[db] Fix count error in db_build_query_browse() if no items match query
2018-09-23 01:37:40 +02:00
ejurgensen
aa3aa383ef
[raop] If ipv6 fails, fall back to ipv4 and disable ipv6 permanently for the device
2018-09-19 23:03:33 +02:00
ejurgensen
f686756dd8
[db] Upgrade schema to 19.10 to remove invalid time_skipped values from commit fde0a281
2018-09-19 19:40:45 +02:00
ejurgensen
a003c419c3
[db] Add missing casts of time_skipped ( fixes #593 )
...
The print mask for some reason uses int64, so time_skipped was too short
2018-09-19 08:12:40 +02:00
ejurgensen
4a16384d3a
[filescanner] Convert plist timestamps to Unix when importing iTunes XML
2018-09-18 20:29:28 +02:00
ejurgensen
97233d4753
[raop] Put ipv6 IP literals in brackets as per rfc3986
2018-09-16 22:19:27 +02:00
ejurgensen
2a9d3f7474
Merge pull request #591 from chme/queue_add_pos
...
[db] Add support to add items to the queue at a specified position
2018-09-16 13:13:13 -07:00
chme
7252b3e509
[db] Add support to add items to the queue at specified position
2018-09-16 09:36:43 +02:00
chme
f84e67ed5e
[db/conf] Add automatic calculation of ratings based on played/skipped
...
If activated in the configuration file, rating is updated after playing
or skipping a song. The calculation is based on how it is done in the
mpdstats plugin for beets
(https://beets.readthedocs.io/en/latest/plugins/mpdstats.html ).
2018-09-16 08:46:16 +02:00
chme
3ca5402638
[dacp] Only return requested number of queue item ( fixes #556 )
2018-09-13 21:11:41 +02:00
ejurgensen
2c1f2f1b15
[mdns] connection test: don't wait if connect() succeeds immediately
2018-09-10 20:18:06 +02:00
ejurgensen
475c598d0e
[mdns] Check return values of avahi_address_snprint()
2018-09-09 22:17:31 +02:00
chme
461a1d55bf
[player] Only add persistent items to history
...
The current logic in httpd_dacp.c cannot handle non persistent items
correctly. The items are always shown with the dummy_mfi with "unkown
artist" etc.
2018-09-08 09:14:24 +02:00
chme
9a47335a05
[player] Only increment playcount and scrobble persistent items
...
Ommits useless update query for playcount for items that are not in the
library. Also avoids trying to scrobble these items (fixes error log
message "lastfm: Scrobble failed, track id 9999999 is unknown")
2018-09-08 08:32:49 +02:00
ejurgensen
ce1bf8f40d
[web] Lower log level of libwebsockets
2018-09-08 00:24:49 +02:00
ejurgensen
b3fc87170e
[mdns] Fix missing check of the value-result from getsockopt(SO_ERROR)
...
The connection test would not catch "No route to host", as this is returned
through the value-result buffer.
This fix might partially solve issue #498 .
2018-09-07 23:19:46 +02:00
ejurgensen
93730281f4
[dacp] Map discrete-pause to playpause command handler
2018-09-07 21:40:23 +02:00
ejurgensen
3ba92aa860
[httpd] Better logging of unauthorized requests
2018-09-07 17:01:32 +02:00
ejurgensen
16e375e637
[db/misc] Cast ARRAY_SIZE to unsigned (avoids compiler warnings)
2018-09-04 20:07:05 +02:00
ejurgensen
350361e8bb
[db] Be forwards compatible with tables that have additional columns
2018-09-02 23:38:46 +02:00
ejurgensen
a29772e8be
[raop] Fix AirPlay 2 issue #557 , fix for stream metadata, better logging
...
AirPlay 2 devices like Sonos One and AirPort Express with firmware 7.8
require auth-setup before ANNOUNCE, otherwise they will return 403.
Also fixed a problem where metadata did not get sent when toggling
a speaker on/off if we were playing an endless stream.
2018-09-02 20:22:38 +02:00
whatdoineed2do
e3ce003190
genre search functionality ( #559 )
...
* [jsonapi] Add support for listing albums for genres
2018-09-02 09:05:18 +02:00
chme
ef3ab53562
[mdns] Fix compile warning "directive output may be truncated" (provided
...
string length might not be big enough for ipv6 addresses)
2018-09-02 07:46:50 +02:00
ejurgensen
697338d118
Merge pull request #567 from whatdoineed2do/bug/httpd-dir-check
...
[bugfix] httpd dir check does not like symlinks to directories
2018-08-26 00:24:45 +02:00
Rok Mandeljc
083f58abf7
daap_request: cache the query result only if user agent was provided
...
Avoid calling cache_daap_add() when hreq->user_agent is NULL
(user agent is not provided by the client), because it will
trigger a segfault when strdup() is called with that NULL pointer.
Fixes #571 .
2018-08-24 17:05:11 +02:00
ejurgensen
231b5615f1
[main] Just show version info when called with -v argument
2018-08-18 23:59:57 +02:00
ejurgensen
fde0a28142
Support for skip_count and time_skipped file metadata
2018-08-18 22:56:27 +02:00
whatdoineed2do
8b7c19a299
[httpd] allow webdir (htdocs) to be symlink to dir
2018-08-18 11:34:03 +01:00
ejurgensen
5ee0b69d39
[transcode] Set ffmpeg options so that it will attempt to reconnect streams
2018-08-12 19:50:54 +02:00
ejurgensen
ab1ded35e4
[config] Make user_agent configurable + don't use ffmpeg default (ref issue #562 )
2018-08-12 19:49:23 +02:00
ejurgensen
970769cab6
[mdns] Fix mdns problems with ATV4 and ipv6
...
Avahi gives us several ipv6 addresses for an ATV4 that aren't actually
connectable. Here we simply try to make a connection to the address,
and if it is not possible within a timeout we ignore the announcement.
We also now don't start a mdns record browser if the address from the
resolver passes the connection test and isn't link-local.
2018-06-25 21:44:07 +02:00
ejurgensen
0d4dd06b51
[filescanner] iTunes XML mapping of Play Count and Play Date
...
See issue #549
2018-06-25 20:03:38 +02:00
ejurgensen
975d75d607
[daap] Add mapping of dmap.persistentid
...
Used by rtRemote when starting playback of a searched item
2018-06-17 23:11:05 +02:00
ejurgensen
9d95466e09
[db] Use ANALYZE instead of PRAGMA optimize (reverts commit cd96ec5
)
...
Turns out PRAGMA optimize does not analyze tables on a fresh install,
which means that sqlite_stat1 is not available for the query planner,
which means that wrong indexes are used.
See https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=49928&sid=1e5d1d418315d7565ae027d751dd94a0&start=1350#p1328964
2018-06-16 21:43:58 +02:00
ejurgensen
3325b2d9ce
[transcode] Use proper const for avfilter_get_by_name() result
2018-06-06 00:00:22 +02:00
chme
f4422e9cf4
[MAKEFILE/misc] Add option to disable inclusion of default webinterface
2018-06-03 23:39:37 +03:00
chme
cc98eef88f
[websocket] Properly log libwebsockets log messages
2018-05-31 10:57:28 +03:00
chme
705b7013c3
[player/dacp/mpd/json] Update master volume after setting speaker volume
...
Changing a speaker volume in a DACP clients results in two dacp requests
(at least in Retune):
setproperty?include-speaker-id=0&dmcp.volume=41
setproperty?speaker-id=198018693182577&dmcp.volume=43
The first request sets the absolute volume for the speaker (player.c -
volume_setabs_speaker). The second request is only triggered if the
volume from the first one is not the new master volume. This second
requests adjusts the relativ volume based on the loudest device (new
master volume) (player.c - volume_setrel_speaker). After the second
request the master volume and the relative volumes are correct (range
from 0 - 100 percent and master volume is 100 percent).
MPD and JSON API clients only set the absolute volume which results in
inconsistent master_volume and relative volumes. The added option to
update the master volume in volume_setabs_speaker/volume_setrel_speaker
makes sure the master volume and the relative volumes are correctly set.
2018-05-31 10:49:53 +03:00
chme
3d779e1273
[player] Additional debug logs for speaker volume
2018-05-31 10:49:53 +03:00
ejurgensen
b6e1269cf2
[raop/dacp/player] Support for Airplay speakers to register volume updates
...
Implements Active-Remote, which is sent to the speaker, so it can use this
to tell us who it is when it makes dacp request with a device-volume update.
2018-05-27 16:12:20 +02:00
ejurgensen
646bf37f17
[dacp] Add support for play + stop commands
...
These commands are not used by Remote, but some Airplay speakers are
able to make them (e.g. my Sony STR-DN1040).
Also prepare being able to set the device volume property.
2018-05-14 23:09:04 +02:00
ejurgensen
05c935a7b7
[main] mdns announce dacp so that speakers can use it for playback control
...
See issue #531
2018-05-14 22:00:35 +02:00
ejurgensen
f5d7477ddb
Merge pull request #530 from chme/spotify_rework
...
Allow playing arbitrary spotify tracks
2018-05-11 19:12:04 +02:00
ejurgensen
83b6bcebcd
[raop] Use OPTIONS for keep_alive instead of GET_PARAMETER
...
Old Airport Express hangs up if we use GET_PARAMETER (despite announcing support
for it...), and since iTunes seems to use OPTIONS we also do that. We weren't
really using the return value of GET_PARAMETER anyway.
See also comment added to commit d9a67b6dce
2018-05-10 21:46:24 +02:00
chme
c77acbddf2
[artwork] Ignore artwork requests for items with a non persistent id
2018-05-10 07:23:33 +02:00
chme
843fbeb066
[jsonapi] Add non-library uris to the queue
2018-05-10 07:02:15 +02:00
chme
7bab990eb3
[spotify/jsonapi] Expose access token and user country in JSON API
...
spoitfy endpoint
2018-05-10 07:02:15 +02:00
chme
d562cb9b6b
[spotify] Retry playback setup if song is still loading
2018-05-10 07:02:15 +02:00
chme
f108b6b498
[spotify] Support adding arbitrary spotify-uris to the queue
...
Allows adding non-library spotify tracks to be added to the queue. The
path given to queue_add should either be a spotify track, album or
playlist uri.
2018-05-10 07:02:15 +02:00
chme
e6a5168c0d
[spotify] (Re-) add track-relinking for playlists and albums
...
Appending the market parameter got lost in the refactoring and therefor
not track-relinking happend
2018-05-09 22:47:37 +02:00
chme
116f7a0253
[spotify] Log progress of scanning saved albums/playlists
2018-05-09 22:47:37 +02:00
chme
cfc5fef88d
[spotify] Refactor spotify_webapi
2018-05-09 22:47:37 +02:00
chme
eaab6f887b
[spotify] Decoupling of the spotify webapi from libspotify integration
...
Separation of scanning Spotify songs into the library (spotify_webapi.c)
and playing Spotify songs through libspotify (spotify.c).
2018-05-09 22:47:37 +02:00
chme
85257788ba
[jsonapi] Add cache control header to count endpoint and fix
...
not-modified-since check to check against the last db update instead of
last start time
2018-05-09 22:29:52 +02:00
chme
41e99ca3cd
[db/mpd/jsonapi] Include artist and album count in filecount query; add
...
count endpoint and additional metadata to JSON API; remove unused
artist-/album-count queries
2018-05-09 22:29:52 +02:00
chme
ae3e0b6bf5
[httpd] Lower log level if file is not found
2018-04-26 22:20:27 +02:00
ejurgensen
d84818649a
[transcode] Fix for issue #502 , ffmpeg segfault when jpeg encoding
...
For some reason it seems the Docker version of ffmpeg 3.4 uses "optimal"
Huffman tables (despite not being default), which cause ffmpeg to crash
when mjpeg encoder is encoding artwork jpeg's
2018-04-21 23:19:41 +02:00
chme
43745cf5c3
[smartpl.g] Fix memleak in smart playlist parsing with string operators
2018-04-15 22:11:40 +02:00
chme
359d12f4ff
[db] Free order by-clause in playist_info
2018-04-15 22:11:40 +02:00
chme
6ceede44f4
[db] Use default -1 for playlists.query_limit column
2018-04-15 22:11:40 +02:00
chme
f167e975c2
Unify naming of "order by" clause in structs/table
2018-04-15 22:11:40 +02:00
chme
47a79d40f1
[db] Allow fetching playlists if the schema contains more columns than
...
the column map (can happen if there was a minor db version upgrade)
2018-04-15 22:11:40 +02:00
chme
d15018cb99
[httpd/jsonapi] Add cache control headers to some json api endpoints
...
Adds utility functions to httpd.c for checking the request headers for
either an "If-None-Match" or an "If-Not-Modified-Since" headers. If the
header value is found and it matches the current value for the requested
resource, we return early with a http response code 403 (Not Modified).
If the request header value is not present or does not match we add the
current ETag/Last-Modified values to the response headers and process
the request normally.
2018-04-15 22:11:40 +02:00
chme
99a812ad9a
[jsonapi] Add new endpoints for artist/album/playlist/seek
2018-04-15 22:11:40 +02:00
chme
33459bd4ef
[jsonapi] Extend search endpoint to support queries in smartpl language
2018-04-15 22:11:40 +02:00
chme
f1c7672426
[db] Fix total results for album group query
...
The query did not respect the filter and therefor always returned the
number of albums in the library and not the number of albums for the
given query.
2018-04-15 22:11:40 +02:00
chme
6bdcda1524
[db/filescanner] Upgrade database to v19.08 and support limit/order by
...
in smart playlist files
2018-04-15 22:11:40 +02:00
chme
5189fe2305
[smartpl/filescanner] Refactor smart playlist parsing
...
Moves the actual parsing with ANTLR3 out of filescanner.c to allow
future reuse in different context (JSON api)
2018-04-15 22:11:40 +02:00
chme
9708e26dd1
[db] Add support for ORDER BY and HAVING clause in query parameter
2018-04-15 22:11:40 +02:00
chme
84f262401e
[smartpl.g] Add ORDER BY, LIMIT and HAVING to smart playlist grammar
2018-04-15 22:11:40 +02:00
chme
7dd8955a92
[filescanner] Add http stream to the library prior to adding to a
...
persistent playlist
2018-04-15 22:09:28 +02:00
chme
60ebac076b
Refactor adding non library items to the queue
...
Instead of asking a client to first scan the path into a media_file_info
object and afterwards add it to the queue, we now offer a library
function to directly add a path.
The library-source that can handle the given path translates the path
into new queue item(s) and adds them to the queue.
2018-04-15 22:09:28 +02:00
ejurgensen
acd5bd3272
[raop] Always try to get volumes from devices at keep_alive intervals
...
Should be ok, even if the device does not support GET_PARAMETER for
volume, no harm done, we will just stop querying.
2018-04-14 22:19:53 +02:00
ejurgensen
d9a67b6dce
[raop] Use GET_PARAMETER of volume to keep connection alive and get speaker volume
2018-04-11 22:29:07 +02:00
chme
879307f3ac
[smartpl] Support "starts with" operator for string fields
2018-03-17 13:23:48 +01:00
ejurgensen
ea4ea072cd
Merge pull request #499 from chme/jsonapi
...
New endpoints for the JSON api (library, queue)
2018-03-17 09:38:02 +01:00
chme
a78ed20848
[jsonapi] Add new JSON api endpoints
...
Allows
- browsing artists/albums/playlists
- search
- moving a queue item
2018-03-14 19:22:13 +01:00
chme
d1b47465a8
[jsonapi] Disable gzipping response
...
An attempt to improve the performance of the artists and albums
endpoints.
2018-03-14 19:21:57 +01:00
chme
66bdb7c0a9
[db] Add function to get a human readable string for data and media kind
2018-03-14 19:21:57 +01:00
chme
d59e62312a
[httpd] Allow cross origin POST, PUT, DELETE, OPTIONS requests
...
If the web interface is hosted on a different server, this is required
to allow sending e. g. post/put requests to control outputs.
2018-03-14 19:12:20 +01:00
chme
a764fb3c52
[httpd] Serve index.html if requested source is a directory
...
Defaults to an index.html file instead of redirecting to admin.html. It
will not redirect to index.html, but instead serve the file (if exists)
directly. This allows nicer uris in the webinterface.
We will still redirect to admin.html if no index.html is found for
requests to http://ip:port/
2018-03-14 19:12:20 +01:00
ejurgensen
e79beb6877
[httpd_daap] Workaround for Android "Remote for iTunes" requesting playlist 0
...
See issue #505
2018-03-11 22:40:07 +01:00
chme
2b5fa56bf9
[dacp] Add missing call to "db_queue_enum_end" in error case
2018-03-08 21:50:41 +01:00
chme
f47a17e186
[db] Remove unused function "db_queue_get_pos_byfileid"
2018-03-08 21:50:41 +01:00
ejurgensen
50c6d3f272
[db] Silence misleading log error message
...
We were logging a missing lastfm_sk in the admin table as
an error, which it really isn't
2018-03-03 20:13:09 +01:00
ejurgensen
ea6fd1476a
[db] Improve speed of browse queries (issue #478 )
...
Before, we returned either unordered (for RSP, meaning client had to
sort) or ordered by a client selected sort_clause[]. The latter are
multi-purpose and therefore not optimised for browse queries.
To speed up, we predefine the entire set of browse queries, including
order, with matching indices. The predefined queries are used except
if the client explicitly requests a non-default order or query.
As a special bonus, the commit also allows queries with I_SUB that
have an offset but no limit.
2018-03-02 21:11:31 +01:00
ejurgensen
121b812c30
[transcode] Lower log level of "will transcode" messages
2018-03-02 20:51:33 +01:00
chme
cd96ec579a
[db/library] Use "PRAGMA optimize" instead of "ANALYZE"
...
ANALYZE collects and saves statistics even if there were no database
changes and the last collected data is still good.
According to the sqlite3 documentation, it is recommended to use "PRAGMA
optimize" which will call "ANALYZE" if it is necessary. "PRAGMA
optimize" will run "ANALYZE" based on prior queries on the same database
connection. It is recommended to run optimize before closing the
connection.
(see https://www.sqlite.org/lang_analyze.html )
2018-02-26 18:41:28 +01:00
ejurgensen
666af127d5
[raop] Fix gcrypt error handling in raop_verification.c
...
And I learnt that gcrypt doesn't follow the negative-on-error pattern
2018-02-22 22:36:50 +01:00
ejurgensen
c2a563eec7
[main] Remove build date so there will be no complaints about non-producible builds
2018-02-22 22:16:22 +01:00
ejurgensen
f386c13bd9
[pipe] Add forgotten include of config.h
2018-02-22 22:11:42 +01:00
ejurgensen
6a56c19ad5
[pipe] Add forgotten include of pthread
2018-02-22 22:03:37 +01:00
ejurgensen
6c2ee276de
Merge pull request #495 from chme/fixwarnings
...
Fix compiler warnings
2018-02-22 21:52:17 +01:00
ejurgensen
b1c9518a78
[-] Make json-c a required library
...
Already kind of was required, as it was required by Spotify, Chromecast and the web api
2018-02-22 21:49:11 +01:00
chme
30aa4cf525
[db] Fix comments
2018-02-22 21:36:14 +01:00
chme
8b2d40d46f
Initialize local variables to silence OpenWrt compiler warnings
2018-02-22 21:35:38 +01:00
chme
1212723072
[jsonapi] Do not set "DAAP-Server" header in json api response
2018-02-15 19:19:13 +01:00
chme
0e9feac829
[jsonapi] Rework outputs endpoint and strictly match uris by request
...
method
2018-02-15 19:19:13 +01:00
chme
83bb06225b
[misc] Add helper function to check if a key with a given type exists
2018-02-15 19:19:13 +01:00
chme
1379ef235c
[httpd] Support assigning request methods to uri handlers
2018-02-15 19:19:13 +01:00
chme
a98713ba49
[jsonapi] Return proper HTTP status codes
2018-02-11 10:55:11 +01:00
chme
d4b05e98ae
[httpd] Add PUT and DELETE to the allowed http request methods
2018-02-10 10:39:32 +01:00
chme
43887d160f
[mpd] Refactor commands to enable/disable/toggle/volume for outputs
2018-02-10 09:04:18 +01:00
chme
decf9f1329
[player] Add commands to enable/disable output
2018-02-10 09:04:18 +01:00
chme
93879c6f90
[player] Refactor speaker enumerate callback
2018-02-10 09:04:18 +01:00
chme
94fd370df2
[player] Simplify parameter passing to player commands
2018-02-10 09:04:18 +01:00
chme
d36e6ac5ab
[player] Refactor speaker_set/speaker_activate
2018-02-10 09:04:18 +01:00
chme
f2659d995b
[player] Refactor speaker_set/speaker_deactivate
2018-02-07 21:04:47 +01:00
ejurgensen
e70f9623db
[filescanner] Update ffmpeg id3 tag mapping, include grouping tags
2018-01-31 21:46:17 +01:00
ejurgensen
0b3f4dfa15
[transcode] Ignore some errors from avcodec_send_packet(), fixes #483
...
Since the stream can at least in some cases be transcoded anyway
2018-01-26 22:37:28 +01:00
Scott Shambarger
49c88a9cc5
[configure] Fixed make distcheck
2018-01-25 21:52:20 -08:00
ejurgensen
c23f2c01b2
[scan] Fix bugs related to iTunes XML playlists
...
1) They would get disabled after rescan
2) Playlists and playlistitems didn't get cleaned up
2018-01-25 22:26:00 +01:00
ejurgensen
e1fb3607e9
[scan] Treat playlists with mtime==db_timestamp as modified + better virtual_path for iTunes XML playlists
...
Should fix a problem where saving a playlist with gedit was not picked up by forked-daapd as a modification
2018-01-24 21:36:50 +01:00
ejurgensen
4000d15778
[main] Add cmd line options to disable mdns announcements + update man page
2018-01-14 19:46:19 +01:00
chme
18a6372fb1
[dbperf] Use sqlite3_trace_v2 instead of deprecated sqlite3_profile
...
Set log severity depending on how long the query was running and return
early if log level is lower than the current one.
2018-01-13 11:05:58 +01:00
chme
c747456880
[logger] Expose log severity
2018-01-13 10:51:48 +01:00
ejurgensen
4da45bdfab
[httpd] Parser should allow queries that are not key/value
...
E.g. http://prem3.di.fm:80/progressive_hi?my_premium_key
2018-01-08 20:13:05 +01:00
ejurgensen
45d193e56c
[scan] Use open()/close() instead of euidaccess() to support ACL's
...
Fixes #474
2018-01-06 20:10:34 +01:00