From: unknown Date: Sat, 28 Mar 2009 14:25:53 +0000 (+0100) Subject: - Play next file in playlist only if previous file finished playing X-Git-Url: https://gitweb.tyo.aptx.org/?a=commitdiff_plain;h=81dcc68460b4e847b2a99f3dba478d872715cc78;p=aniplayer-old.git - Play next file in playlist only if previous file finished playing - Fix m_automarked -> m_marked --- diff --git a/src/videowindow.cpp b/src/videowindow.cpp index 9d2afa2..269654f 100644 --- a/src/videowindow.cpp +++ b/src/videowindow.cpp @@ -381,8 +381,6 @@ qDebug() << "Media changed state from" << oldstate << "to" << newstate; m_actions["pause"]->setDisabled(true); m_actions["stop"]->setDisabled(true); - playlist->next(); - break; case Phonon::PlayingState: m_actions["play"]->setDisabled(true); @@ -410,7 +408,7 @@ qDebug() << "Media changed state from" << oldstate << "to" << newstate; if (!isFullScreen()) resizeToVideo(); #endif - if (!m_marked) + if (addCommand) addCommand->deleteLater(); addCommand = new MylistAddCommand(m_currentFile, this); @@ -418,7 +416,9 @@ qDebug() << "Media changed state from" << oldstate << "to" << newstate; break; case Phonon::PlayingState: if (newstate == Phonon::PausedState && mediaObject->remainingTime() == 0) - mediaObject->stop(); + { + playlist->next(); + } default: break; } @@ -577,14 +577,13 @@ void VideoWindow::moveWithMenu() void VideoWindow::markWatched() { - if (m_marked) + if (!addCommand) { menu->showMessage("File already Marked"); return; } menu->showMessage("Hashing file"); - m_marked = true; connect(addCommand, SIGNAL(hashComplete()), this, SLOT(doMarkWatched())); addCommand->setMarkWatched(true); qDebug() << "hashing file...";