Easy way to edit paths in xbmc database for new XBMC install?
#1
Hi all,

Thanks to the help of this forum I've been able to create an amazing XMBC box out of an Aspire Revo, unfortunately the one thing that's preventing me from using it is the ability to use my database from my previous XMBC database on my local machine. I'm trying to use SMB shares to connect to my main machine, and I'm able to do so, but I want to retain the database which took so long to create. The only thing I've been able to find is confusing SQLite editors to try to change the path, and I'm wondering is there something easier out there to do this? If not could someone guide an SQL noob through changing all the paths? The database transfers perfectly, except none of the links work because the paths are all wrong :o If anyone could help me with this I would be SO grateful
Reply
#2
Maxwell Smart Wrote:Hi all,

Thanks to the help of this forum I've been able to create an amazing XBMC box out of an Aspire Revo, unfortunately the one thing that's preventing me from using it is the ability to use my database from my previous XBMC database on my local machine. I'm trying to use SMB shares to connect to my main machine, and I'm able to do so, but I want to retain the database which took so long to create. The only thing I've been able to find is confusing SQLite editors to try to change the path, and I'm wondering is there something easier out there to do this? If not could someone guide an SQL noob through changing all the paths? The database transfers perfectly, except none of the links work because the paths are all wrong :o If anyone could help me with this I would be SO grateful

something like

sqlite3 /MyVideos34.db.backup ".dump"|sed -e s:/old/path/:/new/patht2:|sqlite3 /MyVideos34_updated_paths.db

Utterly untested
Reply
#3
So how do I run a query like that? I'm using Mac OS X but I have access to a windows machine if that matters
Reply
#4
Is there any way to do this without using an SQLite database application?
Reply
#5
sure. have at it with a hex editor. why on earth you would do that is beyond me though.
Reply
#6
Maxwell Smart Wrote:Is there any way to do this without using an SQLite database application?
sqlite3 is extremely lightweight, on windows it is actually a standalone executable.. So why would you not want to use it?...

V.
Reply
#7
Would using <pathsubstitution> in your advancesettings.xml not work here?
That is if you weren't to use the afore mentioned methods of course :-)
Reply
#8
Can't you just export > find and replace in a text editor > import??

I've done this before, worked no problem...
Reply
#9
Maxwell Smart Wrote:[...] the one thing that's preventing me from using it is the ability to use my database from my previous XBMC database on my local machine. I'm trying to use SMB shares to connect to my main machine, and I'm able to do so, but I want to retain the database which took so long to create. The only thing I've been able to find is confusing SQLite editors to try to change the path, and I'm wondering is there something easier out there to do this? If not could someone guide an SQL noob through changing all the paths?
I set up a little guide for this purpose in the wiki:
http://wiki.xbmc.org/?title=Cleaning_Up_...oved_items

I just hope, you didn't mean that when saying confusing SQLite editors Big Grin If so, just give it a try. Installing an editor is just a matter of copying a single binary (in most cases) and using the commands is pretty well documented. But don't forget to make a backup of the library first or even better, work on a copy to test the commands.
Reply

Logout Mark Read Team Forum Stats Members Help
Easy way to edit paths in xbmc database for new XBMC install?0