From: Flavio Tordini Date: Tue, 4 Aug 2015 13:12:39 +0000 (+0200) Subject: Add t param to YT page. Subscription status messages X-Git-Tag: 2.5~47 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4143f33fb6b10cfdbffb55e93af691b7f52f7558;p=minitube Add t param to YT page. Subscription status messages --- diff --git a/src/mediaview.cpp b/src/mediaview.cpp index a2c4587..9130394 100644 --- a/src/mediaview.cpp +++ b/src/mediaview.cpp @@ -690,7 +690,8 @@ void MediaView::openWebPage() { #ifdef APP_PHONON mediaObject->pause(); #endif - QDesktopServices::openUrl(video->webpage()); + QString url = video->webpage() + QLatin1String("&t=") + QString::number(mediaObject->currentTime() / 1000); + QDesktopServices::openUrl(url); } void MediaView::copyWebPage() { @@ -1160,8 +1161,13 @@ void MediaView::toggleSubscription() { QString userId = video->channelId(); if (userId.isEmpty()) return; bool subscribed = YTChannel::isSubscribed(userId); - if (subscribed) YTChannel::unsubscribe(userId); - else YTChannel::subscribe(userId); + if (subscribed) { + YTChannel::unsubscribe(userId); + MainWindow::instance()->showMessage(tr("Unsubscribed from %1").arg(video->channelTitle())); + } else { + YTChannel::subscribe(userId); + MainWindow::instance()->showMessage(tr("Subscribed to %1").arg(video->channelTitle())); + } updateSubscriptionAction(video, !subscribed); }