[mythtv-users] Apple HD Trailers: not so HD

James Crow james at ultratans.com
Fri Jan 23 15:05:27 UTC 2009


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.

Cheers,
James




More information about the mythtv-users mailing list