jwallet / spy-spotify

🎤 Records Spotify to mp3 without ads and adds media tags to the files 🎵
https://jwallet.github.io/spy-spotify/
MIT License
2.11k stars 139 forks source link

404 for certain track in LastFMAPI #508

Closed pr8x closed 1 month ago

pr8x commented 11 months ago

I am seeing a 404 while loading the LastFM info for certain tracks:

System.Net.WebException: 'The remote server returned an error: (404) Not Found.'

Spytify.exe!EspionSpotify.API.LastFMAPI.FetchFromAPI(string url) Line 84 C# Spytify.exe!EspionSpotify.API.LastFMAPI.FallbackToSingleAlbumIfNeeded(EspionSpotify.Models.LastFMTrack trackExtra) Line 174 C# Spytify.exe!EspionSpotify.API.LastFMAPI.UpdateTrack(EspionSpotify.Models.Track track, string forceQueryTitle) Line 149 C# Spytify.exe!EspionSpotify.API.LastFMAPI.UpdateTrack(EspionSpotify.Models.Track track) Line 37 C# Spytify.exe!EspionSpotify.Spotify.SpotifyStatus.GetTrack.AnonymousMethod__5_0() Line 46 C#

The LastFM URL: https://ws.audioscrobbler.com/2.0/?method=album.getInfo&api_key=01a049d30c4e17c1586707acf5d0fb17&artist=Baraka&album=Final%20Fantasy

URL looks legit and opens just fine in the browser. Not sure what happens here, but we should definitely handle LastFM API errors better and deal with null return values.

Track used

https://open.spotify.com/track/0D7mJTKeIWzPx1xb7cijus?si=29eecaed2be54bd2

Screenshots