Commit Graph

3934 Commits

Author SHA1 Message Date
ejurgensen
55d5289c05 [player] Add settings for persisting repeat, shuffle and consume
Closes issue #963
2020-07-24 20:15:03 +02:00
ejurgensen
3245b81e60 [settings] Add shorthand macros for getting/setting options 2020-07-24 20:15:03 +02:00
whatdoineed2do/Ray
d567bd004a [db,conf,json] new backup endpoint 2020-07-24 20:07:42 +02:00
ejurgensen
a71444d3e1 [player] Limit auto reconnection + add option for user override
With this commit auto reconnection per default will only be done for ATV4s and
HomePods. Reconnection is not always desirable, for instance if the device cuts
the connection because it is busy with something else, ref. issue #934.

The commit also adds an option to override auto reconnection, thus either
enabling it for other devices or disabling it for affected devices.
2020-07-24 00:10:26 +02:00
ejurgensen
e8bdcd2365 [xcode] Use ffmpeg's "image2pipe" muxer instead of "image2"
With ffmpeg 4.3 it seems image2 no longer works for non-file output, so use
image2pipe instead.

Closes #1061
2020-07-19 23:52:42 +02:00
ejurgensen
d0a7d5114b [http] Drop own Shoutcast metadata requestor, rely on ffmpeg now
ffmpeg/libav has been capable of this since approx 2016, so the fallback
functions can be dropped now.

Also means we don't add automatically add Icy-MetaData: 1 to request
headers any more.
2020-07-17 00:08:16 +02:00
ejurgensen
3e707c4060 [http] Make libcurl a hard requirement
Always using libcurl makes the code simpler, plus makes sure we always have a
https client
2020-07-16 23:30:05 +02:00
ejurgensen
941fb47c1d [player] Only resurrect speakers that fail during playback
Fix bug where we would resurrect speakers, incl restart playback, if the speaker
disconnected after a flush.

Closes #1057
2020-07-16 23:08:58 +02:00
ejurgensen
c4d6e1c251 [raop] Extra logging of invalid retransmit headers 2020-07-16 21:30:48 +02:00
whatdoineed2do/Ray
c6c1e8f9ee [alsa] dump_card() includes ALSA device name
Include ALSA's device name in the ALSA modules 'info' logging to help
identify sound devices as seen by the system for assisting config setup

Many configs use ALSA's hw ids to refer to device but ALSA can also use
device names:

    laudio: Available ALSA playback mixer(s) on hw:0 CARD=Intel (HDA Intel): 'Master' 'Headphone' 'Speaker' 'PCM' 'Mic' 'Beep'
    laudio: Available ALSA playback mixer(s) on hw:1 CARD=E30 (E30): 'E30 '

From the example above can use these ALSA names interchangably:
    'hw:0' and 'hw:Intel'
    'hw:1' and 'hw:E30'
2020-07-14 21:55:46 +01:00
ejurgensen
67f16138c5 [pipe] Change int64_t print mask for log message
Removes compiler warning
2020-07-05 20:59:03 +02:00
ejurgensen
5e60527f40 [spotify] Add an API endpoint for logging out of Spotify 2020-07-05 20:43:51 +02:00
ejurgensen
1b74966ef1 [db] Remove HAVE_SPOTIFY_H conditionals, not required
The db functions don't depend on the Spotify library, so remove conditionals
2020-07-05 20:43:51 +02:00
Christian Meffert
3fd812ef2f
Merge pull request #1008 from chme/web_next
Player web interface v0.7.2
2020-07-05 10:59:15 +02:00
Christian Meffert
0e8e8564bb
Merge pull request #1042 from chme/player-prev-next
[player/jsonapi] Do not report error on skip next/prev if end/start of queue is reached
2020-07-05 10:58:50 +02:00
Christian Meffert
07f3f808c7
Merge pull request #1041 from chme/ws-header-space
[ws] Set websocket header data space
2020-07-05 10:57:54 +02:00
Christian Meffert
db51d59be4
Merge pull request #995 from whatdoineed2do/json-add-by-query-with-limit
[jsonapi] support 'limit' on 'api/queue/items/add?expression='
2020-07-03 20:09:00 +02:00
chme
56564dec87 [ws] Set header data space to 4096
Hopefully fixes the "LWS Ran out of header data space" error seen in the
Chrome browser.
2020-07-03 09:53:39 +02:00
chme
9616cfdf0c [jsonapi] harmonize "channels" attribute in queue item and track object 2020-07-01 07:32:12 +02:00
ejurgensen
a2ec7ee28f [outputs] Fix gcc 10 complaining about multiple definitions
outputs_master_volume, output_device_list and output_buffer were defined in
outputs.h, but should only have been declared with extern.

Solve it by making output_buffer static/non-global (wasn't used anyway), and
the two others are now returned by functions.
2020-06-29 00:19:03 +02:00
ejurgensen
69fbd7b32a [library] Fix gcc 10 warning
And avoid a year 10000 doomsday
2020-06-28 23:23:52 +02:00
chme
8e333c7978 [player/jsonapi] Do not report error on skip next/prev if end/start of
queue is reached
2020-06-28 11:56:51 +02:00
whatdoineed2do/Ray
dd2ee019a8 [streaming] drop client mp3 streaming connections if libav has mp3 encode 2020-06-11 13:11:12 +01:00
ejurgensen
8046f13698 [outputs] Fix issue where speaker becomes unselected after pause (flush) 2020-05-30 21:31:27 +02:00
ejurgensen
5d22f11b0e [player/outputs] Fix for speaker selection and volume adj (closes #1011)
* Make sure that vol_adjust() bases adjustments on the same speakers that the
  user sees as active
* If a speaker fails during activation we unselect it, so that we don't keep
  trying to start it, so we find a new master volume if required, and so it is
  possible for the user to reselect it.
2020-05-27 23:02:29 +02:00
ejurgensen
a9a6f4b584 [outputs] Check for session in outputs_device_authorize() 2020-05-27 23:02:29 +02:00
ejurgensen
384b1171d9 [raop] Change device verification so we don't risk stale sesssions
Before, if a user never verified the device, we would have a device->session
even though the device was not streaming and was in a failed state.

This solution should be more clean and in line with the overall principle that
we only have a session when communicating with the device.

Also includes a bit of code refactoring.
2020-05-27 23:02:29 +02:00
ejurgensen
138d482510 [dummy] Add capability to mock device verification for testing 2020-05-27 23:02:29 +02:00
ejurgensen
d6ec6afb5b [outputs] Remove outputs_authorize()
Replaced by outputs_device_authorize()
2020-05-26 23:21:06 +02:00
ejurgensen
3cca778419 [player] Stop using outputs_authorize() so it can be removed
Use outputs_device_authorize() instead
2020-05-26 23:20:29 +02:00
ejurgensen
d18e49f59b [jsonapi] Make PUT /api/outputs/x capable of device verification 2020-05-26 22:46:49 +02:00
ejurgensen
18e75c2445 [player] Add player_speaker_authorize()
A more straightforward function for device verification, using the new
outputs_device_authorize() function.
2020-05-26 22:45:38 +02:00
ejurgensen
2fa2d33602 [outputs] Add a more standard device authentication function
outputs_authorize() has two issues, one that the caller can't specify device
(problem if there are two devices waiting for verification), the other that it
didn't offer a standard callback, so difficult to catch failure/success.
2020-05-26 22:42:06 +02:00
ejurgensen
9308f81224 [player] Get rid of listener notifications direct from outputs
Try to consolidate in player.c
2020-05-25 22:43:08 +02:00
ejurgensen
010185eab5 [player] Another way of implementing commit 3b033e48 2020-05-25 22:43:04 +02:00
ejurgensen
3b033e48ee [player] Consolidate listener handling in one player trigger - wip
The goal is to make the listener invokation more unified and less ad hoc. Also
reduce risk of blocking/deadlocking player thread.
2020-05-25 22:42:22 +02:00
ejurgensen
3885b92111 [worker] Remove not-so-useful log message 2020-05-25 22:42:22 +02:00
ejurgensen
38ed9e59ad [listener] Update so that comments etc match actual use 2020-05-25 22:42:22 +02:00
ejurgensen
37521406f3 [input] Split file_http.c input into file.c and http.c
The common code is by now limited, and there is a lot of http-specific code.
2020-05-19 23:06:36 +02:00
ejurgensen
8acb2a647d [http] Don't set ICY metadata if they are just empty strings
An empty string will mean that m3u tags won't get used (unless m3u_override is
configured), but they should be used, since they are probably better than an
empty string.
2020-05-19 23:06:36 +02:00
ejurgensen
a69cc65ff6 [input] Download StreamUrl resource async so input thread is not blocked 2020-05-19 23:06:36 +02:00
ejurgensen
28df2fb0f9 [input] Extra comment 2020-05-19 23:06:36 +02:00
ejurgensen
552c201cf3 [artwork] Change cache strategy for artwork_url_get
Credit @sfeakes
2020-05-19 23:06:36 +02:00
ejurgensen
b44e5b3ede [input] Add handler/parser for StreamUrl tags 2020-05-19 23:06:36 +02:00
ejurgensen
ca82857bfe [artwork] Add artwork_extension_is_artwork() + some fixup/renaming 2020-05-19 23:06:36 +02:00
ejurgensen
d2ac216f47 [http] Change name of struct field for StreamUrl
Should not be called artwork_url, since it also can link to other ressources.

Also some fixup, e.g. use new macros.
2020-05-16 00:13:31 +02:00
ejurgensen
d073781445 [json] Add endpoint to delete a setting (reset to defaults) 2020-05-16 00:13:10 +02:00
ejurgensen
bb434297ca [artwork] Be more forgiving towards incorrect mime content-types 2020-05-15 23:10:43 +02:00
ejurgensen
360e46683b [input] Add a simple input for testing timing 2020-05-12 22:25:38 +02:00
ejurgensen
e570cbdcbd [player] Use input progress metadata to update clients
Before, we were ignoring progress metadata, and we were also updating clients
and db too early with input metadata (right when read from the input, instead of
waiting until playback (speakers) were at that position.

This change adds a complicated async chain of events from when the update is
received.
2020-05-12 20:16:15 +02:00