"Most Played" and "Recently played"

It's easy to create automatic playlists containing the most played or most recently played tracks.
I said it's easy, I didn't say you don't have to install a few components!

1.Install components:
foo_playcount + foo_history

foo_playcount adds automatic data fields to the tracks, including the number of plays, or playcount (%play_count%), and the time of last play (%last_played%).

2. Advanced search
If you type, for example, "night" in the search bar above your facets, all entries containing "night" in any field will be selected. But you can restrict to one field. For example:
title HAS night" will only select tracks which title includes night. You can use "HAS", "IS", "NOT", "AND", "OR", "GREATER", "LESS", "PRESENT", "MISSING"....
You can learn more by clicking on the triangle icon at the right end of the search bar in the facets, then go "help".

3. Adding your "most played" list
Now open a plain search box (Menu>Library>Search) and type the following search request:
%play_count% GREATER 0 SORT DESCENDING BY %play_count%
You will have guessed that this displayed all tracks played at least once, sorted by decreasing playcount.

Then select the "[...]" button at the right of the search bar, and "Create Autoplaylist"
A new Playlist has been added to your playlist manager (vertical panel in the middle), that you can rename "Most Played" or whatever.

4. Other lists
Here are other examples of syntaxes.

%last_played% DURING LAST 1 WEEK SORT DESCENDING BY %last_played%
=> Most recently played (in the last week)

=> Recently added (last week)

NOT %added% IS "" SORT DESCENDING BY %added%
=> All tracks, ordered from the most recently added

TIP: If you want to disable the recording of the statistics, just untick Menu>Library>Playback Statistics>Monitor Playing Tracks

5. Write tag in the file
By default, the playcount statistics are stored in a separate file, and not in the tags of the files. If you want, you can write these data to the files (for example, if you are about to reinstall foobar, and want to keep these data. Well, you could also find the data file. Or if you want to send the file. Or make a "backup" of your stats. Whatever)
In the context menu of any track selection, just select Playback Statistics>Write Statistics to File Tags.
I let you guess what "Import statistics from file tags" does.

6. History
If you play a track several times, the track will only be displayed once in the "recently played list". To display all plays, install the "foo_history" plugin. Then, go to the Menu>Library>History menu to tick "History".

An automatic playlist has been created, showing the play history.

That's it!


Anonymous said...

Helps me a lot to make my loving foo.

Anonymous said...

links to foo_playcount and foo_history appear to be broken

Anonymous said...

just restating the problem above

Anonymous said...

New link for foo_playcount:

Nate SIlvers said...

Thanks for this article it makes foobar 100x more fun.