[mythtv] Delay file deletion in mythtranscode

Jim Stichnoth stichnot at gmail.com
Wed Dec 9 18:00:26 UTC 2009


I've always been annoyed that if you're watching a program that is
being transcoded, the unlink of the original file at the end of the
transcode causes the player to exit ungracefully, and you lose your
position in the playback.  I was thinking of adding a piece of code
that delays the unlink until this query returns 0:

  select count(*) from inuseprograms where chanid = xxx and starttime
= 'yyy' and recusage != 'jobqueue';

This probably isn't a perfect solution, but I suspect it will fix
99.9% of the "premature deletion" problems.  Are there any gotchas I'm
missing?

Jim


More information about the mythtv-dev mailing list