From: APTX Date: Sun, 16 Feb 2014 13:07:12 +0000 (+0100) Subject: Try both the absolute and canonical file path with LML. X-Git-Url: https://gitweb.tyo.aptx.org/?a=commitdiff_plain;h=f0e219e044c375bc669514594f6702ad2e91575d;p=aniplayer2.git Try both the absolute and canonical file path with LML. --- diff --git a/aniplayer/aniplayer.cpp b/aniplayer/aniplayer.cpp index f37b5c4..ea46629 100644 --- a/aniplayer/aniplayer.cpp +++ b/aniplayer/aniplayer.cpp @@ -5,6 +5,8 @@ #include +#include + AniPlayer::AniPlayer(QObject *parent) : QObject(parent), m_state(NoFileLoaded) { m_automark = 0; @@ -192,11 +194,16 @@ void AniPlayer::markWatched() return; using namespace LocalMyList; - File f = MyList::instance()->database()->getFileByPath(QFileInfo(currentFile()).canonicalFilePath()); + qDebug() << "path" << currentFile()<< QFileInfo(currentFile()).absoluteFilePath() << QFileInfo(currentFile()).canonicalFilePath(); + File f = MyList::instance()->database()->getFileByPath(QFileInfo(currentFile()).absoluteFilePath()); if (!f.fid) { - emit message(tr("File not in LocalMyList!")); - return; + f = MyList::instance()->database()->getFileByPath(QFileInfo(currentFile()).canonicalFilePath()); + if (!f.fid) + { + emit message(tr("File not in LocalMyList!")); + return; + } } if (f.myWatched.isValid()) {