Skip songs with a rating of zero?

Any ideas about how to improve MediaMonkey? Let us know!

Moderator: Gurus

bateye23
Posts: 8
Joined: Fri Jul 06, 2018 4:33 am
Contact:

Re: Skip songs with a rating of zero?

Post by bateye23 »

tangonat wrote: Tue May 08, 2018 7:23 pm The script below was provided by Loe. It is exactly what I want but when I try to run it in the scripts/Auto folder I get an error on execution. Since I am not a coder, I can't spot the error. Can anyone help? Many thanks.


Sub OnStartup
Script.RegisterEvent SDB, "OnPlay", "SkipBelowRating" 'Register SkipBelowRating on OnPlay event
End sub

Sub SkipBelowRating
Dim min_rating
min_rating = 16
If (SDB.Player.CurrentSong.Rating < min_rating) And (SDB.Player.CurrentSong.Rating > -1) Then
SDB.Player.Next
End If
End Sub
It would be good if you post also the error code or screenshot of error you received so other viewers can respond to it or the mod. Thanks i'm also not a coder but I love to know how to solve this.
rivorson
Posts: 594
Joined: Thu Jul 25, 2013 4:17 am
Contact:

Re: Skip songs with a rating of zero?

Post by rivorson »

tangonat wrote: Tue May 08, 2018 7:23 pm The script below was provided by Loe. It is exactly what I want but when I try to run it in the scripts/Auto folder I get an error on execution. Since I am not a coder, I can't spot the error. Can anyone help? Many thanks.


Sub OnStartup
Script.RegisterEvent SDB, "OnPlay", "SkipBelowRating" 'Register SkipBelowRating on OnPlay event
End sub

Sub SkipBelowRating
Dim min_rating
min_rating = 16
If (SDB.Player.CurrentSong.Rating < min_rating) And (SDB.Player.CurrentSong.Rating > -1) Then
SDB.Player.Next
End If
End Sub
Try this:

Code: Select all

Sub OnStartup()
Script.RegisterEvent SDB, "OnPlay", "SkipBelowRating" 'Register SkipBelowRating on OnPlay event
End sub

Sub SkipBelowRating()
Dim min_rating
min_rating = 16
If (SDB.Player.CurrentSong.Rating < min_rating) And (SDB.Player.CurrentSong.Rating > -1) Then
SDB.Player.Next
End If
End Sub
deremder
Posts: 33
Joined: Thu Sep 06, 2012 1:28 pm
Contact:

Re: Skip songs with a rating of zero?

Post by deremder »

I think, just creating an auto-playlist with rating > (whatever) is the solution. You can also create a new collection in the same way.
Post Reply