[mythtv-users] Apple HD Trailers: not so HD
Phil Bridges
gravityhammer at gmail.com
Mon Feb 2 14:44:10 UTC 2009
On Fri, Jan 23, 2009 at 11:18 AM, Phil Bridges <gravityhammer at gmail.com> wrote:
> On Fri, Jan 23, 2009 at 10:05 AM, James Crow <james at ultratans.com> wrote:
>> On Thu, 2009-01-22 at 08:54 -0500, Phil Bridges wrote:
>>
>>> >>
>>> > The apple trailer website was rather slow in downloading the trailers
>>> > so I decided to fix the tracking of what trailers to keep. Before the
>>> > script just deleted everything and grabbed a new copy each time it was
>>> > run. I now check for existing file before download. If the file is there
>>> > I update its mtime. After all files are downloaded I loop through the
>>> > trailers and remove the ones with mtime greater than 2 days ago.
>>> >
>>> > Tested on my machine only and not promised to do anything good for you.
>>> >
>>> > Attached patch is against the .04.2 version from
>>> > http://www.mythtv.org/wiki/Myth_Apple_Trailers page. If the original
>>> > author of the script is listening on the list, please feel free to take
>>> > any usable parts from my changes.
>>> >
>>>
>>> James -
>>>
>>> I updated my file with your patch, but now it appears that I'm having
>>> files deleted after download, but the entries in the XML file aren't
>>> being deleted. Any idea as to what's causing this?
>>
>> Phil,
>>
>> Can you run `ls -l` on the trailer storage dir before the script and
>> after?
>>
>> The change I made checks for the file before download and if it exists
>> it runs touch on it to update its timestamp. Once the downloads are
>> complete it deletes all files with a timestamp older than two days ago.
>> My initial guess is that the touch is not properly updating the
>> timestamp. The XMl file generation has not been changed. If the trailer
>> appears on Apple's website then it should be in the XMl file and the
>> video file should be downloaded or checked for existence.
>>
>> Send me the output of `ls -l` before and after run and I will see if I
>> can find a problem.
>>
>
> before:
> total 845296
> -rw-r--r-- 1 mythtv video 196759288 Jan 16 19:48 allaboutsteve-tlra_h1080p.mov
> -rw-r--r-- 1 mythtv video 23255852 Jan 23 02:01 fastandfurious-tlr2_h640w.mov
> -rw-r--r-- 1 mythtv video 173370770 Jan 23 02:43 iloveyouman-tlr1_h1080p.mov
> -rw-r--r-- 1 mythtv video 197825770 Jan 23 02:01 stateofplay-tlr2_h1080p.mov
> -rw-r--r-- 1 mythtv video 100798777 Jan 23 02:10
> streetfighterlegendchunli-tlrb_h1080p.mov
> -rw-r--r-- 1 mythtv video 172678248 Jan 23 02:10 wolverine-tlra_h1080p.mov
>
> after:
> total 845296
> -rw-r--r-- 1 mythtv video 196759288 Jan 23 10:16 allaboutsteve-tlra_h1080p.mov
> -rw-r--r-- 1 mythtv video 23255852 Jan 23 10:16 fastandfurious-tlr2_h640w.mov
> -rw-r--r-- 1 mythtv video 173370770 Jan 23 10:49 iloveyouman-tlr1_h1080p.mov
> -rw-r--r-- 1 mythtv video 197825770 Jan 23 10:16 stateofplay-tlr2_h1080p.mov
> -rw-r--r-- 1 mythtv video 100798777 Jan 23 10:16
> streetfighterlegendchunli-tlrb_h1080p.mov
> -rw-r--r-- 1 mythtv video 172678248 Jan 23 10:16 wolverine-tlra_h1080p.mov
>
>
> appletrailer.xml:
> <mythmenu name="TRAILERS">
> <button>
> <type>VIDEO_BROWSER</type>
> <text>Push</text>
> <action>EXEC /usr/bin/mplayer -fs -zoom -really-quiet
> /home/mythtv/trailers/push-tlr1_h640w.mov</action>
> </button>
>
> <button>
> <type>VIDEO_BROWSER</type>
> <text>State of Play</text>
> <action>EXEC /usr/bin/mplayer -fs -zoom -really-quiet
> /home/mythtv/trailers/stateofplay-tlr2_h1080p.mov</action>
> </button>
>
> <button>
> <type>VIDEO_BROWSER</type>
> <text>Fast and Furious</text>
> <action>EXEC /usr/bin/mplayer -fs -zoom -really-quiet
> /home/mythtv/trailers/fastandfurious-tlr2_h640w.mov</action>
> </button>
>
> <button>
> <type>VIDEO_BROWSER</type>
> <text>All About Steve</text>
> <action>EXEC /usr/bin/mplayer -fs -zoom -really-quiet
> /home/mythtv/trailers/allaboutsteve-tlra_h1080p.mov</action>
> </button>
>
> <button>
> <type>VIDEO_BROWSER</type>
> <text>Street Fighter: the Legend of Chun Li</text>
> <action>EXEC /usr/bin/mplayer -fs -zoom -really-quiet
> /home/mythtv/trailers/streetfighterlegendchunli-tlrb_h1080p.mov</action>
> </button>
>
> <button>
> <type>VIDEO_BROWSER</type>
> <text>X-MEN Origins: Wolverine</text>
> <action>EXEC /usr/bin/mplayer -fs -zoom -really-quiet
> /home/mythtv/trailers/wolverine-tlra_h1080p.mov</action>
> </button>
>
> <button>
> <type>VIDEO_BROWSER</type>
> <text>He’s Just Not That Into You</text>
> <action>EXEC /usr/bin/mplayer -fs -zoom -really-quiet
> /home/mythtv/trailers/hesjustnotthatintoyou-tlr2_h1080p.mov</action>
> </button>
>
> <button>
> <type>VIDEO_BROWSER</type>
> <text>Medicine For Melancholy</text>
> <action>EXEC /usr/bin/mplayer -fs -zoom -really-quiet
> /home/mythtv/trailers/medicineformelancholy_h720p.mov</action>
> </button>
>
> <button>
> <type>VIDEO_BROWSER</type>
> <text>Friday the 13th</text>
> <action>EXEC /usr/bin/mplayer -fs -zoom -really-quiet
> /home/mythtv/trailers/fridaythe13th-tlr1b_h1080p.mov</action>
> </button>
>
> <button>
> <type>VIDEO_BROWSER</type>
> <text>Tokyo Sonata</text>
> <action>EXEC /usr/bin/mplayer -fs -zoom -really-quiet
> /home/mythtv/trailers/tokyosonata_h1080p.mov</action>
> </button>
>
> <button>
> <type>VIDEO_BROWSER</type>
> <text>Coraline</text>
> <action>EXEC /usr/bin/mplayer -fs -zoom -really-quiet
> /home/mythtv/trailers/coraline-tlr2_h1080p.mov</action>
> </button>
>
> <button>
> <type>VIDEO_BROWSER</type>
> <text>I Love You Man</text>
> <action>EXEC /usr/bin/mplayer -fs -zoom -really-quiet
> /home/mythtv/trailers/iloveyouman-tlr1_h1080p.mov</action>
> </button>
>
> <button>
> <type>VIDEO_BROWSER</type>
> <text>The Proposal</text>
> <action>EXEC /usr/bin/mplayer -fs -zoom -really-quiet
> /home/mythtv/trailers/theproposal-tlr2_h640w.mov</action>
> </button>
>
> <button>
> <type>VIDEO_BROWSER</type>
> <text>Fired Up</text>
> <action>EXEC /usr/bin/mplayer -fs -zoom -really-quiet
> /home/mythtv/trailers/firedup-tlr1r_h1080p.mov</action>
> </button>
>
> <button>
> <type>VIDEO_BROWSER</type>
> <text>Watchmen</text>
> <action>EXEC /usr/bin/mplayer -fs -zoom -really-quiet
> /home/mythtv/trailers/watchmen-tlr1_h1080p.mov</action>
> </button>
>
> <button>
> <type>VIDEO_BROWSER</type>
> <text>Doubt</text>
> <action>EXEC /usr/bin/mplayer -fs -zoom -really-quiet
> /home/mythtv/trailers/doubt-tlr1r_h1080p.mov</action>
> </button>
>
> <button>
> <type>VIDEO_BROWSER</type>
> <text>9</text>
> <action>EXEC /usr/bin/mplayer -fs -zoom -really-quiet
> /home/mythtv/trailers/9-tsr_h640w.mov</action>
> </button>
>
> <button>
> <type>TV_DELETE</type>
> <text>ERROR: Valkyrie</text>
> <action>EXEC xmessage -center -timeout 10 There was an
> error accessing this Apple trailer...</action>
> </button>
>
> <button>
> <type>TV_DELETE</type>
> <text>ERROR: Earth</text>
> <action>EXEC xmessage -center -timeout 10 There was an
> error accessing this Apple trailer...</action>
> </button>
>
> <button>
> <type>TV_DELETE</type>
> <text>ERROR: The Last House On the Left</text>
> <action>EXEC xmessage -center -timeout 10 There was an
> error accessing this Apple trailer...</action>
> </button>
>
> </mythmenu>
>
Any idea what could be causing this?
More information about the mythtv-users
mailing list