You are here: Home » Topic » Smart Playlist

Smart Playlist

This topic contains 12 replies, has 6 voices, and was last updated by  Anonymous 9 years, 8 months ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1176

    anmith
    Participant

    I want to make an “Added Today” smart playlist with songs added the last 24 hours! ❗ Can anybody tell me what variables I shall use? ❓

    #9537

    CCRDude
    Participant

    Yeah, the variable is called RTFM and is set

    RTFM = (time_added after 1 day before today)

    Sorry, couldn’t resist 😉

    Just search the forum for more information, you’ll probably find this wiki link as well as more examples.

    #9538

    rpedde
    Participant

    @ccrdude wrote:

    Just search the forum for more information, you’ll probably find this wiki link as well as more examples.

    If only that link were on the playlist wizard…

    #9539

    CCRDude
    Participant

    Aaah… I have it on mine, but I just checked the patch I mailed you some time ago and saw that it was in there, so it’s kind of new 😉

    As a piece of information to anyone else: the link should appear in one of the next nightlies!

    #9540

    rpedde
    Participant

    @ccrdude wrote:

    Aaah… I have it on mine, but I just checked the patch I mailed you some time ago and saw that it was in there, so it’s kind of new 😉

    As a piece of information to anyone else: the link should appear in one of the next nightlies!

    Yup… I noticed it too, and though “why wasn’t that there a long time ago?” So yeah, it’s in svn now, and if I ever get off my dead butt and release a new nightlies it will be in there.

    — Ron

    #9541

    sruckh
    Participant

    I apparently do not grasp the smart playlist syntax. Although the web interface accepts the syntax none of the playlists work.

    For example, here are some things I have tried:

    Playlist by filesystem directory name:
    path includes “*directory*”

    I also tried
    path includes “directory”

    (Firefly — Smart) Songs from the last 10 years
    time_modified after 120 months before today

    (Firefly — Smart) Songs from the past year
    time_modified after 52 weeks before today

    (Firefly — Smart) 50’s Music
    Year >= 1950 && Year < 1960 Not one of these smart playlists return any results. This is running svn-1528 of firefly server on Ubuntu edgy 6.10. Can someone post some more examples of smart playlist or help me with my syntax.

    #9542

    CCRDude
    Participant

    If you use “includes”, a trailing wildcard is useless, since includes implies that the search term may be anwywhere already 😉
    Not sure whats wrong there though, I use “includes” on other text field without problems.

    Why do you use time_modified? time_added is probably more useful if its about how long you have that music in you collection… at least I do update my tags from time to time (adding cover art & other new fields, cleaning up typos, etc.), so all my songs would appear “from the past year” 😉
    Wouldn’t explain why it shows nothing though. The Wiki example seems to imply that the parser does understand both singular and plural of descriptors (week/weeks, month/months), but maybe you could try with singular instead of plural, in case this was just a typo on the wiki?

    I wonder why you didn’t just copy one of the other decade examples?
    year >= 1950 AND year < = 1960 ... with AND instead of && ... I haven’t tested any of the 15xx nightlies though (don’t use Vista, nor a Windows server at all 😉 ), so I can’t tell if they broke anything.

    #9543

    sruckh
    Participant

    Why do you use time_modified?

    I could not think of a better alternative. Ultimately I would like to use something like: Year after 52 weeks before today. time_added does not really make sense either. If I added all my 1950 songs today I really would not like those songs to be played in my filter “Songs newer then 1 year”. I figured massaging the OS time_modified field would be easier. Is there a better method for creating this filter that I am missing?

    I wonder why you didn’t just copy one of the other decade examples?

    I did not see the Wiki until after seeing the mt-daapd.playlist file. I was copying the examples from the .playlist file.

    Restarting the firefly server, and the DAAP client actually did finally produce some results. Not necessarily the results I expected but some results none the less.

    Either I have not figured out how to maximize the smart playlist query grammar, or I am needing more features. Although the WIKI is very informative, it did not help me achieve how I would like to use the smart playlist feature.

    Thank you for your response.

    #9544

    rpedde
    Participant

    @sruckh wrote:

    Ultimately I would like to use something like: Year after 52 weeks before today.

    That’s: “year=2007”

    You are right in that it doesn’t update itself, though. It would have to be changed once a year.

    time_added does not really make sense either. If I added all my 1950 songs today I really would not like those songs to be played in my filter “Songs newer then 1 year”. I figured massaging the OS time_modified field would be easier. Is there a better method for creating this filter that I am missing?

    If you set you tags right before you add them to your library, then time_modified is the same as time_added anyway, so those are really the same time. So your argument (which makes sense) against time_added applies to time_modified just as easily.

    I did not see the Wiki until after seeing the mt-daapd.playlist file. I was copying the examples from the .playlist file.

    There are some small differences between the .playlist syntax and the current syntax. The .playlist used lex & yacc, the current uses a home-rolled rd parser, which can’t quite support the same grammar. So do consider the wiki to be the canonical reference.

    Restarting the firefly server, and the DAAP client actually did finally produce some results. Not necessarily the results I expected but some results none the less.

    You have to disconnect and reconnect the client to see playlist changes. Also, double-check your tags to make sure that tag errors aren’t what is causing you to see stuff you don’t expect.

    Either I have not figured out how to maximize the smart playlist query grammar, or I am needing more features. Although the WIKI is very informative, it did not help me achieve how I would like to use the smart playlist feature.

    Other than “Year=2007”, what else is it you are trying to do that you can’t?

    The only things I think the current playlist implementation is missing is:

    1. “Top N”
    2. “Order by”

    There are a convenience functions I’d like:

    1. In playlist “x”

    But that’s it. I don’t think there is much expressive functionality missing.

    I’d welcome comments on that, though.

    — Ron

    #9545

    sruckh
    Participant

    Other than “Year=2007”, what else is it you are trying to do that you can’t?

    Most dynamic lists related to this same topic:
    Songs from the past 5 years, past 20 years, etc.

    Yes, your suggestion is perfect for what I am essentially trying to accomplish, but I was hoping to make use of a truly dynamic smart list.

    I’d welcome comments on that, though.

    Along with what you mentioned, some sort of random feature I think would be cool.

    Something like:
    Return a random list of 100 items that are part of my favorites (ratings > 80). So the ability to create random dynamic lists and to limit the number of items returned for a particular query.

    Thank you for your response and suggestions, and most importantly the product.

    #9546

    rpedde
    Participant

    Most dynamic lists related to this same topic:
    Songs from the past 5 years, past 20 years, etc.

    I don’t want to spend a lot of time implementing math functions and stuff, but maybe I can add some simple variables to implement that sort of thing without getting too crazy.

    Along with what you mentioned, some sort of random feature I think would be cool.

    Ah, yeah, that would be part of the ordering, so :

    top 5 order by random where rating > 80

    for 5 random 5-star items.

    Yeah, I want that too. 🙂

    — Ron

    #9547

    fizze
    Participant

    Playlist by filesystem directory name:
    path includes “*directory*”

    I also tried
    path includes “directory”

    Now, in most DBs a wildcard doesnt work like it does in a “normal” regexp.

    SQL handles searches or comparisions differently, so an exact match has to be searched with the equals operator = while a “unsharp” search has to be done with the “like” operator.

    select id from songs where fpath = 'directory';

    vs.

    select id from songs where fpath like '%directory%';

    The % signs are a wildcard with respect to the “like” operator. They are prepended and appended to the search from the smart playlist when you specify “includes” automatically. 😉

    #9548

    Anonymous

    You might be interested to know that I’ve developed a technique that can be used to work round some of the limitations discussed in this thread – top 10 lists, etc. It involves creating a static playlist instead, via an automated process.

    See here for more details: http://www.andrewferrier.com/blog/2008/01/05/more-flexible-firefly-smart-playlists-with-perl-sqlite3-and-m3u/

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.