home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
MyTrailers
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="lstepnio" data-source="post: 291349" data-attributes="member: 80243"><p>The Haali splitter certainly supports Apples MP4 containters and in fact my experience is that it's the most reliable splitter for these files. The .mov in the filename is just the file extension.</p><p></p><p>I'm sharing my bash script solution which runs once a night and downloads any new trailers along with the associated poster art. This script runs on my backend Linux media server but will also work under Windows using Cygwin. </p><p></p><p>The download directory for the trailers is a share in "My Videos" in my MediaPortal client machine. The posters are displayed in "My Videos" as the thumbnails and when the preview watched I simply delete the file from the MediaPortal My Videos interface.</p><p></p><p>To script requires bash, xmlstarlet and wget. If you're setting this up to run under windows you will need to install and setup Cygwin.</p><p></p><p>There are a few setting to adjust. To download the 1080p version of trailers set GET1080=1. If you want to download posters to be used for thumbnails set GETPOSTER=1. SAVEPATH= is the path which the trailers and posters are stored. DLDBPATH= is the path to to store a database file of previously downloaded trailers which is used prevent re-downloading user deleted trailers. </p><p></p><p>The script will attempt to download 1080p (if enabled and available) next fallback to 720p and finally the 640w versions for anything not available in HD. The script will keep track of the last ~2,500 downloaded trailers so once the trailer and/or poster file is deleted the script will not re-attempt to download the same trailers again. The script will also rename the file .hdmov which is desired when using Quicktime Alternative / QT-Lite.</p><p></p><p></p><p></p><p>You might also need to change the line with the "xmlstarlet" command to "xml". It seem that some packages differ on the name of the binary for xmlstarlet.</p><p></p><p></p><p></p><p></p><p></p><p></p><p>Here's the script ( <a href="http://paste2.org/p/56556" target="_blank">Paste2: Next Generation Pastebin - Viewing Paste 56556</a> ):</p><p>[code]</p><p>#!/bin/bash</p><p></p><p>GET1080p=0</p><p>GETPOSTER=0</p><p>SAVEPATH="/home/lstepnio/Desktop/"</p><p>DLDBPATH="/home/lstepnio/scripts/trailers/"</p><p></p><p>FEEDS="http://www.apple.com/trailers/home/xml/current_720p.xml http://www.apple.com/trailers/home/xml/current.xml"</p><p></p><p></p><p>tail -5000 $DLDBPATH.downloaded.db > $DLDBPATH.downloaded.db.tmp</p><p>mv $DLDBPATH.downloaded.db.tmp $DLDBPATH.downloaded.db</p><p></p><p>for FEEDURL in $FEEDS; do</p><p></p><p>TRAILERS=`xmlstarlet sel --net -D -T -t -m "/records/movieinfo"\</p><p> -v "@id" -o ";"\</p><p> -v "info/postdate" -o ";"\</p><p> -v "preview/large" -o ";"\</p><p> -v "poster/xlarge"\</p><p> -n $FEEDURL`</p><p></p><p>for MOVIE in $TRAILERS; do</p><p></p><p>MOVIEID=`echo $MOVIE | awk 'BEGIN { FS = ";" } ; { print $1 }'`</p><p>POSTDATE=`echo $MOVIE | awk 'BEGIN { FS = ";" } ; { print $2 }'`</p><p></p><p>PREVIEW=`echo $MOVIE | awk 'BEGIN { FS = ";" } ; { print $3 }'`</p><p> PREVIEWFILE=`echo $PREVIEW |sed 's/.*\///' |sed 's/\.mov$/.hdmov/g'`</p><p> NEWPREVIEWNAME="$POSTDATE-$PREVIEWFILE"</p><p></p><p>POSTER=`echo $MOVIE | awk 'BEGIN { FS = ";" } ; { print $4 }'`</p><p> NEWPOSTERNAME=`echo $NEWPREVIEWNAME |sed 's/\.hdmov$/.jpg/g'`</p><p></p><p></p><p>if [ "$GET1080p" -eq "1" ]; then</p><p> if `echo $FEEDURL | grep -q 720p`; then</p><p> if ! grep -q "###$MOVIEID.PREVIEW" $DLDBPATH.downloaded.db; then</p><p> PREVIEW1080p=`echo $MOVIE | awk 'BEGIN { FS = ";" } ; { print $3 }' |sed 's/a720p\.mov$/h1080p.mov/g'`</p><p> PREVIEWFILE1080p=`echo $PREVIEW1080p |sed 's/.*\///' |sed 's/\.mov$/.hdmov/g'`</p><p> NEWPREVIEWNAME1080p="$POSTDATE-$PREVIEWFILE1080p"</p><p> wget -c -O $SAVEPATH$NEWPREVIEWNAME1080p $PREVIEW1080p; PREVIEWOUT1080p=$?</p><p> if [ $PREVIEWOUT1080p -eq 0 ]; then</p><p> echo "###$MOVIEID.PREVIEW $NEWPREVIEWNAME1080p" >> $DLDBPATH.downloaded.db</p><p> NEWPOSTERNAME=`echo $NEWPOSTERNAME |sed 's/a720p\.jpg$/h1080p.jpg/g'`</p><p> else</p><p> echo "##### ID:$MOVIEID URL:$PREVIEW1080p FAILED -- TRYING ORIGINAL 720p URL NEXT"</p><p> fi</p><p> fi</p><p> fi </p><p>fi</p><p></p><p> if ! grep -q "###$MOVIEID.PREVIEW" $DLDBPATH.downloaded.db; then</p><p> wget -c -O $SAVEPATH$NEWPREVIEWNAME $PREVIEW; PREVIEWOUT=$?</p><p> if [ $PREVIEWOUT -eq 0 ]; then </p><p> echo "###$MOVIEID.PREVIEW $NEWPREVIEWNAME" >> $DLDBPATH.downloaded.db</p><p> else</p><p> echo "##### ID:$MOVIEID URL:$PREVIEW FAILED -- RETRY NEXT RUN"</p><p> fi</p><p> else</p><p> echo "##### ID:$MOVIEID NAME:$NEWPREVIEWNAME MARKED DONE -- SKIPPING"</p><p> fi</p><p></p><p> if [ "$GETPOSTER" -eq "1" ]; then</p><p> if ! grep -q "###$MOVIEID.POSTER" $DLDBPATH.downloaded.db; then</p><p> wget -c -O $SAVEPATH$NEWPOSTERNAME $POSTER; POSTEROUT=$?</p><p> if [ $POSTEROUT -eq 0 ]; then</p><p> echo "###$MOVIEID.POSTER $NEWPOSTERNAME" >> $DLDBPATH.downloaded.db</p><p> else</p><p> echo "##### $ID:$MOVIEID URL:$POSTER FAILED -- RETRY NEXT RUN"</p><p> fi</p><p> else</p><p> echo "##### ID:$MOVIEID NAME:$NEWPOSTERNAME MARKED DONE -- SKIPPING"</p><p> fi</p><p> fi</p><p></p><p>done</p><p></p><p>done</p><p>[/code]</p></blockquote><p></p>
[QUOTE="lstepnio, post: 291349, member: 80243"] The Haali splitter certainly supports Apples MP4 containters and in fact my experience is that it's the most reliable splitter for these files. The .mov in the filename is just the file extension. I'm sharing my bash script solution which runs once a night and downloads any new trailers along with the associated poster art. This script runs on my backend Linux media server but will also work under Windows using Cygwin. The download directory for the trailers is a share in "My Videos" in my MediaPortal client machine. The posters are displayed in "My Videos" as the thumbnails and when the preview watched I simply delete the file from the MediaPortal My Videos interface. To script requires bash, xmlstarlet and wget. If you're setting this up to run under windows you will need to install and setup Cygwin. There are a few setting to adjust. To download the 1080p version of trailers set GET1080=1. If you want to download posters to be used for thumbnails set GETPOSTER=1. SAVEPATH= is the path which the trailers and posters are stored. DLDBPATH= is the path to to store a database file of previously downloaded trailers which is used prevent re-downloading user deleted trailers. The script will attempt to download 1080p (if enabled and available) next fallback to 720p and finally the 640w versions for anything not available in HD. The script will keep track of the last ~2,500 downloaded trailers so once the trailer and/or poster file is deleted the script will not re-attempt to download the same trailers again. The script will also rename the file .hdmov which is desired when using Quicktime Alternative / QT-Lite. You might also need to change the line with the "xmlstarlet" command to "xml". It seem that some packages differ on the name of the binary for xmlstarlet. Here's the script ( [url=http://paste2.org/p/56556]Paste2: Next Generation Pastebin - Viewing Paste 56556[/url] ): [code] #!/bin/bash GET1080p=0 GETPOSTER=0 SAVEPATH="/home/lstepnio/Desktop/" DLDBPATH="/home/lstepnio/scripts/trailers/" FEEDS="http://www.apple.com/trailers/home/xml/current_720p.xml http://www.apple.com/trailers/home/xml/current.xml" tail -5000 $DLDBPATH.downloaded.db > $DLDBPATH.downloaded.db.tmp mv $DLDBPATH.downloaded.db.tmp $DLDBPATH.downloaded.db for FEEDURL in $FEEDS; do TRAILERS=`xmlstarlet sel --net -D -T -t -m "/records/movieinfo"\ -v "@id" -o ";"\ -v "info/postdate" -o ";"\ -v "preview/large" -o ";"\ -v "poster/xlarge"\ -n $FEEDURL` for MOVIE in $TRAILERS; do MOVIEID=`echo $MOVIE | awk 'BEGIN { FS = ";" } ; { print $1 }'` POSTDATE=`echo $MOVIE | awk 'BEGIN { FS = ";" } ; { print $2 }'` PREVIEW=`echo $MOVIE | awk 'BEGIN { FS = ";" } ; { print $3 }'` PREVIEWFILE=`echo $PREVIEW |sed 's/.*\///' |sed 's/\.mov$/.hdmov/g'` NEWPREVIEWNAME="$POSTDATE-$PREVIEWFILE" POSTER=`echo $MOVIE | awk 'BEGIN { FS = ";" } ; { print $4 }'` NEWPOSTERNAME=`echo $NEWPREVIEWNAME |sed 's/\.hdmov$/.jpg/g'` if [ "$GET1080p" -eq "1" ]; then if `echo $FEEDURL | grep -q 720p`; then if ! grep -q "###$MOVIEID.PREVIEW" $DLDBPATH.downloaded.db; then PREVIEW1080p=`echo $MOVIE | awk 'BEGIN { FS = ";" } ; { print $3 }' |sed 's/a720p\.mov$/h1080p.mov/g'` PREVIEWFILE1080p=`echo $PREVIEW1080p |sed 's/.*\///' |sed 's/\.mov$/.hdmov/g'` NEWPREVIEWNAME1080p="$POSTDATE-$PREVIEWFILE1080p" wget -c -O $SAVEPATH$NEWPREVIEWNAME1080p $PREVIEW1080p; PREVIEWOUT1080p=$? if [ $PREVIEWOUT1080p -eq 0 ]; then echo "###$MOVIEID.PREVIEW $NEWPREVIEWNAME1080p" >> $DLDBPATH.downloaded.db NEWPOSTERNAME=`echo $NEWPOSTERNAME |sed 's/a720p\.jpg$/h1080p.jpg/g'` else echo "##### ID:$MOVIEID URL:$PREVIEW1080p FAILED -- TRYING ORIGINAL 720p URL NEXT" fi fi fi fi if ! grep -q "###$MOVIEID.PREVIEW" $DLDBPATH.downloaded.db; then wget -c -O $SAVEPATH$NEWPREVIEWNAME $PREVIEW; PREVIEWOUT=$? if [ $PREVIEWOUT -eq 0 ]; then echo "###$MOVIEID.PREVIEW $NEWPREVIEWNAME" >> $DLDBPATH.downloaded.db else echo "##### ID:$MOVIEID URL:$PREVIEW FAILED -- RETRY NEXT RUN" fi else echo "##### ID:$MOVIEID NAME:$NEWPREVIEWNAME MARKED DONE -- SKIPPING" fi if [ "$GETPOSTER" -eq "1" ]; then if ! grep -q "###$MOVIEID.POSTER" $DLDBPATH.downloaded.db; then wget -c -O $SAVEPATH$NEWPOSTERNAME $POSTER; POSTEROUT=$? if [ $POSTEROUT -eq 0 ]; then echo "###$MOVIEID.POSTER $NEWPOSTERNAME" >> $DLDBPATH.downloaded.db else echo "##### $ID:$MOVIEID URL:$POSTER FAILED -- RETRY NEXT RUN" fi else echo "##### ID:$MOVIEID NAME:$NEWPOSTERNAME MARKED DONE -- SKIPPING" fi fi done done [/code] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
MyTrailers
Contact us
RSS
Top
Bottom