Dont save backdrops in mpd dir if song is from AudioCD. Also, add more debug.

This commit is contained in:
craig.p.drummond
2013-12-25 21:39:33 +00:00
committed by craig.p.drummond
parent 3aa3f7c40c
commit c3c38e9dfa

View File

@@ -967,7 +967,7 @@ void ContextWidget::downloadResponse()
bool saved=false;
if (Settings::self()->storeBackdropsInMpdDir() && !currentSong.isVariousArtists() && !currentSong.isStream() &&
MPDConnection::self()->getDetails().dirReadable) {
!currentSong.isCdda() && MPDConnection::self()->getDetails().dirReadable) {
QString mpdDir=MPDConnection::self()->getDetails().dir;
QString songDir=Utils::getDir(currentSong.file);
if (!mpdDir.isEmpty() && 2==songDir.split(Utils::constDirSep, QString::SkipEmptyParts).count()) {
@@ -981,7 +981,14 @@ void ContextWidget::downloadResponse()
DBUG << "Saved backdrop to" << fileName << "for artist" << currentArtist << ", current song" << currentSong.file;
saved=true;
}
} else {
DBUG << "Not saving to mpd folder, mpd dir:" << mpdDir
<< "num parts:" << songDir.split(Utils::constDirSep, QString::SkipEmptyParts).count();
}
} else {
DBUG << "Not saving to mpd folder - set to save in mpd?" << Settings::self()->storeBackdropsInMpdDir()
<< "isVa:" << currentSong.isVariousArtists() << "isStream:" << currentSong.isStream()
<< "isCdda:" << currentSong.isCdda() << "mpd readable:" << MPDConnection::self()->getDetails().dirReadable;
}
if (!saved) {