Linking Videos\Trailers
Linking Videos\Trailers
I'd love the ability to link a video or trailer to each of my movies. Viewing trailers is usually a better way of deciding whether or not you want to see a movie than reading the summary.
Re: Linking Videos\Trailers
You can drag URLs or video files over the info view of the movie to link the trailers. Then the link will be present in the info view for one click browsing of the trailers. If the file is a local video file it will also show up in the full screen mode and under the optional play button on the toolbar.
Re: Linking Videos\Trailers
DVDpedia user Torsten has just sent us an update of his LeoTab info view, which now includes a direct link to YouTube for trailers. You can read about the template and download it from our extras page.
Re: Linking Videos\Trailers
This info view is really cool. However, I have some trouble when it looks up in Youtube with special characters like "&" in "The fast & the furious"... Is there a way to end up with a correct result page in Youtube even if there are special characters like this one in the title ?
Re: Linking Videos\Trailers
DVDpedia has no sense of context when replacing the keys in a template, so it creates all of them for display, which is okay for a link as well, except in the case of the & character that should be %26 inside a link. I'll add that to the list of bugs, but I can't see a simple way to fix it.
Re: Linking Videos\Trailers
(Ok, perhaps with a Javascript replace() method then a javascript link() method... ? ) -->> I was thinking about the export template... So I have no idea...Conor wrote:DVDpedia has no sense of context when replacing the keys in a template, so it creates all of them for display, which is okay for a link as well, except in the case of the & character that should be %26 inside a link. I'll add that to the list of bugs, but I can't see a simple way to fix it.
Re: Linking Videos\Trailers
I didn't think outside of DVDpedia, but javascript should work well as you know the context, the link is for youtube. You could pass the link to a javascript function that replaces any "&" for "%26".
Code: Select all
<a href="javascript:encodeAmp(http://www.youtube.com...[key:title])" >
<script language="JavaScript">
encodeAmp(aLink) {
aLink.replace('&','%26');
window.location = aLink;
}
</script>
Re: Linking Videos\Trailers
I am new to HTML and Javascript... let's say I want to get the following link :Conor wrote:I didn't think outside of DVDpedia, but javascript should work well as you know the context, the link is for youtube. You could pass the link to a javascript function that replaces any "&" for "%26".
Code: Select all
<a href="javascript:encodeAmp(http://www.youtube.com...[key:title])" > <script language="JavaScript"> encodeAmp(aLink) { aLink.replace('&','%26'); window.location = aLink; } </script>
http://www.youtube.com/results?search_q ... finition=1
from this :
Code: Select all
<a href="http://www.youtube.com/results?search_query=[key:title]+trailer&high_definition=1"><B><font color="#FF0000" size="+4">Trailer</font></B></a>
I thought it would be :
Code: Select all
<a href="javascript:encodeAmp(http://www.youtube.com/results?search_query=[key:title])+trailer&high_definition=1" ><B><font color="#FF0000" size="+4">Trailer</font></B></a>
<script language="JavaScript">
encodeAmp(aLink) {
aLink.replace('&','%26');
window.location = aLink;
}
</script>
Re: Linking Videos\Trailers
Should be it, but you need to keep the entire link together; bring in the "+trailer&high_definition=1" inside the parenthesis. Also move the script part to somewhere inside the <head> tags at the top of the page. I also added the replace for spaces in case JavaScript can't handle those.
Code: Select all
<head>
...
<script language="JavaScript">
encodeAmp(aLink) {
aLink.replace('&','%26');
aLink.replace(' ','%20');
window.location = aLink;
}
</script>
...
</head>
...
<a href="javascript:encodeAmp(http://www.youtube.com/results?search_query=[key:title]+trailer&high_definition=1)" >" >
Re: Linking Videos\Trailers
The code doesn't work for me... I was able to call the function (tested with an alert) but not the method .replace().... it seems not working
Code: Select all
<head>
...
<script language="JavaScript">
function encodeAmp(aLink) {
aLink.replace('&','%26'); //doesn't work
aLink.replace(' ','%20'); //not needed for my browser
window.location = aLink;
}
</script>
...
</head>
...
<a href="javascript:encodeAmp('http://www.youtube.com/results?search_query=[key:title]+trailer&high_definition=1')" >Trailer</a>
Re: Linking Videos\Trailers
This used to work, but stopped working for me in the current release (4.5.3)Conor wrote:You can drag URLs or video files over the info view of the movie to link the trailers. Then the link will be present in the info view for one click browsing of the trailers. If the file is a local video file it will also show up in the full screen mode and under the optional play button on the toolbar.
Re: Linking Videos\Trailers
Is the dragging not working or the playback of the file? What type of extension does the file have: .mov .avi .mpg .m4v? Thank you for the information, the more specifics I get the easier it is to try to reproduce. I tried with several different files types that I commonly use (.avi .m4v) and was working correctly.