diff --git a/src/library/dlgtagfetcher.cpp b/src/library/dlgtagfetcher.cpp index 3d68f6d4594..2a149ecd5be 100644 --- a/src/library/dlgtagfetcher.cpp +++ b/src/library/dlgtagfetcher.cpp @@ -556,10 +556,9 @@ void DlgTagFetcher::slotCoverFound( } void DlgTagFetcher::slotStartFetchCoverArt(const QList& allUrls) { - DlgPrefLibrary::CoverArtFetcherQuality fetcherQuality = - static_cast( - m_pConfig->getValue(mixxx::library::prefs::kCoverArtFetcherQualityConfigKey, - static_cast(DlgPrefLibrary::CoverArtFetcherQuality::Medium))); + const int fetcherQuality = m_pConfig->getValue( + mixxx::library::prefs::kCoverArtFetcherQualityConfigKey, + static_cast(DlgPrefLibrary::CoverArtFetcherQuality::Medium)); // Cover art links task can retrieve us variable number of links with different cover art sizes // Every single successful response has 2 links. @@ -579,8 +578,8 @@ void DlgTagFetcher::slotStartFetchCoverArt(const QList& allUrls) { return; } - if (allUrls.size() > static_cast(fetcherQuality)) { - getCoverArt(allUrls.at(static_cast(fetcherQuality))); + if (allUrls.size() > fetcherQuality) { + getCoverArt(allUrls.at(fetcherQuality)); } else { getCoverArt(allUrls.last()); }