Steam Music Database
From girlwiki
This article is a work in progress, and is missing the following pieces:
Literally any information other than the SQL schema |
Found in $STEAM_HOME/music/_database/musicdatabase_XXXX.db
. Not sure what determines the XXXX
yet, but mine is 0016
.
CREATE TABLE localartist (
artistid INTEGER PRIMARY KEY,
artistname TEXT,
artistsortname TEXT,
artistinsertname TEXT
);
CREATE INDEX artistid_index ON localartist ( artistid );
CREATE INDEX artistname_index ON localartist ( artistid, artistname );
CREATE TABLE localalbum (
albumid INTEGER PRIMARY KEY,
albumdirectory TEXT,
albumname TEXT,
artistname TEXT,
albumsortname TEXT,
artistsortname TEXT,
trackcount INTEGER,
discnumber INTEGER,
multipleartist INTEGER,
addedtime INTEGER
);
CREATE INDEX albumid_index ON localalbum( albumid );
CREATE INDEX albumdirectory_index ON localalbum( albumdirectory, albumname, discnumber );
CREATE TABLE localtrack (
trackid INTEGER PRIMARY KEY,
trackfile TEXT,
trackposition INTEGER,
lasttouchedtime INTEGER,
trackname TEXT,
albumname TEXT,
artistname TEXT,
albumartist TEXT,
trackyear INTEGER,
tracktrack INTEGER,
lengthinmilliseconds INTEGER,
bitrate INTEGER,
samplerate INTEGER,
channels INTEGER,
discnumber INTEGER,
genre TEXT,
playcount INTEGER,
lastplayedtime INTEGER,
trackalbum INTEGER REFERENCES localalbum( albumid ) ON UPDATE CASCADE,
trackartist INTEGER REFERENCES localartist( artistid ) ON UPDATE CASCADE,
trackalbumartist INTEGER REFERENCES localartist( artistid ) ON UPDATE CASCADE,
providescover INTEGER,
coverurl TEXT
);
CREATE INDEX trackid_index ON localtrack( trackid );
CREATE INDEX trackfile_index ON localtrack( trackfile, trackname, lengthinmilliseconds, lasttouchedtime );
CREATE TABLE localplaylist (
playlistid INTEGER PRIMARY KEY,
playlistname TEXT,
position INTEGER,
tag TEXT,
totaltime INTEGER,
trackcount INTEGER,
playcount INTEGER,
lastplayedtime INTEGER
);
CREATE INDEX playlistid_index ON localplaylist( playlistid );
CREATE INDEX playlistname_index ON localplaylist( playlistname );
CREATE TABLE localplaylist_localtrack (
id INTEGER PRIMARY KEY,
playlistid INTEGER REFERENCES localplaylist( playlistid ) ON UPDATE CASCADE,
trackfile TEXT,
position INTEGER,
active INTEGER,
providescover INTEGER
);