Author Topic: Synchronize track playcount with last.fm  (Read 5454 times)

Haakjvork

  • Newbie
  • *
  • Posts: 6
I just made a plugin that queries tracks individually using track.getInfo to get an user's playcount and update the track playcount.

The plugin should appear when right-clicking as Sync from LastFm with several options:

Update playcount of selected files: Query LastFm to update the currently selected files.

Update playcount of recent scrobbles: Try to find which tracks have been scrobbled on LastFm recently and exists in MusicBee, and then update them.


https://getmusicbee.com/addons/plugins/491/sync-with-lastfm-playcount/

https://github.com/Haakjvork/musicbee-sync-lastfm-playcount

It can make several queries per track depending on the options. If the sum of the queries is 0, it won't make changes.

Current version: 1.2.1 - 2024-11-14




You can update the plugin replacing the files in your plugins folder while MusicBee is closed:

C:\Users\<user>\AppData\Roaming\MusicBee\Plugins

The main file is: MB_SyncLastFmPlaycount.dll
Dependencies: Newtonsoft.Json.dll and IF.Lastfm.Core.dll
Last Edit: November 14, 2024, 10:48:03 AM by Haakjvork

Bee-liever

  • Member
  • Hero Member
  • *****
  • Posts: 3871
  • MB Version: 3.6.9255 P
Thanks very much for this.
Fixed several thousand incorrect playcounts from not being able to reverse sync Musicolet.
Was a little slow to do the entire scan of my library, but now that's done, I only have to scan the current playlist from my phone.
 :)  :)  :)
MusicBee and my library - Making bee-utiful music together

morgan109

  • Jr. Member
  • **
  • Posts: 20
Wow, thank you so much for this, my most requested feature finally!

Edit: Is it possible to do this for loved tracks too? I have some loved tracks that don't register as such in musicbee, despite being loved in last.fm. I've tried clearing my files, reinstalling the addon and more...nothing works, some tracks refuse to be loved in musicbee. I wonder if it's the same problem as the play count thing (that music bee query just 1 time for a specific information).
Last Edit: February 02, 2024, 10:01:30 AM by morgan109

morgan109

  • Jr. Member
  • **
  • Posts: 20
And I guess this has to be done manually each time? Can't make it search automatically like the last.fm plugin?

maeva

  • Newbie
  • *
  • Posts: 2
hello!
this is such a cool plug in and it's great to see that it is working for many people.
sadly, i'm getting an error when i try to install it



does anyone know what this could be? :(

thank you very much for the help in advance

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10272
does anyone know what this could be? :(
Probably either what you downloaded is corrupt or you're not installing the plugin properly.

Try downloading again and installing again. Double-check the installation instructions.
Download the latest MusicBee v3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Custom Forum Search
Posting screenshots is here

maeva

  • Newbie
  • *
  • Posts: 2
Try downloading again and installing again. Double-check the installation instructions.

i did that yesterday and today again and it did not work unfortunately. same issue

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10272
I'm not able to provide any further suggestions. Perhaps someone else might have an idea. Or wait until the plugin's developer checks in.
Download the latest MusicBee v3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Custom Forum Search
Posting screenshots is here

morgan109

  • Jr. Member
  • **
  • Posts: 20
All I did was place all files in plugin folder and voilĂ .

Haakjvork

  • Newbie
  • *
  • Posts: 6
Thanks for the feedback!

I've been busy these days, but I've updated the plugin for having the option to get the "Loved track" mark from last.fm too

Once installed, with MusicBee closed, you can update the plugin by just replacing MB_SyncLastFmPlaycount.dll  in  C:\Users\<user>\AppData\Roaming\MusicBee\Plugins

The current version I've uploaded it's here. You can find the .dll there too:

https://github.com/Haakjvork/musicbee-sync-lastfm-playcount/releases/tag/v1.0.9


I also wanna make the plugin automatic using recent scrobbles. I'll get into it if i've time these weeks. Cheers!

lemon_yellow

  • Newbie
  • *
  • Posts: 9
@Haakjvork is there a way to only update the playcount if musicbee's count is smaller and skip update if musicbee's count is bigger?

Haakjvork

  • Newbie
  • *
  • Posts: 6
I just updated the plugin and made an option to update the playcount only when LastFm value is bigger! And also changed the contextual menu (right click menu) with a new option to update from recent scrobbles.

The plugin should appear when right-clicking as Sync from LastFm with several options:

Update playcount of selected files: Query LastFm to update the currently selected files.

Update playcount of recent scrobbles: Try to find which tracks have been scrobbled on LastFm recently and exists in MusicBee, and then update them.

https://github.com/Haakjvork/musicbee-sync-lastfm-playcount/releases/tag/v1.2.0
Last Edit: October 17, 2024, 01:42:23 PM by Haakjvork

The Incredible Boom Boom

  • Sr. Member
  • ****
  • Posts: 1419
I never knew this plugin existed.
What is the difference between the internal MusicBee function and it?
Does this plugin perform the synchronization automatically?

Haakjvork

  • Newbie
  • *
  • Posts: 6
I've updated the plugin (v.1.2.1) with an option to query recent tracks when MusicBee starts.

https://github.com/Haakjvork/musicbee-sync-lastfm-playcount/releases/tag/v1.2.1

I've also added a comparison with the default MusicBee plugin in the readme:

MusicBee's default plugin queries all your track history and then recounts your scrobbles with the same artist, title and album. The main goal of this plugin is to ignore the album name and just sum playcounts by "artist" and "track title". It also checks other fields ("album artist" and "sort title") while applying string normalization.

zxvshj

  • Newbie
  • *
  • Posts: 1
Thanks for this great plugin, I've been looking for something to do this for years. A couple suggestions, if they are possible to be implemented.

1. Syncing the date/time of Last Played from last.fm. Musicbee will do this by default when it syncs data from last.fm but I believe you have to restart the application for it to work. An option to do this whenever you sync with the plugin would be nice.

2. An option to sync new files automatically when they are added to the library. At the moment I am having to manually select the files and then use the context menu to sync them. Its a minor inconvenience but it would be nice to have this process automated whenever something new is added to the library.

Again thank you for this great plugin I was relieved to finally find this.