Difference between revisions of "Foobar2000:Components/Playback Statistics v3.x (foo playcount)"

From Hydrogenaudio Knowledgebase
Jump to: navigation, search
(Common problem workaround info)
m
 
(18 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{fb2k}}
+
[[Category:Foobar2000 Legacy Playback statistics components|Legacy Playback statistics components]]
 +
{{infobox foobar2000 component
 +
| name                = Playback Statistics
 +
| module_name          = foo_playcount
 +
| developer            = Peter Pawlowski
 +
| repository          =
 +
| released            = 2006
 +
| released_ref        =
 +
| stable_release      = 3.1.5
 +
| stable_release_date  = 2023-03-15
 +
| preview_release      =
 +
| preview_release_date =
 +
| foobar2000_minimum  = 1.6
 +
| foobar2000_maximum  =
 +
| foobar2000_ui_module = Default UI; Columns UI
 +
| use                  = Playback statistics
 +
| license              =
 +
}}
 +
 
 +
 
 +
==Notes==
 +
 
 
This component collects and maintains statistics for played songs.
 
This component collects and maintains statistics for played songs.
  
 +
==Statistics==
 
The statistics include:
 
The statistics include:
 +
 
* Time/date first played
 
* Time/date first played
 
* Time/date last played
 
* Time/date last played
Line 9: Line 32:
 
* Rating
 
* Rating
  
== New playback statistics data pinning scheme introduced in version 3.0 ==
+
==New playback statistics data pinning scheme introduced in version 3.0==
 
Playback statistics are now pinned to a combination of artist + album + disc number + track number + track title information, contrary to pre-3.0 versions which would pin data to file paths.
 
Playback statistics are now pinned to a combination of artist + album + disc number + track number + track title information, contrary to pre-3.0 versions which would pin data to file paths.
  
 
The consequences of this behavior are:
 
The consequences of this behavior are:
 +
 
* Statistics are shared between redundant copies of the same tracks - useful when you keep separate copies of your music in different formats such as lossy + lossless.
 
* Statistics are shared between redundant copies of the same tracks - useful when you keep separate copies of your music in different formats such as lossy + lossless.
 
* Automatic carrying over of statistics when acquiring the same music in another format, as long as tags match.
 
* Automatic carrying over of statistics when acquiring the same music in another format, as long as tags match.
Line 23: Line 47:
 
Playback statistics data is no longer dropped when the tracks are removed from the media library. A record gets removed when no matching track has been seen by foobar2000 (in Media Library or in any playlist or in an imported XML backup of playback statistics) for four weeks.
 
Playback statistics data is no longer dropped when the tracks are removed from the media library. A record gets removed when no matching track has been seen by foobar2000 (in Media Library or in any playlist or in an imported XML backup of playback statistics) for four weeks.
  
== Backwards compatibility ==
+
==Title formatting fields==
As with all previous releases, this component is fully backwards compatible with databases created by any versions released publicly before. If you have used an earlier version of the Playback Statistics component before, your existing data will be automatically imported on first run.
+
; {{code|%first_played%}}
 +
: Date/time at which the song was played for the first time.
 +
; {{code|%last_played%}}
 +
: Date/time at which the song was played last time.
 +
; {{code|%play_count%}}
 +
: How many times the song has been played.
 +
; {{code|%played_per_day%}}
 +
: Estimate how many times per day the song has been played, based on time first played, time last played and times played.
 +
; {{code|%added%}}
 +
: Date/time at which the song was added to the Media Library.
 +
; {{code|%rating%}}
 +
: Song's rating, on a 1–5 scale.
 +
; {{code|%rating_stars%}}
 +
: Song's rating, formatted as up to five stars, e.g. ★★★
 +
; {{code|%rating_stars_fixed%}}
 +
: Song's rating, formatted as five stars, e.g. ★★★☆☆
  
If you wish to keep the ability to revert to an older 2.x version, please back up your PlaybackStatistics.dat file before running the new component first time.
+
'''Note:''' You may need to change your fonts for the stars-formatting fields to produce readable output.
  
== XML backup functionality ==
+
Detailed information about Title formatting for Playback Statistics can be found [[Titleformat_Playback_Statistics|here]].
 +
 
 +
==XML backup functionality==
 
You can export playback statistics to an XML file and import them later, through ''Library => Playback Statistics'' menu commands, or through context menu on specific tracks. This can be used to easily transfer playback statistics between different foobar2000 installations or profiles.
 
You can export playback statistics to an XML file and import them later, through ''Library => Playback Statistics'' menu commands, or through context menu on specific tracks. This can be used to easily transfer playback statistics between different foobar2000 installations or profiles.
  
== Title formatting fields ==
+
==Backwards compatibility==
* ''%first_played%'' - date/time at which the song was played for the first time.
+
As with all previous releases, this component is fully backwards compatible with databases created by any versions released publicly before. If you have used an earlier version of the Playback Statistics component before, your existing data will be automatically imported on first run.
* ''%last_played%'' - date/time at which the song was played last time.
+
 
* ''%play_count%'' - how many times the song has been played.
+
If you wish to keep the ability to revert to an older 2.x version, please back up your PlaybackStatistics.dat file before running the new component first time.
* ''%played_per_day%'' - estimate how many times per day the song has been played, based on time first played, time last played and times played.
+
* ''%added%'' - date/time at which the song was added to the Media Library.
+
* ''%rating%'' - song's rating, on a 1..5 scale.
+
* ''%rating_stars%'' - song's rating, formatted as up to five stars, e.g. ★★★
+
* ''%rating_stars_fixed%'' - song's rating, formatted as five stars, e.g. ★★★☆☆
+
  
Note that you may need to change your fonts for the stars-formatting fields to produce readable output.
+
==Common sources of confusion==
 +
Please note that foo_playcount takes over {{code|%RATING%}}, {{code|%PLAY_COUNT%}}, and all other mappings corresponding to its native fields listed above, using these mappings to return the fields from its own database rather than from files themselves. If you want to display such fields from the tags of files rather than from the database, use {{code|$meta(rating)}} and so on in your title-formatting. This behavior has changed in version 3.0: previous versions would fall back to reading the field from the file's tags when the corresponding field was not present in the database.
  
== Common problems after installing ==
+
It is important to note that the component cannot retrieve data from before it was installed; therefore, it initializes statistics when it is installed. Most uses of the {{code|%ADDED%}} field, for example, will at first return the entire media library; this is because foo_playcount has no way of guessing when the files were actually added because it was not present at the time. Thus, the default value of {{code|%ADDED%}} is set to the time that the component was first loaded. Any items added after foo_playcount is installed will have the field set properly because it is present to detect them.
Please note that this component takes over %rating%, showing rating according to its own database. If you store rating in tags, use $meta(rating) to access it. This behavior has changed in version 3.0, previous versions would fall back to tag contents when rating information was not present in the database.
+
  
== Compatibility ==
+
==External links==
foobar2000 v1.1 or newer is required, beta versions included.
+
* {{foobar2000|https://www.foobar2000.org/components/view/foo_playcount|Playback Statistics}}

Latest revision as of 13:42, 18 March 2023

Playback Statistics

foo_playcount
Developer(s) Peter Pawlowski
Repository
Release information
Initial release 2006
Stable release 3.1.5 (March 15, 2023)
Preview release
foobar2000 compatibility
Architecture {{{foobar2000_architecture}}}
Minimum version 1.6
Maximum version
UI module(s) Default UI; Columns UI
Additional information
Use Playback statistics
License
Discussion thread {{{discussion_thread}}}
View all components


Notes

This component collects and maintains statistics for played songs.

Statistics

The statistics include:

  • Time/date first played
  • Time/date last played
  • Playback count
  • Time/date added to the Media Library
  • Rating

New playback statistics data pinning scheme introduced in version 3.0

Playback statistics are now pinned to a combination of artist + album + disc number + track number + track title information, contrary to pre-3.0 versions which would pin data to file paths.

The consequences of this behavior are:

  • Statistics are shared between redundant copies of the same tracks - useful when you keep separate copies of your music in different formats such as lossy + lossless.
  • Automatic carrying over of statistics when acquiring the same music in another format, as long as tags match.
  • No risk of data loss when moving files around or between computers.

When editing tags, affected playback statistics records are transferred accordingly.

Starting from version 3.0, collection of playback statistics is no longer restricted to your Media Library content. You can use this component without using Media Library at all, however, you should keep your non-ML music referenced from a playlist for foobar2000 to maintain the statistics.

Playback statistics data is no longer dropped when the tracks are removed from the media library. A record gets removed when no matching track has been seen by foobar2000 (in Media Library or in any playlist or in an imported XML backup of playback statistics) for four weeks.

Title formatting fields

%first_played%
Date/time at which the song was played for the first time.
%last_played%
Date/time at which the song was played last time.
%play_count%
How many times the song has been played.
%played_per_day%
Estimate how many times per day the song has been played, based on time first played, time last played and times played.
%added%
Date/time at which the song was added to the Media Library.
%rating%
Song's rating, on a 1–5 scale.
%rating_stars%
Song's rating, formatted as up to five stars, e.g. ★★★
%rating_stars_fixed%
Song's rating, formatted as five stars, e.g. ★★★☆☆

Note: You may need to change your fonts for the stars-formatting fields to produce readable output.

Detailed information about Title formatting for Playback Statistics can be found here.

XML backup functionality

You can export playback statistics to an XML file and import them later, through Library => Playback Statistics menu commands, or through context menu on specific tracks. This can be used to easily transfer playback statistics between different foobar2000 installations or profiles.

Backwards compatibility

As with all previous releases, this component is fully backwards compatible with databases created by any versions released publicly before. If you have used an earlier version of the Playback Statistics component before, your existing data will be automatically imported on first run.

If you wish to keep the ability to revert to an older 2.x version, please back up your PlaybackStatistics.dat file before running the new component first time.

Common sources of confusion

Please note that foo_playcount takes over %RATING%, %PLAY_COUNT%, and all other mappings corresponding to its native fields listed above, using these mappings to return the fields from its own database rather than from files themselves. If you want to display such fields from the tags of files rather than from the database, use $meta(rating) and so on in your title-formatting. This behavior has changed in version 3.0: previous versions would fall back to reading the field from the file's tags when the corresponding field was not present in the database.

It is important to note that the component cannot retrieve data from before it was installed; therefore, it initializes statistics when it is installed. Most uses of the %ADDED% field, for example, will at first return the entire media library; this is because foo_playcount has no way of guessing when the files were actually added because it was not present at the time. Thus, the default value of %ADDED% is set to the time that the component was first loaded. Any items added after foo_playcount is installed will have the field set properly because it is present to detect them.

External links