ScrobblerDJ V2.20 - Updated 16/11/2013

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

SchulA
Posts: 30
Joined: Sat Jul 25, 2009 5:17 am

Re: ScrobblerDJ V2.7

Post by SchulA » Mon Jan 14, 2013 4:07 pm

V. 2.9 seems to work. It suggested about 50 songs either from last fm or from the default playlist. No repeating Artists or songs so far. Not even with Manu Chao :wink:

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

Re: ScrobblerDJ V2.7

Post by civiliza » Tue Jan 15, 2013 3:44 am

Thank you very much for testing that SchulA, it's a relief to have finally identified the problem after so many false guesses.

For anyone wondering why SchulA tested V2.9,

ScrobblerDJ V2.8 added code to convert between MM4's UTC timecodes and the current time which is TimeZone specific
ScrobblerDJ V2.9 contains V2.8's timecode changes but tweaked the Artist Similarity handling (changed comparison from > to >=)
Last edited by civiliza on Tue Jan 15, 2013 5:06 am, edited 1 time in total.

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

ScrobblerDJ V2.10

Post by civiliza » Tue Jan 15, 2013 5:05 am

ScobblerDJ V2.8 (and later 2.9) relied heavily on a multitude of utc2local() and/or local2utc() calls spread widely throughout the script. Apart from the overheads of these extra calls, the prospect of maintaining both "live" MM4 specific code and commented out MM3 equivalent code in so many different places was daunting.

Anyway, while SchulA was kindly testing V2.9, I was trawling this forum and the internet in general looking for timezone related VBS code.

I was able to find a code snippet that uses a shell call to identify the difference between local time and GMT/UTC.

Using this code snippet plus a global variable, I was able to limit the MM4 specific code to a single script line that could simply be commented out to make the script MM3 specific. (Much more managable).

Also by storing the version specific MM equivalent of the current time to said global variable and comparing all database time values against this variable, the overheads of converting back and forwards between UTC time and local time are no longer an issue,

ScrobblerDJ V2.10 optimises the timezone handling needed to make the script work with the MM4 database.

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

Re: ScrobblerDJ V2.10

Post by mcow » Tue Jan 15, 2013 9:04 pm

The changes are coming fast and furious. I'd like to try a new version, but I don't want to be repeatedly installing stuff; my regular profile is running under 4.1beta so I'm already concerned about stability issues. (So far, so good...)

How close do you think you are to having a stable version?

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

Re: ScrobblerDJ V2.10

Post by civiliza » Tue Jan 15, 2013 11:57 pm

Ah, you've caught me on the hop.

Give me a couple of days, all the recent changes have drained my enthusiasm.

The latest version of the timecode handling needs testing in a non GMT+0 timezone, and after that there is a minor aspect of the Default Playlist handling that could do with improving.

But not tonight, it's the early hours of the morning here, and I'm off to bed.

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

Re: ScrobblerDJ V2.11

Post by civiliza » Wed Jan 16, 2013 7:54 am

Oh the joys of discovering MediaMonkey's idiosyncrasies.

It seems that when performing SQL Queries of the MM4 database, the Songs.LastTimePlayed field needs Timezone correction before comparing it with the vbs now() value. (As dealt with in V2.8 onwards)

But when the same data is accessed via the automation object SDBSongData.LastPlayed no correction is required.

Since ScrobblerDJ uses both access methods, the scriptwide application of Timezone correction in ScrobblerDJ V2.8 through V2.10 fixed some parts of the code while breaking others.

I have got over my fear of temporarily changing my PC's TimeZone, and have produced a new ScrobblerDJ V2.11 script that seems to work equally well in US Pacific Time (GMT-8), Greenwich Mean Time, and Beijing/Hong Kong Time (GMT+8).

ScrobblerDJ has now been upgraded to V2.11 and this is now the recommended version.

Unless someone else discovers a bug in V2.11 I have no immediate plans/ideas for any further upgrades.

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

Re: ScrobblerDJ V2.11 - Updated 16/01/2013

Post by mcow » Wed Jan 30, 2013 12:02 am

It seems that when ScrobblerDJ updates the Now Playing list, the OnNowPlayingModified event does not trigger. This causes my plugin to not update for the new track.

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

Re: ScrobblerDJ V2.11 - Updated 16/01/2013

Post by civiliza » Wed Jan 30, 2013 2:55 am

I don't have anything hanging off of that trigger, but after a quick search of the forums I have changed the method used to add tracks to NowPlaying.

Mcow, could you see whether the changed version (ScrobblerDJ V2.12) solves your problem please?

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

Re: ScrobblerDJ V2.11 - Updated 16/01/2013

Post by mcow » Wed Jan 30, 2013 10:59 pm

civiliza wrote:Mcow, could you see whether the changed version (ScrobblerDJ V2.12) solves your problem please?
It does! Thanks very much.

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

ScrobblerDJ V2.12

Post by civiliza » Thu Jan 31, 2013 3:44 am

Thank you for testing that Mcow,

ScrobblerDJ V2.12 uses PlaylistInsertTracks to trigger the OnNowPlayingModified event (MM4version only)

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

Re: ScrobblerDJ V2.12 - Updated 30/01/2013

Post by mcow » Thu Jan 31, 2013 11:43 pm

Thanks again. I'm liking this pretty well. The only drawback is, eventually, every chain of Similar-To's leads to the Beatles.

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

Re: ScrobblerDJ V2.12 - Updated 30/01/2013

Post by civiliza » Fri Feb 01, 2013 4:10 am

mcow wrote:... eventually, every chain of Similar-To's leads to the Beatles.
Says it all really :D

The only way around this would be to set up a static Default Playlist without any Beatles tracks and set the Limit To Default Playlist option. (Either that or use the Ratings threshold along with downgrading the ratings of all Beatles tracks and/or bumping up the ratings of every other track).

(Of course, if the first caveman to discover music had made a recording, all similarity chains would eventually lead to Ughh (or whatever his name was)). :evil:

EDIT - As to why The Beatles is linked to as opposed to some other influential artist, that depends on the vaguaries of Last.FM's similar artist database. All the script does is use the database, any bias (whether deliberate or subconscious) comes from said data and however it is derived. For all I know the voting userbase of Last.FM might be predominantly of an age, nationality, or language group that would naturally introduce a bias whether due to musical tastes, or lack of familiarity with other Artists/styles.

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

Re: ScrobblerDJ V2.13.1 - Updated 03/02/2013

Post by civiliza » Sat Feb 02, 2013 11:30 pm

I finally decided to bite the bullet and fully utilize the extra functionality offered by MM4's SDB.Database.GetAutoPlaylistQuery() automation function. This returns the SQL query used for a specified AutoPlaylist and is new to MM4.

In particular it can be used to perform SQL queries on AutoPlaylists instead of trawling through them track by track.

After several false starts (a partial and incorrect use of it in ScrobblerDJ V2.12 produced SQL errors with Ordered Default AutoPlaylists), I have finally modified the script so that MM4 users can use Limit To Default Playlist option on AutoPlaylists as well as static Playlists.

--

Unfortunately without GetAutoPlaylistQuery it is simply not possible to allow MM3 users to use the Limit To Default Playlist option on AutoPlaylists. (The overheads involved would be horrendous). The MM3 functionality is now altered as follows:

1) If Limit To Default Playlist is not set, the script will check your entire library for Similar Artists that have not been played recently and if it fails to find any, pick a track from the Default Playlist (be it an AutoPlaylist or a static Playlist)

2) If Limit To Default Playlist is set and the Default Playlist is an AutoPlaylist, Limit To Default Playlist will be ignored (ie the script will perform the same steps as 1) above).

3) If Limit To Default Playlist is set and the Default Playlist is a static Playlist, the script will limit it's Similar Artist chacks to the Default Playlist, and if they have all been played too recently, it will pick a song by a non-Similar Artist from the Default Playlist.

--

NOTE - For both MM3 and MM4 versions:

Once the script has failed to find a Similar Artist track (or any Similar Artist songs that match the No Same Artist criteria) it will ignore No Same Artists when picking from the tracks from the Default Playlist. This allows the entire Default Playlist to be utilised even if all the songs are by the same artist.

In the same situation howver, the No Same Song criteria will continue to be applied. As a result, if all the songs in the Default Playlist have been played within No Same Song hours, the script will stop queueing songs since that is the only way to avoid repeating any of the songs. Anyone wanting the script to keep queueing songs ad-infinitum should ensure that No Same Songs does not exceed the total playing length of the Default Playlist.

(Of course users who only use the script a limited number of hours every day have more leeway eg playing 8 hours a day will allow the Default Playlist to last 3 times as long so No Same Songs can be larger).

ScrobblerDJ V2.13.1 allows MM4 users to use Limit To Default Playlist with AutoPlaylists and is a recommended upgrade from V2.12

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

Re: ScrobblerDJ V2.13.1 - Updated 03/02/2013

Post by mcow » Sun Apr 21, 2013 4:38 pm

I've uninstalled this add-on, but now every time a track starts, I'm getting an error: "Cannot find ScrobberDJ.vbs"

Where do I look to fix this? I see no trace in either the program's or my profile's scripts.ini. It's not shown in the Extensions manager, it's not shown in the Scripts menu.

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

Re: ScrobblerDJ V2.13.1 - Updated 03/02/2013

Post by civiliza » Sun Apr 21, 2013 7:05 pm

That's frustrating, this was working at the start of the year.

Being on the whole happy with ScrobblerDJ, I haven't had any reason to remove it of late, but it used to uninstall ok.

--

A few test runs today have proved that while ScrobblerDJ's file are still being added/deleted correctly, for some reason Scripts.ini is no longer being reliably updated.

The Installation/Unistallation process uses the ScriptsPath mechanism to find Scripts.ini, and there are a couple of threads that suggest that this might be unreliable, although that could be a red herring.

Anyway, the critical Scripts.ini entry consists of the lines:

[ScrobblerDJ]
Filename=ScrobblerDJ.vbs
Procname=ScrobblerDJ
Order=10
DisplayName=&ScrobblerDJ
Description=ScrobblerDJ
Language=VBScript
ScriptType=2

Since in your case the unintall process seems to have correctly removed ScrobblerDJ.vbs but (presumably) failed to update the Scripts.ini file, I would recommend manually editing said file via eg NotePad.

Depending on which drive MediaMonkey is installed onto, check the file Drive:\Program Files\MediaMonkey\Scripts\Scripts.ini, and if it still contains the [ScrobblerDJ] lines shown above, delete them and save the updated file.

(If not, check %appdata%\MediaMonkey\Scripts\Scripts.ini for the same lines).

Apologies for not providing an updated mmip package, the current script used to work fine, and the few threads that mention ScriptsPath don't offer any alternative solutions.

Post Reply