XDGFX / ultrasonics

Sync music playlists between all your music services. Do more with your music.
GNU General Public License v3.0
225 stars 19 forks source link

Fix for whole music import failing due to one JSON parse error in list #51

Open SolveSoul opened 2 years ago

SolveSoul commented 2 years ago

Added a try/catch to catch an error when parsing JSON in up_local music database.py.

I don't have the stacktrace on hand but the sync ran into issues where the JSON was not valid and then writing to local m3u playlist failed completely because the JSON could not be parsed. With this fix the sync continues running and skips one or more songs that failed to parse. It seems better than failing completely as it resulted in a fully synced playlist instead of nothing.

As a sidenote, the song that failed to parse was a .flac file, maybe coincidentally but it's interesting (most of my local files are MP3s and work fine)