Ticket #8130: mythvideo.patch

File mythvideo.patch, 1.4 KB (added by miroslav@…, 14 years ago)

Patch to interrupt PlayFolder?

  • ./mythvideo/mythvideo/videodlg.cpp

    old new  
    36303630 */
    36313631void VideoDialog::playFolder()
    36323632{
     3633    const int WATCHED_WATERMARK = 10000; // Play less then this milisec and the chain of
     3634                                         // videos will not be followed when
     3635                                         // playing.
     3636    QTime playing_time;
     3637
    36333638    MythUIButtonListItem *item = GetItemCurrent();
    36343639    MythGenericTree *node = GetNodePtrFromButton(item);
    36353640    int list_count;
     
    36413646
    36423647    if (list_count > 0)
    36433648    {
    3644         for (int i = 0; i < list_count; i++)
    3645         {
     3649        bool video_started;
     3650        int i = 0;
     3651        do {
     3652            video_started = false;
    36463653            MythGenericTree *subnode = node->getChildAt(i);
    36473654            if (subnode)
    36483655            {
    36493656                Metadata *metadata = GetMetadataPtrFromNode(subnode);
    36503657                if (metadata)
    36513658                {
     3659                    playing_time.start();
     3660                    video_started = true;
    36523661                    PlayVideo(metadata->GetFilename(),
    36533662                                       m_d->m_videoList->getListCache());
    36543663                }
    36553664            }
    3656         }
     3665        i++;
     3666        } while (i < list_count && (!video_started || playing_time.elapsed() > WATCHED_WATERMARK));
    36573667    }
    36583668}
    36593669