IPB

Welcome Guest ( Log In | Register )

43 Pages V  « < 30 31 32 33 34 > »   
Reply to this topicStart new topic
HOW TO: synchronise your last.fm playback stats with foobar, ...works with CUI and DUI
marc2003
post Feb 20 2013, 10:13
Post #776





Group: Members
Posts: 4874
Joined: 27-January 05
From: England
Member No.: 19379



first of all, this post is in the wrong thread. it should be in this one. tongue.gif

and i know i've not documented this, but this part of the error....

CODE
File: <main>


means line 15 of the script in the panel itself - not the common6.js file.

and from a glance i think it's related to a change i made a few weeks back. download the full samples.zip and import the last.fm charts.txt file again.

link: http://db.tt/BInQ3Abm
Go to the top of the page
+Quote Post
juso
post Feb 20 2013, 10:58
Post #777





Group: Members
Posts: 4
Joined: 20-February 13
Member No.: 106760



Hello marc2003, thanks for the explanation - I have downloaded the full samples.zip and re added everything, I now get no error - but I still can't seem to display anything. I have posted the issues I'm experiencing in the other thread that you have mentioned,

Cheers, juso
Go to the top of the page
+Quote Post
iamthejeff
post Feb 27 2013, 18:49
Post #778





Group: Members
Posts: 17
Joined: 14-May 09
From: Calgary, AB
Member No.: 69788



Sometimes (about 10-20% of the time) the LASTFM_PLAYCOUNT_DB field is increased twice during a single play. Did I configure something wrong? Last.fm shows I only scrobbled it once, but the field is updated twice.
Go to the top of the page
+Quote Post
marc2003
post Feb 27 2013, 19:40
Post #779





Group: Members
Posts: 4874
Joined: 27-January 05
From: England
Member No.: 19379



are you sure only one instance of the panel exists in your layout? and even if there were duplicate requests, it would not affect playcount data. this is because a scrobble does not count until the track has finished. so even if there were multiple queries, the result would always be the same - of course i add 1 to increment the playcount but no matter how many times this were to happen, it would not increment by more than 1.

please describe exactly what you are seeing.

This post has been edited by marc2003: Feb 27 2013, 19:41
Go to the top of the page
+Quote Post
iamthejeff
post Feb 27 2013, 19:55
Post #780





Group: Members
Posts: 17
Joined: 14-May 09
From: Calgary, AB
Member No.: 69788



QUOTE (marc2003 @ Feb 27 2013, 11:40) *
are you sure only one instance of the panel exists in your layout? and even if there were duplicate requests, it would not affect playcount data. this is because a scrobble does not count until the track has finished. so even if there were multiple queries, the result would always be the same - of course i add 1 to increment the playcount but no matter how many times this were to happen, it would not increment by more than 1.

please describe exactly what you are seeing.

I've only noticed it happening with songs that initially have zero playcounts (new to my library, and have not been scrobbled before). It might be happening to other songs, but I haven't noticed yet. It doesn't happen to every song with zero playcounts, just some.

I play the song in foobar. It gets to 50% duration, and the playcount increases from 0 to 2 instantly.

Console outputs this:

Last.fm Playcount Sync: Contacting Last.fm....
Last.fm Playcount Sync: Last.fm responded 'OK'

If I play the same song again, it only increases once, to 3.

I am pretty certain I don't have multiple instances of the panel in my layout. I use the mnlt2 skin with the panel on it's own tab:

Go to the top of the page
+Quote Post
marc2003
post Feb 27 2013, 20:15
Post #781





Group: Members
Posts: 4874
Joined: 27-January 05
From: England
Member No.: 19379



QUOTE
and the playcount increases from 0 to 2 instantly.


sorry but i'm more inclined to think you are mistaken and last.fm already has a playcount of 1 stored for that track. login to the website and browse the Library section.

http://www.last.fm/user/YOU/library

browse for the artist/track and it will show the time and date of each individual scrobble.

This post has been edited by marc2003: Feb 27 2013, 20:17
Go to the top of the page
+Quote Post
iamthejeff
post Feb 27 2013, 20:20
Post #782





Group: Members
Posts: 17
Joined: 14-May 09
From: Calgary, AB
Member No.: 69788



QUOTE (marc2003 @ Feb 27 2013, 12:15) *
QUOTE
and the playcount increases from 0 to 2 instantly.


sorry but i'm more inclined to think you are mistaken and last.fm already has a playcount of 1 stored for that track. login to the website and browse the Library section.

http://www.last.fm/user/YOU/library

browse for the artist/track and it will show the time and date of each individual scrobble.


This is the test track I played which I've previously never scrobbled






Go to the top of the page
+Quote Post
marc2003
post Feb 27 2013, 20:47
Post #783





Group: Members
Posts: 4874
Joined: 27-January 05
From: England
Member No.: 19379



well i'm just more confused now. laugh.gif

because it's not just screwing up on the first play but on subsequent plays as well. the fact that playcounts are out of whack after playback has finished is not good either and i can't explain it - well other than the scrobble failing and getting stuck in the cache.

i still can't get how my script would fail in this way.

it's just one line of code that handles this. although it might be a bit confusing, this is simply a shorthand if/or statement....

CODE
this.userplaycount = this.parsed_data.track.userplaycount > 0 ? ++this.parsed_data.track.userplaycount : 1;


i check if the playcount is more than 0 (has been played) and i increment it by 1 if it has. if it hasn't i don't increment 0 to 1 by adding - i set the value of 1 directly as can be seen by the 1 after the colon at the end. using this method, it's impossible to jump from 0 to 2 on the first play.
Go to the top of the page
+Quote Post
iamthejeff
post Feb 27 2013, 21:03
Post #784





Group: Members
Posts: 17
Joined: 14-May 09
From: Calgary, AB
Member No.: 69788



Is the only explanation that I might have it installed twice? Still doesn't explain why it happens to only some songs and not others. I still haven't confirmed if it only happens to new songs, or if it happens to existing ones as well.

Could it be a conflict with other components?

These are my installed components:

Core (2012-12-28 12:23:58 UTC)
foobar2000 core 1.2
foo_abx.dll (2012-07-15 05:00:36 UTC)
ABX Comparator 1.3.4
foo_ac3.dll (2012-11-01 14:01:38 UTC)
AC3 decoder 0.9.7
foo_albumlist.dll (2012-12-28 12:22:20 UTC)
Album List 4.5
foo_audioscrobbler.dll (2008-05-13 21:36:16 UTC)
Audioscrobbler 2.3.1
foo_cdda.dll (2012-12-28 12:21:56 UTC)
CD Audio Decoder 3.0
foo_comserver2.dll (2006-07-31 19:13:20 UTC)
COM Automation server 0.7 alpha 6
foo_converter.dll (2012-12-28 12:22:04 UTC)
Converter 1.5
foo_customdb.dll (2013-02-15 23:03:38 UTC)
Custom Database 0.0.9a
foo_dsp_eq.dll (2012-12-28 12:22:34 UTC)
Equalizer 1.0
foo_dsp_soundtouch.dll (2012-01-06 20:38:14 UTC)
SoundTouch DSP 1.1
foo_dsp_std.dll (2012-12-28 12:22:18 UTC)
Standard DSP Array 1.2
foo_fileops.dll (2012-12-28 12:21:36 UTC)
File Operations 2.2
foo_freedb2.dll (2012-12-28 12:20:38 UTC)
Online Tagger 0.7
foo_input_monkey.dll (2012-11-01 14:01:38 UTC)
Monkey's Audio Decoder 2.1.6
foo_input_std.dll (2012-12-28 12:21:48 UTC)
Standard Input Array 1.0
foo_jesus.dll (2010-12-30 03:05:26 UTC)
Autosave & Autobackup 10
foo_masstag.dll (2009-09-18 16:01:36 UTC)
Masstagger 1.8.4
foo_playcount.dll (2011-10-17 02:26:26 UTC)
Playback Statistics 3.0.2
foo_playlist_revive.dll (2012-10-02 17:19:55 UTC)
Playlist Revive 0.2
foo_quicksearch.dll (2012-11-01 14:01:38 UTC)
Quick Search Toolbar 3.4
foo_rgscan.dll (2012-12-28 12:21:32 UTC)
ReplayGain Scanner 2.1.2
foo_run.dll (2009-06-07 21:15:18 UTC)
Run services 0.3.7
foo_softplaylists.dll (2013-02-15 23:02:40 UTC)
Soft Playlists 2011-02-05
foo_texttools.dll (2010-09-01 22:39:37 UTC)
Text Tools 1.0.5
foo_ui_columns.dll (2010-05-03 13:38:32 UTC)
Columns UI 0.3.8.6
foo_ui_std.dll (2012-12-28 12:22:32 UTC)
Default User Interface 0.9.5
foo_uie_albumart.dll (2007-10-24 05:39:18 UTC)
Album Art Panel 0.2.7
foo_uie_albumlist.dll (2009-06-13 22:49:19 UTC)
Album list panel 0.3.5
foo_uie_console.dll (2009-08-29 16:06:24 UTC)
Console panel 0.4
foo_uie_elplaylist.dll (2010-10-23 05:05:52 UTC)
ELPlaylist 0.6.9.1(beta)
foo_uie_panel_splitter.dll (2009-12-09 16:16:12 UTC)
Panel Stack Splitter 0.3.8.3(alpha)
foo_uie_typefind.dll (2007-10-22 21:30:44 UTC)
Typefind 0.2 beta 2
foo_uie_vis_peakmeter_spectrum.dll (2008-04-20 03:18:50 UTC)
Peakmeter Spectrum Visualisation 0.2.0.0 beta
foo_uie_wsh_panel_mod.dll (2013-02-15 23:02:02 UTC)
WSH Panel Mod 1.5.6
foo_unpack.dll (2012-12-28 12:21:06 UTC)
ZIP/GZIP/RAR Reader 1.6
foo_upnp.dll (2013-02-15 23:01:30 UTC)
UPnP/DLNA Renderer, Server, Control Point 0.99.45
foo_verifier.dll (2009-10-05 18:39:20 UTC)
File Integrity Verifier 1.1
Go to the top of the page
+Quote Post
marc2003
post Feb 27 2013, 21:14
Post #785





Group: Members
Posts: 4874
Joined: 27-January 05
From: England
Member No.: 19379



QUOTE
foo_audioscrobbler.dll (2008-05-13 21:36:16 UTC)
Audioscrobbler 2.3.1


well that's the official last.fm scrobbler. i blame them. perhaps they are submitting before the track has finished playing which goes against their own specifications (well not now it seems). ditch it and use this....

http://mp3tag.de/en/fb2k.html

edit: i'm sure they've relaxed their own guidelines because now it says.....

QUOTE (http://www.last.fm/api/scrobbling#when-is-a-scrobble-a-scrobble)
When is a scrobble a scrobble?

A track should only be scrobbled when the following conditions have been met:

The track must be longer than 30 seconds.
And the track has been played for at least half its duration, or for 4 minutes (whichever occurs earlier.)

As soon as these conditions have been met, the scrobble request may be sent at any time. It is often most convenient to send a scrobble request when a track has finished playing.


i'm sure that wasn't the case before and it certainly conflicts with the way my script works.

This post has been edited by marc2003: Feb 27 2013, 21:47
Go to the top of the page
+Quote Post
iamthejeff
post Feb 27 2013, 21:20
Post #786





Group: Members
Posts: 17
Joined: 14-May 09
From: Calgary, AB
Member No.: 69788



Edit: ^^ okay, makes sense. There's definitely a conflict then.

The official scrobbler scrobbles at 50% of the track's duration by default, doesn't it?



Shouldn't your script be compatible with the official scrobbler?



This post has been edited by iamthejeff: Feb 27 2013, 21:22
Go to the top of the page
+Quote Post
marc2003
post Feb 27 2013, 21:39
Post #787





Group: Members
Posts: 4874
Joined: 27-January 05
From: England
Member No.: 19379



QUOTE (iamthejeff @ Feb 27 2013, 20:20) *
Shouldn't your script be compatible with the official scrobbler?


nope, everyone around here uses Florian's component. you're the first with this complaint. tongue.gif

if i did add support i'd have to complicate things by telling people not to touch that slider. i'm kind of reluctant really but i can tell you how to edit your own script. it'll have to be later on as i'm about to watch something on TV.
Go to the top of the page
+Quote Post
iamthejeff
post Feb 27 2013, 21:46
Post #788





Group: Members
Posts: 17
Joined: 14-May 09
From: Calgary, AB
Member No.: 69788



QUOTE (marc2003 @ Feb 27 2013, 13:39) *
QUOTE (iamthejeff @ Feb 27 2013, 20:20) *
Shouldn't your script be compatible with the official scrobbler?


nope, everyone around here uses Florian's component. you're the first with this complaint. tongue.gif

if i did add support i'd have to complicate things by telling people not to touch that slider. i'm kind of reluctant really but i can tell you how to edit your own script. it'll have to be later on as i'm about to watch something on TV.


Okay, I'm fluent with javascript so if you could give me some modifications later, that'd be great. Thanks.
Go to the top of the page
+Quote Post
marc2003
post Feb 27 2013, 21:55
Post #789





Group: Members
Posts: 4874
Joined: 27-January 05
From: England
Member No.: 19379



just about got time now. use a text editor with line numbering support and open your foobar profile\marc2003 folder and open common6.js

find line 2134...

change it to...

CODE
this.target_time = 5 + Math.min(Math.floor(fb.PlaybackLength / 2), 240);


this tells my script when to run - i'm just adding a few seconds to let the scrobbler do it's thing.

line 2202 should become

CODE
this.userplaycount = this.parsed_data.track.userplaycount;


i'm not sure this is enough to withstand errors so let me know how you get on. after saving the file, make sure you reload the panel so it picks up the changes.

This post has been edited by marc2003: Feb 27 2013, 21:57
Go to the top of the page
+Quote Post
kelmorn
post Feb 28 2013, 00:52
Post #790





Group: Members
Posts: 4
Joined: 29-April 07
From: England
Member No.: 43004



Just had the same problem with last.fm playcount increasing by 2.

As above appears to be linked to use of last.fm's 'official' scrobbler. I've always set it to submit at 70% but this afternoon knocked it down to 50% and the problem started. It's back up at 70% now so I'm ok

And while I'm posting, thanks for creating this tool.

(Just spotted I've been a member for nearly six years and this is my first post blink.gif )

This post has been edited by kelmorn: Feb 28 2013, 00:54
Go to the top of the page
+Quote Post
marc2003
post Feb 28 2013, 01:01
Post #791





Group: Members
Posts: 4874
Joined: 27-January 05
From: England
Member No.: 19379



heh, such a simple workaround. i really should have thought of that.

i'll update the readme incase anyone else wants to use the official scrobbler.
Go to the top of the page
+Quote Post
iamthejeff
post Feb 28 2013, 18:41
Post #792





Group: Members
Posts: 17
Joined: 14-May 09
From: Calgary, AB
Member No.: 69788



Thanks for the update. I also changed my scrobbler to scrobble at 70% and it appears fixed.
Go to the top of the page
+Quote Post
marc2003
post Feb 28 2013, 18:58
Post #793





Group: Members
Posts: 4874
Joined: 27-January 05
From: England
Member No.: 19379



don't change the code AND increase the slider. that will have the side effect of not incrementing the playcount at all. the track won't get scrobbled until after my script has run and the modification writes the current (soon to be old) value into the database.

do one or the other. i think reverting the code change and increasing the slider is the best bet.

Go to the top of the page
+Quote Post
iamthejeff
post Mar 1 2013, 03:34
Post #794





Group: Members
Posts: 17
Joined: 14-May 09
From: Calgary, AB
Member No.: 69788



QUOTE (marc2003 @ Feb 28 2013, 10:58) *
i think reverting the code change and increasing the slider is the best bet.

that's what I did. And it means I'll be able to use future versions of the script without having to re-implement the hack
Go to the top of the page
+Quote Post
joelzhao
post Mar 4 2013, 09:21
Post #795





Group: Members
Posts: 77
Joined: 24-June 09
From: China
Member No.: 70932



@marc2003:
Recently I found console says "Obsolete: Please use AppendTo() method to create sub menu instead of AppendMenuItem()", it used in common6.js. Would you have any plan to update it?
Go to the top of the page
+Quote Post
marc2003
post Mar 4 2013, 09:49
Post #796





Group: Members
Posts: 4874
Joined: 27-January 05
From: England
Member No.: 19379



i already did that..... in october 2011. laugh.gif

https://dl.dropbox.com/u/22801321/playcount%20sync.zip

make sure you extract the marc2003 folder again AND import the new script.

EDIT: you should quickly check your settings on the context menu as i've changed a few things since then. and if it crashes, right click on the panel and select properties>clear. all your existing playcount data will be untouched as that hasn't changed.

This post has been edited by marc2003: Mar 4 2013, 09:58
Go to the top of the page
+Quote Post
crshd
post Mar 10 2013, 11:25
Post #797





Group: Members
Posts: 1
Joined: 10-March 13
Member No.: 107145



Everything worked fine until yesterday, and all of a sudden the panel keeps crashing. I didn't change anything, but just to make sure I set everything up from scratch, re-installed components, made sure I used the newest version of the script... unsure.gif

QUOTE
WSH Panel Mod (Last.fm Playcount Sync v6.2013-01-23.01 by marc2003): Parsing file "C:\Program Files (x86)\foobar2000\marc2003\common6.js"
Error: WSH Panel Mod (Last.fm Playcount Sync v6.2013-01-23.01 by marc2003): Microsoft JScript runtime error:
Object required
File: C:\Program Files (x86)\foobar2000\marc2003\common6.js
Ln: 87, Col: 3
<source text only available at compile time>


EDIT Applied one of my infamous duct-tape style fixes - commented line 87. Seems to work for now.

This post has been edited by crshd: Mar 10 2013, 12:14
Go to the top of the page
+Quote Post
marc2003
post Mar 10 2013, 11:32
Post #798





Group: Members
Posts: 4874
Joined: 27-January 05
From: England
Member No.: 19379



when you updated the script, you didn't update WSH panel mod at the same time. that line of code points to a feature that doesn't exist in older versions.

get the latest here: http://code.google.com/p/foo-wsh-panel-mod/downloads/list

the readme does state what version of WSH panel mod is required but i guess only new users would check that. i'll have to put an extra notice in the zip.

edit: the new file is in the zip and it reads as follows:

QUOTE (UPGRADING FROM OLD VERSION - README FIRST.txt)
The current script requires WSH panel mod version 1.5.0 or above.

The latest version 1.5.6 is available here:

http://code.google.com/p/foo-wsh-panel-mod/downloads/list

You can check your component version by looking at
File>Preferences>Components>WSH panel mod.

Also, if you've made any changes to the default settings, check
the right-click menu to see if they're all intact. Some settings
may be lost during the upgrade as I've changed the way some
of them are stored.

Your username will still be intact and of course all playcount
data will remain exactly the same as before. There have been
no changes as far as that is concerned.

And from now on, you can check for the latest version simply
by right clicking the button and selecting "Update script".


This post has been edited by marc2003: Mar 10 2013, 12:18
Go to the top of the page
+Quote Post
jabberwocky_one
post Mar 10 2013, 12:48
Post #799





Group: Members
Posts: 6
Joined: 5-May 11
Member No.: 90365



QUOTE (crshd @ Mar 10 2013, 18:25) *
Everything worked fine until yesterday, and all of a sudden the panel keeps crashing. I didn't change anything, but just to make sure I set everything up from scratch, re-installed components, made sure I used the newest version of the script... unsure.gif

QUOTE
WSH Panel Mod (Last.fm Playcount Sync v6.2013-01-23.01 by marc2003): Parsing file "C:\Program Files (x86)\foobar2000\marc2003\common6.js"
Error: WSH Panel Mod (Last.fm Playcount Sync v6.2013-01-23.01 by marc2003): Microsoft JScript runtime error:
Object required
File: C:\Program Files (x86)\foobar2000\marc2003\common6.js
Ln: 87, Col: 3
<source text only available at compile time>


EDIT Applied one of my infamous duct-tape style fixes - commented line 87. Seems to work for now.


bump, same issue. Updated WSH to 1.5.6 but error persists. Duct tape fix works for now. Was upgrading from playcount sync.zip dated 2012-03-02.

Edit: Am running foobar with applocale + CUI with "Small Font 7pt". (since line 87 references some fonts, I thought I should give it a mention)

This post has been edited by jabberwocky_one: Mar 10 2013, 12:52
Go to the top of the page
+Quote Post
marc2003
post Mar 10 2013, 13:07
Post #800





Group: Members
Posts: 4874
Joined: 27-January 05
From: England
Member No.: 19379



heh, your font is the culprit. if you look again, you'll see the error is different from before.

Object required tells me the component is out of date

but now it will say...

Unable to get value of the property 'Name': object is null or undefined

all i can do is "catch" this error and default to using another font instead. this doesn't even affect this script because it doesn't use fonts - it's just a shared function with all my other scripts that do.

edit: Now fixed. Use Update script on the right click menu and restart foobar when prompted. the console will report when it detects font names it can't read. it defaults to Segoe UI instead. i'll try and investigate further as to why this happens.

This post has been edited by marc2003: Mar 10 2013, 13:15
Go to the top of the page
+Quote Post

43 Pages V  « < 30 31 32 33 34 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th December 2014 - 21:34