[mythtv] [mythtv-commits] Ticket #4536: Recording appears in Watch Recordings too early

Chris Pinkham cpinkham at bc2va.org
Mon Jan 28 21:09:59 UTC 2008


* On Mon Jan 28, 2008 at 02:37:17PM -0500, Mark Buechler wrote:
> Would the attached patch work better?

I think you're missing the part to allow trying to play the file again
which was one of his main complaints.  If you mark the file as anything
but asAvailable, then PlaybackBox::playSelected() and
PlaybackBox::playSelectedPlaylist() won't allow even trying to ::play()
the file.  That was the reason my quick (and untested) patch didn't
touch the availableStatus if the file until the recording was 15 seconds
old.

Your patch does help to show the differences, but there isn't anything
to allow switching back to asAvailable without reentering the Watch
Recordings screen.  You could fix this by modifying playSelected() and
playSelectedPlaylist() to allow attempting to play both asAvailable
and asNotYetAvailable.  You should also handle the state change from
asNotYetAvailable to asAvailable when the file becomes available and
is played.  This could be done by adding a few lines to ::play() to
reset the availableStatus if the file is now available after we check
the fileExists() and rec->filesize != 0.

<part above where we checked for rec->filesize == 0>

if (rec->availableStatus == asNotYetAvailable)
{
    ProgramInfo *tmpItem = findMatchingProg(rec);
    if (tmpItem)
        tmpItem->availableStatus = asAvailable;
}

ProgramInfo *tvrec = new ProgramInfo(*rec);

setEnabled(false);

<part where we actually try to play the file>

--
Chris


More information about the mythtv-dev mailing list