diff options
-rw-r--r-- | src/library/analysisfeature.cpp | 4 | ||||
-rw-r--r-- | src/library/autodjfeature.cpp | 4 | ||||
-rw-r--r-- | src/library/library.cpp | 8 | ||||
-rw-r--r-- | src/library/library.h | 2 | ||||
-rw-r--r-- | src/library/libraryfeature.h | 2 | ||||
-rw-r--r-- | src/library/mixxxlibraryfeature.cpp | 8 | ||||
-rw-r--r-- | src/skin/legacyskinparser.cpp | 4 | ||||
-rw-r--r-- | src/widget/wcoverart.cpp | 4 | ||||
-rw-r--r-- | src/widget/wcoverart.h | 2 | ||||
-rw-r--r-- | src/widget/wlibrarytableview.h | 6 | ||||
-rw-r--r-- | src/widget/wtracktableview.cpp | 6 |
11 files changed, 26 insertions, 24 deletions
diff --git a/src/library/analysisfeature.cpp b/src/library/analysisfeature.cpp index 7b36df402d..be16608dfa 100644 --- a/src/library/analysisfeature.cpp +++ b/src/library/analysisfeature.cpp @@ -77,8 +77,8 @@ void AnalysisFeature::bindWidget(WLibrary* libraryWidget, connect(m_pAnalysisView, SIGNAL(stopAnalysis()), this, SLOT(stopAnalysis())); - connect(m_pAnalysisView, SIGNAL(loadCoverArt(const QString&, const QString&, int)), - this, SIGNAL(loadCoverArt(const QString&, const QString&, int))); + connect(m_pAnalysisView, SIGNAL(loadCoverArt(const QString&, const QString&, int, bool)), + this, SIGNAL(loadCoverArt(const QString&, const QString&, int, bool))); connect(this, SIGNAL(analysisActive(bool)), m_pAnalysisView, SLOT(analysisActive(bool))); diff --git a/src/library/autodjfeature.cpp b/src/library/autodjfeature.cpp index ea4f358f24..fc2ad14c3a 100644 --- a/src/library/autodjfeature.cpp +++ b/src/library/autodjfeature.cpp @@ -94,8 +94,8 @@ void AutoDJFeature::bindWidget(WLibrary* libraryWidget, connect(m_pAutoDJView, SIGNAL(loadTrackToPlayer(TrackPointer, QString, bool)), this, SIGNAL(loadTrackToPlayer(TrackPointer, QString, bool))); - connect(m_pAutoDJView, SIGNAL(loadCoverArt(const QString&, const QString&, int)), - this, SIGNAL(loadCoverArt(const QString&, const QString&, int))); + connect(m_pAutoDJView, SIGNAL(loadCoverArt(const QString&, const QString&, int, bool)), + this, SIGNAL(loadCoverArt(const QString&, const QString&, int, bool))); #ifdef __AUTODJCRATES__ // Be informed when the user wants to add another random track. diff --git a/src/library/library.cpp b/src/library/library.cpp index 502f43a66f..f55688e76f 100644 --- a/src/library/library.cpp +++ b/src/library/library.cpp @@ -153,8 +153,8 @@ void Library::bindWidget(WLibrary* pLibraryWidget, connect(this, SIGNAL(switchToView(const QString&)), pLibraryWidget, SLOT(switchToView(const QString&))); - connect(pTrackTableView, SIGNAL(loadCoverArt(const QString&, const QString&, int)), - this, SIGNAL(loadCoverArt(const QString&, const QString&, int))); + connect(pTrackTableView, SIGNAL(loadCoverArt(const QString&, const QString&, int, bool)), + this, SIGNAL(loadCoverArt(const QString&, const QString&, int, bool))); m_pLibraryControl->bindWidget(pLibraryWidget, pKeyboard); @@ -181,8 +181,8 @@ void Library::addFeature(LibraryFeature* feature) { this, SLOT(slotRestoreSearch(const QString&))); connect(feature, SIGNAL(enableCoverArtDisplay(bool)), this, SIGNAL(enableCoverArtDisplay(bool))); - connect(feature, SIGNAL(loadCoverArt(const QString&, const QString&, int)), - this, SIGNAL(loadCoverArt(const QString&, const QString&, int))); + connect(feature, SIGNAL(loadCoverArt(const QString&, const QString&, int, bool)), + this, SIGNAL(loadCoverArt(const QString&, const QString&, int, bool))); } void Library::slotShowTrackModel(QAbstractItemModel* model) { diff --git a/src/library/library.h b/src/library/library.h index 63caf41085..249dfae2e7 100644 --- a/src/library/library.h +++ b/src/library/library.h @@ -89,7 +89,7 @@ public: void enableCoverArtDisplay(bool); void loadCoverArt(const QString& coverLocation, const QString& md5Hash, - int trackId); + int trackId, bool cachedOnly); private: ConfigObject<ConfigValue>* m_pConfig; diff --git a/src/library/libraryfeature.h b/src/library/libraryfeature.h index b8365a7e1e..8d0094012a 100644 --- a/src/library/libraryfeature.h +++ b/src/library/libraryfeature.h @@ -96,7 +96,7 @@ class LibraryFeature : public QObject { void enableCoverArtDisplay(bool); void loadCoverArt(const QString& coverLocation, const QString& md5Hash, - int trackId); + int trackId, bool cachedOnly); }; diff --git a/src/library/mixxxlibraryfeature.cpp b/src/library/mixxxlibraryfeature.cpp index 7a2382d539..ebe96edc13 100644 --- a/src/library/mixxxlibraryfeature.cpp +++ b/src/library/mixxxlibraryfeature.cpp @@ -132,15 +132,15 @@ void MixxxLibraryFeature::bindWidget(WLibrary* pLibrary, m_pConfig, m_pTrackCollection, pKeyboard); pLibrary->registerView(kHiddenTitle, m_pHiddenView); - connect(m_pHiddenView, SIGNAL(loadCoverArt(const QString&, const QString&, int)), - this, SIGNAL(loadCoverArt(const QString&, const QString&, int))); + connect(m_pHiddenView, SIGNAL(loadCoverArt(const QString&, const QString&, int, bool)), + this, SIGNAL(loadCoverArt(const QString&, const QString&, int, bool))); m_pMissingView = new DlgMissing(pLibrary, m_pConfig, m_pTrackCollection, pKeyboard); pLibrary->registerView(kMissingTitle, m_pMissingView); - connect(m_pMissingView, SIGNAL(loadCoverArt(const QString&, const QString&, int)), - this, SIGNAL(loadCoverArt(const QString&, const QString&, int))); + connect(m_pMissingView, SIGNAL(loadCoverArt(const QString&, const QString&, int, bool)), + this, SIGNAL(loadCoverArt(const QString&, const QString&, int, bool))); } QVariant MixxxLibraryFeature::title() { diff --git a/src/skin/legacyskinparser.cpp b/src/skin/legacyskinparser.cpp index 099ffa9f00..bf650efb40 100644 --- a/src/skin/legacyskinparser.cpp +++ b/src/skin/legacyskinparser.cpp @@ -971,8 +971,8 @@ QWidget* LegacySkinParser::parseCoverArt(QDomElement node) { pCoverArt, SLOT(slotResetWidget())); connect(m_pLibrary, SIGNAL(enableCoverArtDisplay(bool)), pCoverArt, SLOT(slotEnableWidget(bool))); - connect(m_pLibrary, SIGNAL(loadCoverArt(const QString&, const QString&, int)), - pCoverArt, SLOT(slotLoadCoverArt(const QString&, const QString&, int))); + connect(m_pLibrary, SIGNAL(loadCoverArt(const QString&, const QString&, int, bool)), + pCoverArt, SLOT(slotLoadCoverArt(const QString&, const QString&, int, bool))); return pCoverArt; } diff --git a/src/widget/wcoverart.cpp b/src/widget/wcoverart.cpp index 3d22803616..5aaff9fed2 100644 --- a/src/widget/wcoverart.cpp +++ b/src/widget/wcoverart.cpp @@ -96,7 +96,7 @@ void WCoverArt::slotPixmapFound(int trackId, QPixmap pixmap) { void WCoverArt::slotLoadCoverArt(const QString& coverLocation, const QString& md5Hash, - int trackId) { + int trackId, bool cachedOnly) { if (!m_bEnableWidget) { return; } @@ -157,7 +157,7 @@ void WCoverArt::resizeEvent(QResizeEvent*) { setMinimumSize(0, parentWidget()->height() / 3); slotLoadCoverArt(m_lastRequestedCover.first, m_lastRequestedCover.second, - m_lastRequestedTrackId); + m_lastRequestedTrackId, true); } else { m_loadedCover = CoverArtCache::instance()->getDefaultCoverArt(); setMinimumSize(0, 20); diff --git a/src/widget/wcoverart.h b/src/widget/wcoverart.h index 8b27cf7486..f3c6b407a1 100644 --- a/src/widget/wcoverart.h +++ b/src/widget/wcoverart.h @@ -25,7 +25,7 @@ class WCoverArt : public QWidget, public WBaseWidget { void slotEnableWidget(bool); void slotLoadCoverArt(const QString& coverLocation, const QString& md5Hash, - int trackId); + int trackId, bool cachedOnly); private slots: void slotPixmapFound(int trackId, QPixmap pixmap); diff --git a/src/widget/wlibrarytableview.h b/src/widget/wlibrarytableview.h index 7dc6c43103..7f6da1f9b5 100644 --- a/src/widget/wlibrarytableview.h +++ b/src/widget/wlibrarytableview.h @@ -24,8 +24,10 @@ class WLibraryTableView : public QTableView, public virtual LibraryView { signals: void loadTrack(TrackPointer pTrack); - void loadTrackToPlayer(TrackPointer pTrack, QString group, bool play = false); - void loadCoverArt(const QString& coverLocation, const QString&, int trackId); + void loadTrackToPlayer(TrackPointer pTrack, QString group, + bool play = false); + void loadCoverArt(const QString& coverLocation, const QString&, + int trackId, bool cachedOnly); void onlyCachedCoverArt(bool); void scrollValueChanged(int); diff --git a/src/widget/wtracktableview.cpp b/src/widget/wtracktableview.cpp index 3ac51ac345..1cb0f158e8 100644 --- a/src/widget/wtracktableview.cpp +++ b/src/widget/wtracktableview.cpp @@ -172,6 +172,8 @@ void WTrackTableView::slotGuiTickTime(double cpuTime) { if (!m_bLastCoverLoaded) { if (cpuTime >= m_lastSelection + 0.05) { slotLoadCoverArt(); + // it will allows CoverCache to load and search covers normally + emit(onlyCachedCoverArt(false)); m_bLastCoverLoaded = true; } } @@ -196,9 +198,7 @@ void WTrackTableView::slotLoadCoverArt() { m_iCoverLocationColumn).data().toString(); } } - emit(loadCoverArt(coverLocation, md5Hash, trackId)); - // it will allows CoverCache to load and search covers normally - emit(onlyCachedCoverArt(false)); + emit(loadCoverArt(coverLocation, md5Hash, trackId, false)); } // slot |