Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Dec 2016
    Posts
    5

    Create PLaylist based on MediaMonkey tags

    I run into a problem to create a dynamic playlist base om my ratings. I maintain my music ratings in MediaMonkey (1 to 5 stars). I try to use SQL Playlist to dynamically create a playlist based on the ratings. However, I do not know which column in SQL to use to select on the rating. Maybe a more generic question is how do I know the columns that I can use in SQL Playlist. Can I use a query tool (e.g. Excel) to read the LMS database? Many thanks, Dan

  2. #2
    Senior Member w3wilkes's Avatar
    Join Date
    Jan 2009
    Location
    Utah, USA
    Posts
    1,395
    I think you'd need the "TrackStat" plugin to be able to get ratings from the DB. I can't see that the default library DB saves the track ratings.
    Main system - Rock Solid with LMS 7.9.3 Official on WHS 2011 - 2 Duets and Squeeseslave
    Cabin system - Rock solid with LMS 7.9.3 Official on Win10 Pro - 1 RPi 3 Model B/Hifiberry DAC+ Pro/PiCorePlayer and Squeezeslave
    Squeezebox Boom - "At Large" player around both home and cabin
    Headphones and car - Android phone/Bluetooth w/full library on MicroSD card - PowerAmp music player app (similar to Material Skin)

  3. #3
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    1,046
    Ratings are native to LMS.
    LMS stores ratings in the database persist.db, table tracks_persistent, column rating
    TrackStat stores rating in the database persist.db, table track_statistics, column rating
    TrackStat synchronizes LMS' ratings (e.g. at startup, iirc)

    persist.db is a SQLite database, there are lots of tools to browse it (I use sqlitestudio, which might be overkill). If you really want to use Excel (I wouldn't...), there is a ODBC driver available.

    technical details:
    Code:
    CREATE TABLE tracks_persistent (
        id             INTEGER      PRIMARY KEY AUTOINCREMENT,
        url            TEXT         NOT NULL,
        musicbrainz_id VARCHAR (40),
        added          INT (10),
        rating         TINYINT (1),
        playCount      INT (10),
        lastPlayed     INT (10),
        urlmd5         CHAR (32)    NOT NULL
                                    DEFAULT '0'
    );
    Code:
    CREATE TABLE track_statistics (
        url            TEXT         NOT NULL,
        musicbrainz_id VARCHAR (40),
        playCount      INT (10),
        added          INT (10),
        lastPlayed     INT (10),
        rating         INT (10),
        urlmd5         CHAR (32)    NOT NULL
                                    DEFAULT '0'
    );
    Various SW: Web Interface | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | LMSlib2go | ...
    Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...

  4. #4
    Junior Member
    Join Date
    Dec 2016
    Posts
    5
    Thanks guys for your swift reply. I'm diving in to it. Dan

  5. #5
    Junior Member
    Join Date
    Dec 2016
    Posts
    5
    I'm now a couple of steps further. I understand where to put the ratings in LMS. But I like to get the ratings from MediaMonkey in the LMS DB so I can select based on the MM rating. Mp3Tag shows that the MediaMonkey tags are stored in the "Rating MM" tag. This might be a naive question but is there any way that LMS can read the "Rating MM" tag and store its value in the tracks_persistent.rating field?

  6. #6
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    1,046
    Quote Originally Posted by dan_nobel View Post
    I'm now a couple of steps further. I understand where to put the ratings in LMS. But I like to get the ratings from MediaMonkey in the LMS DB so I can select based on the MM rating. Mp3Tag shows that the MediaMonkey tags are stored in the "Rating MM" tag. This might be a naive question but is there any way that LMS can read the "Rating MM" tag and store its value in the tracks_persistent.rating field?
    The CustomScan plugin has a RatingTag module which claims to be able to do this.
    Various SW: Web Interface | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | LMSlib2go | ...
    Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...

  7. #7
    Junior Member
    Join Date
    Dec 2016
    Posts
    5
    Thanks Roland0. This plugin looks exactly what I need. I'll give it a try. Dan

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •