simon-weber / Autoplaylists-for-Google-Music

Adds autoplaylists, aka iTunes "smart playlists", to Google Music.
https://autoplaylists.simon.codes
MIT License
94 stars 18 forks source link

failed playlist creation causes constant warnings #160

Open simon-weber opened 7 years ago

simon-weber commented 7 years ago

On a look through sentry I noticed one of the most frequent errors is from this line. It seems to be mostly from a handful of users where a playlist create failed, leaving an orphaned local autoplaylist that causes this warning on every sync.

I'm leaning towards just deleting the local autoplaylist rather than retrying to create the remote one. There is a chance this will delete a playlist people are using if we failed to persist the remote id, though it seems pretty slim.

simon-weber commented 6 years ago

You know, it's probably better to detect this and put something in the UI so users can decide what to do about it. It's easy to manually fix (by just duplicating the playlist), and automating it could lead to all sorts of runaway situations (eg duplicating forever because something else is preventing creation).

simon-weber commented 5 years ago

This can also prevent syncing in cases where the failed autoplaylist gets linked:

background.js:11460 TypeError: Cannot read property 'localId' of undefined
    at Object.queryTracks (background.js:28051)
    at resolve (background.js:27892)
    at new Promise (<anonymous>)
    at getLinkedTracks (background.js:27891)
    at Promise.all.linkedPlaylistIds.map.id (background.js:27988)
...