Artist TOP TRACKS via last.fm (v1.10c) MM 2.5

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

Moderators: Peke, Gurus

RedX
Posts: 366
Joined: Wed Dec 27, 2006 10:32 am
Location: Germany

Post by RedX »

You should get two new buttons on your toolbar, if you downloaded the two icons from the first post you should see a styled "TT" and a T with some red markings. If you did not use the two icons then you get two music notes on the bar. They should popup a tooltip if you leave your mouse over it.

If you still have problems plz write!

Regards,
Red
brianon
Posts: 78
Joined: Wed Dec 07, 2005 4:48 am

Post by brianon »

Love the script. Thank you very much indeed :)

One thing I would suggest (if possible) is to change the selecting of tracks from a library.

Say last.fm (xml) says the top track is Thunderstruck (for AC/DC).
I end up with Thunderstruck from a Greatest Hits album or a live album and not from their studio album. Now I know (I think!?) that you have no album info but at least for me tag my Live albums as 'live' and my Greatest Hits albums as 'Greatest'. Maybe the script could be tweaked to avoid those unless no match is found elsewhere ?

Would imagine its not too big a change :)

Maybe an option could be included like..."Try to Ignore" and you supply values like 'live':'greatest':'remix' ?
brianon
Posts: 78
Joined: Wed Dec 07, 2005 4:48 am

Post by brianon »

I am thinking a code change to allow some new checkboxes like (IgnoreHits) could be added.

Then in InDB()... ?

Code: Select all

'This function checks if a track exists in the db and also checks if is accessible
Function InDB(Artist,SongTitle,CheckAccess)
...
	If artist <> "" Then
		SQL = " AND Artists.Artist = '" & CorrectSt(artist) & "' "
	End If
	
	If Songtitle <> "" Then
		SQL =  sql & " AND songs.songtitle = '" & CorrectSt(songtitle) & "' "
	End If

        ' NEW*********
        If IgnoreHits <> "" Then
                SQL = sql & " AND songs.Custom1 != 'hits'"
        End If

...
	
	'only do for 1 item!
        Dim QueryMatch
        Set QueryMatch = SDB.Database.QuerySongs (SQL)  
        if Not QueryMatch.EOF Then
            If checkaccess = True Then
                'we check until we get positive
                Do While Not QueryMatch.eof  		
                    If IsAccessible(QueryMatch.item) Then
                        InDB  = True
                        logme "<<InDB:" & Indb
                        Exit Function
                    End If
                    QueryMatch.next
                Loop
            Else
                InDB = True
                logme "<<InDB:" & Indb
                Exit Function
            End If
        End If
        
        InDB = False
        logme "<<InDB:" & InDB
End Function
brianon
Posts: 78
Joined: Wed Dec 07, 2005 4:48 am

Post by brianon »

That would then need to be changed to allow for when no match is found that a recheck could be done without the IgnoreHits flag.
brianon
Posts: 78
Joined: Wed Dec 07, 2005 4:48 am

Post by brianon »

Ok I had another look. Can't test this at work but have added a new CheckBox 'IgnoreHitsLive'.

If you have a Greatest Hits album (and you put 'hits' in the Custom3 field) say by Pulp with Common People on it and when you do Top Tracks for Pulp you want Common People from Different Class album and not their Greatest Hits. This might work.

Code: Select all

REMOVED :)
Its a simple change. Basically just rerun the sql select but second time ignore the 'hits/live' Custom3 part match. The text to search could easily be modded.
Last edited by brianon on Mon May 28, 2007 5:02 am, edited 1 time in total.
brianon
Posts: 78
Joined: Wed Dec 07, 2005 4:48 am

Post by brianon »

Oh man I was SOOOOooo wrong :)

Ignore the last code I posted.

All you have to do is edit MatchTopTracks()

Change...

Code: Select all

Set QueryMatch = SDB.Database.QuerySongs ("AND (Artists.Artist LIKE '"&CorrectSt(Artist) & "' AND( Songs.songtitle LIKE '"& CorrectSt(TopTracksList.item(j)) & "'))")
to add

Code: Select all

ORDER BY Songs.custom3
at the end.

Then just tag your non-album tracks accordingly (hits, compilation, live) etc...

Then when you run the script the album versions of tracks will get first preference.

Brian.
RedX
Posts: 366
Joined: Wed Dec 27, 2006 10:32 am
Location: Germany

Post by RedX »

Yes thats a posibilty to. I'll include in the next update a possibility to ignore or avoid certain albums.
brianon
Posts: 78
Joined: Wed Dec 07, 2005 4:48 am

Post by brianon »

cool.

Works a treat once you update an artists greatest hits/live albums etc...

Love the script.
jomtones
Posts: 145
Joined: Mon Jul 02, 2007 5:06 pm
Location: London, UK

Post by jomtones »

Sorry if this has been covered - I get

"error #432" file name or class name not found, line 984, column 1

on my laptop, works fine on my desktop....?
RedX
Posts: 366
Joined: Wed Dec 27, 2006 10:32 am
Location: Germany

Post by RedX »

jomtones wrote:Sorry if this has been covered - I get

"error #432" file name or class name not found, line 984, column 1

on my laptop, works fine on my desktop....?
This line starts a regexp object.

Maybe you have an old version of the vbscript library installed on your pc.

See the stickies on the scripts and components section on how to make sure you have the latest version.

Red
jomtones
Posts: 145
Joined: Mon Jul 02, 2007 5:06 pm
Location: London, UK

Post by jomtones »

thanks, will do!
RedX
Posts: 366
Joined: Wed Dec 27, 2006 10:32 am
Location: Germany

Post by RedX »

New version 1.08: HERE!

' 1.08
' * now shows hides buttons w/o restarting MM
' * added option to try not to use albums with certain keywords

Implements request above.

Regards,
Red
Last edited by RedX on Fri Aug 24, 2007 11:17 am, edited 1 time in total.
Teknojnky
Posts: 5537
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post by Teknojnky »

seems top tracks shuffled is not working, I'll check into it this weekend
RedX
Posts: 366
Joined: Wed Dec 27, 2006 10:32 am
Location: Germany

Post by RedX »

Teknojnky wrote:seems top tracks shuffled is not working, I'll check into it this weekend
Yes you're right.

Fixed version: Here

' 1.09
' * Fixed Shuffle button
Teknojnky
Posts: 5537
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post by Teknojnky »

cool that was fast, updated thread thanks!
Post Reply