The change removes all direct calls to mxml from the modules that need an XML
parser (lastfm.c, pipe.c, rssscanner.c and httpd_rsp.c).
Even with the help of mxml, reading XML is hard, so a layer is added which
helps deal with stuff like whitespace and CDATA. This should make OwnTone more
resilient to any XML variations it might receive.
The changes fixes issue #1677.
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
Spotify web API docs say that images are ordered wideest first, but that isn't
happening right now, so don't rely on that for size selection.
Also makes sure we pick an image even when max_w is smaller than smallest
available image.
This special playlist was previously required to keep track of saved
albums tracks to avoid purging them after a rescan, since then the
rescan logic was changed to use the Spotify web api and this playlist
has no use anymore.
- Remove playlist commands only used by libspotify: adding / removing
playlist command was used by the callbacks from libspotify to receive
incremental updates (did not work for some time)
- Remove "login" web api endpoint: no login into libspotify is required
any more. Spotify web api authorization follows the OAuth flow.
This change allows to reuse curl handles for multiple requests.
Reusing a curl handle improves performance if more than one request is
made against a service (connection, session cache, dns cache are kept
between requests).
(db upgrade to v22.00)
`scan_kind` identifies the library "scanner" component that created the
item and is responsible to keep it up to date (rescan).
The library update now supports passing a `scan_kind` to update only the
items of one particular "scanner". This allows e. g. to only update the
item from the Spotify library or only update the RSS feeds.
The OwnTone database is upgraded to v22.00 and the `scan_kind` columns
in `files`, `playlists`, `directories` are identified by:
1. Check if item is part of a RSS playlist (podcast RSS feed), they
belong to the "rssscanner"
2. Check if item has a Spotify `virtual_path`, they belong to the
"spotifyscanner"
3. Remaining items belong to the "filescanner"
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.
Caused by queue_item_add returning >0 as success, but caller is expecting ==0.
Try to avoid other occurancess of this issue by generally checking for error
("ret < 0") instead.