Commit Graph

4295 Commits

Author SHA1 Message Date
ejurgensen
6ade24c935 [xcode] Support for user-configured ffmpeg filters
Closes #1583 and #290
2023-02-25 16:48:17 +01:00
ejurgensen
2272f99599 [artwork] Fix for --disable-spotify broken in commit c8e46aa 2023-02-06 22:59:27 +01:00
ejurgensen
070cf6a5fc [spotify] Some cleanup of webapi client 2023-02-06 22:38:44 +01:00
ejurgensen
eee011180f [spotify] Make web api client thread safe
Protect http_session with a lock and don't use mutating globals in utility
functions where it is less clear if they are protected.
2023-02-06 22:38:44 +01:00
ejurgensen
c8e46aad42 [artwork] Make Spotify online artwork getter thread safe
By making the global struct online_source's read-only. Before, the Spotify
handler was modifying auth_secret in a non-thread safe way.
2023-02-06 22:38:44 +01:00
ejurgensen
8b6336b91d [xcode] Protect against memleak if future ffmpeg doesn't free options
Can happen if ffmpeg doesn't recognize all the options
2023-02-05 17:14: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
c23c2fdc45 [httpd] Addendum to commit 017e09d: More fixing up of libevent warnings 2022-12-26 17:16:58 +01:00
ejurgensen
017e09d7c3 [httpd] Fix evhttp_connection_get_peer() const char warning for newer libevent 2022-12-25 20:09:38 +01:00
ejurgensen
b70188f4b8 [spotify] Fix commit 5e7bf182 to avoid picking too large images 2022-12-21 23:29:44 +01:00
ejurgensen
5e7bf1826c [spotify] Fix poor artwork resolution on playback from playlist start
Closes #1559
2022-12-21 17:39:41 +01:00
whatdoineed2do/Ray
7d26c2c954 [db,scan,jsonapi] bug fix to handle date_released before 1970, storing -ve values in db 2022-12-13 17:38:07 +00:00
ejurgensen
7c0474b743 [player] Don't stop/clear queue on speaker 'prevent-playback' or 'busy'
When 'prevent-playback' or 'busy' is sent by a single playing speaker, we just
want to pause playback and not clear the queue

Closes #1553
2022-11-20 22:38:33 +01:00
ejurgensen
d468fd358e [spotify] Select best artwork size even when not ordered descending
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.
2022-10-30 20:31:58 +01:00
ejurgensen
1379914857 [xcode] See if we can do without asking decoder for specific sample rate/channels
We use filters now, so shouldn't be necessary.

request_sample_fmt and request_channel_layout was added with commit 73b2d08.
2022-10-26 17:22:41 +02:00
ejurgensen
684f55f603 [xcode] Align how ffmpeg API checks are done 2022-10-26 17:22:41 +02:00
ejurgensen
4ff850cd3d [xcode] A bit of refactoring 2022-10-26 17:22:29 +02:00
ejurgensen
e437e41870 [airplay] Add WWW authentication for Airplay 2
Some speakers (e.g. Homepod) that are configured to require password want that
this is used both for pairing authentication and classic WWW Authentication.

This commit adds the WWW Authentication that is also used for Airplay 1.

Closes #1545.
2022-10-15 00:30:31 +02:00
whatdoineed2do
94c28386a6
[xcode] Use ffmpeg ch_layout instead of deprecated channel_layout/channels (#1536)
Co-authored-by: whatdoineed2do/Ray <whatdoineed2do@nospam.gmail.com>
2022-10-06 17:09:01 +02:00
whatdoineed2do/Ray
48526c2ab7 [dacp] bug fix - play item from 'up next' when stopped 2022-09-03 01:32:01 +02:00
ejurgensen
c1373394a8 [mdns] Add log hint about Avahi not running if adding browser fails
Ref issue #1529
2022-08-21 10:21:22 +02:00
ejurgensen
3cbb95976a [airplay] Add support for password based authentication
Closes #1527
2022-08-15 20:09:54 +02:00
ejurgensen
31ab97595e [smartpl] Support larger smart playlists (fixes #1521) 2022-08-08 17:42:54 +02:00
ejurgensen
1725d5cef6 [mdns] If configured, use bind_address to set network interface
Otherwise keep using AVAHI_IF_UNSPEC. Resolves #1519.
2022-07-14 21:29:21 +02:00
ejurgensen
3754871c73 [misc] Add utility function to get interface name from IP address 2022-07-14 21:12:58 +02:00
ejurgensen
680c27eb66 [mdns] Fix possible crash after Avahi restart (fixes #1509)
Necessary to clear the resolver list on client restart, since especially
r->resolver becomes invalid when mdns_client is freed.

Also drop freeing of libevent watches and timers on deinit, it is not
necessary, Avahi will do it.
2022-07-14 21:00:34 +02:00
ejurgensen
0bde7acce8 [smartpl] Fix parsing of CRLF and "NOT (" (closes #1502) 2022-06-28 20:46:20 +02:00
ejurgensen
8f9f311bdf [dacp] Fix AirPlay speakers turning on by themselves (closes #1487)
Affects Denon speakers and possibly others
2022-06-06 10:20:40 +02:00
Christian Meffert
ffcde46140
Merge pull request #1484 from chme/fix/consume-repeat
[player] Turn repeat mode off when activating consume mode
2022-06-03 07:51:37 +02:00
chme
9340443a3b [spotify] Remove "Spotify saved" playlist
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.
2022-06-03 07:06:17 +02:00
chme
efb9ba7767 [spotify] Additional cleanup of functionality only used with libspotify
- 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.
2022-06-03 07:06:17 +02:00
ejurgensen
02078212ac [httpd] Better log message when Spotify OAuth fails 2022-06-02 19:58:51 +02:00
chme
63bede3ee9 [player] Turn repeat mode off when activating consume mode and vice
versa
2022-05-28 09:42:07 +02: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
d4a2b11c3e [spotify] Slightly improved version of recent commit 79fb65f 2022-05-24 20:34:45 +02:00
hgy59
30f33b1b1d mdns_init: avoid null reference access
- when avahi client creation fails with mdns_client=null, use avahi_strerror(error) instead of MDNSERR
  to avoid access to mdns_client->error.
2022-05-22 20:56:49 +02:00
ejurgensen
79fb65fbd8 [spotify] Fix for "Premium account required" (issue #1474)
Sadly user-agent spoofing seems to be necessary after Spotify sunset of
libspotify. Apparently librespot is whitelisted.
2022-05-17 23:31:30 +02:00
whatdoineed2do/Ray
5cebf4aca2 [smartpl] add 'file_size' 2022-05-13 15:27:02 +01:00
whatdoineed2do/Ray
4418803aba [db,jsonapi] add file_size to count query 2022-05-13 09:51:06 +01:00
whatdoineed2do
670ac7745d
[rcp] bug fix - speaker unselection upon restart / obey volume (#1459) 2022-05-08 14:09:59 +02:00
ejurgensen
c90a1c17e3 [-] Fix deprecated GCRY_THREAD_OPTION_PTHREAD_IMPL and GCRYCTL_SET_THREAD_CBS
Looks like libgcrypt uses platform standard threading instead of asking caller
for a threading package/callbacks.
2022-05-08 10:04:58 +02:00
whatdoineed2do/Ray
b54a963f3a [web] typo prevent handling of LISTENER_SPEAKER events 2022-05-07 11:12:22 +01:00
Christian Meffert
6dbd90ad7f
Merge pull request #1461 from whatdoineed2do/player-missing-listener-event-on-device-fail
[player] send volume event when a device fails
2022-05-07 08:24:45 +02:00
chme
d277f7c7b3 [http/spotify] Add support for http sessions across multiple requests
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).
2022-05-01 09:01:23 +02:00
whatdoineed2do/Ray
b5bb0bd7f2 [player] send volume event when a device fails - without this the webui does not know that an output device failing, volume/selected status remains 2022-04-29 22:00:03 +01:00
whatdoineed2do/Ray
7d525e4dec [rcp] bug fix on deinit() - the rcp_session_cleanup() adv the head of list so no need to do again in deinit loop 2022-04-24 15:04:23 +01:00
Christian Meffert
7598a71aea
Merge pull request #1444 from chme/feat/jsonapi-pl-item-count
[jsonapi] Add item and stream count to playlists, expose config option "radio_playlists"
2022-04-08 17:44:02 +02:00
Christian Meffert
176142f311
Merge pull request #1445 from whatdoineed2do/websocket-slow-shutdown
[web] slow 4.1.6 shutdown; request to cancel ws loop
2022-04-06 17:27:38 +02:00
whatdoineed2do/Ray
f33ccb9238 [web] slow 4.1.6 shutdown; request to cancel ws loop 2022-04-06 11:18:48 +01:00