From 4ea883616f2abb7e6dabe486814733f2e22674fc Mon Sep 17 00:00:00 2001 From: "craig.p.drummond" Date: Sun, 10 Nov 2013 17:47:55 +0000 Subject: [PATCH] If MPD's database time is invalid, and the cache's database time is invalid, then accept a database listing. This works-around an issue with using MPD's proxy DB - where no database time is sent. BUG: 326 --- ChangeLog | 3 +++ models/musiclibrarymodel.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8b89bfe47..8c1744fcc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -94,6 +94,9 @@ highlighted artists) will be added to playqueue in a random order. 53. Add 'Shuffle Albums' entry to playqueue context menu. 54. When showing a new page, place focus on view. +55. If MPD's database time is invalid, and the cache's database time is + invalid, then accept a database listing. This works-around an issue with + using MPD's proxy DB - where no database time is sent. 1.1.3 ----- diff --git a/models/musiclibrarymodel.cpp b/models/musiclibrarymodel.cpp index 7cefdb4c6..c16893f5a 100644 --- a/models/musiclibrarymodel.cpp +++ b/models/musiclibrarymodel.cpp @@ -417,7 +417,7 @@ QSet MusicLibraryModel::getAlbumArtists() void MusicLibraryModel::updateMusicLibrary(MusicLibraryItemRoot *newroot, QDateTime dbUpdate, bool fromFile) { - if (!mpdModel || databaseTime >= dbUpdate) { + if (!mpdModel || (databaseTime.isValid() && dbUpdate.isValid() && databaseTime >= dbUpdate)) { delete newroot; return; }