summaryrefslogtreecommitdiffstats
path: root/src/library
diff options
context:
space:
mode:
authorDaniel Schürmann <daschuer@mixxx.org>2021-01-04 18:46:27 +0100
committerDaniel Schürmann <daschuer@mixxx.org>2021-01-04 18:46:27 +0100
commitb7171a2b97f7671125abe6ebb8bfffd31ff3e14f (patch)
treefe1183c2054335bbe8b321dbb88a356aae7a1cbc /src/library
parent4813d0ecab0eed0fece4a7a6868204ba151ea877 (diff)
LIBRARYTABLE_LOCATION to LIBRARYTABLE_LOCATION_ID because the column holds only a reference to the track locations table. Use the enum COLUMN_TRACKLOCATIONSTABLE_LOCATION instead of COLUMN_LIBRARYTABLE_NATIVELOCATION becase it points only to the id column. Delete also enums for non existing Playlist table columns.
Diffstat (limited to 'src/library')
-rw-r--r--src/library/basesqltablemodel.cpp4
-rw-r--r--src/library/basetrackcache.cpp9
-rw-r--r--src/library/basetracktablemodel.cpp10
-rw-r--r--src/library/basetracktablemodel.h2
-rw-r--r--src/library/columncache.cpp11
-rw-r--r--src/library/columncache.h6
-rw-r--r--src/library/dao/playlistdao.h3
-rw-r--r--src/library/dao/trackschema.h2
-rw-r--r--src/library/parsercsv.cpp9
-rw-r--r--src/library/playlisttablemodel.cpp2
-rw-r--r--src/library/rekordbox/rekordboxfeature.cpp6
-rw-r--r--src/library/searchquery.cpp2
-rw-r--r--src/library/serato/seratofeature.cpp6
-rw-r--r--src/library/serato/seratoplaylistmodel.cpp2
14 files changed, 32 insertions, 42 deletions
diff --git a/src/library/basesqltablemodel.cpp b/src/library/basesqltablemodel.cpp
index b6b422a33d..b9c0615716 100644
--- a/src/library/basesqltablemodel.cpp
+++ b/src/library/basesqltablemodel.cpp
@@ -100,7 +100,7 @@ void BaseSqlTableModel::initSortColumnMapping() {
fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_FILETYPE);
m_columnIndexBySortColumnId[static_cast<int>(
TrackModel::SortColumnId::NativeLocation)] =
- fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_NATIVELOCATION);
+ fieldIndex(ColumnCache::COLUMN_TRACKLOCATIONSTABLE_LOCATION);
m_columnIndexBySortColumnId[static_cast<int>(
TrackModel::SortColumnId::Comment)] =
fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_COMMENT);
@@ -755,7 +755,7 @@ QString BaseSqlTableModel::getTrackLocation(const QModelIndex& index) const {
}
QString nativeLocation =
index.sibling(index.row(),
- fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_NATIVELOCATION))
+ fieldIndex(ColumnCache::COLUMN_TRACKLOCATIONSTABLE_LOCATION))
.data()
.toString();
return QDir::fromNativeSeparators(nativeLocation);
diff --git a/src/library/basetrackcache.cpp b/src/library/basetrackcache.cpp
index 91aef93448..24c325fe8e 100644
--- a/src/library/basetrackcache.cpp
+++ b/src/library/basetrackcache.cpp
@@ -273,13 +273,12 @@ bool BaseTrackCache::updateIndexWithQuery(const QString& queryString) {
record.resize(numColumns);
for (int i = 0; i < numColumns; ++i) {
- if (fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_NATIVELOCATION) == i) {
+ if (fieldIndex(ColumnCache::COLUMN_TRACKLOCATIONSTABLE_LOCATION) == i) {
// Database stores all locations with Qt separators: "/"
// Here we want to cache the display string with native separators.
QString location = query.value(i).toString();
record[i] = QDir::toNativeSeparators(location);
- }
- else {
+ } else {
record[i] = query.value(i);
}
}
@@ -378,7 +377,7 @@ void BaseTrackCache::getTrackValueForColumn(TrackPointer pTrack,
trackValue.setValue(pTrack->getType());
} else if (fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_TRACKNUMBER) == column) {
trackValue.setValue(pTrack->getTrackNumber());
- } else if (fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_NATIVELOCATION) == column) {
+ } else if (fieldIndex(ColumnCache::COLUMN_TRACKLOCATIONSTABLE_LOCATION) == column) {
trackValue.setValue(QDir::toNativeSeparators(pTrack->getLocation()));
} else if (fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_COMMENT) == column) {
trackValue.setValue(pTrack->getComment());
@@ -407,7 +406,7 @@ void BaseTrackCache::getTrackValueForColumn(TrackPointer pTrack,
} else if (fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_COVERART_LOCATION) == column) {
trackValue.setValue(pTrack->getCoverInfo().coverLocation);
} else if (fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_COVERART_HASH) == column ||
- fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_COVERART) == column) {
+ fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_COVERART) == column) {
// For sorting, we give COLUMN_LIBRARYTABLE_COVERART the same value as
// the cover hash.
trackValue.setValue(pTrack->getCoverHash());
diff --git a/src/library/basetracktablemodel.cpp b/src/library/basetracktablemodel.cpp
index ba8ae4c6db..73f26d3734 100644
--- a/src/library/basetracktablemodel.cpp
+++ b/src/library/basetracktablemodel.cpp
@@ -47,7 +47,7 @@ const QStringList kDefaultTableColumns = {
LIBRARYTABLE_GENRE,
LIBRARYTABLE_GROUPING,
LIBRARYTABLE_KEY,
- LIBRARYTABLE_LOCATION,
+ TRACKLOCATIONSTABLE_LOCATION,
LIBRARYTABLE_PLAYED,
LIBRARYTABLE_PREVIEW,
LIBRARYTABLE_RATING,
@@ -189,7 +189,7 @@ void BaseTrackTableModel::initHeaderProperties() {
tr("Key"),
defaultColumnWidth());
setHeaderProperties(
- ColumnCache::COLUMN_LIBRARYTABLE_NATIVELOCATION,
+ ColumnCache::COLUMN_TRACKLOCATIONSTABLE_LOCATION,
tr("Location"),
defaultColumnWidth() * 6);
setHeaderProperties(
@@ -350,7 +350,7 @@ bool BaseTrackTableModel::isColumnHiddenByDefault(
column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_COMPOSER) ||
column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_FILETYPE) ||
column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_GROUPING) ||
- column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_NATIVELOCATION) ||
+ column == fieldIndex(ColumnCache::COLUMN_TRACKLOCATIONSTABLE_LOCATION) ||
column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_PLAYED) ||
column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_REPLAYGAIN) ||
column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_SAMPLERATE) ||
@@ -373,7 +373,7 @@ QAbstractItemDelegate* BaseTrackTableModel::delegateForColumn(
} else if (PlayerManager::numPreviewDecks() > 0 &&
index == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_PREVIEW)) {
return new PreviewButtonDelegate(pTableView, index);
- } else if (index == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_NATIVELOCATION)) {
+ } else if (index == fieldIndex(ColumnCache::COLUMN_TRACKLOCATIONSTABLE_LOCATION)) {
return new LocationDelegate(pTableView);
} else if (index == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_COLOR)) {
return new ColorDelegate(pTableView);
@@ -845,7 +845,7 @@ Qt::ItemFlags BaseTrackTableModel::readWriteFlags(
column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_DATETIMEADDED) ||
column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_DURATION) ||
column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_FILETYPE) ||
- column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_NATIVELOCATION) ||
+ column == fieldIndex(ColumnCache::COLUMN_TRACKLOCATIONSTABLE_LOCATION) ||
column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_REPLAYGAIN) ||
column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_SAMPLERATE)) {
return readOnlyFlags(index);
diff --git a/src/library/basetracktablemodel.h b/src/library/basetracktablemodel.h
index d45923b518..3dcc3cc70f 100644
--- a/src/library/basetracktablemodel.h
+++ b/src/library/basetracktablemodel.h
@@ -167,7 +167,7 @@ class BaseTrackTableModel : public QAbstractTableModel, public TrackModel {
/// COLUMN_LIBRARYTABLE_GROUPING: QString (pass-through)
/// COLUMN_LIBRARYTABLE_TRACKNUMBER: QString (pass-through)
/// COLUMN_LIBRARYTABLE_FILETYPE: QString (pass-through)
- /// COLUMN_LIBRARYTABLE_NATIVELOCATION: QString (pass-through)
+ /// COLUMN_TRACKLOCATIONSTABLE_LOCATION: QString (pass-through)
/// COLUMN_LIBRARYTABLE_COMMENT: QString (pass-through)
/// COLUMN_LIBRARYTABLE_DURATION: double (seconds)/mixxx::Duration
/// COLUMN_LIBRARYTABLE_BITRATE: int (kbps)/mixxx::audio::Bitrate
diff --git a/src/library/columncache.cpp b/src/library/columncache.cpp
index c1e3f64446..5a12e356f6 100644
--- a/src/library/columncache.cpp
+++ b/src/library/columncache.cpp
@@ -48,7 +48,6 @@ void ColumnCache::setColumns(const QStringList& columns) {
insertColumnNameByEnum(COLUMN_LIBRARYTABLE_GROUPING, LIBRARYTABLE_GROUPING);
insertColumnNameByEnum(COLUMN_LIBRARYTABLE_TRACKNUMBER, LIBRARYTABLE_TRACKNUMBER);
insertColumnNameByEnum(COLUMN_LIBRARYTABLE_FILETYPE, LIBRARYTABLE_FILETYPE);
- insertColumnNameByEnum(COLUMN_LIBRARYTABLE_NATIVELOCATION, LIBRARYTABLE_LOCATION);
insertColumnNameByEnum(COLUMN_LIBRARYTABLE_COMMENT, LIBRARYTABLE_COMMENT);
insertColumnNameByEnum(COLUMN_LIBRARYTABLE_DURATION, LIBRARYTABLE_DURATION);
insertColumnNameByEnum(COLUMN_LIBRARYTABLE_BITRATE, LIBRARYTABLE_BITRATE);
@@ -76,14 +75,13 @@ void ColumnCache::setColumns(const QStringList& columns) {
insertColumnNameByEnum(COLUMN_LIBRARYTABLE_COVERART_LOCATION, LIBRARYTABLE_COVERART_LOCATION);
insertColumnNameByEnum(COLUMN_LIBRARYTABLE_COVERART_HASH, LIBRARYTABLE_COVERART_HASH);
+ insertColumnNameByEnum(COLUMN_TRACKLOCATIONSTABLE_LOCATION, TRACKLOCATIONSTABLE_LOCATION);
insertColumnNameByEnum(COLUMN_TRACKLOCATIONSTABLE_FSDELETED, TRACKLOCATIONSTABLE_FSDELETED);
insertColumnNameByEnum(COLUMN_PLAYLISTTRACKSTABLE_TRACKID, PLAYLISTTRACKSTABLE_TRACKID);
insertColumnNameByEnum(COLUMN_PLAYLISTTRACKSTABLE_POSITION, PLAYLISTTRACKSTABLE_POSITION);
insertColumnNameByEnum(COLUMN_PLAYLISTTRACKSTABLE_PLAYLISTID, PLAYLISTTRACKSTABLE_PLAYLISTID);
- insertColumnNameByEnum(COLUMN_PLAYLISTTRACKSTABLE_LOCATION, PLAYLISTTRACKSTABLE_LOCATION);
- insertColumnNameByEnum(COLUMN_PLAYLISTTRACKSTABLE_ARTIST, PLAYLISTTRACKSTABLE_ARTIST);
- insertColumnNameByEnum(COLUMN_PLAYLISTTRACKSTABLE_TITLE, PLAYLISTTRACKSTABLE_TITLE);
+
insertColumnNameByEnum(
COLUMN_PLAYLISTTRACKSTABLE_DATETIMEADDED,
PLAYLISTTRACKSTABLE_DATETIMEADDED);
@@ -112,16 +110,13 @@ void ColumnCache::setColumns(const QStringList& columns) {
insertColumnSortByEnum(COLUMN_LIBRARYTABLE_GROUPING, kSortNoCaseLex);
insertColumnSortByEnum(COLUMN_LIBRARYTABLE_TRACKNUMBER, kSortInt);
insertColumnSortByEnum(COLUMN_LIBRARYTABLE_FILETYPE, kSortNoCase);
- insertColumnSortByEnum(COLUMN_LIBRARYTABLE_NATIVELOCATION, kSortNoCase);
insertColumnSortByEnum(COLUMN_LIBRARYTABLE_COMMENT, kSortNoCaseLex);
insertColumnSortByEnum(COLUMN_LIBRARYTABLE_BITRATE, kSortInt);
insertColumnSortByEnum(COLUMN_LIBRARYTABLE_BPM, kSortInt);
insertColumnSortByEnum(COLUMN_LIBRARYTABLE_SAMPLERATE, kSortInt);
insertColumnSortByEnum(COLUMN_LIBRARYTABLE_TIMESPLAYED, kSortInt);
- insertColumnSortByEnum(COLUMN_PLAYLISTTRACKSTABLE_LOCATION, kSortNoCase);
- insertColumnSortByEnum(COLUMN_PLAYLISTTRACKSTABLE_ARTIST, kSortNoCase);
- insertColumnSortByEnum(COLUMN_PLAYLISTTRACKSTABLE_TITLE, kSortNoCase);
+ insertColumnSortByEnum(COLUMN_TRACKLOCATIONSTABLE_LOCATION, kSortNoCase);
slotSetKeySortOrder(m_pKeyNotationCP->get());
}
diff --git a/src/library/columncache.h b/src/library/columncache.h
index df1369516c..6f763665a8 100644
--- a/src/library/columncache.h
+++ b/src/library/columncache.h
@@ -13,7 +13,6 @@
class ColumnCache : public QObject {
Q_OBJECT
public:
-
enum Column {
COLUMN_LIBRARYTABLE_INVALID = -1,
COLUMN_LIBRARYTABLE_ID = 0,
@@ -27,7 +26,6 @@ class ColumnCache : public QObject {
COLUMN_LIBRARYTABLE_GROUPING,
COLUMN_LIBRARYTABLE_TRACKNUMBER,
COLUMN_LIBRARYTABLE_FILETYPE,
- COLUMN_LIBRARYTABLE_NATIVELOCATION,
COLUMN_LIBRARYTABLE_COMMENT,
COLUMN_LIBRARYTABLE_DURATION,
COLUMN_LIBRARYTABLE_BITRATE,
@@ -55,14 +53,12 @@ class ColumnCache : public QObject {
COLUMN_LIBRARYTABLE_COVERART_LOCATION,
COLUMN_LIBRARYTABLE_COVERART_HASH,
+ COLUMN_TRACKLOCATIONSTABLE_LOCATION,
COLUMN_TRACKLOCATIONSTABLE_FSDELETED,
COLUMN_PLAYLISTTRACKSTABLE_TRACKID,
COLUMN_PLAYLISTTRACKSTABLE_POSITION,
COLUMN_PLAYLISTTRACKSTABLE_PLAYLISTID,
- COLUMN_PLAYLISTTRACKSTABLE_LOCATION,
- COLUMN_PLAYLISTTRACKSTABLE_ARTIST,
- COLUMN_PLAYLISTTRACKSTABLE_TITLE,
COLUMN_PLAYLISTTRACKSTABLE_DATETIMEADDED,
COLUMN_REKORDBOX_ANALYZE_PATH,
diff --git a/src/library/dao/playlistdao.h b/src/library/dao/playlistdao.h
index 2d4fcabeb4..77d9c06156 100644
--- a/src/library/dao/playlistdao.h
+++ b/src/library/dao/playlistdao.h
@@ -22,9 +22,6 @@ const QString PLAYLISTTABLE_DATEMODIFIED = "date_modified";
const QString PLAYLISTTRACKSTABLE_TRACKID = "track_id";
const QString PLAYLISTTRACKSTABLE_POSITION = "position";
const QString PLAYLISTTRACKSTABLE_PLAYLISTID = "playlist_id";
-const QString PLAYLISTTRACKSTABLE_LOCATION = "location";
-const QString PLAYLISTTRACKSTABLE_ARTIST = "artist";
-const QString PLAYLISTTRACKSTABLE_TITLE = "title";
const QString PLAYLISTTRACKSTABLE_DATETIMEADDED = "pl_datetime_added";
#define AUTODJ_TABLE "Auto DJ"
diff --git a/src/library/dao/trackschema.h b/src/library/dao/trackschema.h
index befc626e47..4a41101f5f 100644
--- a/src/library/dao/trackschema.h
+++ b/src/library/dao/trackschema.h
@@ -16,7 +16,7 @@ const QString LIBRARYTABLE_COMPOSER = "composer";
const QString LIBRARYTABLE_GROUPING = "grouping";
const QString LIBRARYTABLE_TRACKNUMBER = "tracknumber";
const QString LIBRARYTABLE_FILETYPE = "filetype";
-const QString LIBRARYTABLE_LOCATION = "location";
+const QString LIBRARYTABLE_LOCATION_ID = "location";
const QString LIBRARYTABLE_COMMENT = "comment";
const QString LIBRARYTABLE_DURATION = "duration";
const QString LIBRARYTABLE_BITRATE = "bitrate";
diff --git a/src/library/parsercsv.cpp b/src/library/parsercsv.cpp
index 0970a80d78..be3cd5196d 100644
--- a/src/library/parsercsv.cpp
+++ b/src/library/parsercsv.cpp
@@ -181,7 +181,10 @@ bool ParserCsv::writeCSVFile(const QString &file_str, BaseSqlTableModel* pPlayli
}
out << "\"";
QString field = pPlaylistTableModel->data(pPlaylistTableModel->index(j,i)).toString();
- if (useRelativePath && i == pPlaylistTableModel->fieldIndex(ColumnCache::COLUMN_PLAYLISTTRACKSTABLE_LOCATION)) {
+ if (useRelativePath &&
+ i ==
+ pPlaylistTableModel->fieldIndex(ColumnCache::
+ COLUMN_TRACKLOCATIONSTABLE_LOCATION)) {
field = base_dir.relativeFilePath(field);
}
out << field.replace('\"', "\"\""); // escape "
@@ -236,12 +239,12 @@ bool ParserCsv::writeReadableTextFile(const QString &file_str, BaseSqlTableModel
}
}
- i = pPlaylistTableModel->fieldIndex(ColumnCache::COLUMN_PLAYLISTTRACKSTABLE_ARTIST);
+ i = pPlaylistTableModel->fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_ARTIST);
if (i >= 0) {
out << " ";
out << pPlaylistTableModel->data(pPlaylistTableModel->index(j,i)).toString();
}
- i = pPlaylistTableModel->fieldIndex(ColumnCache::COLUMN_PLAYLISTTRACKSTABLE_TITLE);
+ i = pPlaylistTableModel->fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_TITLE);
if (i >= 0) {
out << " - ";
out << pPlaylistTableModel->data(pPlaylistTableModel->index(j,i)).toString();;
diff --git a/src/library/playlisttablemodel.cpp b/src/library/playlisttablemodel.cpp
index cbd740229e..c06a23b10a 100644
--- a/src/library/playlisttablemodel.cpp
+++ b/src/library/playlisttablemodel.cpp
@@ -58,7 +58,7 @@ void PlaylistTableModel::initSortColumnMapping() {
fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_FILETYPE);
m_columnIndexBySortColumnId[static_cast<int>(
TrackModel::SortColumnId::NativeLocation)] =
- fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_NATIVELOCATION);
+ fieldIndex(ColumnCache::COLUMN_TRACKLOCATIONSTABLE_LOCATION);
m_columnIndexBySortColumnId[static_cast<int>(
TrackModel::SortColumnId::Comment)] =
fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_COMMENT);
diff --git a/src/library/rekordbox/rekordboxfeature.cpp b/src/library/rekordbox/rekordboxfeature.cpp
index 080333e4d6..4b16402b10 100644
--- a/src/library/rekordbox/rekordboxfeature.cpp
+++ b/src/library/rekordbox/rekordboxfeature.cpp
@@ -1071,7 +1071,7 @@ void RekordboxPlaylistModel::initSortColumnMapping() {
fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_FILETYPE);
m_columnIndexBySortColumnId[static_cast<int>(
TrackModel::SortColumnId::NativeLocation)] =
- fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_NATIVELOCATION);
+ fieldIndex(ColumnCache::COLUMN_TRACKLOCATIONSTABLE_LOCATION);
m_columnIndexBySortColumnId[static_cast<int>(
TrackModel::SortColumnId::Comment)] =
fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_COMMENT);
@@ -1233,7 +1233,7 @@ RekordboxFeature::RekordboxFeature(
<< LIBRARYTABLE_YEAR
<< LIBRARYTABLE_GENRE
<< LIBRARYTABLE_TRACKNUMBER
- << LIBRARYTABLE_LOCATION
+ << TRACKLOCATIONSTABLE_LOCATION
<< LIBRARYTABLE_COMMENT
<< LIBRARYTABLE_RATING
<< LIBRARYTABLE_DURATION
@@ -1252,7 +1252,7 @@ RekordboxFeature::RekordboxFeature(
<< LIBRARYTABLE_YEAR
<< LIBRARYTABLE_GENRE
<< LIBRARYTABLE_TRACKNUMBER
- << LIBRARYTABLE_LOCATION
+ << TRACKLOCATIONSTABLE_LOCATION
<< LIBRARYTABLE_COMMENT
<< LIBRARYTABLE_DURATION
<< LIBRARYTABLE_BITRATE
diff --git a/src/library/searchquery.cpp b/src/library/searchquery.cpp
index bb809f1250..b17785a359 100644
--- a/src/library/searchquery.cpp
+++ b/src/library/searchquery.cpp
@@ -33,7 +33,7 @@ QVariant getTrackValueForColumn(const TrackPointer& pTrack, const QString& colum
return pTrack->getType();
} else if (column == LIBRARYTABLE_TRACKNUMBER) {
return pTrack->getTrackNumber();
- } else if (column == LIBRARYTABLE_LOCATION) {
+ } else if (column == TRACKLOCATIONSTABLE_LOCATION) {
return QDir::toNativeSeparators(pTrack->getLocation());
} else if (column == LIBRARYTABLE_COMMENT) {
return pTrack->getComment();
diff --git a/src/library/serato/seratofeature.cpp b/src/library/serato/seratofeature.cpp
index 06d92aeb73..be6c26d56d 100644
--- a/src/library/serato/seratofeature.cpp
+++ b/src/library/serato/seratofeature.cpp
@@ -507,7 +507,7 @@ QString parseDatabase(mixxx::DbConnectionPoolPtr dbConnectionPool, TreeItem* dat
LIBRARYTABLE_SAMPLERATE + ", " +
LIBRARYTABLE_BPM + ", " +
LIBRARYTABLE_KEY + ", " +
- LIBRARYTABLE_LOCATION + ", " +
+ TRACKLOCATIONSTABLE_LOCATION + ", " +
LIBRARYTABLE_BPM_LOCK + ", " +
LIBRARYTABLE_DATETIMEADDED +
", "
@@ -866,7 +866,7 @@ SeratoFeature::SeratoFeature(
<< LIBRARYTABLE_BPM
<< LIBRARYTABLE_KEY
<< LIBRARYTABLE_TRACKNUMBER
- << LIBRARYTABLE_LOCATION
+ << TRACKLOCATIONSTABLE_LOCATION
<< LIBRARYTABLE_BPM_LOCK;
QStringList searchColumns;
@@ -877,7 +877,7 @@ SeratoFeature::SeratoFeature(
<< LIBRARYTABLE_YEAR
<< LIBRARYTABLE_GENRE
<< LIBRARYTABLE_TRACKNUMBER
- << LIBRARYTABLE_LOCATION
+ << TRACKLOCATIONSTABLE_LOCATION
<< LIBRARYTABLE_COMMENT
<< LIBRARYTABLE_DURATION
<< LIBRARYTABLE_BITRATE
diff --git a/src/library/serato/seratoplaylistmodel.cpp b/src/library/serato/seratoplaylistmodel.cpp
index 3fe689e12b..93fad052d8 100644
--- a/src/library/serato/seratoplaylistmodel.cpp
+++ b/src/library/serato/seratoplaylistmodel.cpp
@@ -40,7 +40,7 @@ void SeratoPlaylistModel::initSortColumnMapping() {
fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_FILETYPE);
m_columnIndexBySortColumnId[static_cast<int>(
TrackModel::SortColumnId::NativeLocation)] =
- fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_NATIVELOCATION);
+ fieldIndex(ColumnCache::COLUMN_TRACKLOCATIONSTABLE_LOCATION);
m_columnIndexBySortColumnId[static_cast<int>(TrackModel::SortColumnId::Comment)] =
fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_COMMENT);
m_columnIndexBySortColumnId[static_cast<int>(TrackModel::SortColumnId::Duration)] =