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: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (Read 129327 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #100
Beta 5 fixing the %first/last_played_enhanced% issue:

Tested in the problematic files, problem solved.

really appreciate your post-sale service ;)

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #101
Wait, I'm supposed to be getting paid for this?

Beta 6 changelist:
  • index-db will be automatically converted to new format, and the old database will be deleted. You might want to back up 0C1BD000-43E7-4078-B885-48EE4249DEC2 just in case, or at least have foo_jesus installed. To test that everything is kosher, startup foobar, see that the console reports how many records were converted. Close foobar, see that the ...EC2 db is gone (new file is ...EC3), restart foobar and you should still have your lastfm playcounts. Then you can delete your backup if you like.
  • Files now pinned to the following hash string, lowercased: "%artist% - $year($if2(%date%,%original release date%)) - %album% $if2(%discnumber%,1)-%tracknumber% %title%". This means you can change capitalization with foobar closed, and your hashes won't get lost. This exactly mirrors the hash string that foo_playcount uses, except Peter doesn't toss in a $year() around %date%.

BTW, the conversion stuff was such a pain in the ass because I made a stupid typo and it took me 6+ hours of fiddling and trying 50 different ways to get it to work before I realized what my mistake was.

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #102
Wait, I'm supposed to be getting paid for this?

Of course, with eternal love and honey ;)


Beta 6 changelist:
  • index-db will be automatically converted to new format, and the old database will be deleted. You might want to back up 0C1BD000-43E7-4078-B885-48EE4249DEC2 just in case, or at least have foo_jesus installed. To test that everything is kosher, startup foobar, see that the console reports how many records were converted. Close foobar, see that the ...EC2 db is gone (new file is ...EC3), restart foobar and you should still have your lastfm playcounts. Then you can delete your backup if you like.

The process was perfect:
Code: [Select]
foo_enhanced_playcount: on_init()
foo_enhanced_playcount: Converted 23405 records. Deleted old database.

The ...EC2 was gone and only left a brand new ...EC3 with all the data in place.

  • Files now pinned to the following hash string, lowercased: "%artist% - $year($if2(%date%,%original release date%)) - %album% $if2(%discnumber%,1)-%tracknumber% %title%". This means you can change capitalization with foobar closed, and your hashes won't get lost. This exactly mirrors the hash string that foo_playcount uses, except Peter doesn't toss in a $year() around %date%.

Cool  8)

Thank you very much MordredKLB, now my dinamic rating is more accurate than never.




Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #103
Officially released v3.0.0 in the component registry. The only changes from beta6 are a version bump and some minor code cleanup. Nothing functional, so feel free to skip it if you have beta6.

Thanks everybody for all the help testing things. I'm feeling pretty good about the component and at the moment I can't think of anything else I want to add. Feel free to make suggestions if there's something you feel is missing.

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #104
Releasing v3.0.1

Changelog:
  • When no lastfm plays recorded by the component, [%lastfm_playcount%] now shows a blank value instead of 0 meaning it operates identical to [%playcount%] - Thanks to @annalise for reporting
  • Fixed a bad regression where changing file tags would cause all plays and scrobbles of that song to be lost. This allowed me to clean up some code and ensure this can't happen again as there's now a single code path for generating hash strings

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #105
I preferred it showing 0. Now I would just have  blank, no fun. Showing 0 is more meanigful while a blank is just that.
With playcount I could get around with $if, but not with this.

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #106
I preferred it showing 0. Now I would just have  blank, no fun. Showing 0 is more meanigful while a blank is just that.
With playcount I could get around with $if, but not with this.
You don't need to surround it with brackets. %lastfm_playcount% will still show 0.

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #107
Good to know, thanks.

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #108
Runs like clockwork, I would like to thank you very much for this usefül component again!

I got a mildly disturbing message today from one of the last.fm devs. Apparently they are considering removing the user.getArtistTracks method from their API which would completely break this component's last.fm functionality. As far as I can see there's no other method to retrieve scrobbles of a particular song, so we'd be SOL. The dev wasn't quite sure what I was using the method for though, so hopefully I made my case. I'll let you know if I hear back more info.

Btw.. any (let's hope good) new information on this?


Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #109
Btw.. any (let's hope good) new information on this?
Not really.

I explained my case, and he replied along the lines of "oh, that's great! you can just use method ____." To be sure, I tried whatever method it was out, verified that it did NOT work for our use case, and explained why it didn't and how even if it did work, it would require way more last.fm calls than the component currently does. Never got a response back.

Honestly I think the best thing to be done is to get as many people as possible using the component so that they see a lot of demand for the current user.getArtistTracks method and then hopefully they won't remove it. Those guys seem to move at a glacial pace though, so who knows what'll end up happening.

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #110
Thanks for the update Mordred!

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #111
no pop-up window?

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #112
no pop-up window?
When you right click a song/songs and pull scrobbles from last.fm there should always be a popup. When a song is playing and it attempts to check last.fm it will display a popup if that operation lasts longer than 500ms. Usually that only happens if the artist has been played more than 200 times. After the first song from an artist has been played, the last.fm results are cached and you shouldn't see any more popups while playing that artist, unless you play a song again, or the response falls out of the cache.

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #113
A lot of the data is inaccurate.

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #114
This plug-in is very useful. Thank you very much.
But two things I think need to be improved.
1、Pop-ups are intolerable. I hope not.
2、I found that A lot of the data(playcount) is inaccurate.

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #115
This plug-in is very useful. Thank you very much.
But two things I think need to be improved.
1、Pop-ups are intolerable. I hope not.
2、I found that A lot of the data(playcount) is inaccurate.
I don't like the popups either, but there's no way to suppress them using the sdk. Be glad that they only appear after 500ms.
I'm assuming you mean the count of scrobbles is inaccurate? I can only use the data that last.fm gives me. If you've renamed tracks while scrobbling there's no way for this component to know that. It already ignores all punctuation and capitalization, but outside that it can't tell that "Take me to Church" and "Take me too Church" are probably referring to the same song.

If you have examples you think are wrong, share the URL being retrieved (it's in the console) and the song title you think the count is off for.

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #116
This plug-in is very useful to me because I've got more than 110,000+ plays on lastfm and I never back up local playback data.
My tags is normalized by foo_musicbrainz and foo_discogs. The plays are scrobbled to Last.fm by foo_audioscrobbler.

some examples:
ARTIST - TITLE - (%lastfm_play_count%/plays from lastfm album page) (These songs have been successfully identified by lastfm )
Arctic Monkeys - No.1 Party Anthem - (0/6plays)
Daft Punk feat. Julian Casablancas - Instant Crush - (0/44)
Daft Punk feat. Paul Williams - Touch - (0/25)
Daft Punk feat. Todd Edwards - Fragments of Time - (0/32)
Daft Punk feat. Panda Bear - Doin' It Right - (0/26)

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #117
~These songs have been successfully identified by lastfm but Slightly different.
Daft Punk - Motherboard - (26/25)
Daft Punk feat. DJ Falcon - Contact - (22/25)

~These songs have NOT been successfully identified by lastfm (lastfm):
Daft Punk feat. Giorgio Moroder - Giorgio by Moroder - (50/NO RECORD)
Daft Punk feat. Pharrell Williams & Nile Rodgers - Lose Yourself to Dance - (39/NO RECORD)
Daft Punk feat. Pharrell Williams & Nile Rodgers - Get Lucky - (34/NO RECORD)

~I can make some adjustments about ARTIST to scrobble. so lastfm can identifie them.
$if($stricmp(%album artist%,Various Artists),$meta(artist,0),$if2($meta(album artist,0),$meta(artist,0)))

THE CONFLICT IS OBVIOUS.
This plug-in shoud only retrieves the data and gives the user a definition of how to match it.
To reduce the pop-ups, I'm trying to get a lot of data at once, FB got stuck.

I think it should be:
1. Get all the original playback data back at once, then no longer connect lastfm.
2. Tell users how the data is stored and let them customize how they use it.

This plugin is fucking useful, but it's really hard to use. thank you all the same,

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #118
Before I address your comments, a couple things.
1) Stop using foo_audioscrobbler. Switch to foo_scrobble, it's world's better and your scrobbles will be a lot more accurate making them work much better with my component. It can't go back in time and fix your old scrobbles but at least it fix them going forward.
2) Can you post the URL posted to the foobar console when you start playing "Daft Punk feat. Giorgio Moroder - Giorgio by Moroder". It will look like "Querying last.fm: http://ws.audioscrobbler.com/2.0/?method=user.getartisttracks&api_key=...." post that here so I can see exactly what the component is seeing.

I'll be able to explain what's going wrong once you post that URL.

Also, what do you mean FB got stuck? When you're pulling multiple data for multiple songs at once, the progress bar will appear, and should continue updating. If an artist has a ton of scrobbles, it might take some time to pull all of them so you might see it pause movement for 30s or so, but it'll continue moving again after that. If you have 100k scrobbles, and the average artist in last.fm has 75 scrobbles this could take 5+ minutes to pull them all. It'd take a lot more time than that if that average drops considerably (i.e. you've got hundreds of artists with only a few plays each).


Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #120
Daft Punk feat. Todd Edwards - Fragments of Time

Querying last.fm: http://ws.audioscrobbler.com/2.0/?method=user.getartisttracks&api_key=a1685abe5265b93cf2be4a70d181bf6b&user=Sickid&artist=Daft+Punk+feat%252e+Todd+Edwards&limit=200&format=json&page=1
Found 0 plays in last.fm (since last recorded scrobble) of Fragments of Time

this song can not get scrobbles from lastfm. but On lastfm's album page, there are 32 plays。

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #121
I mean, no response,I had to turn off FB in the task manager。

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #122

It's been an hour and I've had to turn it off from the task manager.

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #123
Thanks. So yeah, if foobar is freezing up like that then something is clearly wrong. The progress bar should continue to move noticeably every few minutes. Unfortunately it's not crashing so there's no crash log to go off of. How many songs are you trying to retrieve scrobbles for at once there?


Regarding your 0 scrobbles issues, those are most likely all related to song/artist mismatches between what you have in foobar and what last.fm has. For the "Giorgio by Morodor" you have 50 scrobbles under the artist "Daft Punk feat. Giorgio Moroder". You also have 1 scrobble very recently of that song with the artist "Daft Punk". If that's the artist listed for that song, it'll never get those other scrobbles. You can force it to retrieve by changing the artist field to be "Daft Punk feat. Giorgio Moroder", then clearing saved scrobbles for that song, and repulling them. That should get the 50 missing scrobbles.

For Daft Punk feat. Todd Edwards - Fragments of Time, last.fm has the artist listed as "Daft Punk feat. Todd Edwards" and the song title as "Fragments of Time (feat. Todd Edwards)". You listed the song title as "Fragments of Time" which wouldn't match obviously. I'm wondering if maybe foo_audioscrobbler is scrobbling that file weirdly (seriously switch to foo_scrobble!), or last.fm is automatically updating the song title based on some internal rules. There's nothing I can do there either. Clearing the saved last.fm plays in the component, changing the track name to "Fragments of Time (feat. Todd Edwards)", and then repulling should get the missing scrobbles assuming the artist also matches perfectly. You'll notice a pattern here. Almost all the songs you're complaining about not getting scrobbles for have a "feat." artist on them. The best way to avoid these issues is to be extremely consistent in your tagging, and don't add featured artists in the artist name (I'd tag that artist as Daft Punk and tag Todd Edwards in a featured artist field for display purposes but that's just me).

Your suggestion that I retrieve all the data from last.fm and then let the user query it doesn't make any sense, and isn't how the foobar sdk database structure works, where data must be pinned to a hash based off actual files in your library. Even if you could arbitrarily store that data dump, there's no fast or efficient way to query the data using fields that the component provides. i.e. I want to get the number of last.fm scrobbles for Giorgio on Morodor, how do I specify that I want it to find every scrobble by any artist that starts with "Daft Punk" inside a simple %lastfm_playcount% style title-formatting field?

PLUS, I'd still need to requery last.fm whenever you started playing a song (which could display a popup if that query is slow!) because I have no way of knowing if you've scrobbled it from your phone using Spotify or whatever since the scrobbles were downloaded, without checking again, which could require redownloading 100k scrobbles again if the last scrobble you recorded for that track was years ago.

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (JScript)

Reply #124
You don't seem to understand. You need to test yourself and you'll know. Thank you.