Last.fm plugin scrobbling problem

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

Peke
Posts: 17573
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Last.fm plugin scrobbling problem

Post by Peke »

@benzo8
Yeah it looks like that and I would like to try to track it down along with fix.

I sent you PM.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
HateMe
Posts: 26
Joined: Thu Aug 06, 2009 1:11 pm

Re: Last.fm plugin scrobbling problem

Post by HateMe »

News? Is there already a fix available?

regards
Peke
Posts: 17573
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Last.fm plugin scrobbling problem

Post by Peke »

No, I still do not have any returned mails from people at Last.fm
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
benzo8
Posts: 47
Joined: Tue Feb 19, 2008 4:31 am

Re: Last.fm plugin scrobbling problem

Post by benzo8 »

Having tried to be observant to see if I can find any pattern to this occurring:

1. When the scrobbling issue occurs, and if I shut down Mediamonkey, there will be a mediamonkey.exe process left running in the task manager.
2.a. If I kill that process, more of than not, MediaMonkey will restart automatically. My Now Playing playlist will be correct, and as the last state.
2.b. Sometimes, MediaMonkey will not automatically restart, and I will need to manually restart it. On doing this, the Now Playing playlist will be incorrect, in the state it was before I last started MediaMonkey.
3. After killing the rogue mediamonkey.exe process, MediaMonkey will scrobble correctly again for some indeterminate time.
4. Starting up or stopping MediaMonkey doesn't seem related to this issue, unless you actively kill the rogue process.

I haven't been able to ascertain what may be creating this rogue process - Peke I'm sure will understand what MM is doing in the background far better than I. Maybe this will help?

(This is on Windows 7x32...)
Lowlander
Posts: 56872
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Last.fm plugin scrobbling problem

Post by Lowlander »

That's correct, if you have 2 MediaMonkey processes running scrobbling won't work.
HateMe
Posts: 26
Joined: Thu Aug 06, 2009 1:11 pm

Re: Last.fm plugin scrobbling problem

Post by HateMe »

Well.... still no update .... :( :( :(

Ok, because this native plugin is so damn annoying (silently dies all the time!!), I switched to something else. Works so far.
I will report a result the next weeks.

In the meanwhile take a look at this Scrobbler-method:

Configuring MediaMonkey with the Last.fm Dashboard (Submitted by Sizzly on Thu, 05/13/2010 - 6:29pm)

Works as it should!

kind regards,
Mizery_Made
Posts: 2283
Joined: Tue Aug 29, 2006 1:09 pm
Location: Kansas City, Missouri, United States

Re: Last.fm plugin scrobbling problem

Post by Mizery_Made »

If I remember correctly, the "old Winamp plugin" method doesn't work with Unicode and may have a few other downfalls.
HateMe
Posts: 26
Joined: Thu Aug 06, 2009 1:11 pm

Re: Last.fm plugin scrobbling problem

Post by HateMe »

HateMe wrote:Configuring MediaMonkey with the Last.fm Dashboard (Submitted by Sizzly on Thu, 05/13/2010 - 6:29pm)
Works beautiful!! No more lost tracks! Brilliant!

With that tool it is also possible, that MM scroobles even a track, when you only played 50% of it. With the native plugin you have to play 100% of a track to get it scroobled.

I will stay with that one :).
Mizery_Made wrote:If I remember correctly, the "old Winamp plugin" method doesn't work with Unicode and may have a few other downfalls.
Yeah, I discovered 2 times some kind of error, that every new played track replaced the last scrobbled track at http://www.last.fm . But that wasn't a real problem, because the "Last.FM Scrobbler"-tool saves every played track. On next start it sent all those tracks successfully to last.fm .

Well guys, after 1 Week and over 500 (successfully) scroobled tracks: IT WORKS! 8)

Kind regards,
me
guest0815

Re: Last.fm plugin scrobbling problem

Post by guest0815 »

The "Configuring MediaMonkey with the Last.fm Dashboard" thing does work nicely.
At least if you don't want to scrobble tracks with foreign characters such as russian, japanese,.....
:-?
Seems like for that there's no other way than using a different player if you want to scrobble these.
Sizzly
Posts: 106
Joined: Mon Apr 27, 2009 8:46 pm
Location: Worcester, MA
Contact:

Re: Last.fm plugin scrobbling problem

Post by Sizzly »

Hey, goslings!

I'm pleased my tutorial worked for you. I feel loved.

R.
Rob
DJ Sizzly
http://djsizzly.com
HateMe
Posts: 26
Joined: Thu Aug 06, 2009 1:11 pm

Re: Last.fm plugin scrobbling problem

Post by HateMe »

Sizzly wrote:I'm pleased my tutorial worked for you. I feel loved.
Ah cool, the original author of above Howto is also here! Nice! 8)

Thank you very much for your Howto, it works as it should. No more lost tracks, thank you so much :wink: .

Kind regards,
Dreadlau
Posts: 1967
Joined: Sun Nov 25, 2007 6:49 am

Re: Last.fm plugin scrobbling problem

Post by Dreadlau »

I recommend visiting the site of sizzly ( link in his sig )
As it's full of useful advices and tutorials.
Seven Ultimate X64 SP1 / Sansa Clip 2go (with RockBox)
HateMe
Posts: 26
Joined: Thu Aug 06, 2009 1:11 pm

Re: Last.fm plugin scrobbling problem

Post by HateMe »

guest0815 wrote:At least if you don't want to scrobble tracks with foreign characters such as russian, japanese,.....
:-?
Confirmed. Tracks with foreign character weren't scrobbled by this method. Too bad :(. Almost a perfect solution.

I don't understand, why the "Last.FM Scrobbler" doesn't support (anymore) MediaMonkey? This shouldn't be however a big problem, since MM works with that old winamp-plugin?! Why don't they code a new proper plugin? Damn it :roll: .
Peke
Posts: 17573
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Last.fm plugin scrobbling problem

Post by Peke »

As developer of Last.fm developer I got notified by last.FM yesterday that they are releasing Scrobbling API 2.0 so we can expect issues.

We are looking into API 2.0 and ways to implement it into new version of native MediaMonkey plugin.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
Grondane
Posts: 1
Joined: Sun Nov 21, 2010 6:07 am

Re: Last.fm plugin scrobbling problem

Post by Grondane »

I couldn't get Sizzly's Dashboard solution to work, so I will be sticking to the existing plugin for now. Given the frustrations of losing a long history when it fails, though, I decided to try to find a way to recover from the problem ie to scrobble the files that should have been scrobbled but weren't.

I have therefore put together the script below, which will generate a .scrobbler.log file (the same as are generated by portable players) for the selected tracks in the Now Playing window, based on their LastPlayed date/time. The log file can then be uploaded using standard mechanisms such as via the web, eg http://scroblr.net/ or via a standalone tool, eg http://code.google.com/p/logscrobbler/.

It has scrobbled the Unicode characters in the tracks I have, so I am hoping that it will resolve the problems with foreign characters.

Also, it is my first attempt at a MediaMonkey script, and first bit of coding for a few years, so please be gentle :)

Instructions

1. Save the following code into a text file with the name "CreateScrobblerLog.vbs", in the subfolder "Scripts" of the main MediaMonkey folder.

Code: Select all

'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
'               CreateScrobblerLog
'                   by Grondane
'
'            Version 0.1 - 20 Nov 2010
'
' A script that allows you to recover when you
' discover that the MediaMonkey scrobbler plugin 
' has failed to scrobble a bunch of the tracks 
' you have been listening to.
'
' To use: select the tracks you want to Scrobble in
' the Now Playing window and run the script.  A
' .scrobbler.log file will be created that can be
' uploaded to Last.fm here:
'   http://scroblr.net/
' or by using a standalone tool such as this one:
'   http://code.google.com/p/logscrobbler/
'
'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Option Explicit     

function UDate(dateval)
    'Dates are scrobbled as Unix timestamps, so
    'this function converts dates into that format.
    UDate = DateDiff("s", "01/01/1970 00:00:00", dateval)
end function


Sub CreateLog

Dim list      ' list of songs to be exported
Dim res       ' results of dialogs calls
Dim win       ' window
Dim winS      ' window with focus
Dim daycount  ' how many days to check back

daycount = 32

  ' Move focus to Now Playing panel, on the principle that
  ' only those items should be scrobbled.	
  Set win = SDB.UI
  winS=win.MainWindowFocus
  win.MainWindowFocus = 4

  ' Get the list of songs to be logged.
  Set list = SDB.SelectedSongList

  If list.count=0 Then
    res = SDB.MessageBox( SDB.Localize("Select tracks to be logged, please."), mtError, Array(mbOk))
    Exit Sub
  End If


  ' Open inifile and get last used directory.
  Dim iniF
  Set iniF = SDB.IniFile

  ' Let user select the output path.
  Dim path
  path = iniF.StringValue( "CreateScrobblerLog", "LastCreateDir")

  path = SDB.SelectFolder( path, SDB.Localize( "Select where to create the Scrobbler log."))

  If path="" Then
    Exit Sub
  End If

  If Right( path, 1)<>"\" Then
    path = path & "\"
  End If

  ' Write selected directory to the ini file.
  iniF.StringValue( "CreateScrobblerLog", "LastCreateDir") = path
  Set iniF = Nothing

  ' Use progress to notify user about the current action.
  Dim Progress, ExpText
  Set Progress = SDB.Progress
  ExpText = SDB.Localize("Creating Log...")
  Progress.Text = ExpText

  ' Connect to the FileSystemObject
  Dim fso
  Set fso = CreateObject("Scripting.FileSystemObject")


  ' Create the output file.  Creates Unicode file for compatibility with Last.fm.
  Dim fout
  Set fout = fso.CreateTextFile( path & ".scrobbler.log", True, True)

  ' Write header lines.
  fout.Write "#AUDIOSCROBBLER/1.1" & CHR(10)
  fout.Write "#TZ/UNKNOWN" & CHR(10)
  fout.Write "#CLIENT/MEDIAMONKEY v" & SDB.VersionString & CHR(10)
 
  Progress.MaxValue = list.count

  ' Iterate through the list of songs.
  Dim i, itm
  for i=0 to list.count-1
    Set itm = list.Item(i)

    ' Check that the song has been played at all. Stop processing tracks if it hasn't.
    If UDate(itm.LastPlayed)<0 Then
        ' The extra spaces in the message box are because my font is set at >100%. 
        ' Modify to fit your settings as necessary.
    	res = SDB.MessageBox( SDB.Localize("Cannot Scrobble unplayed track '" & itm.Title & "'.      "), mtError, Array(mbOk))
    	Exit For
    End If

    ' Check when the song was last played. If more than 'daycount' days ago, 
    ' ask whether it should be Scrobbled.  Mainly intended as a sanity check.
    ' Note: 32 is set as the default on the assumption that NowPlaying lists won't
    ' last for more than a month.
    If (UDate(Date)-UDate(itm.LastPlayed))>(86400 * daycount) Then
    	res = SDB.MessageBox( SDB.Localize("You listened to '" & itm.Title & "' over " & _
        CStr(daycount) & " days ago. Do you want to stop?            "), mtWarning, Array(mbYes,mbNo))
    	If res = 6 Then
		Exit For
	End If
    End If

    ' Write the information for each track to the file.
    ' Note: LastPlayed is the time the track finished, but Last.fm uses the time it started, so it has to be converted.         
    fout.Write Join( Array(itm.ArtistName, itm.AlbumName, itm.Title, itm.TrackOrderStr, _
       CStr(CInt(itm.SongLength/1000)), "L", CStr(UDate(itm.LastPlayed)-CInt(itm.SongLength/1000)), _
       ""), CHR(9)) & CHR(10)
    Progress.Value = i+1
    if Progress.Terminate then
      Exit For
    end if
  next

  ' Close the output file and finish.
  fout.Close

  ' Return focus to original panel.
  win.MainWindowFocus = winS


  ' hide progress.
  Set Progress = Nothing

    res = SDB.MessageBox( SDB.Localize("Log Created.       "), mtInformation, Array(mbOk))

End Sub
2. In the same "Scripts" subfolder, open the "Scripts.ini" file (as an Administrator if in Windows 7 etc) and add the text below to the end of the file before saving it.

Code: Select all

[CreateScrobblerLog]
FileName=CreateScrobblerLog.vbs
ProcName=CreateLog
Order=60
DisplayName=Create a Last.FM Scrobbler Log...
Description=Generates a Log from the selected tracks in the Now Playing window.
Language=VBScript
ScriptType=0
3. Restart MediaMonkey and the script should be in the Tools/Scripts menu. Select some files in the Now Playing window, run the script, decide where you want to save it, and everything should hopefully work out OK.
Post Reply