summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Klotz <uklotz@mixxx.org>2020-04-22 17:02:02 +0200
committerUwe Klotz <uklotz@mixxx.org>2020-06-05 13:25:18 +0200
commitf15675aca5e4fc0583c3fc8a76ee713686cf0774 (patch)
tree7da80152d30a7dc593fbba49e2e8eddbc247557a
parentf6ba1d4b676dfce45b691be6f1a6a282d982a6ab (diff)
Switch cover column sorting from legacy hash to digest
-rw-r--r--src/library/basetrackcache.cpp4
-rw-r--r--src/library/crate/cratetablemodel.cpp4
-rw-r--r--src/library/librarytablemodel.cpp4
-rw-r--r--src/library/playlisttablemodel.cpp4
4 files changed, 8 insertions, 8 deletions
diff --git a/src/library/basetrackcache.cpp b/src/library/basetrackcache.cpp
index c2dcfc95bf..9062ef0297 100644
--- a/src/library/basetrackcache.cpp
+++ b/src/library/basetrackcache.cpp
@@ -411,8 +411,8 @@ void BaseTrackCache::getTrackValueForColumn(TrackPointer pTrack,
fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_COVERART) == column ||
fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_COVERART_HASH) == column) {
// For sorting, we give COLUMN_LIBRARYTABLE_COVERART the same value as
- // the cover hash.
- trackValue.setValue(pTrack->getCoverInfo().imageHash());
+ // the cover digest.
+ trackValue.setValue(pTrack->getCoverInfo().imageDigest());
} else if (fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_COVERART_COLOR) == column) {
trackValue.setValue(mixxx::RgbColor::toQVariant(pTrack->getCoverInfo().color));
} else if (fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_COVERART_DIGEST) == column) {
diff --git a/src/library/crate/cratetablemodel.cpp b/src/library/crate/cratetablemodel.cpp
index 588a453dd2..2790ec2cd7 100644
--- a/src/library/crate/cratetablemodel.cpp
+++ b/src/library/crate/cratetablemodel.cpp
@@ -25,8 +25,8 @@ void CrateTableModel::selectCrate(CrateId crateId) {
columns << LIBRARYTABLE_ID
<< "'' AS " + LIBRARYTABLE_PREVIEW
// For sorting the cover art column we give LIBRARYTABLE_COVERART
- // the same value as the cover hash.
- << LIBRARYTABLE_COVERART_HASH + " AS " + LIBRARYTABLE_COVERART;
+ // the same value as the cover digest.
+ << LIBRARYTABLE_COVERART_DIGEST + " AS " + LIBRARYTABLE_COVERART;
// We hide files that have been explicitly deleted in the library
// (mixxx_deleted = 0) from the view.
// They are kept in the database, because we treat crate membership as a
diff --git a/src/library/librarytablemodel.cpp b/src/library/librarytablemodel.cpp
index afabdff127..8fc1fca873 100644
--- a/src/library/librarytablemodel.cpp
+++ b/src/library/librarytablemodel.cpp
@@ -30,8 +30,8 @@ void LibraryTableModel::setTableModel(int id) {
columns << "library." + LIBRARYTABLE_ID
<< "'' AS " + LIBRARYTABLE_PREVIEW
// For sorting the cover art column we give LIBRARYTABLE_COVERART
- // the same value as the cover hash.
- << LIBRARYTABLE_COVERART_HASH + " AS " + LIBRARYTABLE_COVERART;
+ // the same value as the cover digest.
+ << LIBRARYTABLE_COVERART_DIGEST + " AS " + LIBRARYTABLE_COVERART;
const QString tableName = "library_view";
diff --git a/src/library/playlisttablemodel.cpp b/src/library/playlisttablemodel.cpp
index 5c1e477ef9..331651289e 100644
--- a/src/library/playlisttablemodel.cpp
+++ b/src/library/playlisttablemodel.cpp
@@ -79,8 +79,8 @@ void PlaylistTableModel::setTableModel(int playlistId) {
<< PLAYLISTTRACKSTABLE_DATETIMEADDED
<< "'' AS " + LIBRARYTABLE_PREVIEW
// For sorting the cover art column we give LIBRARYTABLE_COVERART
- // the same value as the cover hash.
- << LIBRARYTABLE_COVERART_HASH + " AS " + LIBRARYTABLE_COVERART;
+ // the same value as the cover digest.
+ << LIBRARYTABLE_COVERART_DIGEST + " AS " + LIBRARYTABLE_COVERART;
QString queryString = QString("CREATE TEMPORARY VIEW IF NOT EXISTS %1 AS "
"SELECT %2 FROM PlaylistTracks "