Robbyell wrote: 
> Anyone got any thoughts then as to how I'd get the Excel info into a new
> player?!  By the sounds, if the player accepts POPM as an example, I'd
> need to:
> a) take the filename and the ratings (currently expressed as 1-5 in
> Excel) - 2 columns
> b) find how the desired player "reads" ratings (eg, of 255, 0-20 = 1,
> 20-60 = 2 etc)
> c) convert my second XL column so that 1 = 10, 2 = 40 etc
> d) find what input format the desired player can take (csv, XL html(?)
> etc)
> e) convert my 2 columns to that format?
imo, the main challenge still will be how to import the ratings (d) -
good luck finding a player capable of that (LMS+TrackStat can (using
XML), but I've yet to see anything similar anywhere else)
For file tags, a python script probably would be the simplest solution.
If you want to try this, start by installing python and understanding
how to install python modules (needed for the tagging bits later on)
Here's a test script which exports ratings for mp3s directly from the
LMS database as a csv file (adjust the paths in lines 4 and 5)
Note is also checks if the files can be accessed, which isn't required
now, but will be as soon as tags are written.

  import sqlite3, os, sys
  from urllib.parse import urlparse,urlunparse,unquote
  sconn = sqlite3.connect( "persist.db")
  scursor = sconn.cursor()
  with open( outfile, 'w', encoding='utf-8') as fp:
        scursor.execute("SELECT url, rating FROM track_statistics WHERE rating 
        for row in scursor:
                fpath = unquote( urlparse( row[0]).path)
                if not os.path.exists( fpath):
                        print("ERROR: file [{}] not found".format( fpath))
                fp.write('"{}",{}\n'.format( fpath, row[1]))

SW: 'Web UI for LMS'
| 'Playlist Editor / Generator'
| 'Music Classification'
| 'Similar Music'
| 'LMSlib2go' (
HowTos: 'build a self-contained LMS'
| 'Ogg Opus'
| 'Bluetooth/ALSA'
Roland0's Profile:
View this thread:

discuss mailing list

Reply via email to