How are Half-star ratings tagged ?

Get answers about using MediaMonkey 4 for Windows.

Moderator: Gurus

MarvCuenca

How are Half-star ratings tagged ?

Post by MarvCuenca »

I am writing a PowerShell script to analyze my Media Monkey ratings, and am puzzled to find that songs rated with half-stars in the MM interface do not appear to carry that information in the tags in the .mp3 file's metadata. Each song with a half-star appears in the Rating tag as a whole star, rounded up, e.g. a 2.5 star rating in the interface has a Rating tag of 3 stars.

Needless to say, this makes it impossible to do an accurate analysis. Since I ultimately want to move songs based on these ratings, this is creating some real headaches.

Does anyone know how MM handles this? I hope that the answer is not that MM only carries the half-star in the database. I see dozens of postings related to half-star ratings, but none of them addressed this issue.

Thanks
Guest

Re: How are Half-star ratings tagged ?

Post by Guest »

Thanks for the prompt reply, Lowlander.

I had seen references to POPM, but could not find any such tag. Now I understand that it is a much more complex situation than that.

I have been digging into a way to get at this data in PowerShell, but have not had much luck. Do you happen to know of a good source for this? I see a few examples, but they all assume a great deal more knowledge of tools like TagLib than I have, or than I have time to acquire.

If not, I will figure out a workaround to accomplish what I want to do.
MarquisEXB
Posts: 42
Joined: Mon Oct 05, 2009 12:04 pm

Re: How are Half-star ratings tagged ?

Post by MarquisEXB »

If you look at the Media Monkey database (mm.db) you can open & read it with a SQLite connection.

Here is a script you can use, but you'll need the SQLite/NET ADO [http://system.data.sqlite.org/]

Code: Select all

$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition

[string]$sqlite_library_path = $scriptPath + "\sqlite-dll\System.Data.SQLite.dll"
[string]$db_data_source = "MM.DB" # path to your MM.DB here

[string]$db_query = "SELECT SongPath FROM Songs WHERE rating=50 Limit 10;" # show 10 songs with rating 2.5 stars


[void][System.Reflection.Assembly]::LoadFrom($sqlite_library_path)
$db_dataset = New-Object System.Data.DataSet
$db_data_adapter = New-Object System.Data.SQLite.SQLiteDataAdapter($db_query,"Data Source=$db_data_source")

[void]$db_data_adapter.Fill($db_dataset)


$db_dataset.Tables[0]
foreach ($row in $db_dataset.Tables[0])
{
	$row["SongPath"]
}


Image
Post Reply