Author Topic: How to save Play Count to music files as tag  (Read 22266 times)

redwing

  • Guest
MB, by default, saves play count of each track to MB database file only. But you can save play count to your music files and keep them auto-updated. You first need install Additional Tagging Tools plugin and enable it: http://getmusicbee.com/forum/index.php?topic=3833.0

1. Go to Edit> Preferences> Tags(1) > custom tags



Choose a custom tag, rename it "P_count" or something, and select a frame the new field will use with the drop-down menu (If you do not change the custom tag setting from "Save to MusicBee database only" to something else, there's no point of doing this).

2. Go to Tools> Tagging Tools> Advanced Search and Replace.

3. Import all presets and find "TOY: 'Copy tag' command" preset.



4. Select all tracks in the main panel and make it to copy "Play Count" to "P_count" field using drop-down menu. Click on "Preview" and then "Apply" if everything looks OK.

5. Tick the box in front of the preset name to make the preset auto-applied to all tracks in your library. Now whenever a play count of a track changes, "P_count" tag value of the file will get auto-updated.

------------------------

Copy play count tag to MB database

You can also copy play count values saved in your music files to that field of MB database. With this, you could update play count values of a new library using the values saved in your music files.



Select files and go to Tools> Tagging Tools> copy tag. Configure it to copy "P_count" to "Play Count" and click on Preview and then Proceed.
Last Edit: June 22, 2014, 03:55:49 AM by redwing

boroda

  • Hero Member
  • *****
  • Posts: 3542

redwing

  • Guest
This plugin version:
http://www.mediafire.com/download/hyq2wabn25l2q0m/mb_TagTools_2014-06-03-2.zip

should be able to automate copying play counts using 'copy tag' asr preset.

Yes, it's working great. Thanks for the quick update! I will rewrite the guide shortly.

It's done now.
Last Edit: June 03, 2014, 12:41:07 PM by redwing


psychoadept

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10446

redwing

  • Guest
the link is not working anymore

That link was temporary just for a test. Go to the plugin thread for the latest version.

You first need install Additional Tagging Tools plugin and enable it: http://getmusicbee.com/forum/index.php?topic=3833.0

dennis800121

  • Newbie
  • *
  • Posts: 13
Hi!
Someone asked a very good question here:

"Hey, i want to make use of your "TOY: 'Copy tag' command" command to copy "play count" into a custom field, ie "www radio", but im having a problem, in case of emergencies say i remove a file, or rename it, the musicbee library will reset its playcount and will copy the new tag of 0, which would delete all the previous play counts, is there anyway to use this TOY: 'Copy tag' command with an IF statement? so for example, say i delete an audio file from the library, rename it, import it back in, the www radio tag has say 53, play count in musicbee library has 0, but if the www radio tag value is higher, it copies it back to the play count tag, and continius updating"

Does anyone have a answer to this?

boroda

  • Hero Member
  • *****
  • Posts: 3542
i think we need to wait for Steven's answer, but i'm doubtful that mb somehow relies on track paths. mostly probably mb identifies tracks internally by some persistent id.

redwing

  • Guest
Hi!
Someone asked a very good question here:

"Hey, i want to make use of your "TOY: 'Copy tag' command" command to copy "play count" into a custom field, ie "www radio", but im having a problem, in case of emergencies say i remove a file, or rename it, the musicbee library will reset its playcount and will copy the new tag of 0, which would delete all the previous play counts, is there anyway to use this TOY: 'Copy tag' command with an IF statement? so for example, say i delete an audio file from the library, rename it, import it back in, the www radio tag has say 53, play count in musicbee library has 0, but if the www radio tag value is higher, it copies it back to the play count tag, and continius updating"

Does anyone have a answer to this?

I just saw this question. It won't be that hard to handle the issue.

When you proceed to perform "Copy play count tag to MB database" described in first post, you could create a virtual tag with the following code and copy the virtual tag instead to MB database:

Code
$If(<P_Count>><Play Count>,<P_Count>,<Play Count>)

The virtual tag will compare "P_Count" and "Play Count" and display a greater number of the two. If you copy that virtual tag to play count tag, you will get what you want. But while doing this kind of task, always test with a small number of test files first with those tags displayed in the main panel, not to screw up your library and tags.

dennis800121

  • Newbie
  • *
  • Posts: 13
Hello REDWING!

Thank you for your answer!!!

But how do i copy the largest number to ex. "WWW Radio Page" with the "TOY: 'Copy tag' command" preset?
Last Edit: June 30, 2017, 08:25:06 AM by dennis800121

redwing

  • Guest
But how do i copy the largest number to ex. "WWW Radio Page" with the "TOY: 'Copy tag' command" preset?

So you're asking how to copy the largest number to the file tag instead of the database using "TOY: 'Copy tag' command" preset instead of Copy tags command.
In that case, select all files, open the preset, set <Tag 1> to the virtual tag and set <Tag 2> to P_Count (or whatever tag name you used when creating the custom play count file tag for WWW Radio Page frame). Preview and Apply. This is a one time task, so do not tick the box in front of the preset name.


Freddy Barker

  • Hero Member
  • *****
  • Posts: 751
  • 🎧 MB 3.4.7628P

...should be able to automate copying play counts using 'copy tag' asr preset.

Hi boroda74...[or any MB fan, programmer, advisor, coder etc.]

Is there any way (or could there ever be any way?) to copy the 'Last played Date and Time' details to a tag embedded into the music file (like with album art pics) please?
I ask this because I recently had to re-install MB from scratch after a PC problem. I had some success with  'Sync from Last FM' data, but it missed over 1k tracks..
Best regards: Freddy :-)
Last Edit: April 25, 2018, 05:20:18 PM by Freddy Barker [DIVERSITY FM]

redwing

  • Guest
Is there any way (or could there ever be any way?) to copy the 'Last played Date and Time' details to a tag embedded into the music file (like with album art pics) please?

Did you read the guide? And did you try it with "Last played" field instead of "Play count" field?
Or do you think there should be a guide spelled out for every field?

Freddy Barker

  • Hero Member
  • *****
  • Posts: 751
  • 🎧 MB 3.4.7628P
Is there any way (or could there ever be any way?) to copy the 'Last played Date and Time' details to a tag embedded into the music file (like with album art pics) please?

Did you read the guide? And did you try it with "Last played" field instead of "Play count" field?
Or do you think there should be a guide spelled out for every field?

No I have not tried it, and yes I did look at the guide when previously messing with some other virtual tag ideas, but always failed when trying to get the syntax of the necessary string slicing to work.
I was only enquiring to see if such functionality would be possible, so I will give it a try...
Thanks for your response!
Kind regards: Freddy