Page 1 of 2

Date format in Smart Playlists

Posted: Sat May 12, 2007 2:28 am
by k2103
Which is the required date format for the selection criteria in Smart Playlists?
I tested several formats without success.

Ex.: Date Added is before yy/mm/dd

:?:

Re: Date format in Smart Playlists

Posted: Sat May 12, 2007 5:32 am
by sbooth
k2103 wrote:Which is the required date format for the selection criteria in Smart Playlists?
I tested several formats without success.

Ex.: Date Added is before yy/mm/dd
The date format is "May 11, 2007".

However, I found a bug in the date portion of the smart playlists in 0.1.1, which I've fixed in the unstable version (r799 as of now).

Posted: Sat May 12, 2007 5:42 am
by tethead
it would be really cool to be able to list YYYY/MM/DD and YYYY-MM-DD as well, that's a very popular date format for Etree users.

Posted: Sat May 12, 2007 6:17 am
by sbooth
The dates I am referring to are only dates determined by Play: date added, last played, last skipped, etc.
The metadata DATE (or YEAR) is a free text field, and should be searchable as a string.

Posted: Sat May 12, 2007 12:15 pm
by k2103
I have just installed the version Play-r801 and the format "May 11, 2007" still does not function.

Posted: Sat May 12, 2007 3:25 pm
by sbooth
Which item are you attempting to filter on (Date Added, Last Played, etc)?

Posted: Sat May 12, 2007 4:25 pm
by k2103
"Date Added", but it's the same for other items.

Posted: Sat May 12, 2007 4:48 pm
by RonaldPR
I did not try smart playlists before, but if I try to use "May 11, 2007", I get "Invalid date string". (in r801)

Posted: Sat May 12, 2007 5:00 pm
by RonaldPR
Found another bug with smart playlists: If I select for Artist _begins_ with "Elton", all Elton John's songs are found as expected, but if I select for Artist _contains_ "Elton", then nothing is found.

Posted: Sat May 12, 2007 5:02 pm
by sbooth
I wonder if this could be a locale issue. Perhaps Play wants the input in your default language (the one set in System Preferences)?

One thing to try for troubleshooting would be to set the locale to English and then see if date input works using the format we've discussed here.

Posted: Sat May 12, 2007 6:45 pm
by k2103
It's exact, by selecting English like default language, the format “May 11, 2007” is accepted and functions. But I cannot keep this configuration permanently.

In addition, it seems to have several others bugs.
- “Duration_is less than_2.04” or “Duration_is equal to_2.04” does not return anything. The format should be 2:04, but this one is not accepted.
- “Composer_contains_Ravel Maurice” returns Ravel Maurice but “Composer_contains_Ravel” does not return anything.

I think that all this chapter would have to be re-examined.

Happy to contribute.

Posted: Sat May 12, 2007 6:48 pm
by sbooth
The duration is in seconds, so 2:04 would be 124.

For contains, you need to insert the wildcard *. So for the Elton John example, it should be Artist contains "*Elton*" and for Ravel it would be Composer contains "*Ravel*".

I should change it so the * is not required.

Posted: Sat May 12, 2007 7:17 pm
by RonaldPR
sbooth wrote:I wonder if this could be a locale issue. Perhaps Play wants the input in your default language (the one set in System Preferences)?
The default language itself makes no difference, but selecting the date will work when in 'International' system pref panel the date format is set to (US) English, but with different date format settings none of the set formats will work. This does not work with my usual Dutch date format. I suppose there must be a way to use in Play the format that is set in system preferences.

Posted: Sat May 12, 2007 7:24 pm
by RonaldPR
sbooth wrote:The duration is in seconds, so 2:04 would be 124.
In the Library and Play Queue lists and with the progression slider you use the format m:ss. I think you should use the same format for playlist selections.
For contains, you need to insert the wildcard *. So for the Elton John example, it should be Artist contains "*Elton*" and for Ravel it would be Composer contains "*Ravel*".

I should change it so the * is not required.
Yes, I think you should.

Posted: Sat May 12, 2007 8:47 pm
by k2103
sbooth wrote:I wonder if this could be a locale issue. Perhaps Play wants the input in your default language (the one set in System Preferences)?
I got it! :D

If I write "mai 11, 2007" (in french) instead of "May 11, 2007", it works.

... :arrow: