Created
July 21, 2015 03:05
-
-
Save electricessence/5c10590e9c53aa4da95d to your computer and use it in GitHub Desktop.
This SQL script is used with Magic Nodes on MediaMonkey to filter out songs that have already been played recently, but also artists and albums.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Songs.ID IN (SELECT ID FROM Songs WHERE Songs.ID IN ( SELECT ID FROM Songs WHERE <Custom 2> NOT LIKE 'Retire%' AND <Custom 2> NOT LIKE 'Duplicate%' AND Rating >= 60 AND ( <Played> < 1 AND <Days since last played> > 1 OR LastTimePlayed = 0.0 OR <Days since last played> > (<Played> * <Played> + 7 + 100-<Rating> ) ) AND Songs.Artist IN ( SELECT Artist FROM Songs GROUP BY Artist HAVING Max(LastTimePlayed) = 0.0 OR JulianDay( Date('now', 'localtime') ) - JulianDay( Date(Max(LastTimePlayed) + JulianDay('1899-12-30')) ) > 7 ) AND ( Songs.Album = "" OR Songs.IDAlbum IN ( SELECT IDAlbum FROM Songs GROUP BY IDAlbum HAVING Max(LastTimePlayed) = 0.0 OR JulianDay( Date('now', 'localtime') ) - JulianDay( Date(Max(LastTimePlayed) + JulianDay('1899-12-30')) ) > 2 ) ) GROUP BY IDAlbum ORDER BY (<Played> - 2*<Year> - <Rating>/20)) GROUP BY Artist) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment