Similar Artists 2.2 - Updated 26/10/2013

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

ohneland
Posts: 115
Joined: Mon Jan 08, 2007 11:11 am

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by ohneland » Thu Aug 09, 2012 7:42 am

"Select highest rated in library" etc.: That is track or artist?
ohneland

Win 10
Logitech Media Server on a Synology NAS with diff. players
Moto G on LOS 14 [LG Optimus One; Nokia Lumia 620]
MM 4, MP3Tag, EAC, Musicbee, [Songbird]
[Samsung Galaxy Tab 2 10.1 5110; Sansa ClipZip]

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by trixmoto » Thu Aug 09, 2012 7:57 am

Well artists aren't rated, so it'd be tracks.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

ohneland
Posts: 115
Joined: Mon Jan 08, 2007 11:11 am

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by ohneland » Thu Aug 09, 2012 8:54 am

Thanks, sounds logical.
currently it is not working but i suppose it is cause I just let run the ArtistTopTracks script?
It produced one playlist and then stopped...
I post sth when ATT has finished
ohneland

Win 10
Logitech Media Server on a Synology NAS with diff. players
Moto G on LOS 14 [LG Optimus One; Nokia Lumia 620]
MM 4, MP3Tag, EAC, Musicbee, [Songbird]
[Samsung Galaxy Tab 2 10.1 5110; Sansa ClipZip]

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by trixmoto » Thu Aug 09, 2012 6:17 pm

There may be some confusion here. Highest "rated" is the track rating. Highest "ranked" is based on the Last.Fm artist top tracks, but this script goes and gets those values itself, it is not linked to the "Artist Top Tracks" script in any way.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

ohneland
Posts: 115
Joined: Mon Jan 08, 2007 11:11 am

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by ohneland » Thu Aug 09, 2012 6:53 pm

Somehow it's not quite working.
Even when denying a playlist based on the title playing (ie the last in the list) it nevertheless creates one.
It often returns error notifications, probably when MM is busy with sth else: "Don't use write lock after read lock was acquired".
Hmm...
ohneland

Win 10
Logitech Media Server on a Synology NAS with diff. players
Moto G on LOS 14 [LG Optimus One; Nokia Lumia 620]
MM 4, MP3Tag, EAC, Musicbee, [Songbird]
[Samsung Galaxy Tab 2 10.1 5110; Sansa ClipZip]

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by trixmoto » Thu Aug 09, 2012 7:04 pm

I can take a look at the ReadLock/Write Lock errors, this usually can be fixed by being more specific about the transaction scopes and reordering some of the code.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

rockportrait

Similar Artists 2.0 - Freezes MM

Post by rockportrait » Tue Oct 23, 2012 8:27 am

Just installed the script on the latest MM (v4.0.7.1505) running on Win7 Pro64. Whenever I start the script it creates a status message, then just seems to go on some internal loop with no external updates to tell me what's happening. While that is happening I can still view different folders and playlists in my music library, but I can't terminate the process or shut down MM. I left it running overnight with no result.
Any ideas?

Steve

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by trixmoto » Tue Oct 23, 2012 7:26 pm

No, that sounds very odd. Have you looked at the settings page to make sure it's configured correctly?
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

rockportrait

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by rockportrait » Fri Oct 26, 2012 8:01 am

Well, I don't know what "configured correctly" means. If there's an "incorrect" configuration I'd imagine it wouldn't be an option, or there'd be suitable guidance in place. Anyway, here are the parts that seem to be fairly relevant:
Artist Limit: 10
Tracks/artist: 5
Tracks/playlist: 50
Parent playlist: [Playlists]
The last three options regarding what to do when the script finishes are blanked out

Once I run the script & agree to make a Play List for 1 artist - Judas Priest, I see a status of "SimilarArtists: Processing artist 'Judas Priest' (1/2)..." and the playlist itself appears under the Playlist node. Other functionality seems to be OK, although I eventually get a rotating mouse cursor, and the status sits there until I get bored of waiting. Tag updating doesn't work properly at this point, even though I can still use the mouse to select menus and functions. If I keep trying to operate MM for long enough it eventually freezes.

Steve

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by trixmoto » Fri Oct 26, 2012 11:41 pm

By "correctly" I meant "as you want it to be" - I was really asking if you'd configured the script or were just using the default settings.

It sounds very odd to me. I can't remember off the top of my head if there's a debug mode or not for this script? If so, try enabling that and see what the message buffer says. Do you get any tracks appear in the playlist that's created?
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

rockportrait

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by rockportrait » Sat Oct 27, 2012 12:23 am

There is no debug mode that I am able to see.
No tracks are added to the playlist, and the playlist disappears after I force close & restart MM.

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by trixmoto » Sat Oct 27, 2012 12:28 am

If had a quick look at the code, you're right, no debug mode on the options sheet. However, if you open up the script file in a text editor then you can modify line 30 to be...

Code: Select all

Dim Debug : Debug = True
This should then create a debug file called "SimilarArtists.log" in your %temp% folder.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

rockportrait

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by rockportrait » Sat Oct 27, 2012 4:29 am

OK, after a few minutes I chose to open the log, and this is what we get. I assume those very long "REPLACE" query lines are not supposed to look like they do.

Code: Select all

#CREATE TABLE IF NOT EXISTS TrixSongRank (ID INTEGER PRIMARY KEY, Rank INTEGER)
#DELETE FROM TrixSongRank
#SELECT Id FROM Artists WHERE Artist='Judas Priest'
@http://ws.audioscrobbler.com/2.0/?method=artist.getSimilar&api_key=6cfe51c9bf7e77d6449e63ac0db2ac24&artist=Judas+Priest
@http://ws.audioscrobbler.com/2.0/?method=artist.getTopTracks&api_key=6cfe51c9bf7e77d6449e63ac0db2ac24&artist=Judas+Priest&limit=100
#SELECT Songs.ID FROM Songs,ArtistsSongs WHERE Songs.ID=ArtistsSongs.IDSong AND ArtistsSongs.PersonType=1 AND ArtistsSongs.IDArtist=1505 AND Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(UpperW(Songs.SongTitle),'&','AND'),'+','AND'),' N ','AND'),'''N''','AND'),' ',''),'.',''),',',''),':',''),';',''),'-',''),'_',''),'!',''),'''',''),'"','')='BREAKINGTHELAW'
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (124994,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (125002,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (125011,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (125134,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (125275,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (125301,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (125349,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (125371,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (157754,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (166235,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (168067,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (173011,100)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (191447,100)
#SELECT Songs.ID FROM Songs,ArtistsSongs WHERE Songs.ID=ArtistsSongs.IDSong AND ArtistsSongs.PersonType=1 AND ArtistsSongs.IDArtist=1505 AND Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(UpperW(Songs.SongTitle),'&','AND'),'+','AND'),' N ','AND'),'''N''','AND'),' ',''),'.',''),',',''),':',''),';',''),'-',''),'_',''),'!',''),'''',''),'"','')='PAINKILLER'
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (124996,99)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (125063,99)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (125097,99)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (125262,99)
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (125352,99)
#SELECT Songs.ID FROM Songs,ArtistsSongs WHERE Songs.ID=ArtistsSongs.IDSong AND ArtistsSongs.PersonType=1 AND ArtistsSongs.IDArtist=1505 AND Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(UpperW(Songs.SongTitle),'&','AND'),'+','AND'),' N ','AND'),'''N''','AND'),' ',''),'.',''),',',''),':',''),';',''),'-',''),'_',''),'!',''),'''',''),'"','')='LIVINGAFTERMIDNIGHT'
#REPLACE INTO TrixSongRank (ID,Rank) VALUES (124999,98)


.
. Code is too long, so I am cutting it here and showing you the last few lines after this.
.


#SELECT Songs.ID FROM Songs,ArtistsSongs WHERE Songs.ID=ArtistsSongs.IDSong AND ArtistsSongs.PersonType=1 AND ArtistsSongs.IDArtist=11249 AND Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(UpperW(Songs.SongTitle),'&','AND'),'+','AND'),' N ','AND'),'''N''','AND'),' ',''),'.',''),',',''),':',''),';',''),'-',''),'_',''),'!',''),'''',''),'"','')='WHITEHEATREDHOT'
#SELECT Songs.Id,Songs.SongTitle FROM ArtistsSongs,Songs LEFT OUTER JOIN TrixSongRank ON Songs.ID=TrixSongRank.ID WHERE Songs.ID=ArtistsSongs.IDSong AND ArtistsSongs.PersonType=1 AND ArtistsSongs.IDArtist=11249 AND (Rating<0 OR Rating>55) GROUP BY Songs.SongTitle ORDER BY TrixSongRank.Rank DESC,Random()
#SELECT Id,Artist FROM Artists WHERE Artist='Accept'
@http://ws.audioscrobbler.com/2.0/?method=artist.getTopTracks&api_key=6cfe51c9bf7e77d6449e63ac0db2ac24&artist=Accept&limit=100
#SELECT Songs.ID FROM Songs,ArtistsSongs WHERE Songs.ID=ArtistsSongs.IDSong AND ArtistsSongs.PersonType=1 AND ArtistsSongs.IDArtist=6365 AND Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(UpperW(Songs.SongTitle),'&','AND'),'+','AND'),' N ','AND'),'''N''','AND'),' ',''),'.',''),',',''),':',''),';',''),'-',''),'_',''),'!',''),'''',''),'"','')='BALLSTOTHEWALL'

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by trixmoto » Tue Oct 30, 2012 8:00 am

Everything looks fine there, the long replace lines are my best attempt at doing some fuzzy matching with SQL, which is far from fuzzy in itself. Is that the end of the logfile?
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

rockportrait

Re: Similar Artists 2.0 - Updated 23/07/2012

Post by rockportrait » Tue Oct 30, 2012 8:15 am

Yep, that was the end of the logfile. I tried waiting longer then reloading the file into Notepad, but nothing further was added.
Eventually I did the three-finger salute to close MediaMonkey.

Post Reply