Help - Search - Members - Calendar
Full Version: Autoplaylist by date range
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
wolfsong
Any ideas on how I might go about filtering tracks that have not been played in X days? I know I can use %last_played% to determine if and when a track has been played but I don't see a "today" function. Thanks.
Zarkon
Use the foo_cwb_hooks plugin and use the code (for example:) "$cwb_datediff(%last_played%,%cwb_systemdate%) GREATER 30".
wolfsong
QUOTE(Zarkon @ Feb 25 2008, 17:31) *

Use the foo_cwb_hooks plugin and use the code (for example:) "$cwb_datediff(%last_played%,%cwb_systemdate%) GREATER 30".

For some reason while it finds results, it doesn't create a playlist.
Samurro
Does this need a last_played tag in the mp3 files? When yes, which program does this?
buktore
QUOTE(Samurro @ Feb 26 2008, 13:16) *

Does this need a last_played tag in the mp3 files? When yes, which program does this?

Yes, you need last_played tag in your files or some type of database. Foobar can do this, You can use official playcount plugin or 3rd party playcount plugin which have more customize option. Both plugin can add last_played tag.
Squeller
QUOTE(Zarkon @ Feb 26 2008, 01:31) *
Use the foo_cwb_hooks plugin and use the code (for example:) "$cwb_datediff(%last_played%,%cwb_systemdate%) GREATER 30".

Can I put such code into "Library - Search"? I tried "$cwb_datediff(%last_played%,%cwb_systemdate%) LESS 7" but it returns nothing. I definitely have some tracks in my library with "%last_played% set today... I'd also like to have an autoplaylist with this...
Also, in foo_uie_quicksearch it doesn't return anything...
Additionally: Does it make a difference if I store in Tags or in a database? Will components still be able to display %last_played%? I don't want to store %last_played% in tags because of backup reasons.

EDIT: OK, I've got it. (foo_custominfo/playcount combination). But still don't know how to search or make an autoplaylist with this.
buktore
Here is what I use with autoplaylist. You will have to put (") at somewhere to make it work. (This part sometime is a bit confusing)

CODE
"$left(%last_played%,1)" IS 2 AND "$cwb_datediff(%last_played%,%cwb_systemdatetime%)" LESS 15


The "$left(%last_played%,1)" IS 2 part is to check that there is %last_played% tag in files. If not check the result will also have track that don't played yet. There maybe a better approach though.

Last time I checked it should work with all type of search tool. It work with quicksearch toolbar and with old autoplaylist. And I once test with albumlist & build-in media libraly search of 0.9.5.1 and it also work as far as i remember. And also it should work with both custominfo tag (3rd party plugin style) and official playback statistic style database tag.

Also, here is the sort format to make latest played track at top.

CODE
$sub(999999999999,$replace($right(%last_played%,17),'-',,':',,' ',))
delphine
QUOTE(Squeller @ Feb 26 2008, 10:01) *

QUOTE(Zarkon @ Feb 26 2008, 01:31) *
Use the foo_cwb_hooks plugin and use the code (for example:) "$cwb_datediff(%last_played%,%cwb_systemdate%) GREATER 30".

Can I put such code into "Library - Search"? I tried "$cwb_datediff(%last_played%,%cwb_systemdate%) LESS 7" but it returns nothing. I definitely have some tracks in my library with "%last_played% set today... I'd also like to have an autoplaylist with this...
Also, in foo_uie_quicksearch it doesn't return anything...
Additionally: Does it make a difference if I store in Tags or in a database? Will components still be able to display %last_played%? I don't want to store %last_played% in tags because of backup reasons.

EDIT: OK, I've got it. (foo_custominfo/playcount combination). But still don't know how to search or make an autoplaylist with this.


I'm not sure how helpful this will be, you may already have figured it out - but I've also been trying to create such a playlist, and using the info from this thread, I realised the quotation marks in the query are misplaced. Instead of having them round the entire query, you need them round the front part of it, like this:

"$cwb_datediff(%last_played%,%cwb_systemdate%)" GREATER 30

and it works like a charm in the Autoplaylist manager!

EDIT: I just realised that buktore's post (above mine) says much the same thing. Maybe another way of making sure the playlist includes tracks that haven't been played yet would be a playcount query, like %PLAY_COUNTER% LESS 1 or %PLAY_COUNTER% IS ? - this is what I'm using at the moment and it works pretty well.
Squeller
QUOTE(delphine @ Feb 26 2008, 14:23) *
Maybe another way of making sure the playlist includes tracks that haven't been played yet would be a playcount query, like %PLAY_COUNTER% LESS 1 or %PLAY_COUNTER% IS ?
Buktores example includes tracks which are already tagged by playcounter. Finding the non-Tagged ones is probably easier mith MISSING (see query help).
wolfsong
QUOTE(delphine @ Feb 26 2008, 06:23) *

I'm not sure how helpful this will be, you may already have figured it out - but I've also been trying to create such a playlist, and using the info from this thread, I realised the quotation marks in the query are misplaced. Instead of having them round the entire query, you need them round the front part of it, like this:

"$cwb_datediff(%last_played%,%cwb_systemdate%)" GREATER 30

and it works like a charm in the Autoplaylist manager!

Yes. The quotes are misplaced but I'm using AlbumList not Autoplaylist Manager and it doesn't seem to work.
wolfsong
QUOTE(wolfsong @ Feb 26 2008, 10:35) *

QUOTE(delphine @ Feb 26 2008, 06:23) *

I'm not sure how helpful this will be, you may already have figured it out - but I've also been trying to create such a playlist, and using the info from this thread, I realised the quotation marks in the query are misplaced. Instead of having them round the entire query, you need them round the front part of it, like this:

"$cwb_datediff(%last_played%,%cwb_systemdate%)" GREATER 30

and it works like a charm in the Autoplaylist manager!

Yes. The quotes are misplaced but I'm using AlbumList not Autoplaylist Manager and it doesn't seem to work.

Does anyone know how to do this with AlbumList?
Mar2zz
Think this is also possible with latest playback statistics
query in album list:
%last_played% DURING LAST 7 DAYS
or for excluding time
%last_played% NOT DURING LAST 7 DAYS

days can be weeks or months also. can be combined with AND operator.

works for me and i have official components only.
wolfsong
QUOTE(Mar2zz @ Jun 4 2008, 15:28) *

Think this is also possible with latest playback statistics
query in album list:
%last_played% DURING LAST 7 DAYS
or for excluding time
%last_played% NOT DURING LAST 7 DAYS

days can be weeks or months also. can be combined with AND operator.

works for me and i have official components only.

What version number are you using? I just installed 2.1.4 and it doesn't work for me.
Mar2zz
2.1.4 and foobar 9.5.3.

Here are all the formats for it (you can find those in your foobarfolder or by pressing ? in database search panel
Time Expressions

QUOTE

<time1> BEFORE <time2>
Returns only items where <time1> value is before <time2>.
Example: %last_modified% BEFORE 2008
*
<time1> AFTER <time2>
Returns only items where <time1> value is after <time2>.
Example: %last_modified% AFTER 2008
*
<time1> SINCE <time2>
Returns only items where <time1> value is not before <time2>.
Example: %last_modified% SINCE 2007
*
<time1> DURING <time2>
Returns only items where <time1> value is a subset of <time2> period.
Example: %last_modified% DURING 2007
*
<time> DURING LAST <number> <time-unit>
Returns items where <time> value is contained in the specified period.
<time-unit> can be one of SECONDS, MINUTES, HOURS, DAYS, or WEEKS.
Example: %last_modified% DURING LAST 2 WEEKS
If <number> is 1, the expression can be simplified to <time> DURING LAST SECOND/MINUTE/HOUR/DAY/WEEK

Time values used in these expressions must be in one of the following formats: YYYY, YYYY-MM, YYYY-MM-DD, YYYY-MM-DD hh, YYYY-MM-DD hh:mm, YYYY-MM-DD hh:mm:ss.


Just type it in filter in album list or as query in facets or database search. After that you can save your results as a (auto)playlist.

(i think my 2nd one is wrong. This must be: NOT %last_played% DURING LAST 7 DAYS)
wolfsong
QUOTE(Mar2zz @ Jun 5 2008, 00:39) *

(i think my 2nd one is wrong. This must be: NOT %last_played% DURING LAST 7 DAYS)

This was what I was trying to use, works now. Thanks.
metal_termite
QUOTE(Mar2zz @ Jun 5 2008, 01:39) *

2.1.4 and foobar 9.5.3.


I have Playback Statistics 2.14, but am using it with foobar version 0.9.5.2. Is foobar version 0.9.5.3 required for the query examples you gave? Because when I type those examples in the Media Library Search they yield no results.

EDIT: Fixed typo.
shakey_snake
QUOTE(metal_termite @ Jun 5 2008, 15:24) *

Is foobar version 0.9.5.3 required for the query examples you gave?

Yes.
Mar2zz
Yes it is. Take a look at 9.5.3. changelog.
http://foobar2000.org/changelog.html

If you upgrade it can be possible that some of your old 3rd party components won't work properly anymore and you will get a warning for that every time you start foobar.

(lol @ shakey...)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.