How do you export the video file links?

Talk to other Pedia users about the programs, share tricks and tips or ask questions about existing features.
Post Reply
DJFriar
Junior Member
Junior Member
Posts: 4
Joined: Sun Mar 15, 2009 8:53 pm

How do you export the video file links?

Post by DJFriar »

I am just playing around with DVDpedia more, and have been able to export my collections to HTML. However, what I want to do now I can't find. I have a few movie files linked to their DVDpedia entry, but for the life of me I can't find a way to export that link so that I in the HTML version I could click on the QuickTime icon and have the linked video play. Has anyone been able to accomplish this?
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: How do you export the video file links?

Post by Conor »

Because locally linked files can be large you need to modify the template with a command to let it know you would like it to include the local links as well. To do that use the edit button in the export sheet, after selecting your template and add the following near the top of the new "MyTemplate.html" file:

Code: Select all

<meta name="includeLocalLinks" content="yes" />
You need to open the file with a text editor that will show you the source code, for example TextEdit shows you the rendered web page and that is no good. You can tell TextEdit to show you the source by using the open command an checking "Ignore rich text" option. With that in the header of the template on your next export select your new modified template, and DVDpedia will create a "files" folder with your local links in the exported HTML folder for upload as well as add the links to the page.

Also depending on the template it might not include links, make sure the following code or similar appears in your preferred template:

Code: Select all

<!--IFlinks [linksBegin]
<a href="[link:url]">[link:name]</a><br/>
[linksEnd]
ENDlinks-->
For more details refer to this older post.
DJFriar
Junior Member
Junior Member
Posts: 4
Joined: Sun Mar 15, 2009 8:53 pm

Re: How do you export the video file links?

Post by DJFriar »

If I'm reading your response correctly then the proposed modifications would require me to upload the files themselves to the server as well, correct?

This might work though, but for clarification my goal is to export the database to a local server, and the files themselves wouldn't actually move. My only problem right now is that from what I can tell none of the templates include any mention of linked files. Am I correct that simply adding the code you included at the end of your response to any template will generate a link to the local file?
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: How do you export the video file links?

Post by Conor »

The export assumes that the files are to be uploaded to a server where a local link would not work. So when you add the code mentioned above it creates a new folder in the export with the files needed copied there and includes the local links included in the export. The links are not the same as you see inside DVDpedia they reference the now relative path to the copied files. If you include only the links tag without the includeLocalLinks set, then only links that do not start with "file://" will be included in the HTML export.

From your description I would change the link URLs in DVDpedia from "file:///Users/me/Desktop" to "file:/Users/me/Desktop". This new link format will still work in a web browser but because it's not the way that DVDpedia formats links it will not be caught by the local link stripper in the export function and will appear as is in the export. You still need to add the links tag part of the HTML above to your template.

You can modify all the links directly in the SQL database by running the following command in Terminal with DVDpedia not running:

Code: Select all

sqlite3 ~/Library/Application\ Support/DVDpedia/Database.dvdpd
update ZLINK Set ZURL = replace(ZURL, 'file:///', 'file:/');
.exit
Before doing this make a copy of the database file as backup, any changes are undoable and any mistake can result in a damaged database. The file is located in your home folder at (~/Library/Application\ Support/DVDpedia/Database.dvdpd).
Post Reply