From: Flavio Date: Thu, 10 Jan 2013 13:25:27 +0000 (+0100) Subject: Related videos action X-Git-Tag: 2.0~29 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d325a44bca6d2e650fc0e87d6e867403d605d9d9;p=minitube Related videos action --- diff --git a/src/mediaview.cpp b/src/mediaview.cpp index 21b11b2..d329fee 100644 --- a/src/mediaview.cpp +++ b/src/mediaview.cpp @@ -289,9 +289,12 @@ void MediaView::activeRowChanged(int row) { // Do not stop/start playing if the first video result is the current video if (row == 0 && !history.isEmpty()) { Video *currentVideo = 0; - if (downloadItem && downloadItem->getVideo()) currentVideo = downloadItem->getVideo(); - if (currentVideo && playlistModel->videoAt(row)->webpage() == currentVideo->webpage()) + if (downloadItem && downloadItem->getVideo()) + currentVideo = downloadItem->getVideo(); + if (currentVideo && playlistModel->videoAt(row)->webpage() == currentVideo->webpage()) { + The::globalActions()->value("related-videos")->setEnabled(false); return; + } } errorTimer->stop(); @@ -327,6 +330,7 @@ void MediaView::activeRowChanged(int row) { The::globalActions()->value("skip")->setEnabled(true); The::globalActions()->value("previous")->setEnabled(row > 0); The::globalActions()->value("stopafterthis")->setEnabled(true); + The::globalActions()->value("related-videos")->setEnabled(true); // see you in gotStreamUrl...