Pull out song length, too

This commit is contained in:
bjschuma 2010-01-02 01:14:54 -05:00
parent b9d36e264e
commit d6abfab2ab
2 changed files with 4 additions and 2 deletions

View File

@ -112,4 +112,5 @@ def run(file=None):
# Insert the track if it is new
trid,inserted = findId("track",title)
if inserted == False:
database.insert("track", (trid,arid,alid,0,title,file[len(root):]))
a = f.audioProperties()
database.insert("track", (trid,arid,alid,0,a.length,title,file[len(root):]))

View File

@ -67,6 +67,7 @@ def create():
artist INTEGER,
album INTEGER,
count INTEGER,
length INTEGER,
name TEXT,
path TEXT UNIQUE
);
@ -79,7 +80,7 @@ def create():
vals["artist"]= "?,?"
vals["album"] = "?,?"
vals["library"] = "?,?,?"
vals["track"] = "?,?,?,?,?,?"
vals["track"] = "?,?,?,?,?,?,?"