Foobar2000:Components 0.9/Playback Statistics Custom (foo playback custom): Difference between revisions

From Hydrogenaudio Knowledgebase
mNo edit summary
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:Foobar2000 Legacy Playback statistics components|Legacy Playback statistics components]]
=Introduction=
=Introduction=
This component stores playback statistics (play count, first played date, last played date) in a tag like foo_playcount_mod, but has a faster response time. If the component is unable to write a tag, you can have it write the information into the custom_info database (this requires you to have foo_custominfo installed).
This component stores playback statistics (play count, first played date, last played date) in a tag like [[Foobar2000:Components 0.9/Play Count Mod (foo playcount mod)|foo_playcount_mod]], but has a faster response time. If the component is unable to write a tag, you can have it write the information into the custom_info database (this requires you to have [[Foobar2000:Components 0.9/Custom Info (foo_custominfo)|foo_custominfo]] installed).


=Features=
=Features=
Line 7: Line 8:
* Allows you to select the tags where the information is to be stored: only in the tag, only in the custominfo database or in custominfo database only if tag cannot be written.
* Allows you to select the tags where the information is to be stored: only in the tag, only in the custominfo database or in custominfo database only if tag cannot be written.
* Allows you to select when the information is updated (when the song starts playing, when it has finished etc).
* Allows you to select when the information is updated (when the song starts playing, when it has finished etc).
* Allows you to convert from old standards and the official playback statistics format to new standards (e.g. Play_Time, Play_date, Last Played Timestamp, First Played Timestamp, Play Count etc. to Play_Counter, Last_Played, and First_Played)


=Default Settings=
=Default Settings=
Line 38: Line 40:


==Playback statistics settings==
==Playback statistics settings==
* Use the dropdown menu to select where you would like to store the information:
** 'only tag': this option will write the information into the song's tag.
** 'only foo_custominfo database': this option will write the information into the foo_custominfo database. You need the foo_custominfo component to be installed.
** 'tag and foo_custominfo...': this option will write the information to the song's tag whenever possible, if it is unable to do so (e.g. format does not support tagging -> wav), then the information will be stored in foo_custominfo.
Which option should i choose? Writing tags in information means that the information will always be present regardless of whether you rename or move the file. However, when you back up your collection even a single change in tag will register as a file change and will result in the backup program copying the entire file again. if you play lots of music, you could easily be forced to copy a lot of (otherwise unchanged) music needlessly. Also, writing the tag will change the file's MD5 signature, which will wreak havoc if you're using MD5 to verify your files. Foo_custominfo database option avoids the need to write the tags in the file, so you don't have the backup or the MD5 problem. However, foo_custominfo information is lost when you rename/move the file, and the options aren't acccessible through masstagger/properties window. The third option is a compromise between the two, however requires the foo_custominfo component to be installed. So it's not justified for people who don't use wav/wma files very often..
* Use the checkboxes to select which tags you want to write
* Use the checkboxes to select which tags you want to write
* If you want to use a different tag to store the information (e.g. Play_Counter instead of Play_count), type Play_count in the box next to the tag and press the apply button.
* If you want to use a different tag to store the information (e.g. Play_Count instead of Play_counter), type Play_count in the box next to the tag and press the apply button.
* If you want to remove older tag standards as they are encountered, check the "convert old tag and remove" option. If you used to use the offfical playback statistics component, leave the tag names unchanged. Otherwise, replace as necessary


==Other Settings==
==Other Settings==
Line 64: Line 74:
* Defrag your hard drive
* Defrag your hard drive


If none of the above works, use [[foo_custom_pc]] instead.
If none of the above works, make the plugin write the information to the custominfo database.
 
'''Q.''' How do i convert the tag standards in ALL my files at once form the last_played_timestamp (etc.) format to the new standard?
 
'''A.''' The plugin is capable of cleaning the old information as they are encountered, however it might be more prudent to convert the old information to the newer standard in one go (for autoplaylists, columns display etc).
 
The main difference between the standards used by the official plugin and these unofficial ones are:
* ''Play_count'' in the official plugin vs ''Play_counter'' in the unofficial plugin
 
To convert from play_count to play_counter is pretty straightforward. Make an autoplaylist with all the files which have the "play_count" tag (by using <tt>NOT play_count MISSING</tt> in the Query). Select all files, right click them, go to <tt> Tagging -> Manage Scripts </tt>. Click <tt>Add</tt>, and choose <tt>Copy Value</tt>. Under Source put <tt>play_count</tt>, under Destination put <tt>play_counter</tt> and click OK. Again click <tt>Add</tt> and select <tt>Delete values</tt>. Put <tt>play_count</tt> and click OK. Run this script. Now all your play_count information is in play_counter field.
 
* ''Last_played_timestamp'' and ''First_played_timestamp'' (which are in the Win32Filetime format, and linked to last_played and first_played) vs ''Last_played'' and ''first_played'' (which are in YYYY-MM-DD HH:MM:SS format)
Note: the official playback plugin is still installed for this to work
 
This is slightly trickier because of the different standards used.  One method to overcome this hurdle is to use Text Tools which is a part of foo_utils. Go to the Text Tools preferences  and delete the entries in header, body and  footer. Under body enter: <tt> %last_played%. %first_played%$crlf()</tt>. Now create a playlist of all the files that contain both first_played_timestamp and last_played_timestamp (use <tt>NOT first_played_timestamp MISSING AND NOT last_played_timestamp MISSING</tt> as the query). Select about 550 files in the autoplaylist, right click them <tt> Text Tools -> Copy Text</tt>. Now open Masstagger (do not unselect the files). Click <tt> Add</tt>, choose <tt>Input data (one line per track)</tt> and paste the contents into the resulting window (press Ctrl-V or right click paste). Under Scheme, use <tt>%last_played%. %first_played%</tt>. Click OK. and run the script. Repeat these steps for remaining files. NOTE: 550 files is due to the limitations of the masstagger window. If you try to paste more information, the contents will be truncated.


=Link=
=Link=
* [http://www.hydrogenaudio.org/forums/index.php?showtopic=55746 Discussion thread]
* {{ha|https://hydrogenaud.io/index.php/topic,55746}}
* [http://kitahei.cocolog-nifty.com/youyou/2007/04/foo_custominfo__6ab8.html Download Site]
* [http://kitahei.cocolog-nifty.com/youyou/2007/04/foo_custominfo__6ab8.html Download Site]

Latest revision as of 18:38, 7 October 2022

Introduction

This component stores playback statistics (play count, first played date, last played date) in a tag like foo_playcount_mod, but has a faster response time. If the component is unable to write a tag, you can have it write the information into the custom_info database (this requires you to have foo_custominfo installed).

Features

  • Writes playback statistics (play_counter, first_played, last_played) in tags
  • Allows you to select which information to be written
  • Allows you to select the tags where the information is to be stored: only in the tag, only in the custominfo database or in custominfo database only if tag cannot be written.
  • Allows you to select when the information is updated (when the song starts playing, when it has finished etc).
  • Allows you to convert from old standards and the official playback statistics format to new standards (e.g. Play_Time, Play_date, Last Played Timestamp, First Played Timestamp, Play Count etc. to Play_Counter, Last_Played, and First_Played)

Default Settings

Note: All of the following can be changed

  • Default tag name for play count: %play_counter%
  • Default tag name for first played: %first_played%
  • Default tag name for last played: %last_played%
  • format of first played and last played is: YYYY-MM-DD HH:MM:SS
  • Update playback statistics: when song has been played for 60 seconds

Installation

Copy the foo_playback_custom to foobar2000's components directory. Restart foobar.

Settings

  1. . Run foobar2000
  2. . Check to see that foo_playback_custom is installed by going to Preferences -> Components. Also, check to see if you are using the latest version
  3. . Go to Preferences -> Tools -> Playback Statistics Custom

Playback Statistics Update Timing

This option allow you to change when the plugin updates information:

  • Disable (Do not update)
 (self explanatory)
  • Update when a track is started
 (self explanatory)
  • Update when a track is ended
 (self explanatory)
  • Update when playback percentage is
 You can select a value between 1% and 99%
  • Update counter when playback second(s) is:
 You can set any value greater than 1 second

Playback statistics settings

  • Use the dropdown menu to select where you would like to store the information:
    • 'only tag': this option will write the information into the song's tag.
    • 'only foo_custominfo database': this option will write the information into the foo_custominfo database. You need the foo_custominfo component to be installed.
    • 'tag and foo_custominfo...': this option will write the information to the song's tag whenever possible, if it is unable to do so (e.g. format does not support tagging -> wav), then the information will be stored in foo_custominfo.

Which option should i choose? Writing tags in information means that the information will always be present regardless of whether you rename or move the file. However, when you back up your collection even a single change in tag will register as a file change and will result in the backup program copying the entire file again. if you play lots of music, you could easily be forced to copy a lot of (otherwise unchanged) music needlessly. Also, writing the tag will change the file's MD5 signature, which will wreak havoc if you're using MD5 to verify your files. Foo_custominfo database option avoids the need to write the tags in the file, so you don't have the backup or the MD5 problem. However, foo_custominfo information is lost when you rename/move the file, and the options aren't acccessible through masstagger/properties window. The third option is a compromise between the two, however requires the foo_custominfo component to be installed. So it's not justified for people who don't use wav/wma files very often..

  • Use the checkboxes to select which tags you want to write
  • If you want to use a different tag to store the information (e.g. Play_Count instead of Play_counter), type Play_count in the box next to the tag and press the apply button.
  • If you want to remove older tag standards as they are encountered, check the "convert old tag and remove" option. If you used to use the offfical playback statistics component, leave the tag names unchanged. Otherwise, replace as necessary

Other Settings

  • Only Tracks in media library update playback statistics

If selected, no information will be written to songs that are not in the media library

  • Store playback statistics with foo_custominfo database...

If selected, the component will write information to custominfo database if it fails to write a tag. NOTE: foo_custominfo has to be installed.


FAQ

Q. I get a popup window when playback statistics is being updated. Is this normal?

A. Normally, the window shouldn't appear while using the component. it only appears when I/O processing time while writing the tag is long. The track might also stop playing.

Cause:

  • While playing losssless files (e.g. Flac, APE, Wavpack, TAK) which are highly compressed, IO processing time can be long
  • Another component is trying to update the file information at the same time
  • Your Hard drive is slow/ fragmented

Solution:

  • Use a lower compressed lossless file
  • Try changing the update time setting. (Usually components like foosic and audioscrobbler update at around 1 min.)
  • Defrag your hard drive

If none of the above works, make the plugin write the information to the custominfo database.

Q. How do i convert the tag standards in ALL my files at once form the last_played_timestamp (etc.) format to the new standard?

A. The plugin is capable of cleaning the old information as they are encountered, however it might be more prudent to convert the old information to the newer standard in one go (for autoplaylists, columns display etc).

The main difference between the standards used by the official plugin and these unofficial ones are:

  • Play_count in the official plugin vs Play_counter in the unofficial plugin

To convert from play_count to play_counter is pretty straightforward. Make an autoplaylist with all the files which have the "play_count" tag (by using NOT play_count MISSING in the Query). Select all files, right click them, go to Tagging -> Manage Scripts . Click Add, and choose Copy Value. Under Source put play_count, under Destination put play_counter and click OK. Again click Add and select Delete values. Put play_count and click OK. Run this script. Now all your play_count information is in play_counter field.

  • Last_played_timestamp and First_played_timestamp (which are in the Win32Filetime format, and linked to last_played and first_played) vs Last_played and first_played (which are in YYYY-MM-DD HH:MM:SS format)

Note: the official playback plugin is still installed for this to work

This is slightly trickier because of the different standards used. One method to overcome this hurdle is to use Text Tools which is a part of foo_utils. Go to the Text Tools preferences and delete the entries in header, body and footer. Under body enter: %last_played%. %first_played%$crlf(). Now create a playlist of all the files that contain both first_played_timestamp and last_played_timestamp (use NOT first_played_timestamp MISSING AND NOT last_played_timestamp MISSING as the query). Select about 550 files in the autoplaylist, right click them Text Tools -> Copy Text. Now open Masstagger (do not unselect the files). Click Add, choose Input data (one line per track) and paste the contents into the resulting window (press Ctrl-V or right click paste). Under Scheme, use %last_played%. %first_played%. Click OK. and run the script. Repeat these steps for remaining files. NOTE: 550 files is due to the limitations of the masstagger window. If you try to paste more information, the contents will be truncated.

Link