4481 Commits

Author SHA1 Message Date
Christian Meffert
aab6f6c718 [logger] Support logging with logfmt format 2025-02-25 20:08:11 +01:00
ejurgensen
4980218fc5 [spotify] Import version 0.5 of librespot-c 2025-02-24 19:58:09 +01:00
ejurgensen
038c741052 [spotify] Set the new protocol as experimental and fallback, old one as default 2025-02-23 23:43:51 +01:00
ejurgensen
2547336576 [spotify] Retry fix for connection retry 2025-02-23 23:27:50 +01:00
ejurgensen
aab49945d4 [misc] Distinguished logging of errors from getaddrinfo() 2025-02-23 23:27:50 +01:00
ejurgensen
b5977b5633 [spotify] Fix for connection retry during login 2025-02-23 23:27:50 +01:00
ejurgensen
3f9e400dbd [spotify] Import version 0.4 of librespot-c and remove password-based login
Experimental version to test new protocol
2025-02-23 23:27:49 +01:00
Christian Meffert
9b56727361
[spotify] Fix possible deadlock during Spotify scan (#1859) 2025-02-20 07:13:55 +01:00
ejurgensen
d64c30b5ab [logger] Fix more compile warnings on e.g. ARMv7 (ref #1863) 2025-02-18 20:17:59 +01:00
ejurgensen
200d9abc43 [logger] Fix compile warnings on e.g. ARMv7 (closes #1863) 2025-02-18 19:30:30 +01:00
Christian Meffert
5acf9dd336 [db] Add thread name/id to db wait unlock 2025-02-16 23:51:06 +01:00
Christian Meffert
5fec4bbe34 [logger] Add thread name and thread id to log messages 2025-02-16 23:51:06 +01:00
Alain Nussbaumer
c72dc48b1d [api] Stop playback once last item is removed from the queue 2025-02-16 12:37:58 +01:00
ejurgensen
792e04b47d [artwork] Allow longer tokens in auth headers towards online sources
Fixes "Cannot make request for online artwork, auth header is too long" error
2025-02-11 16:44:47 +01:00
ejurgensen
71d48452d8 [mpd] Fix bug in 28.11 (and .10?) where "mpc enable/disable" toggles
Fixes #1847
2025-02-05 09:16:26 +01:00
ejurgensen
591a0b6b83 [spotify] Allow for longer tokens (fixes #1846) 2025-02-04 19:39:25 +01:00
Christian Meffert
7760554cb7 [lbrainz] Add ListenBrainz integration
- Support submitting listens (scrobble) to ListenBrainz.
- Add JSON API endpoints to manage ListenBrainz auth token.
2025-02-01 14:25:45 +01:00
Christian Meffert
9283d0c3c2 [http] Make output_body (request body) in http_client_ctx "const" and delete unused fields 2025-02-01 14:25:10 +01:00
Christian Meffert
9fbd07a75d [db] Add cli parameter to overwrite path to SQLite extension
This will allow pointing to the locally build (and not installed) owntone SQLite extension during development and local testing.
2025-01-22 20:27:34 +01:00
Christian Meffert
a2d56df416 [httpd] Fix infinite loop with more than one ws connection 2025-01-22 20:27:34 +01:00
Christian Meffert
a454f062bb [web] Implement libevent ws in httpd_libeventhttp, address thread safety 2025-01-22 20:27:34 +01:00
Christian Meffert
91175dc905 [listener] Support passing context arg to listener callbacks 2025-01-22 20:27:34 +01:00
Christian Meffert
eca99f120a [httpd] libevent proxy handling changes with libevent >= 2.2 2025-01-22 20:27:34 +01:00
Christian Meffert
a3ab301cff [web] Support libevent as WS server instead of libwebsockets
If libevent >= 2.2 is detected during configure and "websocket_port" == 0 in the config file, the libwebsocket implementation is disabled and instead the libevent http server offers the websocket connection. The connection to the websocket is then done with the path "/ws".
2025-01-22 20:27:34 +01:00
ejurgensen
c7432e6bca [settings] Move two settings to artwork category
show_cover_artwork_in_album_lists and streamurl_ignore. Ref #1829.
2025-01-22 20:26:06 +01:00
ejurgensen
410d3a0cfa [http] Implement setting to ignore StreamUrl
Some radio stations send garbage in the ICY StreamUrl tag, ref issue #1829.
2025-01-22 20:26:06 +01:00
ejurgensen
76b5da0f0d [settings] Make settings convenience macros more convenient 2025-01-22 20:26:06 +01:00
ejurgensen
f986eedb25 [artwork] Fix concurrency issues with online search and artwork retrieval 2025-01-22 20:26:06 +01:00
ejurgensen
464f87a8db [artwork] Don't make online artwork searches if artist/album starts with "unknown" 2025-01-22 20:26:06 +01:00
ejurgensen
3c98ca7928 [http] Support for extracting artwork url from within StreamUrl field 2025-01-22 20:26:06 +01:00
ejurgensen
1b2c51bc5e [misc] Improve logging of int conversion errors 2025-01-22 20:26:06 +01:00
ejurgensen
1810be023d [json-api] Setting of track attribs time_played/time_skipped and make generic 2025-01-22 20:26:06 +01:00
ejurgensen
40f43840f2 [httpd] Fixup commit 5d7e3dc0 in case NULL isn't zero 2025-01-22 20:26:06 +01:00
ejurgensen
d0ff361ae0 [httpd] Add parameter "no_register_playback" for DAAP/RSP streaming 2025-01-22 20:26:06 +01:00
ejurgensen
9a513e41c7 [json_api] Method for setting skip_count and for setting play_count directly 2025-01-22 20:26:06 +01:00
ejurgensen
72ef58d853 [mpd] Add getvol, bump version to 0.23.0 2025-01-22 20:26:06 +01:00
ejurgensen
5571fa628d [mpc] Support for readpicture and albumart 2025-01-22 20:26:06 +01:00
ejurgensen
df86df02dc [daap] Fix for Apple Music/iTunes not working on Airplay host (attempt 2)
OwnTone selects ALAC for daap streaming because it thinks the client is an Airplay speaker.

Regression in 28.10 coming from PR #1698.

Fixes #1816
2025-01-22 20:26:06 +01:00
ejurgensen
04bca06805 Revert "[daap] Fix for Apple Music/iTunes not working on Airplay host"
This reverts commit 73864e82cd267da65b7245430bd1a2060d8bec81.
2025-01-22 20:26:06 +01:00
ejurgensen
7ed66079f2 [daap] Fix for Apple Music/iTunes not working on Airplay host
OwnTone selects ALAC for daap streaming because it thinks the client is an Airplay speaker.

Regression in 28.10 coming from PR #1698.

Fixes #1816
2025-01-22 20:26:06 +01:00
ejurgensen
3999449c89 [httpd/daap] Improve logging of speaker profile selection 2025-01-22 20:26:06 +01:00
ejurgensen
0483aad095 [mpd] Fix outputs enable/disable/toggle not working in v28.10
Also simplify code by using new speaker index from player and remove some code
duplication.

Regression from PR #1779. Fixes #1814.
2025-01-22 20:26:06 +01:00
ejurgensen
269aed632f [player] Add a index attribute to struct player_speaker_info + a getter 2025-01-22 20:26:06 +01:00
Fabian Groffen
1019b777c3 [mpd] outputs: drop invalid outputsvolume key
This key confuses some clients, and it isn't emitted by MPD, nor
documented to exist:
9ff8e02e54/src/output/Print.cxx

It was added in bdb2c7493, but without explanation why it was added to
outputs command.

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
2025-01-22 20:22:10 +01:00
ejurgensen
d57b7565da [mpd] Add Bison/Flex parser for complex mpd commands + misc
Some of the misc:
* Initialize query_params from the start of each function
* Reduce code duplication by consolidating the handler's integer conversion
* Go back to classic int return types for handlers
* Change list grouping to respond like mpd
* Sanitize all user string output
2025-01-22 20:22:10 +01:00
ejurgensen
08b1b74ddd [mpd] Make protocol version a #define 2025-01-22 20:22:10 +01:00
ejurgensen
40f2bb5d81 [db] free_query_params should also free qp->group
Plus honor qp->order in queue_enum_start() if set by caller
2025-01-22 20:22:10 +01:00
ejurgensen
ed526f7fe3 [mpd] Refactor commit 9962c743 and other stuff in mpd.c 2025-01-22 20:22:10 +01:00
gd
277e5001a0 [mpd] Fix: allow password command when not authenticated 2025-01-22 20:22:10 +01:00
gd
b46a035a2f [mpd,db] MPD protocol fixes to handling of idle/noidle command and command list.
Command handling:
1. Changed mpd_read_cb() to delegate to mpd_process_line() for each received
command line.
2. mpd_process_line() handles idle state and command list state and delegates
to mpd_process_command() to handle each command line.
If the command was successful it sends OK to the client according the the
command list state.
Error responses are sent by mpd_process_command().
3. mpd_process_command() parses the args and delegates to the individual
command handler.

mpd_input_filter:
1. Removed handling of command lists. They are handled by mpd_process_line().
2. Return BEV_OK if there's at least one complete line of input even if there's
more data in the input buffer.

Idle/noidle:
1. Changed mpd_command_idle() to never write OK to the output buffer.
Instead it is the responsibility of the caller to decide on the response.

2. Removed mpd_command_noidle() instead it is handled in mpd_process_line().
If the client is not in idle state noidle is ignored (no response sent)
If the client is in idle state then it changes idle state to false and sends
OK as the response to the idle command.

Command lists:
1. Added command list state to the client context so commands in the list are
buffered and only executed after receiving command_list_end.

Connection state:
1. Added is_closing flag in the client context to ignore messages received
after freeing the events buffer in intent to close the client connection.

Command arguments parsing:
1. Updated COMMAND_ARGV_MAX to 70 to match current MPD.
2. Changed mpd_pars_range_arg to handle open-ended range.

Command pause:
1. pause is ignored in stopped state instead returning error.

Command move:
1. Changed mpd_command_move() to support moving a range.
2. Added db_queue_move_bypos_range() to support moving a range.

Command password:
1. Password authentication flag set in handler mpd_command_password() instead
of in command processor.

Config:
1. Added config value: "max_command_list_size".
   The maximum allowed size of buffered commands in command list.
2025-01-22 20:22:10 +01:00