[GH-ISSUE #122] [Bug Report] Extended Metadata Request Failed when Downloading Episodes #107

Open
opened 2026-02-27 04:57:34 +03:00 by kerem · 2 comments
Owner

Originally created by @Wszechwszeteczny on GitHub (Nov 20, 2025).
Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/122

Originally assigned to: @Googolplexed0 on GitHub.

Zotify Version
0.9.31

Bug Description
A crash when trying to download a playlist of episodes.

Bug Triggering Command
zotify --debug "https://open.spotify.com/playlist/5dNMCguqkaeQ9dlC0nCzEK?si=yjVlHFz3R6ehtGuTU31npg"

Error Traceback / Logs
console:

# zotify --debug "https://open.spotify.com/playlist/5dNMCguqkaeQ9dlC0nCzEK?si=yjVlHFz3R6ehtGuTU31npg"
                                                                                                                                                                                                                   
###   config.json saved to /root/.config/zotify   ###                                                                                                                                                              
                                                                                                                                                                                                                   
DEBUG                                                                                                                                                                                                              
###   config_DEBUG.json saved to /root/.config/zotify   ###                                                                                                                                                        
###   zotify_DEBUG_2025-11-20_09-38-08.log logging to /root/Music/Zotify Music   ###                                                                                                                               
                                                                                                                                                                                                                   
	[∙●∙] Logging in...                                                                                                                                                                                               
Click on the following link to login:                                                                                                                                                                              
https://accounts.spotify.com/authorize?response_type=code&client_id=65b708073fc0480ea92a077233ca87bd&redirect_uri=http://127.0.0.1:4381/login&code_challenge=S71o4rG6bo6mJLmm7qrG0_q-rjBd918acQa_Gxg4YQo&code_challenge_method=S256&scope=app-remote-control+playlist-modify+playlist-modify-private+playlist-modify-public+playlist-read+playlist-read-collaborative+playlist-read-private+streaming+ugc-image-upload+user-follow-modify+user-follow-read+user-library-modify+user-library-read+user-modify+user-modify-playback-state+user-modify-private+user-personalized+user-read-birthdate+user-read-currently-playing+user-read-email+user-read-play-history+user-read-playback-position+user-read-playback-state+user-read-private+user-read-recently-played+user-top-read
                                                                                                                                                                                                                   
	[∙∙∙] Logging in...                                                                                                                                                                                               
DEBUG                                                                                                                                                                                                              
Session Initialized Successfully                                                                                                                                                                                   
Starting Download of 1 URLs                                                                                                                                                                                        
                                                                                                                                                                                                                   
	[∙●∙] Fetching episode information...                                                                                                                                                                              [●∙∙] Preparing download...                                                                                                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                  Traceback (most recent call last):                                                                                                                                                                                  
  File "/root/.local/bin/zotify", line 7, in <module>                                                                                                                                                              
    sys.exit(main())                                                                                                                                                                                               
  File "/root/.local/share/pipx/venvs/zotify/lib/python3.10/site-packages/zotify/__main__.py", line 119, in main                                                                                                   
    args.func(args)                                                                                                                                                                                                
  File "/root/.local/share/pipx/venvs/zotify/lib/python3.10/site-packages/zotify/app.py", line 257, in client                                                                                                      
    download_from_urls(args.urls)                                                                                                                                                                                  
  File "/root/.local/share/pipx/venvs/zotify/lib/python3.10/site-packages/zotify/app.py", line 38, in download_from_urls
    download_playlist({ID: playlist_id,
  File "/root/.local/share/pipx/venvs/zotify/lib/python3.10/site-packages/zotify/playlist.py", line 93, in download_playlist
    download_episode(song[ID])
  File "/root/.local/share/pipx/venvs/zotify/lib/python3.10/site-packages/zotify/podcast.py", line 97, in download_episode
    stream = Zotify.get_content_stream(episode_id, Zotify.DOWNLOAD_QUALITY)
  File "/root/.local/share/pipx/venvs/zotify/lib/python3.10/site-packages/zotify/config.py", line 620, in get_content_stream
    return cls.SESSION.content_feeder().load(content_id, VorbisOnlyAudioQuality(quality), False, None)
  File "/root/.local/share/pipx/venvs/zotify/lib/python3.10/site-packages/librespot/audio/__init__.py", line 741, in load
    return self.load_episode(playable_id, audio_quality_picker,
  File "/root/.local/share/pipx/venvs/zotify/lib/python3.10/site-packages/librespot/audio/__init__.py", line 772, in load_episode
    episode = self.__session.api().get_metadata_4_episode(episode_id)
  File "/root/.local/share/pipx/venvs/zotify/lib/python3.10/site-packages/librespot/core.py", line 232, in get_metadata_4_episode
    mdb = self.get_ext_metadata(ExtensionKind.EPISODE_V4, episode.to_spotify_uri())
  File "/root/.local/share/pipx/venvs/zotify/lib/python3.10/site-packages/librespot/core.py", line 211, in get_ext_metadata
    raise ConnectionError("Extended Metadata request failed: Status code {}".format(entityextd.header.status_code))
ConnectionError: Extended Metadata request failed: Status code 404

DEBUG.log:

INFO:root:OAuth: Visit in your browser and log in: https://accounts.spotify.com/authorize?response_type=code&client_id=65b708073fc0480ea92a077233ca87bd&redirect_uri=http://127.0.0.1:4381/login&code_challenge=S71o4rG6bo6mJLmm7qrG0_q-rjBd918acQa_Gxg4YQo&code_challenge_method=S256&scope=app-remote-control+playlist-modify+playlist-modify-private+playlist-modify-public+playlist-read+playlist-read-collaborative+playlist-read-private+streaming+ugc-image-upload+user-follow-modify+user-follow-read+user-library-modify+user-library-read+user-modify+user-modify-playback-state+user-modify-private+user-personalized+user-read-birthdate+user-read-currently-playing+user-read-email+user-read-play-history+user-read-playback-position+user-read-playback-state+user-read-private+user-read-recently-played+user-top-read 
INFO:root:OAuth: Waiting for callback on 127.0.0.1:4381
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): accounts.spotify.com:443
DEBUG:urllib3.connectionpool:https://accounts.spotify.com:443 "POST /api/token HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): apresolve.spotify.com:443
DEBUG:urllib3.connectionpool:https://apresolve.spotify.com:443 "GET /?type=accesspoint HTTP/1.1" 200 None
INFO:Librespot:Session:Created new session! device_id: 99b5d72d6b235adae86ffdcdf057680b3091c8b1, ap: ap-gae2.spotify.com:80
INFO:Librespot:Session:Connection successfully!
INFO:Librespot:Session:Session.Receiver started
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): apresolve.spotify.com:443
DEBUG:urllib3.connectionpool:https://apresolve.spotify.com:443 "GET /?type=spclient HTTP/1.1" 200 None
INFO:Librespot:Session:Skipping 02
INFO:Librespot:Session:Received license_version: 0
INFO:Librespot:Session:Received country_code: PL
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): apresolve.spotify.com:443
DEBUG:Librespot:Session:Parsed product info: {'type': 'free', 'ab-ad-player-targeting': '1', 'ab-watch-now': '0', 'ab_recently_played_feature_time_filter_threshold': 'com.spotify.gaia=30,driving-mode=120,spotify%3Ainternal%3Astartpage=30', 'ad-formats-preroll-video': '0', 'ad-session-persistence': '1', 'ads': '1', 'app-developer': '0', 'arsenal_country': '1', 'audio-preview-url-template': 'https://p.scdn.co/mp3-preview/{id}', 'audio-quality': '0', 'audiobook-onboarding-completed': '0', 'autoplay': '1', 'capping-bar-threshold': '3601', 'catalogue': 'free', 'collection': '1', 'created_by_partner': None, 'employee-free-opt-in': '0', 'enable-annotations': '2', 'enable-annotations-read': '0', 'enable-crossfade': '1', 'explicit-content': '1', 'filter-explicit-content': '0', 'financial-product': 'pr:free,tc:0', 'head-file-caching': '1', 'head-files': '1', 'head-files-url': 'https://heads-fa-tls13.spotifycdn.com/head/{file_id}', 'high-bitrate': '0', 'image-url': 'https://i.scdn.co/image/{file_id}', 'incognito_mode_timeout': '21600', 'is_email_verified': '0', 'key-caching-auto-offline': '0', 'key-caching-max-count': '10000', 'key-caching-max-offline-seconds': '1800', 'key-memory-cache-mode': '1:15,300', 'libspotify': '0', 'license-agreements': None, 'metadata-link-lookup-modes': '0', 'mobile': '0', 'name': 'Spotify Free', 'nft-disabled': '1', 'offline': '0', 'on-demand': '1', 'on-demand-trial-in-progress': '0', 'payments-locked-state': '0', 'player-license': 'on-demand', 'player-license-v2': 'on-demand', 'playlist-annotations-markup': '0', 'preferred-locale': 'en', 'prefetch-keys': '1', 'prefetch-strategy': '18', 'prefetch-window-max': '2', 'publish-activity': '0', 'publish-playlist': '1', 'radio': '1', 'rating-access': '1', 'remote-control': '6', 'restrict-playlist-collaboration': '0', 'send-email': '0', 'shows-collection': '1', 'shows-collection-jam': '0', 'shuffle': '0', 'shuffle-algorithm': 'FRESH', 'sidebar-navigation-enabled': '0', 'storage-size-config': '10240,90,500,3', 'streaming': '1', 'streaming-rules': None, 'ugc-abuse-report': '1', 'ugc-abuse-report-url': 'https://support.spotify.com/abuse/?uri={uri}', 'video-cdn-sampling': '100', 'video-device-blacklisted': '0', 'video-manifest-url': 'https://spclient.wg.spotify.com/manifests/v6/{type}/sources/{source_id}/options/supports_drm', 'widevine-license-url': 'https://spclient.wg.spotify.com/widevine-license/v1/video/license'}
INFO:Librespot:Session:Skipping 1f
INFO:Librespot:Session:Skipping 69
DEBUG:Librespot:MercuryClient:Handling packet, cmd: 0xb5, seq: 1685530434659680256, flags: b'\x01', parts: 1
DEBUG:Librespot:MercuryClient:Couldn't dispatch Mercury event seq: 1685530434659680256, uri: hm://pusher/v1/connections/OTliNWQ3MmQ2YjIzNWFkYWU4NmZmZGNkZjA1NzY4MGIzMDkxYzhiMStBUCt0Y3A6Ly8wYWIxNTlkZS5pcC5nYWUyLnNwb3RpZnkubmV0OjUwMTErMjQ3MTVGMEE1MzRFRDYwN0I0RjVGMzE3NTM5MENGMjQ1OTI2QjE5RjYyRDVDODQ4QzUzQzlGRTYxOEY1NUM4Mg%3D%3D, code: 200, payload: b''
DEBUG:urllib3.connectionpool:https://apresolve.spotify.com:443 "GET /?type=dealer HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): login5.spotify.com:443
DEBUG:Librespot:Session:Received 0x10: 9d7a9f1dcd0288068fbbd467a98878d6ffda50cc
DEBUG:urllib3.connectionpool:https://login5.spotify.com:443 "POST /v3/login HTTP/1.1" 200 None
INFO:Librespot:TokenProvider:Login5 authentication successful, got access token
DEBUG:Librespot:TokenProvider:Using Login5 access token for scopes: ['playlist-read']
INFO:Librespot:Session:Authenticated as 31xmwlqfak4jpr4ijv3t25vqhx4y!
DEBUG:zotify.debug:

Session Initialized Successfully

DEBUG:zotify.debug:Starting Download of 1 URLs

DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): login5.spotify.com:443
DEBUG:urllib3.connectionpool:https://login5.spotify.com:443 "POST /v3/login HTTP/1.1" 200 None
INFO:Librespot:TokenProvider:Login5 authentication successful, got access token
DEBUG:Librespot:TokenProvider:Using Login5 access token for scopes: ['user-read-email', 'playlist-read-private', 'user-library-read', 'user-follow-read']
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.spotify.com:443
INFO:Librespot:Session:Skipping unknown command cmd: 0x75, payload: b'\x00\x00\x01'
DEBUG:urllib3.connectionpool:https://api.spotify.com:443 "GET /v1/playlists/5dNMCguqkaeQ9dlC0nCzEK?fields=name,owner(display_name)&market=from_token HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.spotify.com:443
DEBUG:urllib3.connectionpool:https://api.spotify.com:443 "GET /v1/playlists/5dNMCguqkaeQ9dlC0nCzEK/tracks?limit=100&offset=0 HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.spotify.com:443
DEBUG:urllib3.connectionpool:https://api.spotify.com:443 "GET /v1/episodes/3OWkeS3nH03GKuDxLkdKiU HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api-partner.spotify.com:443
DEBUG:urllib3.connectionpool:https://api-partner.spotify.com:443 "GET /pathfinder/v1/query?operationName=getEpisode&variables=%7B%22uri%22:%22spotify:episode:3OWkeS3nH03GKuDxLkdKiU%22%7D&extensions=%7B%22persistedQuery%22:%7B%22version%22:1,%22sha256Hash%22:%22224ba0fd89fcfdfb3a15fa2d82a6112d3f4e2ac88fba5c6713de04d1b72cf482%22%7D%7D HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): clienttoken.spotify.com:443
DEBUG:urllib3.connectionpool:https://clienttoken.spotify.com:443 "POST /v1/clienttoken HTTP/1.1" 200 None
DEBUG:Librespot:ApiClient:Updated client token: AADLIdXMttSIDs5r/iMFcJy9uiLTiFGDbOZmErnhalboxurnneM3wLFk7IPFU8qHOU6YjjJxzbqqA2IZlAsIqVqSXa+XlQJ29Ki8NcF69k8Lju+r0y13xBoHiJaceu4UvsOpL5qSYZz3BNkNi/WEtIRvDHCQrZaKFcmyhWj2p8ETG3+H/Jrjo3FsooBcjJ7u4dQuyyMjaEnR9wLIbrUo5DPLQIE3CKm+k9OnBOqbI4VJ
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): gew4-spclient.spotify.com:443
DEBUG:urllib3.connectionpool:https://gew4-spclient.spotify.com:443 "POST /extended-metadata/v0/extended-metadata HTTP/1.1" 200 74

Config File

config_DEBUG.json:

cat ~/.config/zotify/config_DEBUG.json 
{
    "DEBUG": "True",
    "ROOT_PATH": "~/Music/Zotify Music",
    "SAVE_CREDENTIALS": "True",
    "CREDENTIALS_LOCATION": "",
    "OUTPUT": "",
    "OUTPUT_PLAYLIST": "{playlist}/{artist}_{song_name}",
    "OUTPUT_PLAYLIST_EXT": "{playlist}/{playlist_num}_{artist}_{song_name}",
    "OUTPUT_LIKED_SONGS": "Liked Songs/{artist}_{song_name}",
    "OUTPUT_SINGLE": "{artist}/{album}/{artist}_{song_name}",
    "OUTPUT_ALBUM": "{artist}/{album}/{album_num}_{artist}_{song_name}",
    "ROOT_PODCAST_PATH": "~/Music/Zotify Podcasts",
    "SPLIT_ALBUM_DISCS": "False",
    "MAX_FILENAME_LENGTH": "0",
    "BULK_WAIT_TIME": "1",
    "DOWNLOAD_REAL_TIME": "False",
    "TEMP_DOWNLOAD_DIR": "",
    "DOWNLOAD_PARENT_ALBUM": "False",
    "NO_COMPILATION_ALBUMS": "False",
    "REGEX_ENABLED": "False",
    "REGEX_TRACK_SKIP": "",
    "REGEX_EPISODE_SKIP": "",
    "REGEX_ALBUM_SKIP": "",
    "DOWNLOAD_FORMAT": "copy",
    "DOWNLOAD_QUALITY": "auto",
    "TRANSCODE_BITRATE": "auto",
    "SONG_ARCHIVE_LOCATION": "",
    "DISABLE_SONG_ARCHIVE": "False",
    "DISABLE_DIRECTORY_ARCHIVES": "False",
    "SKIP_EXISTING": "True",
    "SKIP_PREVIOUSLY_DOWNLOADED": "False",
    "EXPORT_M3U8": "False",
    "M3U8_LOCATION": "",
    "M3U8_REL_PATHS": "True",
    "LIKED_SONGS_ARCHIVE_M3U8": "True",
    "DOWNLOAD_LYRICS": "True",
    "LYRICS_LOCATION": "",
    "ALWAYS_CHECK_LYRICS": "False",
    "LYRICS_MD_HEADER": "False",
    "LANGUAGE": "en",
    "STRICT_LIBRARY_VERIFY": "True",
    "MD_DISC_TRACK_TOTALS": "True",
    "MD_SAVE_GENRES": "True",
    "MD_ALLGENRES": "False",
    "MD_GENREDELIMITER": ", ",
    "MD_ARTISTDELIMITER": ", ",
    "MD_SAVE_LYRICS": "True",
    "ALBUM_ART_JPG_FILE": "False",
    "RETRY_ATTEMPTS": "1",
    "CHUNK_SIZE": "20000",
    "REDIRECT_ADDRESS": "127.0.0.1",
    "PRINT_SPLASH": "False",
    "PRINT_PROGRESS_INFO": "True",
    "PRINT_SKIPS": "True",
    "PRINT_DOWNLOADS": "True",
    "PRINT_DOWNLOAD_PROGRESS": "True",
    "PRINT_URL_PROGRESS": "True",
    "PRINT_ALBUM_PROGRESS": "True",
    "PRINT_ARTIST_PROGRESS": "True",
    "PRINT_PLAYLIST_PROGRESS": "True",
    "PRINT_WARNINGS": "True",
    "PRINT_ERRORS": "True",
    "PRINT_API_ERRORS": "True",
    "FFMPEG_LOG_LEVEL": "error"
}

Additional Context
I'm running inside podman with the following command:

podman run -it --rm \
  --name zotify-container \
  -v ~/Downloads/Mode_One/Spotify:/data \
  --cap-drop=ALL \
  --security-opt=no-new-privileges \
  -p 4381:4381 \
  zotify

(Note: the port forwarding doesn't seem to work for me and I have to copy the OAuth callback url from my browser and use it with curl from within the container.)

Originally created by @Wszechwszeteczny on GitHub (Nov 20, 2025). Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/122 Originally assigned to: @Googolplexed0 on GitHub. **Zotify Version** 0.9.31 **Bug Description** A crash when trying to download a playlist of episodes. **Bug Triggering Command** `zotify --debug "https://open.spotify.com/playlist/5dNMCguqkaeQ9dlC0nCzEK?si=yjVlHFz3R6ehtGuTU31npg"` **Error Traceback / Logs** console: <details> ``` # zotify --debug "https://open.spotify.com/playlist/5dNMCguqkaeQ9dlC0nCzEK?si=yjVlHFz3R6ehtGuTU31npg" ### config.json saved to /root/.config/zotify ### DEBUG ### config_DEBUG.json saved to /root/.config/zotify ### ### zotify_DEBUG_2025-11-20_09-38-08.log logging to /root/Music/Zotify Music ### [∙●∙] Logging in... Click on the following link to login: https://accounts.spotify.com/authorize?response_type=code&client_id=65b708073fc0480ea92a077233ca87bd&redirect_uri=http://127.0.0.1:4381/login&code_challenge=S71o4rG6bo6mJLmm7qrG0_q-rjBd918acQa_Gxg4YQo&code_challenge_method=S256&scope=app-remote-control+playlist-modify+playlist-modify-private+playlist-modify-public+playlist-read+playlist-read-collaborative+playlist-read-private+streaming+ugc-image-upload+user-follow-modify+user-follow-read+user-library-modify+user-library-read+user-modify+user-modify-playback-state+user-modify-private+user-personalized+user-read-birthdate+user-read-currently-playing+user-read-email+user-read-play-history+user-read-playback-position+user-read-playback-state+user-read-private+user-read-recently-played+user-top-read [∙∙∙] Logging in... DEBUG Session Initialized Successfully Starting Download of 1 URLs [∙●∙] Fetching episode information... [●∙∙] Preparing download... Traceback (most recent call last): File "/root/.local/bin/zotify", line 7, in <module> sys.exit(main()) File "/root/.local/share/pipx/venvs/zotify/lib/python3.10/site-packages/zotify/__main__.py", line 119, in main args.func(args) File "/root/.local/share/pipx/venvs/zotify/lib/python3.10/site-packages/zotify/app.py", line 257, in client download_from_urls(args.urls) File "/root/.local/share/pipx/venvs/zotify/lib/python3.10/site-packages/zotify/app.py", line 38, in download_from_urls download_playlist({ID: playlist_id, File "/root/.local/share/pipx/venvs/zotify/lib/python3.10/site-packages/zotify/playlist.py", line 93, in download_playlist download_episode(song[ID]) File "/root/.local/share/pipx/venvs/zotify/lib/python3.10/site-packages/zotify/podcast.py", line 97, in download_episode stream = Zotify.get_content_stream(episode_id, Zotify.DOWNLOAD_QUALITY) File "/root/.local/share/pipx/venvs/zotify/lib/python3.10/site-packages/zotify/config.py", line 620, in get_content_stream return cls.SESSION.content_feeder().load(content_id, VorbisOnlyAudioQuality(quality), False, None) File "/root/.local/share/pipx/venvs/zotify/lib/python3.10/site-packages/librespot/audio/__init__.py", line 741, in load return self.load_episode(playable_id, audio_quality_picker, File "/root/.local/share/pipx/venvs/zotify/lib/python3.10/site-packages/librespot/audio/__init__.py", line 772, in load_episode episode = self.__session.api().get_metadata_4_episode(episode_id) File "/root/.local/share/pipx/venvs/zotify/lib/python3.10/site-packages/librespot/core.py", line 232, in get_metadata_4_episode mdb = self.get_ext_metadata(ExtensionKind.EPISODE_V4, episode.to_spotify_uri()) File "/root/.local/share/pipx/venvs/zotify/lib/python3.10/site-packages/librespot/core.py", line 211, in get_ext_metadata raise ConnectionError("Extended Metadata request failed: Status code {}".format(entityextd.header.status_code)) ConnectionError: Extended Metadata request failed: Status code 404 ``` </details> DEBUG.log: <details> ``` INFO:root:OAuth: Visit in your browser and log in: https://accounts.spotify.com/authorize?response_type=code&client_id=65b708073fc0480ea92a077233ca87bd&redirect_uri=http://127.0.0.1:4381/login&code_challenge=S71o4rG6bo6mJLmm7qrG0_q-rjBd918acQa_Gxg4YQo&code_challenge_method=S256&scope=app-remote-control+playlist-modify+playlist-modify-private+playlist-modify-public+playlist-read+playlist-read-collaborative+playlist-read-private+streaming+ugc-image-upload+user-follow-modify+user-follow-read+user-library-modify+user-library-read+user-modify+user-modify-playback-state+user-modify-private+user-personalized+user-read-birthdate+user-read-currently-playing+user-read-email+user-read-play-history+user-read-playback-position+user-read-playback-state+user-read-private+user-read-recently-played+user-top-read INFO:root:OAuth: Waiting for callback on 127.0.0.1:4381 DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): accounts.spotify.com:443 DEBUG:urllib3.connectionpool:https://accounts.spotify.com:443 "POST /api/token HTTP/1.1" 200 None DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): apresolve.spotify.com:443 DEBUG:urllib3.connectionpool:https://apresolve.spotify.com:443 "GET /?type=accesspoint HTTP/1.1" 200 None INFO:Librespot:Session:Created new session! device_id: 99b5d72d6b235adae86ffdcdf057680b3091c8b1, ap: ap-gae2.spotify.com:80 INFO:Librespot:Session:Connection successfully! INFO:Librespot:Session:Session.Receiver started DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): apresolve.spotify.com:443 DEBUG:urllib3.connectionpool:https://apresolve.spotify.com:443 "GET /?type=spclient HTTP/1.1" 200 None INFO:Librespot:Session:Skipping 02 INFO:Librespot:Session:Received license_version: 0 INFO:Librespot:Session:Received country_code: PL DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): apresolve.spotify.com:443 DEBUG:Librespot:Session:Parsed product info: {'type': 'free', 'ab-ad-player-targeting': '1', 'ab-watch-now': '0', 'ab_recently_played_feature_time_filter_threshold': 'com.spotify.gaia=30,driving-mode=120,spotify%3Ainternal%3Astartpage=30', 'ad-formats-preroll-video': '0', 'ad-session-persistence': '1', 'ads': '1', 'app-developer': '0', 'arsenal_country': '1', 'audio-preview-url-template': 'https://p.scdn.co/mp3-preview/{id}', 'audio-quality': '0', 'audiobook-onboarding-completed': '0', 'autoplay': '1', 'capping-bar-threshold': '3601', 'catalogue': 'free', 'collection': '1', 'created_by_partner': None, 'employee-free-opt-in': '0', 'enable-annotations': '2', 'enable-annotations-read': '0', 'enable-crossfade': '1', 'explicit-content': '1', 'filter-explicit-content': '0', 'financial-product': 'pr:free,tc:0', 'head-file-caching': '1', 'head-files': '1', 'head-files-url': 'https://heads-fa-tls13.spotifycdn.com/head/{file_id}', 'high-bitrate': '0', 'image-url': 'https://i.scdn.co/image/{file_id}', 'incognito_mode_timeout': '21600', 'is_email_verified': '0', 'key-caching-auto-offline': '0', 'key-caching-max-count': '10000', 'key-caching-max-offline-seconds': '1800', 'key-memory-cache-mode': '1:15,300', 'libspotify': '0', 'license-agreements': None, 'metadata-link-lookup-modes': '0', 'mobile': '0', 'name': 'Spotify Free', 'nft-disabled': '1', 'offline': '0', 'on-demand': '1', 'on-demand-trial-in-progress': '0', 'payments-locked-state': '0', 'player-license': 'on-demand', 'player-license-v2': 'on-demand', 'playlist-annotations-markup': '0', 'preferred-locale': 'en', 'prefetch-keys': '1', 'prefetch-strategy': '18', 'prefetch-window-max': '2', 'publish-activity': '0', 'publish-playlist': '1', 'radio': '1', 'rating-access': '1', 'remote-control': '6', 'restrict-playlist-collaboration': '0', 'send-email': '0', 'shows-collection': '1', 'shows-collection-jam': '0', 'shuffle': '0', 'shuffle-algorithm': 'FRESH', 'sidebar-navigation-enabled': '0', 'storage-size-config': '10240,90,500,3', 'streaming': '1', 'streaming-rules': None, 'ugc-abuse-report': '1', 'ugc-abuse-report-url': 'https://support.spotify.com/abuse/?uri={uri}', 'video-cdn-sampling': '100', 'video-device-blacklisted': '0', 'video-manifest-url': 'https://spclient.wg.spotify.com/manifests/v6/{type}/sources/{source_id}/options/supports_drm', 'widevine-license-url': 'https://spclient.wg.spotify.com/widevine-license/v1/video/license'} INFO:Librespot:Session:Skipping 1f INFO:Librespot:Session:Skipping 69 DEBUG:Librespot:MercuryClient:Handling packet, cmd: 0xb5, seq: 1685530434659680256, flags: b'\x01', parts: 1 DEBUG:Librespot:MercuryClient:Couldn't dispatch Mercury event seq: 1685530434659680256, uri: hm://pusher/v1/connections/OTliNWQ3MmQ2YjIzNWFkYWU4NmZmZGNkZjA1NzY4MGIzMDkxYzhiMStBUCt0Y3A6Ly8wYWIxNTlkZS5pcC5nYWUyLnNwb3RpZnkubmV0OjUwMTErMjQ3MTVGMEE1MzRFRDYwN0I0RjVGMzE3NTM5MENGMjQ1OTI2QjE5RjYyRDVDODQ4QzUzQzlGRTYxOEY1NUM4Mg%3D%3D, code: 200, payload: b'' DEBUG:urllib3.connectionpool:https://apresolve.spotify.com:443 "GET /?type=dealer HTTP/1.1" 200 None DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): login5.spotify.com:443 DEBUG:Librespot:Session:Received 0x10: 9d7a9f1dcd0288068fbbd467a98878d6ffda50cc DEBUG:urllib3.connectionpool:https://login5.spotify.com:443 "POST /v3/login HTTP/1.1" 200 None INFO:Librespot:TokenProvider:Login5 authentication successful, got access token DEBUG:Librespot:TokenProvider:Using Login5 access token for scopes: ['playlist-read'] INFO:Librespot:Session:Authenticated as 31xmwlqfak4jpr4ijv3t25vqhx4y! DEBUG:zotify.debug: Session Initialized Successfully DEBUG:zotify.debug:Starting Download of 1 URLs DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): login5.spotify.com:443 DEBUG:urllib3.connectionpool:https://login5.spotify.com:443 "POST /v3/login HTTP/1.1" 200 None INFO:Librespot:TokenProvider:Login5 authentication successful, got access token DEBUG:Librespot:TokenProvider:Using Login5 access token for scopes: ['user-read-email', 'playlist-read-private', 'user-library-read', 'user-follow-read'] DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.spotify.com:443 INFO:Librespot:Session:Skipping unknown command cmd: 0x75, payload: b'\x00\x00\x01' DEBUG:urllib3.connectionpool:https://api.spotify.com:443 "GET /v1/playlists/5dNMCguqkaeQ9dlC0nCzEK?fields=name,owner(display_name)&market=from_token HTTP/1.1" 200 None DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.spotify.com:443 DEBUG:urllib3.connectionpool:https://api.spotify.com:443 "GET /v1/playlists/5dNMCguqkaeQ9dlC0nCzEK/tracks?limit=100&offset=0 HTTP/1.1" 200 None DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.spotify.com:443 DEBUG:urllib3.connectionpool:https://api.spotify.com:443 "GET /v1/episodes/3OWkeS3nH03GKuDxLkdKiU HTTP/1.1" 200 None DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api-partner.spotify.com:443 DEBUG:urllib3.connectionpool:https://api-partner.spotify.com:443 "GET /pathfinder/v1/query?operationName=getEpisode&variables=%7B%22uri%22:%22spotify:episode:3OWkeS3nH03GKuDxLkdKiU%22%7D&extensions=%7B%22persistedQuery%22:%7B%22version%22:1,%22sha256Hash%22:%22224ba0fd89fcfdfb3a15fa2d82a6112d3f4e2ac88fba5c6713de04d1b72cf482%22%7D%7D HTTP/1.1" 200 None DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): clienttoken.spotify.com:443 DEBUG:urllib3.connectionpool:https://clienttoken.spotify.com:443 "POST /v1/clienttoken HTTP/1.1" 200 None DEBUG:Librespot:ApiClient:Updated client token: AADLIdXMttSIDs5r/iMFcJy9uiLTiFGDbOZmErnhalboxurnneM3wLFk7IPFU8qHOU6YjjJxzbqqA2IZlAsIqVqSXa+XlQJ29Ki8NcF69k8Lju+r0y13xBoHiJaceu4UvsOpL5qSYZz3BNkNi/WEtIRvDHCQrZaKFcmyhWj2p8ETG3+H/Jrjo3FsooBcjJ7u4dQuyyMjaEnR9wLIbrUo5DPLQIE3CKm+k9OnBOqbI4VJ DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): gew4-spclient.spotify.com:443 DEBUG:urllib3.connectionpool:https://gew4-spclient.spotify.com:443 "POST /extended-metadata/v0/extended-metadata HTTP/1.1" 200 74 ``` </details> **Config File** config_DEBUG.json: <details> ``` cat ~/.config/zotify/config_DEBUG.json { "DEBUG": "True", "ROOT_PATH": "~/Music/Zotify Music", "SAVE_CREDENTIALS": "True", "CREDENTIALS_LOCATION": "", "OUTPUT": "", "OUTPUT_PLAYLIST": "{playlist}/{artist}_{song_name}", "OUTPUT_PLAYLIST_EXT": "{playlist}/{playlist_num}_{artist}_{song_name}", "OUTPUT_LIKED_SONGS": "Liked Songs/{artist}_{song_name}", "OUTPUT_SINGLE": "{artist}/{album}/{artist}_{song_name}", "OUTPUT_ALBUM": "{artist}/{album}/{album_num}_{artist}_{song_name}", "ROOT_PODCAST_PATH": "~/Music/Zotify Podcasts", "SPLIT_ALBUM_DISCS": "False", "MAX_FILENAME_LENGTH": "0", "BULK_WAIT_TIME": "1", "DOWNLOAD_REAL_TIME": "False", "TEMP_DOWNLOAD_DIR": "", "DOWNLOAD_PARENT_ALBUM": "False", "NO_COMPILATION_ALBUMS": "False", "REGEX_ENABLED": "False", "REGEX_TRACK_SKIP": "", "REGEX_EPISODE_SKIP": "", "REGEX_ALBUM_SKIP": "", "DOWNLOAD_FORMAT": "copy", "DOWNLOAD_QUALITY": "auto", "TRANSCODE_BITRATE": "auto", "SONG_ARCHIVE_LOCATION": "", "DISABLE_SONG_ARCHIVE": "False", "DISABLE_DIRECTORY_ARCHIVES": "False", "SKIP_EXISTING": "True", "SKIP_PREVIOUSLY_DOWNLOADED": "False", "EXPORT_M3U8": "False", "M3U8_LOCATION": "", "M3U8_REL_PATHS": "True", "LIKED_SONGS_ARCHIVE_M3U8": "True", "DOWNLOAD_LYRICS": "True", "LYRICS_LOCATION": "", "ALWAYS_CHECK_LYRICS": "False", "LYRICS_MD_HEADER": "False", "LANGUAGE": "en", "STRICT_LIBRARY_VERIFY": "True", "MD_DISC_TRACK_TOTALS": "True", "MD_SAVE_GENRES": "True", "MD_ALLGENRES": "False", "MD_GENREDELIMITER": ", ", "MD_ARTISTDELIMITER": ", ", "MD_SAVE_LYRICS": "True", "ALBUM_ART_JPG_FILE": "False", "RETRY_ATTEMPTS": "1", "CHUNK_SIZE": "20000", "REDIRECT_ADDRESS": "127.0.0.1", "PRINT_SPLASH": "False", "PRINT_PROGRESS_INFO": "True", "PRINT_SKIPS": "True", "PRINT_DOWNLOADS": "True", "PRINT_DOWNLOAD_PROGRESS": "True", "PRINT_URL_PROGRESS": "True", "PRINT_ALBUM_PROGRESS": "True", "PRINT_ARTIST_PROGRESS": "True", "PRINT_PLAYLIST_PROGRESS": "True", "PRINT_WARNINGS": "True", "PRINT_ERRORS": "True", "PRINT_API_ERRORS": "True", "FFMPEG_LOG_LEVEL": "error" } ``` </details> **Additional Context** I'm running inside podman with the following command: ``` podman run -it --rm \ --name zotify-container \ -v ~/Downloads/Mode_One/Spotify:/data \ --cap-drop=ALL \ --security-opt=no-new-privileges \ -p 4381:4381 \ zotify ``` (Note: the port forwarding doesn't seem to work for me and I have to copy the OAuth callback url from my browser and use it with curl from within the container.)
Author
Owner

@Googolplexed0 commented on GitHub (Nov 21, 2025):

(Note: the port forwarding doesn't seem to work for me and I have to copy the OAuth callback url from my browser and use it with curl from within the container.)

Try setting the REDIRECT_ADDRESS config to the podman address (something like "10.88.0.2" I think), it should redirect you properly. If that fix works for you, let me know and I'll add the runpod command to the README.

ConnectionError: Extended Metadata request failed: Status code 404

I am able to reproduce this so it isn't a podman issue. Something must be wrong with podcast episodes. Will do more investigating.

<!-- gh-comment-id:3561371766 --> @Googolplexed0 commented on GitHub (Nov 21, 2025): > (Note: the port forwarding doesn't seem to work for me and I have to copy the OAuth callback url from my browser and use it with curl from within the container.) Try setting the `REDIRECT_ADDRESS` config to the podman address (something like "10.88.0.2" I think), it should redirect you properly. If that fix works for you, let me know and I'll add the runpod command to the README. > ConnectionError: Extended Metadata request failed: Status code 404 I am able to reproduce this so it isn't a podman issue. Something must be wrong with podcast episodes. Will do more investigating.
Author
Owner

@Wszechwszeteczny commented on GitHub (Nov 21, 2025):

Thanks for the quick response and for looking into this. I'm not familiar with zotify or librespot but I'm decent with Python so if I can help, please let me know.

Those episodes are very old (the first one is from 2009) so that might be a relevant factor. Sadly, the original host has gone down and Spotify seems to be the only place that still hosts them.

Try setting the REDIRECT_ADDRESS config to the podman address (something like "10.88.0.2" I think), it should redirect you properly. If that fix works for you, let me know and I'll add the runpod command to the README.

In addition to that, there seems to be some issue in podman with binding to 127.0.0.1 from within a container. I ended up passing --network host instead of port mapping and now it works. Here is the full command:

podman run -it --rm \
  --name zotify-container \
  -v ~/Downloads/Mode_One/Spotify:/data \
  --cap-drop=ALL \
  --security-opt=no-new-privileges \
  --network=host \
  zotify

but you will probably want to change the volume (-v) mapping.

<!-- gh-comment-id:3562177128 --> @Wszechwszeteczny commented on GitHub (Nov 21, 2025): Thanks for the quick response and for looking into this. I'm not familiar with zotify or librespot but I'm decent with Python so if I can help, please let me know. Those episodes are very old (the first one is from 2009) so that might be a relevant factor. Sadly, the original host has gone down and Spotify seems to be the only place that still hosts them. > Try setting the REDIRECT_ADDRESS config to the podman address (something like "10.88.0.2" I think), it should redirect you properly. If that fix works for you, let me know and I'll add the runpod command to the README. In addition to that, there seems to be some issue in podman with binding to 127.0.0.1 from within a container. I ended up passing `--network host` instead of port mapping and now it works. Here is the full command: ``` podman run -it --rm \ --name zotify-container \ -v ~/Downloads/Mode_One/Spotify:/data \ --cap-drop=ALL \ --security-opt=no-new-privileges \ --network=host \ zotify ``` but you will probably want to change the volume (`-v`) mapping.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/zotify#107
No description provided.