ScrobblerDJ V2.20 - Updated 16/11/2013

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

civiliza
Posts: 84
Joined: Wed Dec 17, 2008 1:34 pm
Location: United Kingdom

ScrobblerDJ V2.20 - Updated 16/11/2013

Post by civiliza » Tue Dec 25, 2012 11:50 pm

NOTE - Title changed to reflect latest version, rest of this post was (pre)V2.0

For users of Mediamonkey 3+ who like me never moved on from PsyXonova's ScrobblerDJ, I have found a tweak that cures the recent "Could not locate artist on Last.FM" problems. (FYI This tweak has got ScrobblerDJ working again on my current MM 4.0.6.1501 Installation).

The problem was caused by Last.FM returning fractional Similarity ratings (range 0.0 to 1.0) instead of the old (presumably) 0 to 100.

Unfortunately I cannot seem to locate a copy of the original ScrobblerDJ V1.26 Installation Package on either my computer or this forum, so all I can offer is a change to the existing V1.26 version of ScrobblerDJ.vbs.

The change is to the ParseXML function which starts:

Code: Select all

Function ParseXML(input, out_type)
logme "* ParseXML has started with parameters " & input & ", " & out_type
'This procedure at first parses XML and then it calls the auxiliary procedures to check for the various limitations
    Dim XDict, XElmnt, i, n, RNumber, res
    Set XDict = CreateObject("Scripting.Dictionary")
    	logme "ParseXML is tranfering XML data to a dictionary"

    Select Case out_type
        Case 1

            i = 0
            For Each XElmnt In xmlDoc.getElementsByTagName("artist")
				If XElmnt.ChildNodes.Item(2).Text <> "" Then
	                If CInt(XElmnt.ChildNodes.Item(2).Text) > MinMatch Then
The knack is to multiply the returned value by 100 before comparing with MinMatch so that the last line in the code excerpt above becomes:

Code: Select all

	                If CInt(XElmnt.ChildNodes.Item(2).Text)*100 > MinMatch Then
I sent a quick query to the co-authors, and it was recommended that this change would take ScrobblerDJ up to V2.0. Unfortunately I forgot to mention that I could not produce a revised Installation Package. Hopefully they would be in a position to produce a suitable V2.0 Installation Package incorporating this change.

PS The idea of multiplying by 100 was copied across from rmatiazo's version of the script, so credit to rmatiazo as well as to the co-authors PsyXonova and Peke.

The original ScrobblerDJ V1.26 thread can be found at:
http://www.mediamonkey.com/forum/viewto ... f=2&t=7961

From now on ScrobblerDJ will Reside and be available on:
http://www.happymonkeying.com/plugin.php?q=300092
Last edited by civiliza on Sat Nov 16, 2013 1:32 pm, edited 21 times in total.

Peke
Posts: 11994
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia
Contact:

Re: ScrobblerDJ V2.00 (Could't Locate Artist Tweak)

Post by Peke » Wed Dec 26, 2012 8:23 pm

I updated links to ScrobblerDJ 1.26 and made redirections to this thread so that all questions are now directed here.

v1.26 had standalone installer, guess you will need to make your own. See http://www.mediamonkey.com/wiki/index.p ... n_Packages
Best regards,
Pavle
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
How to add SCREENSHOTS to forum

civiliza
Posts: 84
Joined: Wed Dec 17, 2008 1:34 pm
Location: United Kingdom

Working (fingers crossed) Installation File

Post by civiliza » Thu Dec 27, 2012 8:01 am

The link in this post leads to my best attempt at a ScrobblerDJ V2.0 Installation Package (based on the odds and ends of ScrobblerDJ files left on my PC).

Version superceded, see my next post.

Rather than try to make my way through the maze of All User / Current User dependant file locations, I have plumped for using the {app} location (%appdata%/Mediamonkey/) and placed all ScrobblerDJ files in the Scripts subfolder. This is also where it expects to Uninstall said files from.

Something that was bugging me was the way songs with multiple artists (eg Chicane; Bryan Adams) would fail to find a match on Last.FM. I have added code that randomly picks an artist from the song's artist list to present to Last.FM. In the case above, the track could randomly be treated as either a Chicane song or a Bryan Adams song when asking Last.FM for Similar Artists,

Please note that the V2.0 update was a personal project and while I am to blame for this particular update, I am perfectly happy for the Add-On in general to remain the property of PsyXonova and Peke.
Last edited by civiliza on Sun Jan 13, 2013 12:08 pm, edited 4 times in total.

Peke
Posts: 11994
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia
Contact:

Re: ScrobblerDJ V2.00 (Couldn't Locate Artist Tweak)

Post by Peke » Thu Dec 27, 2012 6:49 pm

I personally would not mind if you wanna continue personal project and I doubt PsyXonova will argue about that especially as he is occupied with other things.

Project is free and no royalties are needed except to keep us noted and credits for anything new is yours only.

I'll help wherever I can, when ever I can.
Best regards,
Pavle
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
How to add SCREENSHOTS to forum

civiliza
Posts: 84
Joined: Wed Dec 17, 2008 1:34 pm
Location: United Kingdom

ScrobblerDJ V2.1

Post by civiliza » Fri Dec 28, 2012 4:17 am

Peke has kindly tidied up a couple of my Installation Package mistakes and suggested a better site to host the file.

With the code change to randomly pick one of the contributing artists for a multi-artist song (previously always picked the closest to A) I have bumped this to Version 2.1

The corrected file in its new location can be found at:
http://www.happymonkeying.com/plugin.php?q=300092 <<-- LATEST INSTALLATION PACKAGE IS ALWAYS HERE
Last edited by civiliza on Thu Apr 25, 2013 6:06 am, edited 6 times in total.

Peke
Posts: 11994
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia
Contact:

Re: ScrobblerDJ V2.00 (Couldn't Locate Artist Tweak)

Post by Peke » Fri Dec 28, 2012 11:31 pm

I hope you do not mind that I too the liberty to cross link plugin page here (first post) and add this topic into plugin page details on HappyMonkeying.

Other Please note that MMW extensions Find updates works for this plugin.
Best regards,
Pavle
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
How to add SCREENSHOTS to forum

civiliza
Posts: 84
Joined: Wed Dec 17, 2008 1:34 pm
Location: United Kingdom

ScrobblerDJ V2.2

Post by civiliza » Sat Dec 29, 2012 9:23 am

I have added an Ignore Composers option.

This was provoked by an occasion arising from a solo artist being identified as being similar to his former group.

The problem was that I had none of his solo work, so ScrobblerDJ saw him in my Library (as one of the group's writers/composers) but could not find any of his hits. Instead it substituted a song that he had written (namely another of the group's songs).

When the Ignore Composers option is selected, similarity is based purely on performing acts and the writer/composer is ignored.

The link in the posts above now points to the new Scrobbler 2.2 installation
Last edited by civiliza on Sun Jan 13, 2013 12:09 pm, edited 1 time in total.

mcow
Posts: 817
Joined: Sun Sep 21, 2008 9:35 pm
Location: Cupertino, California

Logs? (debug or otherwise)

Post by mcow » Mon Dec 31, 2012 7:45 pm

I see there's a "Enable Debug Mode" option. Is that part of what is seen in DbgView or is there a log somewhere else? I'd like to be able to review which choices were actual last.fm selections and which were random because no good selection was available.

Also, I'd like a time limit so I don't get repeats. I have exactly one String Cheese Incident track in my library, and ScrobblerDJ has selected it two days in a row because they are similar to more plentiful artists in my library.

civiliza
Posts: 84
Joined: Wed Dec 17, 2008 1:34 pm
Location: United Kingdom

Re: Logs? (debug or otherwise)

Post by civiliza » Tue Jan 01, 2013 6:56 am

mcow wrote:I see there's a "Enable Debug Mode" option. Is that part of what is seen in DbgView or is there a log somewhere else?
The Debug output goes to the file ScrobblerDJ.vbs.log in the same Directory/Folder as the ScrobblerDJ Script files. From Version 2.00 onwards this can be found at %appdata%/MediaMonkey/Scripts.

(Note, I'm afraid that this log file is very much a script writer's tool, while it can be used to work out what decisions the script made, this information is well and truly buried in debugging information. Also it expands rapidly, so be prepared to delete the file at regular intervals and/or turn off Debug mode once you have worked out what is going on).
Last edited by civiliza on Tue Jan 01, 2013 11:51 am, edited 2 times in total.

civiliza
Posts: 84
Joined: Wed Dec 17, 2008 1:34 pm
Location: United Kingdom

Re: ScrobblerDJ V2.00 (Couldn't Locate Artist Tweak)

Post by civiliza » Tue Jan 01, 2013 7:04 am

Looking through the code in response to the last post, I have discovered that I misinterpreted the purpose of the Default Playlist.

It is used as a fallback when no tracks by a similar artist are present in the library (or all such artists have benn played too recently). I had previously thought that it was the source of all tracks added to Now Playing.

civiliza
Posts: 84
Joined: Wed Dec 17, 2008 1:34 pm
Location: United Kingdom

ScrobblerDJ V2.3 Beta

Post by civiliza » Tue Jan 01, 2013 11:40 am

mcow wrote:I'd like a time limit so I don't get repeats. I have exactly one String Cheese Incident track in my library, and ScrobblerDJ has selected it two days in a row because they are similar to more plentiful artists in my library.
OK, I've given it my best shot, there is now a "No same Song" option that specifies the minimum time (between 1 and 744 hours) before a song can repeat.

With this change, I've taken the Version up to 2.3 Beta. I'm calling it a beta because I'm having difficulty finding a suitably small island of similar artists to test it fully. So far I think I've caught it actively preventing a track from repeating, but haven't been able to prove it it allows tracks again after the "No same Song" period has expired.

I chose 744 Hours as the upper limit because that is 31 days, I can't see the majority of users having a library large enough to require that large a number, but I had to set the limit somewhere. The default is a more reasonable 24 Hours.
Last edited by civiliza on Sun Jan 13, 2013 12:10 pm, edited 1 time in total.

civiliza
Posts: 84
Joined: Wed Dec 17, 2008 1:34 pm
Location: United Kingdom

ScrobblerDJ V2.3

Post by civiliza » Tue Jan 01, 2013 4:56 pm

I made some howlers in the Beta, primarily using the wrong variable when comparing time, but also not saving the new "No same Song" value when the Options were updated.

The new Scrobbler V2.3 will now successfully avoid playing the same song within the "No Same Song" interval.

Unfortunately it treats multiple copies/versions of the same song as different songs, so it can eg play the same song from a different album within said interval. That said, it will call it no more frequently than the older versions did so it is no worse than the old code.

I have tidied up the ParseXML logic to:
1) Avoid (potentially) randomly checking the same Artist/Song multiple times. It will now check the entire Similar Artists / Top Songs list before giving up.
2) Avoid a superfluous loop each time the Similar Artists / Top Tracks list is exhausted.

Script now upgraded from 2.3 Beta to 2.3.
Last edited by civiliza on Sun Jan 13, 2013 12:10 pm, edited 1 time in total.

civiliza
Posts: 84
Joined: Wed Dec 17, 2008 1:34 pm
Location: United Kingdom

Re: ScrobblerDJ V2.3

Post by civiliza » Tue Jan 01, 2013 5:08 pm

Darn it, I've broken the No Same Artist code. Hold off the V2.3 code, and I'll try to fix it for V2.4
Last edited by civiliza on Sun Jan 13, 2013 12:11 pm, edited 1 time in total.

civiliza
Posts: 84
Joined: Wed Dec 17, 2008 1:34 pm
Location: United Kingdom

ScrobblerDJ V2.4

Post by civiliza » Tue Jan 01, 2013 7:43 pm

Sorry one and all, I have just discovered while fixing the "No same Artist" code I broke in V2.3 that the original V2.0 implementation was faulty.

As coded in V2.00, all artists with similarities below 50% were being ignored due to poor handling of Integers and Doubles.

After correcting this V2.0 code, the range of Similar Artists has returned to what it should have been.

Anyway, as well as correcting my V2.3 mistake, V2.4 does what V2.0 should have been doing all along and UPGRADING TO V2.4 FROM ANY OF THE EARLIER V2 VERSIONS IS HIGHLY RECOMMENDED.
Last edited by civiliza on Sun Jan 13, 2013 12:12 pm, edited 1 time in total.

civiliza
Posts: 84
Joined: Wed Dec 17, 2008 1:34 pm
Location: United Kingdom

Re: ScrobblerDJ V2.5

Post by civiliza » Fri Jan 11, 2013 3:21 pm

Sorry for deleting the post I made here a few minutes ago, I had just learnt the hard away about the difference between Left Join and Inner Join and wanted to take it down before anybody downloaded a dodgy version.

Anyway, I have added a new Limit To Default Playlist option.

This option when selected makes sure that the script only queues tracks from the Default Playlist instead of queueing any library song by a similar artist even if it is not on the Default Playlist.

(Note as originally coded the Default Playlist is only refered to when none of the Similar Artists / Songs can be found in the library, this is what still happens if the new option is left unselected).

IT SHOULD BE NOTED THAT THE OPTION ONLY WORKS IF THE DEFAULT PLAYLIST IS A STATIC (IE NON-AUTO) PLAYLIST OTHERWISE DESELECT THE OPTION.

The option is part of my quest to avoid hearing the same song multiple times in a given interval.

The No Same Song option added in 2.4 stopped the same song from playing twice, but only if your library didn't have multiple copies of the song.
By creating a static Default Playlist with only one copy of each song then setting Limit To Default Playlist, multiple copies will no longer be an issue.

The Scrobbler V2.5 script has now been corrected to eliminate the problem caused by incorrect use of Left Join

Prior to making the Left Join mistake, I had also improved the code that gets called when no Similar Artists are found. Songs from the Default Playlist are now queued without the characteristic long delay.
Last edited by civiliza on Sun Jan 13, 2013 12:12 pm, edited 1 time in total.

Post Reply