summaryrefslogtreecommitdiffstats
path: root/src/library/dao/trackschema.h
blob: 0284b4fc6a182cf7ad035d3f922c57500495f5ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#ifndef MIXXX_TRACKSCHEMA_H
#define MIXXX_TRACKSCHEMA_H

#include <QString>
#include <QStringList>

#define LIBRARY_TABLE "library"
#define TRACKLOCATIONS_TABLE "track_locations"

const QString LIBRARYTABLE_ID = "id";
const QString LIBRARYTABLE_ARTIST = "artist";
const QString LIBRARYTABLE_TITLE = "title";
const QString LIBRARYTABLE_ALBUM = "album";
const QString LIBRARYTABLE_ALBUMARTIST = "album_artist";
const QString LIBRARYTABLE_YEAR = "year";
const QString LIBRARYTABLE_GENRE = "genre";
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_COMMENT = "comment";
const QString LIBRARYTABLE_DURATION = "duration";
const QString LIBRARYTABLE_BITRATE = "bitrate";
const QString LIBRARYTABLE_BPM = "bpm";
const QString LIBRARYTABLE_REPLAYGAIN = "replaygain";
const QString LIBRARYTABLE_CUEPOINT = "cuepoint";
const QString LIBRARYTABLE_URL = "url";
const QString LIBRARYTABLE_SAMPLERATE = "samplerate";
const QString LIBRARYTABLE_WAVESUMMARYHEX = "wavesummaryhex";
const QString LIBRARYTABLE_CHANNELS = "channels";
const QString LIBRARYTABLE_MIXXXDELETED = "mixxx_deleted";
const QString LIBRARYTABLE_DATETIMEADDED = "datetime_added";
const QString LIBRARYTABLE_HEADERPARSED = "header_parsed";
const QString LIBRARYTABLE_TIMESPLAYED = "timesplayed";
const QString LIBRARYTABLE_PLAYED = "played";
const QString LIBRARYTABLE_RATING = "rating";
const QString LIBRARYTABLE_KEY = "key";
const QString LIBRARYTABLE_KEY_ID = "key_id";
const QString LIBRARYTABLE_BPM_LOCK = "bpm_lock";
const QString LIBRARYTABLE_PREVIEW = "preview";
const QString LIBRARYTABLE_COLOR = "color";
const QString LIBRARYTABLE_COVERART = "coverart";
const QString LIBRARYTABLE_COVERART_SOURCE = "coverart_source";
const QString LIBRARYTABLE_COVERART_TYPE = "coverart_type";
const QString LIBRARYTABLE_COVERART_LOCATION = "coverart_location";
const QString LIBRARYTABLE_COVERART_HASH = "coverart_hash";

const QString TRACKLOCATIONSTABLE_ID = "id";
const QString TRACKLOCATIONSTABLE_LOCATION = "location";
const QString TRACKLOCATIONSTABLE_FILENAME = "filename";
const QString TRACKLOCATIONSTABLE_DIRECTORY = "directory";
const QString TRACKLOCATIONSTABLE_FILESIZE = "filesize";
const QString TRACKLOCATIONSTABLE_FSDELETED = "fs_deleted";
const QString TRACKLOCATIONSTABLE_NEEDSVERIFICATION = "needs_verification";

const QString REKORDBOX_ANALYZE_PATH = "analyze_path";

const QStringList DEFAULT_COLUMNS = {
        LIBRARYTABLE_ID,
        LIBRARYTABLE_PLAYED,
        LIBRARYTABLE_TIMESPLAYED,
        //has to be up here otherwise Played and TimesPlayed are not shown
        LIBRARYTABLE_ALBUMARTIST,
        LIBRARYTABLE_ALBUM,
        LIBRARYTABLE_ARTIST,
        LIBRARYTABLE_TITLE,
        LIBRARYTABLE_YEAR,
        LIBRARYTABLE_RATING,
        LIBRARYTABLE_GENRE,
        LIBRARYTABLE_COMPOSER,
        LIBRARYTABLE_GROUPING,
        LIBRARYTABLE_TRACKNUMBER,
        LIBRARYTABLE_KEY,
        LIBRARYTABLE_KEY_ID,
        LIBRARYTABLE_BPM,
        LIBRARYTABLE_BPM_LOCK,
        LIBRARYTABLE_DURATION,
        LIBRARYTABLE_BITRATE,
        LIBRARYTABLE_REPLAYGAIN,
        LIBRARYTABLE_FILETYPE,
        LIBRARYTABLE_DATETIMEADDED,
        TRACKLOCATIONSTABLE_LOCATION,
        TRACKLOCATIONSTABLE_FSDELETED,
        LIBRARYTABLE_COMMENT,
        LIBRARYTABLE_MIXXXDELETED,
        LIBRARYTABLE_COLOR,
        LIBRARYTABLE_COVERART_SOURCE,
        LIBRARYTABLE_COVERART_TYPE,
        LIBRARYTABLE_COVERART_LOCATION,
        LIBRARYTABLE_COVERART_HASH};

namespace mixxx {
namespace TrackSchema {
// TableForColumn returns the name of the table that contains the named column.
QString tableForColumn(const QString& columnName);
} // namespace TrackSchema
} // namespace mixxx

#endif //MIXXX_TRACKSCHEMA_H