ISDBSongData::Rating

From MediaMonkey Wiki
Jump to: navigation, search

CoClass SDBSongData, Interface ISDBSongData

Property Get/Let Rating As Long


Property description

Rating of the track (-1=Unknown, 0..100). Can be any of the values in the first column below.

Rating Display Description Interpreted
-1   No/Unknown rating  
0 Bomb.png 0 stars / bomb 0..5
10 Half-star.png 0.5 stars 6..15
20 Star.png 1 star 16..25
30 Star.pngHalf-star.png 1.5 stars 26..35
40 Star.pngStar.png 2 stars 36..45
50 Star.pngStar.pngHalf-star.png 2.5 stars 46..55
60 Star.pngStar.pngStar.png 3 stars 56..65
70 Star.pngStar.pngStar.pngHalf-star.png 3.5 stars 66..75
80 Star.pngStar.pngStar.pngStar.png 4 stars 76..85
90 Star.pngStar.pngStar.pngStar.pngHalf-star.png 4.5 stars 86..95
100 Star.pngStar.pngStar.pngStar.pngStar.png 5 stars 96..100

Remark: rating values -2147483648 to -2 and 101 to 2147483647 are also interpreted as an Unknown rating, however you should never use these values.

Rating
Scripting Object SDBSongData
Value Name Rating
Value Type Value
Database Table Songs
Field Name Rating
Field Type Integer
Tracklist Column Rating
Example Data 28 Star.pngHalf-star.png

Example Code

Complete script

Sub

  For iCounter = 0 to objSongList.count - 1                                    'SongLists
      Set objSongData = objSongList.Item(iCounter)
      ValueRating = objSongData.Rating
      SDB.MessageBox "Value = '" &  ValueRating & "'", mtError, Array(mbOK)    'SDB.MessageBox
  Next
' objSongData.Rating = ValueNewRating 'Commented Out For Safety
' objSonglist.UpdateAll              'Commented Out For Safety                 'UpdateAll
                         Updates db and writes tags (if checked in options)
End Sub