Page 4 of 5

Posted: Sun May 06, 2007 3:55 am
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

Posted: Thu May 24, 2007 4:25 am
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' ?

Posted: Thu May 24, 2007 6:00 am
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

Posted: Thu May 24, 2007 6:02 am
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.

Posted: Thu May 24, 2007 6:28 am
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.

Posted: Mon May 28, 2007 5:02 am
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.

Posted: Mon May 28, 2007 9:01 am
by RedX
Yes thats a posibilty to. I'll include in the next update a possibility to ignore or avoid certain albums.

Posted: Tue May 29, 2007 4:48 am
by brianon
cool.

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

Love the script.

Posted: Thu Jul 05, 2007 5:35 pm
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....?

Posted: Fri Jul 06, 2007 8:21 am
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

Posted: Fri Jul 06, 2007 10:49 am
by jomtones
thanks, will do!

Posted: Tue Aug 14, 2007 12:38 pm
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

Posted: Fri Aug 24, 2007 11:09 am
by Teknojnky
seems top tracks shuffled is not working, I'll check into it this weekend

Posted: Fri Aug 24, 2007 11:19 am
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

Posted: Fri Aug 24, 2007 11:25 am
by Teknojnky
cool that was fast, updated thread thanks!