Skip to main content

Thread: Upgrade from Jaunty (9.04) to Karmic Koala (9.10) corrupts Banshee 1.4.3 database


when upgraded jaunty official release of karmic koala (9.10) (not alpha / beta or rc), banshee upgraded 1.4.3 1.5.1.

result, of tracks failed play reporting following error:

problem player engine

object reference not set instance of object

came across post: http://ubuntuforums.org/showthread.php?t=1288125 inspired me deeper problem. discovered root cause appeared how location of each file being stored.

example file path in 1.4.3 is:
urban/michael jackson/2009 - king of pop/michael jackson - 46 - smooth criminal (ext dance mix).mp3
whereas 1.5.1 takes following format:
file:///path/to/music/folder/urban/michael%20jackson/2009%20-%20king%20of%20pop/michael%20jackson%20-%2046%20-%20smooth%20criminal%20(ext%20dance%20mix).mp3
the 2 key differences absolute path (i.e. inclusion of file:///path/to/music/folder/) , spaces replaced "%20".

work around, wrote short python script:

code:
import sqlite3    con = sqlite3.connect('banshee.db')  c = con.cursor()  = con.cursor()  c.execute("select trackid, uri `coretracks`")    row in c:      original = unicode(row[1])      id = str(row[0])      if original.find("file:///path/to/music/folder/") < 0:          original = "file:///path/to/music/folder/" + original                if original.find(" ") > -1:          original = original.replace(" ","%20")            print id + "  " + original            t = (original, id)            a.execute("update `coretracks` set uri=? trackid=?", t)    print "all done"  con.commit()
save file say: update.py , place in same place banshee database in home folder:

code:
/home/userid/.config/banshee-1/
then open terminal in folder, , type following:

code:
python update.py

hope found useful. i'll make sure banshee team informed if haven't been already.



Forum The Ubuntu Forum Community Ubuntu Official Flavours Support Installation & Upgrades [SOLVED] Upgrade from Jaunty (9.04) to Karmic Koala (9.10) corrupts Banshee 1.4.3 database


Ubuntu

Comments