Posts: 262
Joined: May 2008
Reputation:
4
tkgafs
Senior Member
Posts: 262
If I create a smart playlist with the filter not played in the Last X weeks, will this potentially select music that has been newly added to the library and never been played, or does it need to have been played to set the last played date field
Basically I want to filter on a particular genre, then choose music that has not been played in the last 2 weeks or has never been played at all, but there does not seem to be any way to OR the two rules.
Any suggestions gratefully received
Posts: 262
Joined: May 2008
Reputation:
4
tkgafs
Senior Member
Posts: 262
I probably have not explained myself very well, I want to create a smart playlist with the following filters
[Genre = X ] AND [ (Last played > 2 weeks) OR (Playcount = 0)]
so that the smart playlist will select songs of genre X AND (which have never been played in the last 2 weeks OR have not been played at all).
there does not seem to be any way to use AND and OR in the playlist selection
Either the songs match ALL the rules or ANY of the rules
Hence my question when new items are added to the library what is the last played date set to ?
Posts: 262
Joined: May 2008
Reputation:
4
tkgafs
Senior Member
Posts: 262
Just added a new album to my library and checked the database as I would expect the LastPlayed field of the songs is set to NULL
Posts: 4,545
Joined: Jun 2015
Reputation:
269
2022-05-08, 09:51
(This post was last modified: 2022-05-08, 09:59 by DaveBlake.)
To achieve mixed AND/OR logic you can nest smart playlists. You can take this too far with rulle comninations that push the SQL creation into wacky error, but for what you want it will work just fine. You can pick "playlist" in the field list when creating rule.
Basically create a smart playlist that does (Last played > 2 weeks) OR (Playcount = 0) say called "Played2weeks", and then another which has rules [Genre = X ] AND [Playlist = "Played2weeks"]
Posts: 262
Joined: May 2008
Reputation:
4
tkgafs
Senior Member
Posts: 262
Brilliant, no need to worry then !!
its hard to test something like this with a large library.
I didnt realise there was the ability to nest rulesets, I'll have a play around with other stuff like this now knowing that.
When you say "last played BEFORE are cleverly implemented to accomodate the null values" I take it this will work with Before or After date fields
Posts: 5,210
Joined: Jul 2012
Reputation:
335
Any differences with SQLite vs MySQL?
scott s.
.