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

Mark Buechler mark.buechler at gmail.com
Mon Jan 28 23:17:35 UTC 2008


Hi

On 1/28/08, Chris Pinkham <cpinkham at bc2va.org> wrote:
>
> * 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
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>

Yes, that patch doesn't fix it entirely. However, would setting
availableStatus to asAvailable before those checks have the same effect?

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

if (fileExists(rec) == false)
{
    QString msg =
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-dev/attachments/20080128/c0994ee6/attachment.htm 


More information about the mythtv-dev mailing list