owntone / owntone-server

Linux/FreeBSD DAAP (iTunes) and MPD audio server with support for AirPlay 1 and 2 speakers (multiroom), Apple Remote (and compatibles), Chromecast, Spotify and internet radio.
https://owntone.github.io/owntone-server
GNU General Public License v2.0
2.09k stars 237 forks source link

Spotify content found but not playable #1325

Closed cdlenfert closed 2 years ago

cdlenfert commented 3 years ago

On occasion search results found in the Owntone Spotify search are unplayable:

The Search http://owntone.local:3689/#/search/spotify?type=track,artist,album,playlist,audiobook,podcast&query=snuff&limit=3&offset=0

I then scroll down and click on the artist result http://owntone.local:3689/#/music/spotify/artists/39Yw8FPJXDJyf5L4vK7TD3

Where I see the albums listed and I click into the "Disposable Income" album and try to play it.

The Result

[2021-10-05 19:52:21] [DEBUG]       db: Running query 'BEGIN TRANSACTION;'
[2021-10-05 19:52:21] [DEBUG]       db: Running query 'SELECT value FROM admin a WHERE a.key = 'queue_version';'
[2021-10-05 19:52:21] [DEBUG]       db: Running query 'DELETE FROM queue where id <> 0;'
[2021-10-05 19:52:21] [DEBUG]       db: Running query 'INSERT OR REPLACE INTO admin (key, value) VALUES ('queue_version', '1639');'
[2021-10-05 19:52:21] [DEBUG]       db: Running query 'END TRANSACTION;'
[2021-10-05 19:52:21] [DEBUG]      mpd: Asynchronous listener callback called with event type 2.
[2021-10-05 19:52:21] [DEBUG]      mpd: Notify clients waiting for idle results: 2
[2021-10-05 19:52:21] [DEBUG]      web: notify callback reason: 11
[2021-10-05 19:52:21] [DEBUG]      web: notify callback reply: 2
[2021-10-05 19:52:21] [DEBUG]   player: Status update - status: 2, events: 16, caller: options_generic_bh
[2021-10-05 19:52:21] [DEBUG]      mpd: Asynchronous listener callback called with event type 16.
[2021-10-05 19:52:21] [DEBUG]      mpd: Notify clients waiting for idle results: 16
[2021-10-05 19:52:21] [DEBUG]      web: notify callback reason: 11
[2021-10-05 19:52:21] [DEBUG]      web: notify callback reply: 16
[2021-10-05 19:52:21] [DEBUG]   player: Player status: stopped
[2021-10-05 19:52:21] [DEBUG]      lib: Add items for path 'spotify:album:65joloGLKCZLuSiOFjNS46' to the queue
[2021-10-05 19:52:21] [DEBUG]  spotify: Spotify token still valid
[2021-10-05 19:52:21] [DEBUG]  spotify: Request Spotify API endpoint: 'https://api.spotify.com/v1/albums/65joloGLKCZLuSiOFjNS46')
[2021-10-05 19:52:21] [ INFO]     http: Making request for https://api.spotify.com/v1/albums/65joloGLKCZLuSiOFjNS46
[2021-10-05 19:52:21] [DEBUG]  spotify: Spotify API endpoint request: 'https://api.spotify.com/v1/albums/65joloGLKCZLuSiOFjNS46'
[2021-10-05 19:52:21] [DEBUG]       db: Running query 'BEGIN TRANSACTION;'
[2021-10-05 19:52:21] [DEBUG]       db: Running query 'SELECT value FROM admin a WHERE a.key = 'queue_version';'
[2021-10-05 19:52:21] [DEBUG]       db: Running query 'SELECT COUNT(*) FROM queue;'
[2021-10-05 19:52:21] [DEBUG]  spotify: Spotify token still valid
[2021-10-05 19:52:21] [DEBUG]  spotify: Request Spotify API endpoint: 'https://api.spotify.com/v1/albums/65joloGLKCZLuSiOFjNS46/tracks?market=US')
[2021-10-05 19:52:21] [ INFO]     http: Making request for https://api.spotify.com/v1/albums/65joloGLKCZLuSiOFjNS46/tracks?market=US
[2021-10-05 19:52:22] [DEBUG]  spotify: Spotify API endpoint request: 'https://api.spotify.com/v1/albums/65joloGLKCZLuSiOFjNS46/tracks?market=US'
[2021-10-05 19:52:22] [  LOG]  spotify: Track not available for playback: 'Snuff' - 'Angels 1-5' (spotify:track:3DfbePSgkjGZf9XkvdEqa1) (restrictions: { "reason": "market" })
[2021-10-05 19:52:22] [  LOG]  spotify: Unexpected JSON: error processing item at index 0 '{ "artists": [ { "external_urls": { "spotify": "https:\/\/open.spotify.com\/artist\/39Yw8FPJXDJyf5L4vK7TD3" }, "href": "https:\/\/api.spotify.com\/v1\/artists\/39Yw8FPJXDJyf5L4vK7TD3", "id": "39Yw8FPJXDJyf5L4vK7TD3", "name": "Snuff", "type": "artist", "uri": "spotify:artist:39Yw8FPJXDJyf5L4vK7TD3" } ], "disc_number": 1, "duration_ms": 230626, "explicit": false, "external_urls": { "spotify": "https:\/\/open.spotify.com\/track\/3DfbePSgkjGZf9XkvdEqa1" }, "href": "https:\/\/api.spotify.com\/v1\/tracks\/3DfbePSgkjGZf9XkvdEqa1", "id": "3DfbePSgkjGZf9XkvdEqa1", "is_local": false, "is_playable": false, "name": "Angels 1-5", "preview_url": null, "restrictions": { "reason": "market" }, "track_number": 1, "type": "track", "uri": "spotify:track:3DfbePSgkjGZf9XkvdEqa1" }' (API endpoint: 'https://api.spotify.com/v1/albums/65joloGLKCZLuSiOFjNS46/tracks')
[2021-10-05 19:52:22] [  LOG]  spotify: Track not available for playback: 'Snuff' - 'The Other Half Of You' (spotify:track:2lu1qLogMx3KTlC1HY6A3q) (restrictions: { "reason": "market" })
[2021-10-05 19:52:22] [  LOG]  spotify: Unexpected JSON: error processing item at index 1 '{ "artists": [ { "external_urls": { "spotify": "https:\/\/open.spotify.com\/artist\/39Yw8FPJXDJyf5L4vK7TD3" }, "href": "https:\/\/api.spotify.com\/v1\/artists\/39Yw8FPJXDJyf5L4vK7TD3", "id": "39Yw8FPJXDJyf5L4vK7TD3", "name": "Snuff", "type": "artist", "uri": "spotify:artist:39Yw8FPJXDJyf5L4vK7TD3" } ], "disc_number": 1, "duration_ms": 150400, "explicit": false, "external_urls": { "spotify": "https:\/\/open.spotify.com\/track\/2lu1qLogMx3KTlC1HY6A3q" }, "href": "https:\/\/api.spotify.com\/v1\/tracks\/2lu1qLogMx3KTlC1HY6A3q", "id": "2lu1qLogMx3KTlC1HY6A3q", "is_local": false, "is_playable": false, "name": "The Other Half Of You", "preview_url": null, "restrictions": { "reason": "market" }, "track_number": 2, "type": "track", "uri": "spotify:track:2lu1qLogMx3KTlC1HY6A3q" }' (API endpoint: 'https://api.spotify.com/v1/albums/65joloGLKCZLuSiOFjNS46/tracks')
[2021-10-05 19:52:22] [  LOG]  spotify: Track not available for playback: 'Snuff' - 'Chocs Away' (spotify:track:5MVfqWabgHWmzGwC87q0vJ) (restrictions: { "reason": "market" })
[2021-10-05 19:52:22] [  LOG]  spotify: Unexpected JSON: error processing item at index 2 '{ "artists": [ { "external_urls": { "spotify": "https:\/\/open.spotify.com\/artist\/39Yw8FPJXDJyf5L4vK7TD3" }, "href": "https:\/\/api.spotify.com\/v1\/artists\/39Yw8FPJXDJyf5L4vK7TD3", "id": "39Yw8FPJXDJyf5L4vK7TD3", "name": "Snuff", "type": "artist", "uri": "spotify:artist:39Yw8FPJXDJyf5L4vK7TD3" } ], "disc_number": 1, "duration_ms": 153773, "explicit": false, "external_urls": { "spotify": "https:\/\/open.spotify.com\/track\/5MVfqWabgHWmzGwC87q0vJ" }, "href": "https:\/\/api.spotify.com\/v1\/tracks\/5MVfqWabgHWmzGwC87q0vJ", "id": "5MVfqWabgHWmzGwC87q0vJ", "is_local": false, "is_playable": false, "name": "Chocs Away", "preview_url": null, "restrictions": { "reason": "market" }, "track_number": 3, "type": "track", "uri": "spotify:track:5MVfqWabgHWmzGwC87q0vJ" }' (API endpoint: 'https://api.spotify.com/v1/albums/65joloGLKCZLuSiOFjNS46/tracks')
[2021-10-05 19:52:22] [  LOG]  spotify: Track not available for playback: 'Snuff' - 'Once Upon A Time Far Far Away' (spotify:track:3CKXrVa7dZRcDuRcqiMOzV) (restrictions: { "reason": "market" })
[2021-10-05 19:52:22] [  LOG]  spotify: Unexpected JSON: error processing item at index 3 '{ "artists": [ { "external_urls": { "spotify": "https:\/\/open.spotify.com\/artist\/39Yw8FPJXDJyf5L4vK7TD3" }, "href": "https:\/\/api.spotify.com\/v1\/artists\/39Yw8FPJXDJyf5L4vK7TD3", "id": "39Yw8FPJXDJyf5L4vK7TD3", "name": "Snuff", "type": "artist", "uri": "spotify:artist:39Yw8FPJXDJyf5L4vK7TD3" } ], "disc_number": 1, "duration_ms": 140186, "explicit": true, "external_urls": { "spotify": "https:\/\/open.spotify.com\/track\/3CKXrVa7dZRcDuRcqiMOzV" }, "href": "https:\/\/api.spotify.com\/v1\/tracks\/3CKXrVa7dZRcDuRcqiMOzV", "id": "3CKXrVa7dZRcDuRcqiMOzV", "is_local": false, "is_playable": false, "name": "Once Upon A Time Far Far Away", "preview_url": null, "restrictions": { "reason": "market" }, "track_number": 4, "type": "track", "uri": "spotify:track:3CKXrVa7dZRcDuRcqiMOzV" }' (API endpoint: 'https://api.spotify.com/v1/albums/65joloGLKCZLuSiOFjNS46/tracks')
[2021-10-05 19:52:22] [  LOG]  spotify: Track not available for playback: 'Snuff' - 'Dehumanised' (spotify:track:5rehbpf64ED9TmvTpLDKGu) (restrictions: { "reason": "market" })
[2021-10-05 19:52:22] [  LOG]  spotify: Unexpected JSON: error processing item at index 4 '{ "artists": [ { "external_urls": { "spotify": "https:\/\/open.spotify.com\/artist\/39Yw8FPJXDJyf5L4vK7TD3" }, "href": "https:\/\/api.spotify.com\/v1\/artists\/39Yw8FPJXDJyf5L4vK7TD3", "id": "39Yw8FPJXDJyf5L4vK7TD3", "name": "Snuff", "type": "artist", "uri": "spotify:artist:39Yw8FPJXDJyf5L4vK7TD3" } ], "disc_number": 1, "duration_ms": 297173, "explicit": true, "external_urls": { "spotify": "https:\/\/open.spotify.com\/track\/5rehbpf64ED9TmvTpLDKGu" }, "href": "https:\/\/api.spotify.com\/v1\/tracks\/5rehbpf64ED9TmvTpLDKGu", "id": "5rehbpf64ED9TmvTpLDKGu", "is_local": false, "is_playable": false, "name": "Dehumanised", "preview_url": null, "restrictions": { "reason": "market" }, "track_number": 5, "type": "track", "uri": "spotify:track:5rehbpf64ED9TmvTpLDKGu" }' (API endpoint: 'https://api.spotify.com/v1/albums/65joloGLKCZLuSiOFjNS46/tracks')
[2021-10-05 19:52:22] [  LOG]  spotify: Track not available for playback: 'Snuff' - '7 Days [Solomon's Boring Week]' (spotify:track:3qp3mQoAymRgW1Sxn1ktBB) (restrictions: { "reason": "market" })
[2021-10-05 19:52:22] [  LOG]  spotify: Unexpected JSON: error processing item at index 5 '{ "artists": [ { "external_urls": { "spotify": "https:\/\/open.spotify.com\/artist\/39Yw8FPJXDJyf5L4vK7TD3" }, "href": "https:\/\/api.spotify.com\/v1\/artists\/39Yw8FPJXDJyf5L4vK7TD3", "id": "39Yw8FPJXDJyf5L4vK7TD3", "name": "Snuff", "type": "artist", "uri": "spotify:artist:39Yw8FPJXDJyf5L4vK7TD3" } ], "disc_number": 1, "duration_ms": 123746, "explicit": false, "external_urls": { "spotify": "https:\/\/open.spotify.com\/track\/3qp3mQoAymRgW1Sxn1ktBB" }, "href": "https:\/\/api.spotify.com\/v1\/tracks\/3qp3mQoAymRgW1Sxn1ktBB", "id": "3qp3mQoAymRgW1Sxn1ktBB", "is_local": false, "is_playable": false, "name": "7 Days [Solomon's Boring Week]", "preview_url": null, "restrictions": { "reason": "market" }, "track_number": 6, "type": "track", "uri": "spotify:track:3qp3mQoAymRgW1Sxn1ktBB" }' (API endpoint: 'https://api.spotify.com/v1/albums/65joloGLKCZLuSiOFjNS46/tracks')
[2021-10-05 19:52:22] [  LOG]  spotify: Track not available for playback: 'Snuff' - 'To Disappoint' (spotify:track:7o63xxq5axpoK9b6MHqvZU) (restrictions: { "reason": "market" })
[2021-10-05 19:52:22] [  LOG]  spotify: Unexpected JSON: error processing item at index 6 '{ "artists": [ { "external_urls": { "spotify": "https:\/\/open.spotify.com\/artist\/39Yw8FPJXDJyf5L4vK7TD3" }, "href": "https:\/\/api.spotify.com\/v1\/artists\/39Yw8FPJXDJyf5L4vK7TD3", "id": "39Yw8FPJXDJyf5L4vK7TD3", "name": "Snuff", "type": "artist", "uri": "spotify:artist:39Yw8FPJXDJyf5L4vK7TD3" } ], "disc_number": 1, "duration_ms": 230240, "explicit": false, "external_urls": { "spotify": "https:\/\/open.spotify.com\/track\/7o63xxq5axpoK9b6MHqvZU" }, "href": "https:\/\/api.spotify.com\/v1\/tracks\/7o63xxq5axpoK9b6MHqvZU", "id": "7o63xxq5axpoK9b6MHqvZU", "is_local": false, "is_playable": false, "name": "To Disappoint", "preview_url": null, "restrictions": { "reason": "market" }, "track_number": 7, "type": "track", "uri": "spotify:track:7o63xxq5axpoK9b6MHqvZU" }' (API endpoint: 'https://api.spotify.com/v1/albums/65joloGLKCZLuSiOFjNS46/tracks')
[2021-10-05 19:52:22] [  LOG]  spotify: Track not available for playback: 'Snuff' - 'Heads You Win Tails You Lose' (spotify:track:7prFzUc884nVP47O73ywQj) (restrictions: { "reason": "market" })
[2021-10-05 19:52:22] [  LOG]  spotify: Unexpected JSON: error processing item at index 7 '{ "artists": [ { "external_urls": { "spotify": "https:\/\/open.spotify.com\/artist\/39Yw8FPJXDJyf5L4vK7TD3" }, "href": "https:\/\/api.spotify.com\/v1\/artists\/39Yw8FPJXDJyf5L4vK7TD3", "id": "39Yw8FPJXDJyf5L4vK7TD3", "name": "Snuff", "type": "artist", "uri": "spotify:artist:39Yw8FPJXDJyf5L4vK7TD3" } ], "disc_number": 1, "duration_ms": 368360, "explicit": false, "external_urls": { "spotify": "https:\/\/open.spotify.com\/track\/7prFzUc884nVP47O73ywQj" }, "href": "https:\/\/api.spotify.com\/v1\/tracks\/7prFzUc884nVP47O73ywQj", "id": "7prFzUc884nVP47O73ywQj", "is_local": false, "is_playable": false, "name": "Heads You Win Tails You Lose", "preview_url": null, "restrictions": { "reason": "market" }, "track_number": 8, "type": "track", "uri": "spotify:track:7prFzUc884nVP47O73ywQj" }' (API endpoint: 'https://api.spotify.com/v1/albums/65joloGLKCZLuSiOFjNS46/tracks')
[2021-10-05 19:52:22] [  LOG]  spotify: Track not available for playback: 'Snuff' - 'Boatnick [So It Goes]' (spotify:track:3aVi6NuGm44w03q4c2k5jZ) (restrictions: { "reason": "market" })
[2021-10-05 19:52:22] [  LOG]  spotify: Unexpected JSON: error processing item at index 8 '{ "artists": [ { "external_urls": { "spotify": "https:\/\/open.spotify.com\/artist\/39Yw8FPJXDJyf5L4vK7TD3" }, "href": "https:\/\/api.spotify.com\/v1\/artists\/39Yw8FPJXDJyf5L4vK7TD3", "id": "39Yw8FPJXDJyf5L4vK7TD3", "name": "Snuff", "type": "artist", "uri": "spotify:artist:39Yw8FPJXDJyf5L4vK7TD3" } ], "disc_number": 1, "duration_ms": 229986, "explicit": false, "external_urls": { "spotify": "https:\/\/open.spotify.com\/track\/3aVi6NuGm44w03q4c2k5jZ" }, "href": "https:\/\/api.spotify.com\/v1\/tracks\/3aVi6NuGm44w03q4c2k5jZ", "id": "3aVi6NuGm44w03q4c2k5jZ", "is_local": false, "is_playable": false, "name": "Boatnick [So It Goes]", "preview_url": null, "restrictions": { "reason": "market" }, "track_number": 9, "type": "track", "uri": "spotify:track:3aVi6NuGm44w03q4c2k5jZ" }' (API endpoint: 'https://api.spotify.com/v1/albums/65joloGLKCZLuSiOFjNS46/tracks')
[2021-10-05 19:52:22] [  LOG]  spotify: Track not available for playback: 'Snuff' - 'Wearenowhere' (spotify:track:55MwXdF71W7sTOsniJjncZ) (restrictions: { "reason": "market" })
[2021-10-05 19:52:22] [  LOG]  spotify: Unexpected JSON: error processing item at index 9 '{ "artists": [ { "external_urls": { "spotify": "https:\/\/open.spotify.com\/artist\/39Yw8FPJXDJyf5L4vK7TD3" }, "href": "https:\/\/api.spotify.com\/v1\/artists\/39Yw8FPJXDJyf5L4vK7TD3", "id": "39Yw8FPJXDJyf5L4vK7TD3", "name": "Snuff", "type": "artist", "uri": "spotify:artist:39Yw8FPJXDJyf5L4vK7TD3" } ], "disc_number": 1, "duration_ms": 101653, "explicit": false, "external_urls": { "spotify": "https:\/\/open.spotify.com\/track\/55MwXdF71W7sTOsniJjncZ" }, "href": "https:\/\/api.spotify.com\/v1\/tracks\/55MwXdF71W7sTOsniJjncZ", "id": "55MwXdF71W7sTOsniJjncZ", "is_local": false, "is_playable": false, "name": "Wearenowhere", "preview_url": null, "restrictions": { "reason": "market" }, "track_number": 10, "type": "track", "uri": "spotify:track:55MwXdF71W7sTOsniJjncZ" }' (API endpoint: 'https://api.spotify.com/v1/albums/65joloGLKCZLuSiOFjNS46/tracks')
[2021-10-05 19:52:22] [  LOG]  spotify: Track not available for playback: 'Snuff' - 'Salad' (spotify:track:6DqahIyr61IdJWLTRNCA2B) (restrictions: { "reason": "market" })
[2021-10-05 19:52:22] [  LOG]  spotify: Unexpected JSON: error processing item at index 10 '{ "artists": [ { "external_urls": { "spotify": "https:\/\/open.spotify.com\/artist\/39Yw8FPJXDJyf5L4vK7TD3" }, "href": "https:\/\/api.spotify.com\/v1\/artists\/39Yw8FPJXDJyf5L4vK7TD3", "id": "39Yw8FPJXDJyf5L4vK7TD3", "name": "Snuff", "type": "artist", "uri": "spotify:artist:39Yw8FPJXDJyf5L4vK7TD3" } ], "disc_number": 1, "duration_ms": 163853, "explicit": false, "external_urls": { "spotify": "https:\/\/open.spotify.com\/track\/6DqahIyr61IdJWLTRNCA2B" }, "href": "https:\/\/api.spotify.com\/v1\/tracks\/6DqahIyr61IdJWLTRNCA2B", "id": "6DqahIyr61IdJWLTRNCA2B", "is_local": false, "is_playable": false, "name": "Salad", "preview_url": null, "restrictions": { "reason": "market" }, "track_number": 11, "type": "track", "uri": "spotify:track:6DqahIyr61IdJWLTRNCA2B" }' (API endpoint: 'https://api.spotify.com/v1/albums/65joloGLKCZLuSiOFjNS46/tracks')
[2021-10-05 19:52:22] [  LOG]  spotify: Track not available for playback: 'Snuff' - 'Lies' (spotify:track:7CZzsj0L8d2CRGZuSRDeM3) (restrictions: { "reason": "market" })
[2021-10-05 19:52:22] [  LOG]  spotify: Unexpected JSON: error processing item at index 11 '{ "artists": [ { "external_urls": { "spotify": "https:\/\/open.spotify.com\/artist\/39Yw8FPJXDJyf5L4vK7TD3" }, "href": "https:\/\/api.spotify.com\/v1\/artists\/39Yw8FPJXDJyf5L4vK7TD3", "id": "39Yw8FPJXDJyf5L4vK7TD3", "name": "Snuff", "type": "artist", "uri": "spotify:artist:39Yw8FPJXDJyf5L4vK7TD3" } ], "disc_number": 1, "duration_ms": 153520, "explicit": true, "external_urls": { "spotify": "https:\/\/open.spotify.com\/track\/7CZzsj0L8d2CRGZuSRDeM3" }, "href": "https:\/\/api.spotify.com\/v1\/tracks\/7CZzsj0L8d2CRGZuSRDeM3", "id": "7CZzsj0L8d2CRGZuSRDeM3", "is_local": false, "is_playable": false, "name": "Lies", "preview_url": null, "restrictions": { "reason": "market" }, "track_number": 12, "type": "track", "uri": "spotify:track:7CZzsj0L8d2CRGZuSRDeM3" }' (API endpoint: 'https://api.spotify.com/v1/albums/65joloGLKCZLuSiOFjNS46/tracks')
[2021-10-05 19:52:22] [  LOG]  spotify: Track not available for playback: 'Snuff' - 'Pages 42-43' (spotify:track:19B3HeS67PbzdSDJ9YQXNe) (restrictions: { "reason": "market" })
[2021-10-05 19:52:22] [  LOG]  spotify: Unexpected JSON: error processing item at index 12 '{ "artists": [ { "external_urls": { "spotify": "https:\/\/open.spotify.com\/artist\/39Yw8FPJXDJyf5L4vK7TD3" }, "href": "https:\/\/api.spotify.com\/v1\/artists\/39Yw8FPJXDJyf5L4vK7TD3", "id": "39Yw8FPJXDJyf5L4vK7TD3", "name": "Snuff", "type": "artist", "uri": "spotify:artist:39Yw8FPJXDJyf5L4vK7TD3" } ], "disc_number": 1, "duration_ms": 274533, "explicit": false, "external_urls": { "spotify": "https:\/\/open.spotify.com\/track\/19B3HeS67PbzdSDJ9YQXNe" }, "href": "https:\/\/api.spotify.com\/v1\/tracks\/19B3HeS67PbzdSDJ9YQXNe", "id": "19B3HeS67PbzdSDJ9YQXNe", "is_local": false, "is_playable": false, "name": "Pages 42-43", "preview_url": null, "restrictions": { "reason": "market" }, "track_number": 13, "type": "track", "uri": "spotify:track:19B3HeS67PbzdSDJ9YQXNe" }' (API endpoint: 'https://api.spotify.com/v1/albums/65joloGLKCZLuSiOFjNS46/tracks')
[2021-10-05 19:52:22] [  LOG]  spotify: Track not available for playback: 'Snuff' - 'Coming Through' (spotify:track:76DeDBGEskNv5YCTAhyLf5) (restrictions: { "reason": "market" })
[2021-10-05 19:52:22] [  LOG]  spotify: Unexpected JSON: error processing item at index 13 '{ "artists": [ { "external_urls": { "spotify": "https:\/\/open.spotify.com\/artist\/39Yw8FPJXDJyf5L4vK7TD3" }, "href": "https:\/\/api.spotify.com\/v1\/artists\/39Yw8FPJXDJyf5L4vK7TD3", "id": "39Yw8FPJXDJyf5L4vK7TD3", "name": "Snuff", "type": "artist", "uri": "spotify:artist:39Yw8FPJXDJyf5L4vK7TD3" } ], "disc_number": 1, "duration_ms": 199293, "explicit": true, "external_urls": { "spotify": "https:\/\/open.spotify.com\/track\/76DeDBGEskNv5YCTAhyLf5" }, "href": "https:\/\/api.spotify.com\/v1\/tracks\/76DeDBGEskNv5YCTAhyLf5", "id": "76DeDBGEskNv5YCTAhyLf5", "is_local": false, "is_playable": false, "name": "Coming Through", "preview_url": null, "restrictions": { "reason": "market" }, "track_number": 14, "type": "track", "uri": "spotify:track:76DeDBGEskNv5YCTAhyLf5" }' (API endpoint: 'https://api.spotify.com/v1/albums/65joloGLKCZLuSiOFjNS46/tracks')
[2021-10-05 19:52:22] [  LOG]  spotify: Track not available for playback: 'Snuff' - 'Emoticon (contains untitled hidden track)' (spotify:track:4LkAsZf4V1fZkNxAQhUxOx) (restrictions: { "reason": "market" })
[2021-10-05 19:52:22] [  LOG]  spotify: Unexpected JSON: error processing item at index 14 '{ "artists": [ { "external_urls": { "spotify": "https:\/\/open.spotify.com\/artist\/39Yw8FPJXDJyf5L4vK7TD3" }, "href": "https:\/\/api.spotify.com\/v1\/artists\/39Yw8FPJXDJyf5L4vK7TD3", "id": "39Yw8FPJXDJyf5L4vK7TD3", "name": "Snuff", "type": "artist", "uri": "spotify:artist:39Yw8FPJXDJyf5L4vK7TD3" } ], "disc_number": 1, "duration_ms": 664520, "explicit": false, "external_urls": { "spotify": "https:\/\/open.spotify.com\/track\/4LkAsZf4V1fZkNxAQhUxOx" }, "href": "https:\/\/api.spotify.com\/v1\/tracks\/4LkAsZf4V1fZkNxAQhUxOx", "id": "4LkAsZf4V1fZkNxAQhUxOx", "is_local": false, "is_playable": false, "name": "Emoticon (contains untitled hidden track)", "preview_url": null, "restrictions": { "reason": "market" }, "track_number": 15, "type": "track", "uri": "spotify:track:4LkAsZf4V1fZkNxAQhUxOx" }' (API endpoint: 'https://api.spotify.com/v1/albums/65joloGLKCZLuSiOFjNS46/tracks')
[2021-10-05 19:52:22] [  LOG]  spotify: Track not available for playback: 'Snuff' - 'All Over Now' (spotify:track:3Gwr2nb79CptqOJYgbbEtv) (restrictions: { "reason": "market" })
[2021-10-05 19:52:22] [  LOG]  spotify: Unexpected JSON: error processing item at index 15 '{ "artists": [ { "external_urls": { "spotify": "https:\/\/open.spotify.com\/artist\/39Yw8FPJXDJyf5L4vK7TD3" }, "href": "https:\/\/api.spotify.com\/v1\/artists\/39Yw8FPJXDJyf5L4vK7TD3", "id": "39Yw8FPJXDJyf5L4vK7TD3", "name": "Snuff", "type": "artist", "uri": "spotify:artist:39Yw8FPJXDJyf5L4vK7TD3" } ], "disc_number": 1, "duration_ms": 210520, "explicit": false, "external_urls": { "spotify": "https:\/\/open.spotify.com\/track\/3Gwr2nb79CptqOJYgbbEtv" }, "href": "https:\/\/api.spotify.com\/v1\/tracks\/3Gwr2nb79CptqOJYgbbEtv", "id": "3Gwr2nb79CptqOJYgbbEtv", "is_local": false, "is_playable": false, "name": "All Over Now", "preview_url": null, "restrictions": { "reason": "market" }, "track_number": 16, "type": "track", "uri": "spotify:track:3Gwr2nb79CptqOJYgbbEtv" }' (API endpoint: 'https://api.spotify.com/v1/albums/65joloGLKCZLuSiOFjNS46/tracks')
[2021-10-05 19:52:22] [DEBUG]       db: Running query 'UPDATE queue SET pos = pos + 0, queue_version = 1640 WHERE pos >= 0 AND queue_version < 1640;'
[2021-10-05 19:52:22] [DEBUG]       db: Running query 'INSERT OR REPLACE INTO admin (key, value) VALUES ('queue_version', '1640');'
[2021-10-05 19:52:22] [DEBUG]       db: Running query 'END TRANSACTION;'
[2021-10-05 19:52:22] [DEBUG]      mpd: Asynchronous listener callback called with event type 2.
[2021-10-05 19:52:22] [DEBUG]      mpd: Notify clients waiting for idle results: 2
[2021-10-05 19:52:22] [DEBUG]      web: notify callback reason: 11
[2021-10-05 19:52:22] [DEBUG]      web: notify callback reply: 2
[2021-10-05 19:52:22] [DEBUG]      lib: Items for path 'spotify:album:65joloGLKCZLuSiOFjNS46' from library source 'spotifyscanner' added to the queue
[2021-10-05 19:52:22] [DEBUG]       db: Running query 'BEGIN TRANSACTION;'
[2021-10-05 19:52:22] [DEBUG]       db: Starting enum 'SELECT * FROM queue f WHERE pos = 0 ORDER BY pos;'
[2021-10-05 19:52:22] [DEBUG]       db: End of queue enum results
[2021-10-05 19:52:22] [DEBUG]       db: Running query 'END TRANSACTION;'
[2021-10-05 19:52:22] [DEBUG]      web: JSON api request: '/api/queue'
[2021-10-05 19:52:22] [DEBUG]       db: Running query 'SELECT value FROM admin a WHERE a.key = 'queue_version';'
[2021-10-05 19:52:22] [DEBUG]       db: Running query 'SELECT COUNT(*) FROM queue;'
[2021-10-05 19:52:22] [DEBUG]   player: Player status: stopped
[2021-10-05 19:52:22] [DEBUG]       db: Running query 'BEGIN TRANSACTION;'
[2021-10-05 19:52:22] [DEBUG]       db: Starting enum 'SELECT * FROM queue f WHERE 1=1 ORDER BY pos;'
[2021-10-05 19:52:22] [DEBUG]       db: End of queue enum results
[2021-10-05 19:52:22] [DEBUG]       db: Running query 'END TRANSACTION;'
[2021-10-05 19:52:22] [DEBUG]      web: JSON api request: '/api/player'
[2021-10-05 19:52:22] [DEBUG]   player: Player status: stopped
[2021-10-05 19:52:22] [DEBUG]       db: Running query 'BEGIN TRANSACTION;'
[2021-10-05 19:52:22] [DEBUG]       db: Starting enum 'SELECT * FROM queue f WHERE pos = 0 ORDER BY pos;'
[2021-10-05 19:52:22] [DEBUG]       db: End of queue enum results
[2021-10-05 19:52:22] [DEBUG]       db: Running query 'END TRANSACTION;'
[2021-10-05 19:52:22] [DEBUG]      web: JSON api request: '/api/queue'
[2021-10-05 19:52:22] [DEBUG]       db: Running query 'SELECT value FROM admin a WHERE a.key = 'queue_version';'
[2021-10-05 19:52:22] [DEBUG]       db: Running query 'SELECT COUNT(*) FROM queue;'
ejurgensen commented 3 years ago

Thanks for a good report, I can reproduce this. @chme is better into this, so hope he can take a look at it.

chme commented 2 years ago

According to https://developer.spotify.com/documentation/web-api/reference/#/operations/get-an-artists-albums only the albums available for the user should be returned (we are setting the user access token into our requests to Spotify). So the error that a song is not available for the user market should not happen. I'll look into this. Maybe setting the "market" query parameter explicitly has some effect.

chme commented 2 years ago

I added setting the "market" query parameter, but it does not seem to have any effect on the returned list of albums (or tracks). I can see in the response from spotify, that all tracks of that album are not playable. I believe this is a bug in the Spotify web api (according to the "market" parameter documentation, only album / tracks should be returned that are playable).

To improve the user experience a bit, the unplayable tracks have now (light) grey text color and a info text is displayed, that the track is not playable. (#1374).

chme commented 2 years ago

This is how it looks like with #1374 now merged:

image