Commit Graph

18 Commits

Author SHA1 Message Date
ejurgensen 783f918c5e [mpd] Refactor commit 9962c743 and other stuff in mpd.c 2024-09-16 21:17:32 +02:00
gd e1628ff1a9 [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.
2024-09-16 21:17:32 +02:00
Fabian Groffen 8f3c99ec43 [mpd] add option enable_httpd_plugin
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
2024-08-10 20:38:41 +02:00
ejurgensen be1bacf278 [cfg] Add "none" as "trusted_networks" option 2024-07-05 16:00:47 +02:00
ejurgensen c079df5da7 [cache/config] Refactor cache so daap/artwork/xcode is cached in separate db's
Also change config so that the user can just configure a data directory instead
of complete path to each database.
2024-06-17 22:25:20 +02:00
ejurgensen aed74fbb8a [xcode] Support for ALAC encoded RSP/DAAP streaming
Also changes WAV encoding to use source quality instead of fixed 44100/16/2.
Sets the default to WAV, since it has the best quality, and doesn't have the
delay that creating an MP4 container for ALAC currently has (TODO prepare
the headers to avoid the delay).

Ref issue #1182 and #1665
2024-06-17 22:05:07 +02:00
ejurgensen c30f44fd01 [misc] New net_peer_address_is_trusted with cfg set default to "lan"
New default for "trusted_networks" = "lan". This will check peer addresses
against the addresses/netmasks of the interfaces to establish whether the peer
is local.

Fixes #1754
2024-06-16 01:17:11 +02:00
ejurgensen 2bb97c8e0a [cfg] Change ipv6 default to disabled
There is some issue with OwnTone's Airplay ipv6 implementation so disable ipv6
in the config until it is fixed.

Ref issue #1752
2024-05-20 22:21:00 +02:00
whatdoineed2do 2dc448fa30
[scan/library] Media rating sync (#1681)
Automatically read/write ratings to files in the library, if options read_rating/
write_rating are enabled. Also adds a max_rating so the user can set the rating
scale.

Doesn't sync automatic rating updates, because that could lead to whole-playlist
file rewriting.

Closes #1678 

---------

Co-authored-by: whatdoineed2do/Ray <whatdoineed2do@nospam.gmail.com>
Co-authored-by: ejurgensen <espenjurgensen@gmail.com>
2024-01-24 23:30:02 +01:00
ejurgensen d266c8a56f [raop] Make compressed ALAC default, but with a config option
Closes #1656
2023-10-06 21:39:26 +02:00
ejurgensen 6ade24c935 [xcode] Support for user-configured ffmpeg filters
Closes #1583 and #290
2023-02-25 16:48:17 +01:00
ejurgensen af07f9eeb4 [scan] Changes to commit 9a3cb3b7
* 'split_genre' -> 'only_first_genre' + changed description
* fix memleak on multiple genre tags
2022-12-29 20:07:30 +01:00
whatdoineed2do/Ray 0c43de9735 [scan] option to use first genre on multi token genres
multiple genres are either supported by format (see flac/orbis) or are
handled by convention (see mp3) - ffmpeg presents either case as a
single string, seperated by ';' (ie "Pop;Rock")

Currently the server/db does not support multiple genres and will store
the ffmpeg string as-is which is unlikely the user intention.

Introduce 'split_genre' to take the first genre token
2022-12-29 20:07:30 +01:00
ejurgensen 0ca02687bd [spotify] Remove old libspotify integration
No longer works, libspotify has been sunset by Spotify
2022-05-25 22:49:35 +02:00
ejurgensen 92279ef33d [library] Move clear_queue_on_stop_disable cfg option to library section
Resolves #1430
2022-03-17 22:44:06 +01:00
whatdoineed2do/Ray 8f722faaf2 [outputs] new output: RCP/Roku/SoundBridge devices
Roku SoundBridge devices can be treated as dumb speakers; they offer a
texted based protocol, RCP, that allows the server to request the Roku
device to connect to the server's stream.mp3 and provides ability to
control volume

Roku devices appear as speakers automatically via mDNS announcements on
the server _roku-rcp._tcp
2022-02-05 21:59:00 +00:00
ejurgensen 6f0fef6179 [spotify] Reintroduce libspotify support, change spotifyc to librespot-c
Select use of either libspotify or librespot-c as streaming backend via config
option.

librespot-c (renamed/improved spotifyc) impl has the following:
- sync interface
- seek support
- honor bitrate config, set client and thread name
- use web access token with "streaming" scope for login
- fix issue with podcast playback

Also say goodbye to file-based Spotify login.
2021-05-31 23:24:58 +02:00
ejurgensen f61665b81d [-] Rename source and target names from forked-daapd to owntone 2021-04-24 23:54:20 +02:00