Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: HOW TO: synchronise your last.fm playback stats with foobar (Read 386828 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

HOW TO: synchronise your last.fm playback stats with foobar

Reply #450
new version uploaded. now supports auto spelling correction for the artist. you can toggle the option on/off via the context menu. this applies to background updates only.

http://cid-649d3bfeaf541fbb.office.live.co...ount%20sync.zip

HOW TO: synchronise your last.fm playback stats with foobar

Reply #451
new version uploaded. now supports auto spelling correction for the artist. you can toggle the option on/off via the context menu. this applies to background updates only.


What exactly should this do? Update the file tags on %artist%? If so, it doesn't seem to work with me (I tested it by changing artist "Joni Mitchell" to "Joni Mitchel", last.fm page showed correction right but nothing happened in foobar).

HOW TO: synchronise your last.fm playback stats with foobar

Reply #452
oh no - i wouldn't touch people's tags. 

by default, last.fm has spelling correction enabled on their website. so let's say you have a song incorrectly tagged as

Joni Mitchel - Big Yellow Taxi

last.fm would auto-correct this and store your playcount data for "Joni Mitchell". previously, this script could only do exact tag matches. it would look up "Joni Mitchell" but because your playcount data had been auto-corrected, it would return a playcount of nothing. but now last.fm API has been modified so i can fetch the data from the auto-corrected pages.

HOW TO: synchronise your last.fm playback stats with foobar

Reply #453
cool new feature, thanks

HOW TO: synchronise your last.fm playback stats with foobar

Reply #454
Ooh that IS a cool new feature! Maybe you could make a separate script/panel/thingie that allows you to update your tags*? I tend to want to fix the tags usually (it usually involves Japanese composers that have romanised names), so something that could do that quickly would be nice... Sometimes you don't get the right tags from freedb or Musicbrains or whatever.

Unless there's a last.fm type script for this already that I've not noticed?

* EDIT--Just to clarify, this would be on a per-song basis with a confirmation, so it would be like you press a button and a dialog pops up saying "The artist is currently tagged Shinji Hosoe, but Last.FM redirects to 細江慎治. Do you want to fix this?

Or maybe a list panel with before -> after, like how Rename does it...

Anyway!

HOW TO: synchronise your last.fm playback stats with foobar

Reply #455
new version uploaded. now supports auto spelling correction for the artist. you can toggle the option on/off via the context menu. this applies to background updates only.


Big thank you! This is exactly what I needed!
🇺🇦 Glory to Ukraine!

HOW TO: synchronise your last.fm playback stats with foobar

Reply #456
After installing the playcount sync I encountered the next problem:
If script has updated custom_db playcount value at least once (for current foobar2000 session), after closing foobar2000 I see error:



and then:



(sorry for Russian)

Here is translated message from Windows journal:

Quote
The name of the offending applications: foobar2000.exe, version: 1.1.1.0, time stamp: 0x4cd3e09b
The name of the offending module: foobar2000.exe, version: 1.1.1.0, time stamp 0x4cd3e09b
Exception Code: 0x40000015
Offset error: 0x0013ab27
Faulting process id: 0x1720
Faulting application startup time: 0x01cb80477c0c3dab
Faulting application path: E: \ Program Files \ foobar2000 \ foobar2000.exe
Faulting module path: E: \ Program Files \ foobar2000 \ foobar2000.exe
Code Report: a23bfae1-ec3e-11df-a1d7-daee5f7b8875


What is the cause of this problem and how to fix it? Error occuring only on Windows 7
🇺🇦 Glory to Ukraine!

HOW TO: synchronise your last.fm playback stats with foobar

Reply #457
Are the .NET Framework and Visual C++ 2005 Redistributable installed?

BTW marc, I use a modified version of your script (for custom Tag reading, time setting and button configurations like size, margins and the images) so whenever there is an update i have to manually change the code so as not to lose these customisations. With the last version i noticed that the lines that set the images of the button (around line 57) didn't work properly. Your new code is
Code: [Select]
        default:
            n = old_userloved == 1 ? "love_h.png" : "love.png";
            h = old_userloved == 1 ? "love_u.png" : "love.png";
but the button wouldn't appear unless i changed it into
Code: [Select]
        default:
            n = (old_userloved == 1 ? "love_h.png" : "love.png");
            h = (old_userloved == 1 ? "love_u.png" : "love.png");
Was it some sort of glitch on my part?

PS: Disregard the image filenames, as mentioned before I use different icons, hence the discrepancy with the original code filenames. The only change that makes the button appear or not is the use of the round brackets.

HOW TO: synchronise your last.fm playback stats with foobar

Reply #458
Are the .NET Framework and Visual C++ 2005 Redistributable installed?


What version of .NET Framewvork does it need? There is Framework 1.1, 4.0 and MSCVC 2005, 2008 and 2010 installed
🇺🇦 Glory to Ukraine!

HOW TO: synchronise your last.fm playback stats with foobar

Reply #459
I'd guess .NET 2, but given what you have installed that's probably not the problem

HOW TO: synchronise your last.fm playback stats with foobar

Reply #460
The script doesn't seem to work in my case very well. After I've scrobbled a track once, it updates the counter but if I'm listening to the same track again, it doesn't update the counter at all (track played two, three, four etc. times only shows it's been played once).

The console doesn't show up any erros, when the track is scrobbled second/third/etc. time, the log is same than during the first time playing: "Playcount sync: Contacting Last.fm.... Playcount sync: Last.fm responded 'OK'" "Audioscrobbler: Submitting track... Audioscrobbler: Submission succeeded."

I'm using the newest version and tried reinstalling it, but the problem still exists. Any ideas what I should do? Other than updating the counter, I haven't encountered any other problems - loving tracks, creating soft playlists etc. are working very well.

HOW TO: synchronise your last.fm playback stats with foobar

Reply #461
If i remember correctly, Last.fm ignores the scrobbles if the track is played over and over - like a repeat-track behaviour - and considers only the first scrobble. If that's not the case and you're listening other tracks between the replays then disregard this message.

BTW, that wouldn't be a problem with the script since it's not the responsible for scrobling the tracks, foo_audioscrobbler is, so any further problems in this matter should be directed to it's topic 

HOW TO: synchronise your last.fm playback stats with foobar

Reply #462
If i remember correctly, Last.fm ignores the scrobbles if the track is played over and over - like a repeat-track behaviour - and considers only the first scrobble. If that's not the case and you're listening other tracks between the replays then disregard this message.

BTW, that wouldn't be a problem with the script since it's not the responsible for scrobling the tracks, foo_audioscrobbler is, so any further problems in this matter should be directed to it's topic 
That's not the issue here. It doesn't matter if I listen to other tracks meanwhile or same track all over again (tracks already having at least one play on the LASTFM_PLAYCOUNT_DB table) - it never updates the counter on foobar if I listen to previously listened track again at some point. The only way it updates the playcount from 1, 2, 3 etc. plays is the manual "Create and import SQL file"-function - hardly practical.

To sum it up, I have no problems with scrobbling to last.fm - this script just doesn't update the playcount on foobar automatically after the tracks have been listened to once, in my case.

HOW TO: synchronise your last.fm playback stats with foobar

Reply #463
Code: [Select]
Playcount sync: Last.fm responded 'OK' 
Error: WSH Panel Mod (Playcount Sync by marc2003): (null):
(null)
Ln: 118, Col: 6
<source text only available in compile time>

what did i do wrong? o.O

HOW TO: synchronise your last.fm playback stats with foobar

Reply #464
Code: [Select]
Playcount sync: Last.fm responded 'OK' 
Error: WSH Panel Mod (Playcount Sync by marc2003): (null):
(null)
Ln: 118, Col: 6
<source text only available in compile time>

what did i do wrong? o.O

ok, please disregard this post >.<
forgot to copy lastfm_sql.cmd and sqlite3.exe to foobar directory >.<

hope no one makes a mistake as dumb as this D:

HOW TO: synchronise your last.fm playback stats with foobar

Reply #465
When I right click on the panel and click on "Create and import SQL file" I get this....

http://i.imgur.com/dMJFM.png

It starts at 1 and just keeps on going up.. What do?

HOW TO: synchronise your last.fm playback stats with foobar

Reply #466
I'm very new using foobar 2k so I had no last.fm account and playcount statistic at all. I created a last.fm account and when I 'love' a track, i see it in my online profile. When I play the track the foobar console is telling me:

Code: [Select]
Playcount sync: Contacting Last.fm.... 
Playcount sync: Last.fm responded 'OK'
Playcount sync: Playcount not updated. No changes found.


The counter in foobar is increasing every time I play the song but in my last.fm profile all loved tracks have the counter 0. What I'm doing wrong?

HOW TO: synchronise your last.fm playback stats with foobar

Reply #467
Just set this up, excellent script.

I searched this thread for a solution to getting the correct playcount for a track with the same title from different albums. There was a post back in February that stated that the track.getInfo api did not retreive the album info.

Is this still the case with current version of the API and it has yet to be implemented or is it still impossible to distinguish between the same track from different albums. I know when viewing my library through last.fm if I click on the individual albums of an artist it shows the playcount for that track from that album. Though viewing all albums at once the playcount is accumulated.

If this is not possible, I suppose the alternative would be to tag the tracks different from different albums. I am referring to live performances by the way, so instead of "Misery Business (Live)" on 3 different albums from different venues I would change the tags to "Misery Business (Live from xxx)" and I think that should work correctly.


HOW TO: synchronise your last.fm playback stats with foobar

Reply #468
I'd humbly ask you not to do that. This would increase the Last.fm "tag pollution".
It seems the API will only return the correct album if the MusicBrainz ID is supplied (not sure though), but the current DB structure only stores the Artist and Track Name anyway. However, maybe there could be a workaround using library.getTracks with artist and album filters after the whole library playcount has been downloaded.

HOW TO: synchronise your last.fm playback stats with foobar

Reply #469
I'm very new using foobar 2k so I had no last.fm account and playcount statistic at all. I created a last.fm account and when I 'love' a track, i see it in my online profile. When I play the track the foobar console is telling me:

Code: [Select]
Playcount sync: Contacting Last.fm.... 
Playcount sync: Last.fm responded 'OK'
Playcount sync: Playcount not updated. No changes found.


The counter in foobar is increasing every time I play the song but in my last.fm profile all loved tracks have the counter 0. What I'm doing wrong?

Can anybody help me why my playcount is not updated?

HOW TO: synchronise your last.fm playback stats with foobar

Reply #470
Hi, it's my first post on this forum.

Is it possible to transfer statistics from foo_customdb to PlaybackStatistics3.0.1 (foo_playcount) ?
I can think of 3 ways of doing that:

1. writing foo_customdb tags to file tags and then import to foo_playcount from tags
2. exporting foo_customdb to .xml file and then import to foo_playcount
3. I don't know, maybe there is any direct way?

But I don't know how exacly it would look like. Write if You have any idea!

Please, help!

HOW TO: synchronise your last.fm playback stats with foobar

Reply #471
Is there anyway to have the Last.fm Loved Tracks playlist (downloaded from Last.fm) update every so often?

Using an autoplaylist based on LASTFM_LOVED_DB it displays the loved tracks but also displays the same tracks in every other album, which is abit annoying if the same track has appeared on numerous livesets I have in my library.

HOW TO: synchronise your last.fm playback stats with foobar

Reply #472
Is there anyway to have the Last.fm Loved Tracks playlist (downloaded from Last.fm) update every so often?

Using an autoplaylist based on LASTFM_LOVED_DB it displays the loved tracks but also displays the same tracks in every other album, which is abit annoying if the same track has appeared on numerous livesets I have in my library.


yeah i noticed this when i loved the headhunters version of herbie hancock's watermelon man.  when i went back to listen to it, it was a totally different version.  i guess last.fm is limited to artist - track title, so if someone runs into this frequently they're better off with a ratings component.

HOW TO: synchronise your last.fm playback stats with foobar

Reply #473
I have just recently started using you script and I love it.  I was just wondering; when I updated my library, everything seemed to go smoothly, when foobar was reloaded, there were albums that I have listened to multiples time and they were mostly all listened to a few times.  Most of them showed up fine, but a few songs show that it is an empty field (blank).  I am using ELPlaylist with the tagging columns added that you said in your readme.pdf.

I was also wondering, when you listened to a song, should everything update in terms of the listen count increasing by one and if I love a track, should I be able to see the heart right away?  If so, that doesn't seem to be working for me, it updates when I re-import my whole library though, just not real time.

Thanks for the awesome script again!

HOW TO: synchronise your last.fm playback stats with foobar

Reply #474
new version uploaded.

http://cid-649d3bfeaf541fbb.office.live.co...ount%20sync.zip

now has a "show debug info" option on the context menu. this displays the full server response from last.fm in the foobar console so it may give people a clue if the auto-update isn't working as expected.

it would look something like this....

Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<lfm status="ok">
<track>
    <id>3081424</id>
    <name>Self Suicide</name>
    <mbid></mbid>
    <url>http://www.last.fm/music/+noredirect/Goldie+Lookin+Chain/_/Self+Suicide</url>
    <duration>224000</duration>
    <streamable fulltrack="0">0</streamable>   
        <listeners>2640</listeners>
    <playcount>8233</playcount>
        <userplaycount>16</userplaycount>    <userloved>0</userloved>
        <artist>
        <name>Goldie Lookin Chain</name>
        <mbid>5167695e-3a2a-4311-9990-b7e2d13686a2</mbid>
        <url>http://www.last.fm/music/+noredirect/Goldie+Lookin+Chain</url>
    </artist>
        <album position="2">
        <artist>Goldie Lookin' Chain</artist>
        <title>Greatest Hits</title>
        <mbid>772857ca-fdb6-4cf6-8130-e2072e6527e2</mbid>
        <url>http://www.last.fm/music/Goldie+Lookin%27+Chain/Greatest+Hits</url>       
        <image size="small">http://userserve-ak.last.fm/serve/64s/8678127.jpg</image>
        <image size="medium">http://userserve-ak.last.fm/serve/126/8678127.jpg</image>
        <image size="large">http://userserve-ak.last.fm/serve/174s/8678127.jpg</image>
        <image size="extralarge">http://userserve-ak.last.fm/serve/300x300/8678127.jpg</image>
    </album>
        <toptags>
        <tag>
  <name>rap</name>
  <url>http://www.last.fm/tag/rap</url>
</tag>
        <tag>
  <name>welsh</name>
  <url>http://www.last.fm/tag/welsh</url>
</tag>
        <tag>
  <name>hip-hop</name>
  <url>http://www.last.fm/tag/hip-hop</url>
</tag>
        <tag>
  <name>comedy</name>
  <url>http://www.last.fm/tag/comedy</url>
</tag>
        <tag>
  <name>death</name>
  <url>http://www.last.fm/tag/death</url>
</tag>
      </toptags>
    </track></lfm>

the 2 fields the script uses to update your stats in foobar are userplaycount and userloved. if these values are not what you expect, it's likely there is a conflict between the spelling correction options on the website and in the script - you need to make sure they match. also- mis-spelt track names may cause a mismatch - and i must admit, i haven't really looked into it.

i've been offline for quite awhile so i'll try and address a few posts...

@Steve Forte Rio - sorry i have no idea about that error or how to fix.

@Xengrid, are you listening to enough of the track for the script to run (half-way if track is less than 4 minutes or 4 minutes for longer tracks)

@Kamon, i'll need your last.fm userid to investigate that error

@jack_steel - i assume you are using foo_audioscrobbler to update last.fm? - http://www.mp3tag.de/en/fb2k.html

@tytan, you can use the standard foobar properties dialog and transfer the stats into a "RATING" file tag (right click>format from other fields). you can then use playback statistics to import the tags into it's own database

@aerogramme, when you love a a track, you should see the heart straight away. i'm not sure what is happening there...

sorry if i've missed anyone - just give me a shout.