From d325a44bca6d2e650fc0e87d6e867403d605d9d9 Mon Sep 17 00:00:00 2001 From: Flavio Date: Thu, 10 Jan 2013 14:25:27 +0100 Subject: [PATCH] Related videos action --- src/mediaview.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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... -- 2.39.5