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

"playlist title" condition don't combine correctly #163

Closed simon-weber closed 6 years ago

simon-weber commented 7 years ago

An autoplaylist with a condition like "playlist title contains ..." works fine on its own. However, adding a second "playlist title does not contain ..." to exclude some playlists does not work: the autoplaylist will instead return the songs in the excluded playlist.

This seems to apply to combining "playlist equals" conditions as well.

simon-weber commented 7 years ago

The queries I'm forming look fine. I'm worried this may end up being a bug in lovefield like https://github.com/simon-weber/Autoplaylists-for-Google-Music/issues/109. . .

simon-weber commented 6 years ago

Nope, I'm a dingus: this is a problem on my end.

The matches condition currently works like this:

The way step 1 and 3 combine turns out to not work as expected. As an example, imagine a library with three playlists:

Here's an all query that yields 0 tracks:

I think just removing the inversion on the initial match fixes this, but I'll have to come back to it with a clear head before settling on it (since it is technically a breaking change for anyone currently using this condition).