Re: [Banshee-List] banshee db - correcting altered paths / filenames



update Tracks set Uri = "file:///home/cfriedt/Music" || substr(Uri,length("file:///media/IcyBox/media/audio/mp3")+1,9999) where Uri like "file:///media/IcyBox/media/audio/mp3%";

A good reference is

http://www.realsoftware.com/listarchives/realbasic-nug/2007-02/msg00533.html

Christopher Friedt wrote:
Hi everyone -

I'm just wondering if anyone could help me fix my banshee DB:

I have a problem in that several of the songs are registered in the banshee db as being in

/media/IcyBox/media/audio/mp3

but they are actually in

/home/cfriedt/Music


Is it as simple as applying a sed script in place to correct the problem?

i.e.

olddir="$(echo /media/IcyBox/media/audio/mp3 | sed -e 's/\//\\\//g')"
newdir="$(echo /home/cfriedt/Music | sed -e 's/\//\\\//g')"
sed -i -e s/${olddir}//g /home/cfriedt/.config/banshee/banshee.db ?

ps: sorry, I'm using a customized banshee-0.13 because I haven't yet upgraded to the stable version :P

Chris




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]