]> Some of my projects - aniplayer-old.git/commitdiff
- Play next file in playlist only if previous file finished playing
authorunknown <Marek@.(none)>
Sat, 28 Mar 2009 14:25:53 +0000 (15:25 +0100)
committerunknown <Marek@.(none)>
Sat, 28 Mar 2009 14:25:53 +0000 (15:25 +0100)
- Fix m_automarked -> m_marked

src/videowindow.cpp

index 9d2afa26b2519bff0e530e609b31bdf78fe7393f..269654f0d63d8a746514dd3d75c4369382a5dfee 100644 (file)
@@ -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...";