Moving collection to a new hard drive and preserving links

Any trouble you encounter with the Pedias, here's the place to ask for help.
Post Reply
peggotty
Contributor
Contributor
Posts: 5
Joined: Fri Jul 27, 2007 11:28 pm
Location: Sydney

Moving collection to a new hard drive and preserving links

Post by peggotty »

Hi there

I've just moved my short film collection from an external drive to another drive. Of course now I can't play from the links... is there any way of pointing dvdpedia to the new drive?

I found another post where you suggested using a text editor with the .xml files. I tried this to change the file path but with no success.... the links still show the old path... this suggests to me i'm changing the wrong files!

is there an easier way? I've got about 600 films and the thought of relinking them by hand is filling me with dread!
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Post by Conor »

The information you found about changing the XML is for the old file type (info.xml file). The new 4.0 version uses an SQL database (Database.pediadata file). To change the links with SQL follow the following steps:

Quit DVDpedia and make a copy of Database.dvdpd file before you start as backup (this file is located inside the data folder at ~/Library/Application Support/DVDpedia). Then launch the Terminal program from your utilities folder and type:

Code: Select all

sqlite3 ~/Library/Application\ Support/DVDpedia/Database.dvdpd
You will now have a prompt that reads sqlite> you can now send any SQL statement to view and modify the database. To update the links type (change the actual URLs as necessary to fit your situation):

Code: Select all

update ZLINK Set ZURL = replace(ZURL, 'file:///Volumes/MyOldMovieDrive', 'file:///Volumes/MyNewMovieDrive');
To close the file do:

Code: Select all

.exit
You are now done, quit Terminal and launch DVDpedia and the links will have changed. If you run into any trouble just let us know more details and will lend a hand.
peggotty
Contributor
Contributor
Posts: 5
Joined: Fri Jul 27, 2007 11:28 pm
Location: Sydney

Post by peggotty »

Hey there Conor

Thank you for the super speedy reply... I've just had a bash at trying to get it to work and while your reply all makes perfect sense, it just doesn't seem to want to work and is reporting no such function:replace.

here is the terminal info....

Welcome to Darwin!
snowy-imac:~ snowyimac_external$ sqlite3 ~/Library/Application\ Support/DVDpedia/Database.pediadata
SQLite version 3.1.3
Enter ".help" for instructions
sqlite> update ZLINK Set ZURL = replace(ZURL, 'file:///Volumes/Lobster', 'file:///Users/snowyimac_external/Movies');
SQL error: no such function: replace

any suggestions most welcome... I don't know anything about databases and even less about terminal so i can't even begin to troubleshoot the problem.

many thanks
Jane
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Post by Conor »

Hi Jane,

Your current version of sqlite3 3.1.3 does not have the replace ability; I have 3.4.0 (I am starting to suspect those that have Xcode installed have a newer version then the one that comes with Tiger). You can install Xcode from your Tiger CD (under optional installs) or email us your database file and will do it for you. Our email is on support page and the file is of course ~/Library/Application Support/DVDpedia/Database.pediadata.
peggotty
Contributor
Contributor
Posts: 5
Joined: Fri Jul 27, 2007 11:28 pm
Location: Sydney

Post by peggotty »

ahhh great... i thought it was user error.... I really have no idea about terminal... but it all seemed so simple... I'll try and install xcode as you suggest (and yes, I just have a standard tiger install) ... it would be handy to be able to do it myself as i'm not sure my brand new super-dooper file consolidation strategy is actually working and there could be yet another shift to another hard drive at some point in the future.

oh and by the way... dvdpedia is such a fantastic application.... I use it to help plan my lessons (I teach animation) and it's changed my life! or at least it's made it a pleasure to wade through my collection to try and find a particular film or director and it's also really handy if students have a question and I can just jump straight to a film and show them on the spot. and to be honest, I just love being able to find everything (and find stuff i would otherwise have just forgotten about)

one small thing i have noticed now a few divx files are creeping into the collection is that dvdpedia doesn't seem to recognise the divx player. It appears in the type field in the links window as app:divx but won't play. I found changing the type to "movie" launches the divx player as you would expect and all is fine.

thanks for your amazingly fast response and I'll have a go at the xcode thing tomorrow and report back

thanks again

Jane
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Post by Conor »

It's great to hear that DVDpedia makes work fun. We have quite a few teachers and professors. It's one of the perks of developing for the Mac community - we have friendly and interesting users; we have met from directors at the BBC to a freelancer living in the Outback. Now we must go visit L.A. to met our famous actors and writers. My brother is an animation fanatic and teaches animation as well, here is a few fishes he created for a lesson in dynamics.

DVDpedia is smart in that if you tag the link as "Movie" then it assumes it must be a movie and treat it as such. What is the dot extension on the files? This way I can add the extension to DVDpedia for the next version so it will recognize it as a movie right away (when it fails to recognize the file as a movie it lists the application that would open it and this is why you get app:divx).

After installing Xcode you can verify the version of sqlite3 by running this command in Terminal, it will print out the version number:

Code: Select all

sqlite3 -version
I also have Tiger and I never did install a new version of sqlite3 so it must have come from Xcode. If I am wrong and you still have the old version you can intsall the new version once you have Xcode with he following commands in the terminal:

Code: Select all

curl -O http://www.sqlite.org/sqlite-3.5.2.tar.gz
tar -xzvf sqlite-3.5.2tar.gz
cd sqlite-3.5.2
./configure
make
sudo make install
The Terminal is like magic since there is so much that can be done there if you happen to know the right words (speak friend and enter).
peggotty
Contributor
Contributor
Posts: 5
Joined: Fri Jul 27, 2007 11:28 pm
Location: Sydney

Post by peggotty »

Hi Conor

Oh I wish it were speak friend and enter! I'm still stuck at the "you shall not pass" stage.

You're right in that tiger only has 3.1.3 but installing xcode doesn't install a newer version. I ran your script (and felt rather clever when i realised that the second line should read tar -xzvf sqlite-3.5.2.tar.gz) and terminal IS amazing and just went and got the new version of sqlite but it while it seems to install it ok, when i checked which version is there it still says the old one and, of course the "replace" command doesn't work. I tried it a couple of times but with no luck. I entered passwords when prompted and noted something going on after sudo make install but there could any number of things I just don't have the technical nous to see where i've gone wrong.

I may have to take you up on your very kind offer to do it for me. I seem to remember from the last post I read on this topic that if you keep everything in the "download" folder in the dvdpedia folder that it will keep all the links relative to itself (I'm assuming you could then move the entire dvdpedia folder anywhere and they would still work). If I'm going to persist in moving gigs of stuff around and not name every new drive "Lobster" then that might be the most sensible option for me. It would be a cool feature to have in future versions though.

Divx is great! check out http://stage6.divx.com/ and now there are dvd players with divx built in i think there will be a lot more of it. the extension is .divx

thank you so much for all your help on this one. I wish I could have got it to work and i'm not sure why it doesn't. it was cool watching terminal do it's stuff though

oh and your brother's stuff is great... i'm learning dynamics at the moment and my fish don't swarm nearly as nicely as those ones.

best wishes

Jane
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Post by Conor »

I have looked deeper into why it did not install the new version for you, and I think you do all the steps correctly and you have the new version, it just happens to be in a different location. Try the following commands to see if any prints out that it is the new version:

Code: Select all

/usr/bin/sqlite3 -version
or

Code: Select all

/opt/local/bin/sqlite3 -version
If you do get a higher version than 3.1.3 then use the first command we talked about in the first post by giving it the full location of sqlite3 (otherwise it choses the old version that was not replaced).

Code: Select all

/usr/bin/sqlite3 ~/Library/Application\ Support/DVDpedia/Database.pediadata
If that doesn't work let me know and will look at changing the file for you. The Download folder would work but that might not be the ideal structure for you to keep your movies as you already have a system in place. We could look at adding an alias in the download folder that would point to the movies folder and then you could always change were the alias points to without changing the name. But we have to try that out as I have never done it and don't know if the movies will play correctly from DVDpedia through an alias but the should. Also if your planning on moving to Leopard then that would come with the new sqlite3 version installed.

Thank you I have added .divx extensions as part of those recognized as as movies so the next version of DVDpedia will know to play them. Also that is a very nice divx player I was using Flip4Mac for Safari but this one looks better.
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Post by Conor »

My brother will be thrilled you liked his fishes, they are actually part of an online lesson plan he was developing (for Spanish speakers).
peggotty
Contributor
Contributor
Posts: 5
Joined: Fri Jul 27, 2007 11:28 pm
Location: Sydney

Post by peggotty »

Hey Conor

It worked! It takes a second and it's done! fantastic.... thank you so much for persevering with this for me.

In the end it went something like this...(for anyone attempting this at home without adult supervision).... and i'm assuming one wouldn't need to install xcode to install the latest version of sqlite???

install latest sqlite via terminal

Code: Select all

curl -O http://www.sqlite.org/sqlite-3.5.2.tar.gz 
tar -xzvf sqlite-3.5.2.tar.gz 
cd sqlite-3.5.2 
./configure 
make 
sudo make install
then enter this at the sqlite prompt....

Code: Select all

/usr/local/bin/sqlite3 ~/Library/Application\ Support/DVDpedia/Database.pediadata
then enter this (with the appropriate paths for the old and new drives)

Code: Select all

update ZLINK Set ZURL = replace(ZURL, 'file:///Volumes/MyOldMovieDrive', 'file:///Volumes/MyNewMovieDrive');
then

Code: Select all

.exit
then open up dvdpedia and suddenly everything will play again. it's great!

Thanks Conor!

best wishes

jane
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Post by Conor »

Excellent I am glad it worked; I knew if the install of sqlite3 had gone without error then the new version had to be somewhere. Thanks for summarizing the steps for other users, but you do need Xcode. The "make" part of the command compiles the program from the source files that were downloaded and that requires GCC that comes with Xcode.
sallyxi
Junior Member
Junior Member
Posts: 2
Joined: Wed Mar 05, 2008 8:26 am
Contact:

Post by sallyxi »

Conor,could you kindly advise if it has chinese version?
you response will be highly appreciated.
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Post by Conor »

Our programs are not localized in Chinese, we do have the yesasia plug-in that a user created for downloading asian movie information.
User avatar
sitenoise
Addicted to Bruji
Addicted to Bruji
Posts: 230
Joined: Fri Mar 21, 2008 12:42 pm
Contact:

Re: Moving collection to a new hard drive and preserving lin

Post by sitenoise »

I just

Code: Select all

sqlite3 -version
and came back with 3.14 (up-to-date Sierra 10.12.3).

Will the

Code: Select all

update ZLINK Set ZURL = replace(ZURL, 'file:///Volumes/MyOldMovieDrive', 'file:///Volumes/MyNewMovieDrive'); 

work? Is this still the best way to point links to a new Hard Drive?

[Edit] I just noticed this thread is nine years old!
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Moving collection to a new hard drive and preserving lin

Post by Conor »

Will still work, luckily SQL is pretty stable language.
Post Reply