Merge lp:~jonathan-costers/mixxx/LP878931 into lp:~mixxxdevelopers/mixxx/trunk
- LP878931
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 2979 | ||||
Proposed branch: | lp:~jonathan-costers/mixxx/LP878931 | ||||
Merge into: | lp:~mixxxdevelopers/mixxx/trunk | ||||
Diff against target: |
1157 lines (+124/-303) 19 files modified
mixxx/res/schema.xml (+0/-288) mixxx/src/audiotagger.cpp (+26/-0) mixxx/src/audiotagger.h (+2/-0) mixxx/src/dlgtrackinfo.cpp (+3/-0) mixxx/src/dlgtrackinfo.ui (+21/-6) mixxx/src/library/basesqltablemodel.cpp (+4/-1) mixxx/src/library/basetrackcache.cpp (+2/-0) mixxx/src/library/browse/browsetablemodel.cpp (+5/-0) mixxx/src/library/browse/browsetablemodel.h (+1/-0) mixxx/src/library/browse/browsethread.cpp (+3/-0) mixxx/src/library/dao/trackdao.cpp (+12/-6) mixxx/src/library/dao/trackdao.h (+1/-0) mixxx/src/library/mixxxlibraryfeature.cpp (+1/-0) mixxx/src/library/trackcollection.cpp (+1/-1) mixxx/src/soundsource.cpp (+14/-0) mixxx/src/soundsource.h (+3/-0) mixxx/src/soundsourceproxy.cpp (+2/-1) mixxx/src/trackinfoobject.cpp (+16/-0) mixxx/src/trackinfoobject.h (+7/-0) |
||||
To merge this branch: | bzr merge lp:~jonathan-costers/mixxx/LP878931 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
RJ Skerry-Ryan | Approve | ||
Review via email: mp+87046@code.launchpad.net |
Commit message
Description of the change
Add Composer field to the library:
- DB revision 14, adding composer field to library table
- updated relevant models and DAOs
- updated library ui and track info dialog to show new field
- integrated new field with existing tag reading/writing
- 2983. By jonathan
-
use empty string as default value for composer field, instead of "?"
RJ Skerry-Ryan (rryan) wrote : | # |
RJ Skerry-Ryan (rryan) wrote : | # |
Looks good to me! Thanks Jonathan and nice job on making your code blend in with wherever you were writing it. As you have surely noticed there are a variety of different styles of code lurking around the codebase :).
I have one question. Is there a standard composer field for M4A files? I noticed you haven't updated SoundSource:
Is it ok if I add you to the credits as "Jonathan Costers"?
I'm merging this to trunk now and it will be in the 1.11.0 release later this year.
Jonathan Costers (jonathan-costers) wrote : | # |
Haha, yes I did notice.
Not a lot different from any other projects I've been involved with in the past, for that matter :-)
I must have overlooked M4A tagging ... Let me find out.
Thanks for adding me to the credits! Jonathan Costers is quite alright.
RJ Skerry-Ryan (rryan) wrote : | # |
I actually found a reference here:
http://
And added the appropriate parsing to trunk last night but I didn't test it.
On Sat, Jan 7, 2012 at 6:52 AM, Jonathan Costers <<email address hidden>
> wrote:
> Haha, yes I did notice.
> Not a lot different from any other projects I've been involved with in the
> past, for that matter :-)
>
> I must have overlooked M4A tagging ... Let me find out.
>
> Thanks for adding me to the credits! Jonathan Costers is quite alright.
> --
> https:/
> You are reviewing the proposed merge of
> lp:~jonathan-costers/mixxx/LP878931 into lp:mixxx.
>
Preview Diff
1 | === added file 'mixxx/res/schema.xml' | |||
2 | --- mixxx/res/schema.xml 1970-01-01 00:00:00 +0000 | |||
3 | +++ mixxx/res/schema.xml 2011-12-28 23:47:25 +0000 | |||
4 | @@ -0,0 +1,296 @@ | |||
5 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
6 | 2 | <!-- | ||
7 | 3 | This is the Mixxx schema history file. It keeps track of internal changes to the | ||
8 | 4 | Mixxx database schema and allows Mixxx to automatically upgrade itself to new | ||
9 | 5 | revisions of the schema on a version upgrade. | ||
10 | 6 | |||
11 | 7 | DO NOT EDIT THIS FILE OR YOU WILL BREAK YOUR MIXXX LIBRARY AND LOSE YOUR | ||
12 | 8 | METADATA | ||
13 | 9 | --> | ||
14 | 10 | <schema> | ||
15 | 11 | <revision version="1"> | ||
16 | 12 | <description> | ||
17 | 13 | The base schema for the Mixxx SQLITE database. | ||
18 | 14 | </description> | ||
19 | 15 | <sql> | ||
20 | 16 | CREATE TABLE IF NOT EXISTS settings ( | ||
21 | 17 | name TEXT UNIQUE NOT NULL, | ||
22 | 18 | value TEXT, | ||
23 | 19 | locked INTEGER DEFAULT 0, | ||
24 | 20 | hidden INTEGER DEFAULT 0); | ||
25 | 21 | |||
26 | 22 | CREATE TABLE IF NOT EXISTS track_locations ( | ||
27 | 23 | id INTEGER PRIMARY KEY AUTOINCREMENT, | ||
28 | 24 | location varchar(512) UNIQUE, | ||
29 | 25 | filename varchar(512), | ||
30 | 26 | directory varchar(512), | ||
31 | 27 | filesize INTEGER, | ||
32 | 28 | fs_deleted INTEGER, | ||
33 | 29 | needs_verification INTEGER); | ||
34 | 30 | |||
35 | 31 | CREATE TABLE IF NOT EXISTS LibraryHashes ( | ||
36 | 32 | directory_path VARCHAR(256) primary key, | ||
37 | 33 | hash INTEGER, | ||
38 | 34 | directory_deleted INTEGER); | ||
39 | 35 | |||
40 | 36 | CREATE TABLE IF NOT EXISTS library ( | ||
41 | 37 | id INTEGER primary key AUTOINCREMENT, | ||
42 | 38 | artist varchar(48), title varchar(48), | ||
43 | 39 | album varchar(48), year varchar(16), | ||
44 | 40 | genre varchar(32), tracknumber varchar(3), | ||
45 | 41 | location varchar(512) REFERENCES track_locations(location), | ||
46 | 42 | comment varchar(20), url varchar(256), | ||
47 | 43 | duration integer, | ||
48 | 44 | bitrate integer, samplerate integer, | ||
49 | 45 | cuepoint integer, bpm float, | ||
50 | 46 | wavesummaryhex blob, | ||
51 | 47 | channels integer, | ||
52 | 48 | datetime_added DEFAULT CURRENT_TIMESTAMP, | ||
53 | 49 | mixxx_deleted integer, | ||
54 | 50 | played integer); | ||
55 | 51 | |||
56 | 52 | CREATE TABLE Playlists ( | ||
57 | 53 | id INTEGER primary key, | ||
58 | 54 | name varchar(48), | ||
59 | 55 | position INTEGER, | ||
60 | 56 | hidden INTEGER DEFAULT 0 NOT NULL, | ||
61 | 57 | date_created datetime, | ||
62 | 58 | date_modified datetime); | ||
63 | 59 | |||
64 | 60 | CREATE TABLE PlaylistTracks ( | ||
65 | 61 | id INTEGER primary key, | ||
66 | 62 | playlist_id INTEGER REFERENCES Playlists(id), | ||
67 | 63 | track_id INTEGER REFERENCES library(id), | ||
68 | 64 | position INTEGER); | ||
69 | 65 | |||
70 | 66 | CREATE TABLE IF NOT EXISTS cues ( | ||
71 | 67 | id integer PRIMARY KEY AUTOINCREMENT, | ||
72 | 68 | track_id integer NOT NULL REFERENCES library(id), | ||
73 | 69 | type integer DEFAULT 0 NOT NULL, | ||
74 | 70 | position integer DEFAULT -1 NOT NULL, | ||
75 | 71 | length integer DEFAULT 0 NOT NULL, | ||
76 | 72 | hotcue integer DEFAULT -1 NOT NULL, | ||
77 | 73 | label text DEFAULT '' NOT NULL); | ||
78 | 74 | |||
79 | 75 | CREATE TABLE IF NOT EXISTS crates ( | ||
80 | 76 | id integer PRIMARY KEY AUTOINCREMENT, | ||
81 | 77 | name varchar(48) UNIQUE NOT NULL, | ||
82 | 78 | count integer DEFAULT 0, | ||
83 | 79 | show integer DEFAULT 1); | ||
84 | 80 | |||
85 | 81 | CREATE TABLE IF NOT EXISTS crate_tracks ( | ||
86 | 82 | crate_id integer NOT NULL REFERENCES crates(id), | ||
87 | 83 | track_id integer NOT NULL REFERENCES library(id), | ||
88 | 84 | UNIQUE (crate_id, track_id)); | ||
89 | 85 | |||
90 | 86 | </sql> | ||
91 | 87 | </revision> | ||
92 | 88 | <revision version="2"> | ||
93 | 89 | <description> | ||
94 | 90 | Add a header_parsed integer column to the library to indicate when a | ||
95 | 91 | track's tags have been parsed. | ||
96 | 92 | </description> | ||
97 | 93 | <sql> | ||
98 | 94 | ALTER TABLE library ADD COLUMN header_parsed integer DEFAULT 0; | ||
99 | 95 | </sql> | ||
100 | 96 | </revision> | ||
101 | 97 | <revision version="3"> | ||
102 | 98 | <description> | ||
103 | 99 | Change the location column to be a an integer. Change comment to be | ||
104 | 100 | varchar(256) and album/artist/title to be varchar(64). | ||
105 | 101 | </description> | ||
106 | 102 | <sql> | ||
107 | 103 | ALTER TABLE library RENAME TO library_old; | ||
108 | 104 | |||
109 | 105 | CREATE TABLE IF NOT EXISTS library ( | ||
110 | 106 | id INTEGER primary key AUTOINCREMENT, | ||
111 | 107 | artist varchar(64), | ||
112 | 108 | title varchar(64), | ||
113 | 109 | album varchar(64), | ||
114 | 110 | year varchar(16), | ||
115 | 111 | genre varchar(64), | ||
116 | 112 | tracknumber varchar(3), | ||
117 | 113 | location integer REFERENCES track_locations(location), | ||
118 | 114 | comment varchar(256), | ||
119 | 115 | url varchar(256), | ||
120 | 116 | duration integer, | ||
121 | 117 | bitrate integer, | ||
122 | 118 | samplerate integer, | ||
123 | 119 | cuepoint integer, | ||
124 | 120 | bpm float, | ||
125 | 121 | wavesummaryhex blob, | ||
126 | 122 | channels integer, | ||
127 | 123 | datetime_added DEFAULT CURRENT_TIMESTAMP, | ||
128 | 124 | mixxx_deleted integer, | ||
129 | 125 | played integer, | ||
130 | 126 | header_parsed integer DEFAULT 0); | ||
131 | 127 | |||
132 | 128 | INSERT INTO library (id, artist, title, album, year, genre, tracknumber, location, comment, url, duration, bitrate, samplerate, bpm, cuepoint, bpm, wavesummaryhex, channels, datetime_added, mixxx_deleted, played, header_parsed) SELECT id, artist, title, album, year, genre, tracknumber, location, comment, url, duration, bitrate, samplerate, bpm, cuepoint, bpm, wavesummaryhex, channels, datetime_added, mixxx_deleted, played, header_parsed from library_old; | ||
133 | 129 | |||
134 | 130 | DROP TABLE library_old; | ||
135 | 131 | </sql> | ||
136 | 132 | </revision> | ||
137 | 133 | <revision version="4"> | ||
138 | 134 | <description> | ||
139 | 135 | Add file type column. | ||
140 | 136 | </description> | ||
141 | 137 | <sql> | ||
142 | 138 | ALTER TABLE library ADD COLUMN filetype varchar(8) DEFAULT "?"; | ||
143 | 139 | </sql> | ||
144 | 140 | </revision> | ||
145 | 141 | <revision version="5"> | ||
146 | 142 | <description> | ||
147 | 143 | Add needs_verification column to library hashes table. | ||
148 | 144 | </description> | ||
149 | 145 | <sql> | ||
150 | 146 | ALTER TABLE LibraryHashes ADD COLUMN needs_verification INTEGER DEFAULT 0; | ||
151 | 147 | </sql> | ||
152 | 148 | </revision> | ||
153 | 149 | <revision version="6"> | ||
154 | 150 | <description> | ||
155 | 151 | Added a ReplayGain Column. | ||
156 | 152 | </description> | ||
157 | 153 | <sql> | ||
158 | 154 | ALTER TABLE library ADD COLUMN replaygain float DEFAULT 0; | ||
159 | 155 | </sql> | ||
160 | 156 | </revision> | ||
161 | 157 | <revision version="7" min_compatible="3"> | ||
162 | 158 | <description> | ||
163 | 159 | Add timesplayed and rating column. Reset header state. | ||
164 | 160 | </description> | ||
165 | 161 | <sql> | ||
166 | 162 | ALTER TABLE library ADD COLUMN timesplayed integer DEFAULT 0; | ||
167 | 163 | ALTER TABLE library ADD COLUMN rating integer DEFAULT 0; | ||
168 | 164 | ALTER TABLE library ADD COLUMN key varchar(8) DEFAULT ""; | ||
169 | 165 | UPDATE library SET timesplayed = played; | ||
170 | 166 | UPDATE library SET played = 0; | ||
171 | 167 | |||
172 | 168 | DELETE FROM settings WHERE name="mixxx.db.model.library.header_state"; | ||
173 | 169 | DELETE FROM settings WHERE name="mixxx.db.model.playlist.header_state"; | ||
174 | 170 | DELETE FROM settings WHERE name="mixxx.db.model.crate.header_state"; | ||
175 | 171 | DELETE FROM settings WHERE name="mixxx.db.model.prepare.header_state"; | ||
176 | 172 | DELETE FROM settings WHERE name="mixxx.db.model.missing.header_state"; | ||
177 | 173 | </sql> | ||
178 | 174 | </revision> | ||
179 | 175 | <revision version="8" min_compatible="3"> | ||
180 | 176 | <description> | ||
181 | 177 | Added iTunes tables | ||
182 | 178 | </description> | ||
183 | 179 | <sql> | ||
184 | 180 | CREATE TABLE IF NOT EXISTS itunes_library ( | ||
185 | 181 | id INTEGER primary key, | ||
186 | 182 | artist varchar(48), title varchar(48), | ||
187 | 183 | album varchar(48), year varchar(16), | ||
188 | 184 | genre varchar(32), tracknumber varchar(3), | ||
189 | 185 | location varchar(512), | ||
190 | 186 | comment varchar(60), | ||
191 | 187 | duration integer, | ||
192 | 188 | bitrate integer, | ||
193 | 189 | bpm integer, | ||
194 | 190 | rating integer); | ||
195 | 191 | |||
196 | 192 | CREATE TABLE IF NOT EXISTS itunes_playlists ( | ||
197 | 193 | id INTEGER primary key, | ||
198 | 194 | name varchar(100) UNIQUE); | ||
199 | 195 | |||
200 | 196 | CREATE TABLE IF NOT EXISTS itunes_playlist_tracks ( | ||
201 | 197 | id INTEGER primary key AUTOINCREMENT, | ||
202 | 198 | playlist_id INTEGER REFERENCES itunes_playlist(id), | ||
203 | 199 | track_id INTEGER REFERENCES itunes_library(id)); | ||
204 | 200 | </sql> | ||
205 | 201 | </revision> | ||
206 | 202 | <revision version="9" min_compatible="3"> | ||
207 | 203 | <description> | ||
208 | 204 | Tables for Traktor library feature | ||
209 | 205 | </description> | ||
210 | 206 | <sql> | ||
211 | 207 | CREATE TABLE IF NOT EXISTS traktor_library ( | ||
212 | 208 | id INTEGER primary key AUTOINCREMENT, | ||
213 | 209 | artist varchar(48), title varchar(48), | ||
214 | 210 | album varchar(48), year varchar(16), | ||
215 | 211 | genre varchar(32), tracknumber varchar(3), | ||
216 | 212 | location varchar(512) UNIQUE, | ||
217 | 213 | comment varchar(60), | ||
218 | 214 | duration integer, | ||
219 | 215 | bitrate integer, | ||
220 | 216 | bpm float, | ||
221 | 217 | key varchar(6), | ||
222 | 218 | rating integer | ||
223 | 219 | ); | ||
224 | 220 | CREATE TABLE IF NOT EXISTS traktor_playlists ( | ||
225 | 221 | id INTEGER primary key, | ||
226 | 222 | name varchar(100) UNIQUE | ||
227 | 223 | ); | ||
228 | 224 | CREATE TABLE IF NOT EXISTS traktor_playlist_tracks ( | ||
229 | 225 | id INTEGER primary key AUTOINCREMENT, | ||
230 | 226 | playlist_id INTEGER REFERENCES traktor_playlist(id), | ||
231 | 227 | track_id INTEGER REFERENCES traktor_library(id) | ||
232 | 228 | ); | ||
233 | 229 | </sql> | ||
234 | 230 | </revision> | ||
235 | 231 | <revision version="10" min_compatible="3"> | ||
236 | 232 | <description> | ||
237 | 233 | Playlist and crate locks | ||
238 | 234 | </description> | ||
239 | 235 | <sql> | ||
240 | 236 | ALTER TABLE crates ADD COLUMN locked integer DEFAULT 0; | ||
241 | 237 | ALTER TABLE playlists ADD COLUMN locked integer DEFAULT 0; | ||
242 | 238 | </sql> | ||
243 | 239 | </revision> | ||
244 | 240 | <revision version="11" min_compatible="3"> | ||
245 | 241 | <description> | ||
246 | 242 | Tables for Rhythmbox library feature | ||
247 | 243 | </description> | ||
248 | 244 | <sql> | ||
249 | 245 | CREATE TABLE IF NOT EXISTS rhythmbox_library ( | ||
250 | 246 | id INTEGER primary key AUTOINCREMENT, | ||
251 | 247 | artist varchar(48), title varchar(48), | ||
252 | 248 | album varchar(48), year varchar(16), | ||
253 | 249 | genre varchar(32), tracknumber varchar(3), | ||
254 | 250 | location varchar(512) UNIQUE, | ||
255 | 251 | comment varchar(60), | ||
256 | 252 | duration integer, | ||
257 | 253 | bitrate integer, | ||
258 | 254 | bpm float, | ||
259 | 255 | key varchar(6), | ||
260 | 256 | rating integer | ||
261 | 257 | ); | ||
262 | 258 | CREATE TABLE IF NOT EXISTS rhythmbox_playlists ( | ||
263 | 259 | id INTEGER primary key AUTOINCREMENT, | ||
264 | 260 | name varchar(100) UNIQUE | ||
265 | 261 | ); | ||
266 | 262 | CREATE TABLE IF NOT EXISTS rhythmbox_playlist_tracks ( | ||
267 | 263 | id INTEGER primary key AUTOINCREMENT, | ||
268 | 264 | playlist_id INTEGER REFERENCES rhythmbox_playlist(id), | ||
269 | 265 | track_id INTEGER REFERENCES rhythmbox_library(id) | ||
270 | 266 | ); | ||
271 | 267 | </sql> | ||
272 | 268 | </revision> | ||
273 | 269 | <revision version="12" min_compatible="3"> | ||
274 | 270 | <description> | ||
275 | 271 | Add beats column to library table. | ||
276 | 272 | </description> | ||
277 | 273 | <sql> | ||
278 | 274 | ALTER TABLE Library ADD COLUMN beats BLOB; | ||
279 | 275 | ALTER TABLE Library ADD COLUMN beats_version TEXT; | ||
280 | 276 | </sql> | ||
281 | 277 | </revision> | ||
282 | 278 | <revision version="13" min_compatible="3"> | ||
283 | 279 | <description> | ||
284 | 280 | Add position column to Rhythmbox, iTunes, and Traktor playlist tables. | ||
285 | 281 | </description> | ||
286 | 282 | <sql> | ||
287 | 283 | ALTER TABLE itunes_playlist_tracks ADD COLUMN position INTEGER DEFAULT 0; | ||
288 | 284 | ALTER TABLE rhythmbox_playlist_tracks ADD COLUMN position INTEGER DEFAULT 0; | ||
289 | 285 | ALTER TABLE traktor_playlist_tracks ADD COLUMN position INTEGER DEFAULT 0; | ||
290 | 286 | </sql> | ||
291 | 287 | </revision> | ||
292 | 288 | <revision version="14" min_compatible="3"> | ||
293 | 289 | <description> | ||
294 | 290 | Add composer column to library table. | ||
295 | 291 | </description> | ||
296 | 292 | <sql> | ||
297 | 293 | ALTER TABLE library ADD COLUMN composer varchar(64) DEFAULT ""; | ||
298 | 294 | </sql> | ||
299 | 295 | </revision> | ||
300 | 296 | </schema> | ||
301 | 0 | 297 | ||
302 | === removed file 'mixxx/res/schema.xml' | |||
303 | --- mixxx/res/schema.xml 2011-10-14 00:24:59 +0000 | |||
304 | +++ mixxx/res/schema.xml 1970-01-01 00:00:00 +0000 | |||
305 | @@ -1,288 +0,0 @@ | |||
306 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
307 | 2 | <!-- | ||
308 | 3 | This is the Mixxx schema history file. It keeps track of internal changes to the | ||
309 | 4 | Mixxx database schema and allows Mixxx to automatically upgrade itself to new | ||
310 | 5 | revisions of the schema on a version upgrade. | ||
311 | 6 | |||
312 | 7 | DO NOT EDIT THIS FILE OR YOU WILL BREAK YOUR MIXXX LIBRARY AND LOSE YOUR | ||
313 | 8 | METADATA | ||
314 | 9 | --> | ||
315 | 10 | <schema> | ||
316 | 11 | <revision version="1"> | ||
317 | 12 | <description> | ||
318 | 13 | The base schema for the Mixxx SQLITE database. | ||
319 | 14 | </description> | ||
320 | 15 | <sql> | ||
321 | 16 | CREATE TABLE IF NOT EXISTS settings ( | ||
322 | 17 | name TEXT UNIQUE NOT NULL, | ||
323 | 18 | value TEXT, | ||
324 | 19 | locked INTEGER DEFAULT 0, | ||
325 | 20 | hidden INTEGER DEFAULT 0); | ||
326 | 21 | |||
327 | 22 | CREATE TABLE IF NOT EXISTS track_locations ( | ||
328 | 23 | id INTEGER PRIMARY KEY AUTOINCREMENT, | ||
329 | 24 | location varchar(512) UNIQUE, | ||
330 | 25 | filename varchar(512), | ||
331 | 26 | directory varchar(512), | ||
332 | 27 | filesize INTEGER, | ||
333 | 28 | fs_deleted INTEGER, | ||
334 | 29 | needs_verification INTEGER); | ||
335 | 30 | |||
336 | 31 | CREATE TABLE IF NOT EXISTS LibraryHashes ( | ||
337 | 32 | directory_path VARCHAR(256) primary key, | ||
338 | 33 | hash INTEGER, | ||
339 | 34 | directory_deleted INTEGER); | ||
340 | 35 | |||
341 | 36 | CREATE TABLE IF NOT EXISTS library ( | ||
342 | 37 | id INTEGER primary key AUTOINCREMENT, | ||
343 | 38 | artist varchar(48), title varchar(48), | ||
344 | 39 | album varchar(48), year varchar(16), | ||
345 | 40 | genre varchar(32), tracknumber varchar(3), | ||
346 | 41 | location varchar(512) REFERENCES track_locations(location), | ||
347 | 42 | comment varchar(20), url varchar(256), | ||
348 | 43 | duration integer, | ||
349 | 44 | bitrate integer, samplerate integer, | ||
350 | 45 | cuepoint integer, bpm float, | ||
351 | 46 | wavesummaryhex blob, | ||
352 | 47 | channels integer, | ||
353 | 48 | datetime_added DEFAULT CURRENT_TIMESTAMP, | ||
354 | 49 | mixxx_deleted integer, | ||
355 | 50 | played integer); | ||
356 | 51 | |||
357 | 52 | CREATE TABLE Playlists ( | ||
358 | 53 | id INTEGER primary key, | ||
359 | 54 | name varchar(48), | ||
360 | 55 | position INTEGER, | ||
361 | 56 | hidden INTEGER DEFAULT 0 NOT NULL, | ||
362 | 57 | date_created datetime, | ||
363 | 58 | date_modified datetime); | ||
364 | 59 | |||
365 | 60 | CREATE TABLE PlaylistTracks ( | ||
366 | 61 | id INTEGER primary key, | ||
367 | 62 | playlist_id INTEGER REFERENCES Playlists(id), | ||
368 | 63 | track_id INTEGER REFERENCES library(id), | ||
369 | 64 | position INTEGER); | ||
370 | 65 | |||
371 | 66 | CREATE TABLE IF NOT EXISTS cues ( | ||
372 | 67 | id integer PRIMARY KEY AUTOINCREMENT, | ||
373 | 68 | track_id integer NOT NULL REFERENCES library(id), | ||
374 | 69 | type integer DEFAULT 0 NOT NULL, | ||
375 | 70 | position integer DEFAULT -1 NOT NULL, | ||
376 | 71 | length integer DEFAULT 0 NOT NULL, | ||
377 | 72 | hotcue integer DEFAULT -1 NOT NULL, | ||
378 | 73 | label text DEFAULT '' NOT NULL); | ||
379 | 74 | |||
380 | 75 | CREATE TABLE IF NOT EXISTS crates ( | ||
381 | 76 | id integer PRIMARY KEY AUTOINCREMENT, | ||
382 | 77 | name varchar(48) UNIQUE NOT NULL, | ||
383 | 78 | count integer DEFAULT 0, | ||
384 | 79 | show integer DEFAULT 1); | ||
385 | 80 | |||
386 | 81 | CREATE TABLE IF NOT EXISTS crate_tracks ( | ||
387 | 82 | crate_id integer NOT NULL REFERENCES crates(id), | ||
388 | 83 | track_id integer NOT NULL REFERENCES library(id), | ||
389 | 84 | UNIQUE (crate_id, track_id)); | ||
390 | 85 | |||
391 | 86 | </sql> | ||
392 | 87 | </revision> | ||
393 | 88 | <revision version="2"> | ||
394 | 89 | <description> | ||
395 | 90 | Add a header_parsed integer column to the library to indicate when a | ||
396 | 91 | track's tags have been parsed. | ||
397 | 92 | </description> | ||
398 | 93 | <sql> | ||
399 | 94 | ALTER TABLE library ADD COLUMN header_parsed integer DEFAULT 0; | ||
400 | 95 | </sql> | ||
401 | 96 | </revision> | ||
402 | 97 | <revision version="3"> | ||
403 | 98 | <description> | ||
404 | 99 | Change the location column to be a an integer. Change comment to be | ||
405 | 100 | varchar(256) and album/artist/title to be varchar(64). | ||
406 | 101 | </description> | ||
407 | 102 | <sql> | ||
408 | 103 | ALTER TABLE library RENAME TO library_old; | ||
409 | 104 | |||
410 | 105 | CREATE TABLE IF NOT EXISTS library ( | ||
411 | 106 | id INTEGER primary key AUTOINCREMENT, | ||
412 | 107 | artist varchar(64), | ||
413 | 108 | title varchar(64), | ||
414 | 109 | album varchar(64), | ||
415 | 110 | year varchar(16), | ||
416 | 111 | genre varchar(64), | ||
417 | 112 | tracknumber varchar(3), | ||
418 | 113 | location integer REFERENCES track_locations(location), | ||
419 | 114 | comment varchar(256), | ||
420 | 115 | url varchar(256), | ||
421 | 116 | duration integer, | ||
422 | 117 | bitrate integer, | ||
423 | 118 | samplerate integer, | ||
424 | 119 | cuepoint integer, | ||
425 | 120 | bpm float, | ||
426 | 121 | wavesummaryhex blob, | ||
427 | 122 | channels integer, | ||
428 | 123 | datetime_added DEFAULT CURRENT_TIMESTAMP, | ||
429 | 124 | mixxx_deleted integer, | ||
430 | 125 | played integer, | ||
431 | 126 | header_parsed integer DEFAULT 0); | ||
432 | 127 | |||
433 | 128 | INSERT INTO library (id, artist, title, album, year, genre, tracknumber, location, comment, url, duration, bitrate, samplerate, bpm, cuepoint, bpm, wavesummaryhex, channels, datetime_added, mixxx_deleted, played, header_parsed) SELECT id, artist, title, album, year, genre, tracknumber, location, comment, url, duration, bitrate, samplerate, bpm, cuepoint, bpm, wavesummaryhex, channels, datetime_added, mixxx_deleted, played, header_parsed from library_old; | ||
434 | 129 | |||
435 | 130 | DROP TABLE library_old; | ||
436 | 131 | </sql> | ||
437 | 132 | </revision> | ||
438 | 133 | <revision version="4"> | ||
439 | 134 | <description> | ||
440 | 135 | Add file type column. | ||
441 | 136 | </description> | ||
442 | 137 | <sql> | ||
443 | 138 | ALTER TABLE library ADD COLUMN filetype varchar(8) DEFAULT "?"; | ||
444 | 139 | </sql> | ||
445 | 140 | </revision> | ||
446 | 141 | <revision version="5"> | ||
447 | 142 | <description> | ||
448 | 143 | Add needs_verification column to library hashes table. | ||
449 | 144 | </description> | ||
450 | 145 | <sql> | ||
451 | 146 | ALTER TABLE LibraryHashes ADD COLUMN needs_verification INTEGER DEFAULT 0; | ||
452 | 147 | </sql> | ||
453 | 148 | </revision> | ||
454 | 149 | <revision version="6"> | ||
455 | 150 | <description> | ||
456 | 151 | Added a ReplayGain Column. | ||
457 | 152 | </description> | ||
458 | 153 | <sql> | ||
459 | 154 | ALTER TABLE library ADD COLUMN replaygain float DEFAULT 0; | ||
460 | 155 | </sql> | ||
461 | 156 | </revision> | ||
462 | 157 | <revision version="7" min_compatible="3"> | ||
463 | 158 | <description> | ||
464 | 159 | Add timesplayed and rating column. Reset header state. | ||
465 | 160 | </description> | ||
466 | 161 | <sql> | ||
467 | 162 | ALTER TABLE library ADD COLUMN timesplayed integer DEFAULT 0; | ||
468 | 163 | ALTER TABLE library ADD COLUMN rating integer DEFAULT 0; | ||
469 | 164 | ALTER TABLE library ADD COLUMN key varchar(8) DEFAULT ""; | ||
470 | 165 | UPDATE library SET timesplayed = played; | ||
471 | 166 | UPDATE library SET played = 0; | ||
472 | 167 | |||
473 | 168 | DELETE FROM settings WHERE name="mixxx.db.model.library.header_state"; | ||
474 | 169 | DELETE FROM settings WHERE name="mixxx.db.model.playlist.header_state"; | ||
475 | 170 | DELETE FROM settings WHERE name="mixxx.db.model.crate.header_state"; | ||
476 | 171 | DELETE FROM settings WHERE name="mixxx.db.model.prepare.header_state"; | ||
477 | 172 | DELETE FROM settings WHERE name="mixxx.db.model.missing.header_state"; | ||
478 | 173 | </sql> | ||
479 | 174 | </revision> | ||
480 | 175 | <revision version="8" min_compatible="3"> | ||
481 | 176 | <description> | ||
482 | 177 | Added iTunes tables | ||
483 | 178 | </description> | ||
484 | 179 | <sql> | ||
485 | 180 | CREATE TABLE IF NOT EXISTS itunes_library ( | ||
486 | 181 | id INTEGER primary key, | ||
487 | 182 | artist varchar(48), title varchar(48), | ||
488 | 183 | album varchar(48), year varchar(16), | ||
489 | 184 | genre varchar(32), tracknumber varchar(3), | ||
490 | 185 | location varchar(512), | ||
491 | 186 | comment varchar(60), | ||
492 | 187 | duration integer, | ||
493 | 188 | bitrate integer, | ||
494 | 189 | bpm integer, | ||
495 | 190 | rating integer); | ||
496 | 191 | |||
497 | 192 | CREATE TABLE IF NOT EXISTS itunes_playlists ( | ||
498 | 193 | id INTEGER primary key, | ||
499 | 194 | name varchar(100) UNIQUE); | ||
500 | 195 | |||
501 | 196 | CREATE TABLE IF NOT EXISTS itunes_playlist_tracks ( | ||
502 | 197 | id INTEGER primary key AUTOINCREMENT, | ||
503 | 198 | playlist_id INTEGER REFERENCES itunes_playlist(id), | ||
504 | 199 | track_id INTEGER REFERENCES itunes_library(id)); | ||
505 | 200 | </sql> | ||
506 | 201 | </revision> | ||
507 | 202 | <revision version="9" min_compatible="3"> | ||
508 | 203 | <description> | ||
509 | 204 | Tables for Traktor library feature | ||
510 | 205 | </description> | ||
511 | 206 | <sql> | ||
512 | 207 | CREATE TABLE IF NOT EXISTS traktor_library ( | ||
513 | 208 | id INTEGER primary key AUTOINCREMENT, | ||
514 | 209 | artist varchar(48), title varchar(48), | ||
515 | 210 | album varchar(48), year varchar(16), | ||
516 | 211 | genre varchar(32), tracknumber varchar(3), | ||
517 | 212 | location varchar(512) UNIQUE, | ||
518 | 213 | comment varchar(60), | ||
519 | 214 | duration integer, | ||
520 | 215 | bitrate integer, | ||
521 | 216 | bpm float, | ||
522 | 217 | key varchar(6), | ||
523 | 218 | rating integer | ||
524 | 219 | ); | ||
525 | 220 | CREATE TABLE IF NOT EXISTS traktor_playlists ( | ||
526 | 221 | id INTEGER primary key, | ||
527 | 222 | name varchar(100) UNIQUE | ||
528 | 223 | ); | ||
529 | 224 | CREATE TABLE IF NOT EXISTS traktor_playlist_tracks ( | ||
530 | 225 | id INTEGER primary key AUTOINCREMENT, | ||
531 | 226 | playlist_id INTEGER REFERENCES traktor_playlist(id), | ||
532 | 227 | track_id INTEGER REFERENCES traktor_library(id) | ||
533 | 228 | ); | ||
534 | 229 | </sql> | ||
535 | 230 | </revision> | ||
536 | 231 | <revision version="10" min_compatible="3"> | ||
537 | 232 | <description> | ||
538 | 233 | Playlist and crate locks | ||
539 | 234 | </description> | ||
540 | 235 | <sql> | ||
541 | 236 | ALTER TABLE crates ADD COLUMN locked integer DEFAULT 0; | ||
542 | 237 | ALTER TABLE playlists ADD COLUMN locked integer DEFAULT 0; | ||
543 | 238 | </sql> | ||
544 | 239 | </revision> | ||
545 | 240 | <revision version="11" min_compatible="3"> | ||
546 | 241 | <description> | ||
547 | 242 | Tables for Rhythmbox library feature | ||
548 | 243 | </description> | ||
549 | 244 | <sql> | ||
550 | 245 | CREATE TABLE IF NOT EXISTS rhythmbox_library ( | ||
551 | 246 | id INTEGER primary key AUTOINCREMENT, | ||
552 | 247 | artist varchar(48), title varchar(48), | ||
553 | 248 | album varchar(48), year varchar(16), | ||
554 | 249 | genre varchar(32), tracknumber varchar(3), | ||
555 | 250 | location varchar(512) UNIQUE, | ||
556 | 251 | comment varchar(60), | ||
557 | 252 | duration integer, | ||
558 | 253 | bitrate integer, | ||
559 | 254 | bpm float, | ||
560 | 255 | key varchar(6), | ||
561 | 256 | rating integer | ||
562 | 257 | ); | ||
563 | 258 | CREATE TABLE IF NOT EXISTS rhythmbox_playlists ( | ||
564 | 259 | id INTEGER primary key AUTOINCREMENT, | ||
565 | 260 | name varchar(100) UNIQUE | ||
566 | 261 | ); | ||
567 | 262 | CREATE TABLE IF NOT EXISTS rhythmbox_playlist_tracks ( | ||
568 | 263 | id INTEGER primary key AUTOINCREMENT, | ||
569 | 264 | playlist_id INTEGER REFERENCES rhythmbox_playlist(id), | ||
570 | 265 | track_id INTEGER REFERENCES rhythmbox_library(id) | ||
571 | 266 | ); | ||
572 | 267 | </sql> | ||
573 | 268 | </revision> | ||
574 | 269 | <revision version="12" min_compatible="3"> | ||
575 | 270 | <description> | ||
576 | 271 | Add beats column to library table. | ||
577 | 272 | </description> | ||
578 | 273 | <sql> | ||
579 | 274 | ALTER TABLE Library ADD COLUMN beats BLOB; | ||
580 | 275 | ALTER TABLE Library ADD COLUMN beats_version TEXT; | ||
581 | 276 | </sql> | ||
582 | 277 | </revision> | ||
583 | 278 | <revision version="13" min_compatible="3"> | ||
584 | 279 | <description> | ||
585 | 280 | Add position column to Rhythmbox, iTunes, and Traktor playlist tables. | ||
586 | 281 | </description> | ||
587 | 282 | <sql> | ||
588 | 283 | ALTER TABLE itunes_playlist_tracks ADD COLUMN position INTEGER DEFAULT 0; | ||
589 | 284 | ALTER TABLE rhythmbox_playlist_tracks ADD COLUMN position INTEGER DEFAULT 0; | ||
590 | 285 | ALTER TABLE traktor_playlist_tracks ADD COLUMN position INTEGER DEFAULT 0; | ||
591 | 286 | </sql> | ||
592 | 287 | </revision> | ||
593 | 288 | </schema> | ||
594 | 289 | 0 | ||
595 | === modified file 'mixxx/src/audiotagger.cpp' | |||
596 | --- mixxx/src/audiotagger.cpp 2011-04-15 11:09:14 +0000 | |||
597 | +++ mixxx/src/audiotagger.cpp 2011-12-28 23:47:25 +0000 | |||
598 | @@ -26,6 +26,7 @@ | |||
599 | 26 | m_artist = ""; | 26 | m_artist = ""; |
600 | 27 | m_title = ""; | 27 | m_title = ""; |
601 | 28 | m_genre = ""; | 28 | m_genre = ""; |
602 | 29 | m_composer = ""; | ||
603 | 29 | m_album = ""; | 30 | m_album = ""; |
604 | 30 | m_year = ""; | 31 | m_year = ""; |
605 | 31 | m_comment = ""; | 32 | m_comment = ""; |
606 | @@ -69,6 +70,11 @@ | |||
607 | 69 | } | 70 | } |
608 | 70 | 71 | ||
609 | 71 | 72 | ||
610 | 73 | void AudioTagger::setComposer (QString composer ) | ||
611 | 74 | { | ||
612 | 75 | m_composer = composer; | ||
613 | 76 | } | ||
614 | 77 | |||
615 | 72 | 78 | ||
616 | 73 | void AudioTagger::setYear (QString year ) | 79 | void AudioTagger::setYear (QString year ) |
617 | 74 | { | 80 | { |
618 | @@ -219,6 +225,22 @@ | |||
619 | 219 | 225 | ||
620 | 220 | } | 226 | } |
621 | 221 | 227 | ||
622 | 228 | TagLib::ID3v2::FrameList composerFrame = id3v2->frameListMap()["TCOM"]; | ||
623 | 229 | if (!composerFrame.isEmpty()) | ||
624 | 230 | { | ||
625 | 231 | composerFrame.front()->setText(m_composer.toStdString()); | ||
626 | 232 | |||
627 | 233 | } | ||
628 | 234 | else | ||
629 | 235 | { | ||
630 | 236 | //add new frame | ||
631 | 237 | TagLib::ID3v2::TextIdentificationFrame* newFrame = new TagLib::ID3v2::TextIdentificationFrame("TCOM", TagLib::String::Latin1); | ||
632 | 238 | |||
633 | 239 | newFrame->setText(m_composer.toStdString()); | ||
634 | 240 | id3v2->addFrame(newFrame); | ||
635 | 241 | |||
636 | 242 | } | ||
637 | 243 | |||
638 | 222 | } | 244 | } |
639 | 223 | void AudioTagger::addAPETag(TagLib::APE::Tag* ape) | 245 | void AudioTagger::addAPETag(TagLib::APE::Tag* ape) |
640 | 224 | { | 246 | { |
641 | @@ -230,6 +252,7 @@ | |||
642 | 230 | ape->addValue("BPM",m_bpm.toStdString(), true); | 252 | ape->addValue("BPM",m_bpm.toStdString(), true); |
643 | 231 | ape->addValue("BPM",m_bpm.toStdString(), true); | 253 | ape->addValue("BPM",m_bpm.toStdString(), true); |
644 | 232 | 254 | ||
645 | 255 | ape->addValue("Composer",m_composer.toStdString(), true); | ||
646 | 233 | 256 | ||
647 | 234 | } | 257 | } |
648 | 235 | void AudioTagger::addXiphComment(TagLib::Ogg::XiphComment* xiph) | 258 | void AudioTagger::addXiphComment(TagLib::Ogg::XiphComment* xiph) |
649 | @@ -252,6 +275,9 @@ | |||
650 | 252 | xiph->removeField("KEY"); | 275 | xiph->removeField("KEY"); |
651 | 253 | xiph->addField("KEY", m_key.toStdString()); | 276 | xiph->addField("KEY", m_key.toStdString()); |
652 | 254 | 277 | ||
653 | 278 | xiph->removeField("COMPOSER"); | ||
654 | 279 | xiph->addField("COMPOSER", m_key.toStdString()); | ||
655 | 280 | |||
656 | 255 | } | 281 | } |
657 | 256 | void AudioTagger::processMP4Tag(TagLib::MP4::Tag* mp4) | 282 | void AudioTagger::processMP4Tag(TagLib::MP4::Tag* mp4) |
658 | 257 | { | 283 | { |
659 | 258 | 284 | ||
660 | === modified file 'mixxx/src/audiotagger.h' | |||
661 | --- mixxx/src/audiotagger.h 2011-04-10 18:23:52 +0000 | |||
662 | +++ mixxx/src/audiotagger.h 2011-12-28 23:47:25 +0000 | |||
663 | @@ -21,6 +21,7 @@ | |||
664 | 21 | void setTitle (QString title ); | 21 | void setTitle (QString title ); |
665 | 22 | void setAlbum (QString album ); | 22 | void setAlbum (QString album ); |
666 | 23 | void setGenre (QString genre ); | 23 | void setGenre (QString genre ); |
667 | 24 | void setComposer (QString composer ); | ||
668 | 24 | void setYear (QString year ); | 25 | void setYear (QString year ); |
669 | 25 | void setComment (QString comment ); | 26 | void setComment (QString comment ); |
670 | 26 | void setKey (QString key ); | 27 | void setKey (QString key ); |
671 | @@ -33,6 +34,7 @@ | |||
672 | 33 | QString m_artist; | 34 | QString m_artist; |
673 | 34 | QString m_title; | 35 | QString m_title; |
674 | 35 | QString m_genre; | 36 | QString m_genre; |
675 | 37 | QString m_composer; | ||
676 | 36 | QString m_album; | 38 | QString m_album; |
677 | 37 | QString m_year; | 39 | QString m_year; |
678 | 38 | QString m_comment; | 40 | QString m_comment; |
679 | 39 | 41 | ||
680 | === modified file 'mixxx/src/dlgtrackinfo.cpp' | |||
681 | --- mixxx/src/dlgtrackinfo.cpp 2011-12-18 20:23:14 +0000 | |||
682 | +++ mixxx/src/dlgtrackinfo.cpp 2011-12-28 23:47:25 +0000 | |||
683 | @@ -103,6 +103,7 @@ | |||
684 | 103 | txtArtist->setText(pTrack->getArtist()); | 103 | txtArtist->setText(pTrack->getArtist()); |
685 | 104 | txtAlbum->setText(pTrack->getAlbum()); | 104 | txtAlbum->setText(pTrack->getAlbum()); |
686 | 105 | txtGenre->setText(pTrack->getGenre()); | 105 | txtGenre->setText(pTrack->getGenre()); |
687 | 106 | txtComposer->setText(pTrack->getComposer()); | ||
688 | 106 | txtYear->setText(pTrack->getYear()); | 107 | txtYear->setText(pTrack->getYear()); |
689 | 107 | txtTrackNumber->setText(pTrack->getTrackNumber()); | 108 | txtTrackNumber->setText(pTrack->getTrackNumber()); |
690 | 108 | txtComment->setText(pTrack->getComment()); | 109 | txtComment->setText(pTrack->getComment()); |
691 | @@ -198,6 +199,7 @@ | |||
692 | 198 | m_pLoadedTrack->setArtist(txtArtist->text()); | 199 | m_pLoadedTrack->setArtist(txtArtist->text()); |
693 | 199 | m_pLoadedTrack->setAlbum(txtAlbum->text()); | 200 | m_pLoadedTrack->setAlbum(txtAlbum->text()); |
694 | 200 | m_pLoadedTrack->setGenre(txtGenre->text()); | 201 | m_pLoadedTrack->setGenre(txtGenre->text()); |
695 | 202 | m_pLoadedTrack->setComposer(txtComposer->text()); | ||
696 | 201 | m_pLoadedTrack->setYear(txtYear->text()); | 203 | m_pLoadedTrack->setYear(txtYear->text()); |
697 | 202 | m_pLoadedTrack->setTrackNumber(txtTrackNumber->text()); | 204 | m_pLoadedTrack->setTrackNumber(txtTrackNumber->text()); |
698 | 203 | m_pLoadedTrack->setBpm(spinBpm->value()); | 205 | m_pLoadedTrack->setBpm(spinBpm->value()); |
699 | @@ -253,6 +255,7 @@ | |||
700 | 253 | txtArtist->setText(""); | 255 | txtArtist->setText(""); |
701 | 254 | txtAlbum->setText(""); | 256 | txtAlbum->setText(""); |
702 | 255 | txtGenre->setText(""); | 257 | txtGenre->setText(""); |
703 | 258 | txtComposer->setText(""); | ||
704 | 256 | txtYear->setText(""); | 259 | txtYear->setText(""); |
705 | 257 | txtTrackNumber->setText(""); | 260 | txtTrackNumber->setText(""); |
706 | 258 | txtComment->setText(""); | 261 | txtComment->setText(""); |
707 | 259 | 262 | ||
708 | === modified file 'mixxx/src/dlgtrackinfo.ui' | |||
709 | --- mixxx/src/dlgtrackinfo.ui 2011-10-05 16:29:58 +0000 | |||
710 | +++ mixxx/src/dlgtrackinfo.ui 2011-12-28 23:47:25 +0000 | |||
711 | @@ -7,7 +7,7 @@ | |||
712 | 7 | <x>0</x> | 7 | <x>0</x> |
713 | 8 | <y>0</y> | 8 | <y>0</y> |
714 | 9 | <width>448</width> | 9 | <width>448</width> |
716 | 10 | <height>571</height> | 10 | <height>615</height> |
717 | 11 | </rect> | 11 | </rect> |
718 | 12 | </property> | 12 | </property> |
719 | 13 | <property name="windowTitle"> | 13 | <property name="windowTitle"> |
720 | @@ -135,7 +135,22 @@ | |||
721 | 135 | <item row="5" column="1" colspan="3"> | 135 | <item row="5" column="1" colspan="3"> |
722 | 136 | <widget class="QLineEdit" name="txtGenre"/> | 136 | <widget class="QLineEdit" name="txtGenre"/> |
723 | 137 | </item> | 137 | </item> |
724 | 138 | |||
725 | 138 | <item row="6" column="0"> | 139 | <item row="6" column="0"> |
726 | 140 | <widget class="QLabel" name="label_11"> | ||
727 | 141 | <property name="text"> | ||
728 | 142 | <string>Composer:</string> | ||
729 | 143 | </property> | ||
730 | 144 | <property name="buddy" > | ||
731 | 145 | <cstring>txtComposer</cstring> | ||
732 | 146 | </property> | ||
733 | 147 | </widget> | ||
734 | 148 | </item> | ||
735 | 149 | <item row="6" column="1" colspan="3"> | ||
736 | 150 | <widget class="QLineEdit" name="txtComposer"/> | ||
737 | 151 | </item> | ||
738 | 152 | |||
739 | 153 | <item row="7" column="0"> | ||
740 | 139 | <widget class="QLabel" name="label_5"> | 154 | <widget class="QLabel" name="label_5"> |
741 | 140 | <property name="text"> | 155 | <property name="text"> |
742 | 141 | <string>Filename:</string> | 156 | <string>Filename:</string> |
743 | @@ -145,7 +160,7 @@ | |||
744 | 145 | </property> | 160 | </property> |
745 | 146 | </widget> | 161 | </widget> |
746 | 147 | </item> | 162 | </item> |
748 | 148 | <item row="6" column="1" colspan="3"> | 163 | <item row="7" column="1" colspan="3"> |
749 | 149 | <widget class="QLineEdit" name="txtFilepath"> | 164 | <widget class="QLineEdit" name="txtFilepath"> |
750 | 150 | <property name="enabled"> | 165 | <property name="enabled"> |
751 | 151 | <bool>true</bool> | 166 | <bool>true</bool> |
752 | @@ -169,21 +184,21 @@ | |||
753 | 169 | </property> | 184 | </property> |
754 | 170 | </widget> | 185 | </widget> |
755 | 171 | </item> | 186 | </item> |
757 | 172 | <item row="8" column="2"> | 187 | <item row="9" column="2"> |
758 | 173 | <widget class="QLabel" name="Type"> | 188 | <widget class="QLabel" name="Type"> |
759 | 174 | <property name="text"> | 189 | <property name="text"> |
760 | 175 | <string>File Type:</string> | 190 | <string>File Type:</string> |
761 | 176 | </property> | 191 | </property> |
762 | 177 | </widget> | 192 | </widget> |
763 | 178 | </item> | 193 | </item> |
765 | 179 | <item row="8" column="3"> | 194 | <item row="9" column="3"> |
766 | 180 | <widget class="QLabel" name="txtType"> | 195 | <widget class="QLabel" name="txtType"> |
767 | 181 | <property name="text"> | 196 | <property name="text"> |
768 | 182 | <string>77</string> | 197 | <string>77</string> |
769 | 183 | </property> | 198 | </property> |
770 | 184 | </widget> | 199 | </widget> |
771 | 185 | </item> | 200 | </item> |
773 | 186 | <item row="9" column="0"> | 201 | <item row="10" column="0"> |
774 | 187 | <widget class="QLabel" name="label_4"> | 202 | <widget class="QLabel" name="label_4"> |
775 | 188 | <property name="text"> | 203 | <property name="text"> |
776 | 189 | <string>Comments:</string> | 204 | <string>Comments:</string> |
777 | @@ -193,7 +208,7 @@ | |||
778 | 193 | </property> | 208 | </property> |
779 | 194 | </widget> | 209 | </widget> |
780 | 195 | </item> | 210 | </item> |
782 | 196 | <item row="9" column="1" colspan="3"> | 211 | <item row="10" column="1" colspan="3"> |
783 | 197 | <widget class="QTextEdit" name="txtComment"> | 212 | <widget class="QTextEdit" name="txtComment"> |
784 | 198 | <property name="tabChangesFocus"> | 213 | <property name="tabChangesFocus"> |
785 | 199 | <bool>true</bool> | 214 | <bool>true</bool> |
786 | 200 | 215 | ||
787 | === modified file 'mixxx/src/library/basesqltablemodel.cpp' | |||
788 | --- mixxx/src/library/basesqltablemodel.cpp 2011-12-18 18:50:40 +0000 | |||
789 | +++ mixxx/src/library/basesqltablemodel.cpp 2011-12-28 23:47:25 +0000 | |||
790 | @@ -43,6 +43,8 @@ | |||
791 | 43 | Qt::Horizontal, tr("Album")); | 43 | Qt::Horizontal, tr("Album")); |
792 | 44 | setHeaderData(fieldIndex(LIBRARYTABLE_GENRE), | 44 | setHeaderData(fieldIndex(LIBRARYTABLE_GENRE), |
793 | 45 | Qt::Horizontal, tr("Genre")); | 45 | Qt::Horizontal, tr("Genre")); |
794 | 46 | setHeaderData(fieldIndex(LIBRARYTABLE_COMPOSER), | ||
795 | 47 | Qt::Horizontal, tr("Composer")); | ||
796 | 46 | setHeaderData(fieldIndex(LIBRARYTABLE_YEAR), | 48 | setHeaderData(fieldIndex(LIBRARYTABLE_YEAR), |
797 | 47 | Qt::Horizontal, tr("Year")); | 49 | Qt::Horizontal, tr("Year")); |
798 | 48 | setHeaderData(fieldIndex(LIBRARYTABLE_FILETYPE), | 50 | setHeaderData(fieldIndex(LIBRARYTABLE_FILETYPE), |
799 | @@ -528,7 +530,6 @@ | |||
800 | 528 | // waveform widget to load a track into a Player). | 530 | // waveform widget to load a track into a Player). |
801 | 529 | defaultFlags |= Qt::ItemIsDragEnabled; | 531 | defaultFlags |= Qt::ItemIsDragEnabled; |
802 | 530 | 532 | ||
803 | 531 | int row = index.row(); | ||
804 | 532 | int column = index.column(); | 533 | int column = index.column(); |
805 | 533 | 534 | ||
806 | 534 | if ( column == fieldIndex(LIBRARYTABLE_FILETYPE) | 535 | if ( column == fieldIndex(LIBRARYTABLE_FILETYPE) |
807 | @@ -609,6 +610,8 @@ | |||
808 | 609 | pTrack->setYear(value.toString()); | 610 | pTrack->setYear(value.toString()); |
809 | 610 | } else if (fieldIndex(LIBRARYTABLE_GENRE) == column) { | 611 | } else if (fieldIndex(LIBRARYTABLE_GENRE) == column) { |
810 | 611 | pTrack->setGenre(value.toString()); | 612 | pTrack->setGenre(value.toString()); |
811 | 613 | } else if (fieldIndex(LIBRARYTABLE_COMPOSER) == column) { | ||
812 | 614 | pTrack->setComposer(value.toString()); | ||
813 | 612 | } else if (fieldIndex(LIBRARYTABLE_FILETYPE) == column) { | 615 | } else if (fieldIndex(LIBRARYTABLE_FILETYPE) == column) { |
814 | 613 | pTrack->setType(value.toString()); | 616 | pTrack->setType(value.toString()); |
815 | 614 | } else if (fieldIndex(LIBRARYTABLE_TRACKNUMBER) == column) { | 617 | } else if (fieldIndex(LIBRARYTABLE_TRACKNUMBER) == column) { |
816 | 615 | 618 | ||
817 | === modified file 'mixxx/src/library/basetrackcache.cpp' | |||
818 | --- mixxx/src/library/basetrackcache.cpp 2011-12-18 20:25:07 +0000 | |||
819 | +++ mixxx/src/library/basetrackcache.cpp 2011-12-28 23:47:25 +0000 | |||
820 | @@ -238,6 +238,8 @@ | |||
821 | 238 | return QVariant(pTrack->getDateAdded()); | 238 | return QVariant(pTrack->getDateAdded()); |
822 | 239 | } else if (fieldIndex(LIBRARYTABLE_GENRE) == column) { | 239 | } else if (fieldIndex(LIBRARYTABLE_GENRE) == column) { |
823 | 240 | return QVariant(pTrack->getGenre()); | 240 | return QVariant(pTrack->getGenre()); |
824 | 241 | } else if (fieldIndex(LIBRARYTABLE_COMPOSER) == column) { | ||
825 | 242 | return QVariant(pTrack->getComposer()); | ||
826 | 241 | } else if (fieldIndex(LIBRARYTABLE_FILETYPE) == column) { | 243 | } else if (fieldIndex(LIBRARYTABLE_FILETYPE) == column) { |
827 | 242 | return QVariant(pTrack->getType()); | 244 | return QVariant(pTrack->getType()); |
828 | 243 | } else if (fieldIndex(LIBRARYTABLE_TRACKNUMBER) == column) { | 245 | } else if (fieldIndex(LIBRARYTABLE_TRACKNUMBER) == column) { |
829 | 244 | 246 | ||
830 | === modified file 'mixxx/src/library/browse/browsetablemodel.cpp' | |||
831 | --- mixxx/src/library/browse/browsetablemodel.cpp 2011-12-22 10:56:03 +0000 | |||
832 | +++ mixxx/src/library/browse/browsetablemodel.cpp 2011-12-28 23:47:25 +0000 | |||
833 | @@ -31,6 +31,7 @@ | |||
834 | 31 | header_data.insert(COLUMN_TRACK_NUMBER, tr("Track #")); | 31 | header_data.insert(COLUMN_TRACK_NUMBER, tr("Track #")); |
835 | 32 | header_data.insert(COLUMN_YEAR, tr("Year")); | 32 | header_data.insert(COLUMN_YEAR, tr("Year")); |
836 | 33 | header_data.insert(COLUMN_GENRE, tr("Genre")); | 33 | header_data.insert(COLUMN_GENRE, tr("Genre")); |
837 | 34 | header_data.insert(COLUMN_COMPOSER, tr("Composer")); | ||
838 | 34 | header_data.insert(COLUMN_COMMENT, tr("Comment")); | 35 | header_data.insert(COLUMN_COMMENT, tr("Comment")); |
839 | 35 | header_data.insert(COLUMN_DURATION, tr("Duration")); | 36 | header_data.insert(COLUMN_DURATION, tr("Duration")); |
840 | 36 | header_data.insert(COLUMN_BPM, tr("BPM")); | 37 | header_data.insert(COLUMN_BPM, tr("BPM")); |
841 | @@ -44,6 +45,7 @@ | |||
842 | 44 | addSearchColumn(COLUMN_ALBUM); | 45 | addSearchColumn(COLUMN_ALBUM); |
843 | 45 | addSearchColumn(COLUMN_TITLE); | 46 | addSearchColumn(COLUMN_TITLE); |
844 | 46 | addSearchColumn(COLUMN_GENRE); | 47 | addSearchColumn(COLUMN_GENRE); |
845 | 48 | addSearchColumn(COLUMN_COMPOSER); | ||
846 | 47 | addSearchColumn(COLUMN_KEY); | 49 | addSearchColumn(COLUMN_KEY); |
847 | 48 | addSearchColumn(COLUMN_COMMENT); | 50 | addSearchColumn(COLUMN_COMMENT); |
848 | 49 | 51 | ||
849 | @@ -336,6 +338,7 @@ | |||
850 | 336 | tagger.setTracknumber(this->index(row,COLUMN_TRACK_NUMBER).data().toString()); | 338 | tagger.setTracknumber(this->index(row,COLUMN_TRACK_NUMBER).data().toString()); |
851 | 337 | tagger.setYear(this->index(row,COLUMN_YEAR).data().toString()); | 339 | tagger.setYear(this->index(row,COLUMN_YEAR).data().toString()); |
852 | 338 | tagger.setGenre(this->index(row,COLUMN_GENRE).data().toString()); | 340 | tagger.setGenre(this->index(row,COLUMN_GENRE).data().toString()); |
853 | 341 | tagger.setComposer(this->index(row,COLUMN_COMPOSER).data().toString()); | ||
854 | 339 | 342 | ||
855 | 340 | //check if one the item were edited | 343 | //check if one the item were edited |
856 | 341 | if(col == COLUMN_ARTIST) { | 344 | if(col == COLUMN_ARTIST) { |
857 | @@ -354,6 +357,8 @@ | |||
858 | 354 | tagger.setComment(value.toString()); | 357 | tagger.setComment(value.toString()); |
859 | 355 | } else if(col == COLUMN_GENRE) { | 358 | } else if(col == COLUMN_GENRE) { |
860 | 356 | tagger.setGenre(value.toString()); | 359 | tagger.setGenre(value.toString()); |
861 | 360 | } else if(col == COLUMN_COMPOSER) { | ||
862 | 361 | tagger.setComposer(value.toString()); | ||
863 | 357 | } else if(col == COLUMN_YEAR) { | 362 | } else if(col == COLUMN_YEAR) { |
864 | 358 | tagger.setYear(value.toString()); | 363 | tagger.setYear(value.toString()); |
865 | 359 | } | 364 | } |
866 | 360 | 365 | ||
867 | === modified file 'mixxx/src/library/browse/browsetablemodel.h' | |||
868 | --- mixxx/src/library/browse/browsetablemodel.h 2011-12-22 10:56:03 +0000 | |||
869 | +++ mixxx/src/library/browse/browsetablemodel.h 2011-12-28 23:47:25 +0000 | |||
870 | @@ -24,6 +24,7 @@ | |||
871 | 24 | const int COLUMN_TYPE = 11; | 24 | const int COLUMN_TYPE = 11; |
872 | 25 | const int COLUMN_BITRATE = 12; | 25 | const int COLUMN_BITRATE = 12; |
873 | 26 | const int COLUMN_LOCATION = 13; | 26 | const int COLUMN_LOCATION = 13; |
874 | 27 | const int COLUMN_COMPOSER = 14; | ||
875 | 27 | 28 | ||
876 | 28 | /* | 29 | /* |
877 | 29 | * The BrowseTable models displays tracks | 30 | * The BrowseTable models displays tracks |
878 | 30 | 31 | ||
879 | === modified file 'mixxx/src/library/browse/browsethread.cpp' | |||
880 | --- mixxx/src/library/browse/browsethread.cpp 2011-11-04 20:03:24 +0000 | |||
881 | +++ mixxx/src/library/browse/browsethread.cpp 2011-12-28 23:47:25 +0000 | |||
882 | @@ -141,6 +141,9 @@ | |||
883 | 141 | item = new QStandardItem(tio.getGenre()); | 141 | item = new QStandardItem(tio.getGenre()); |
884 | 142 | row_data.insert(COLUMN_GENRE, item); | 142 | row_data.insert(COLUMN_GENRE, item); |
885 | 143 | 143 | ||
886 | 144 | item = new QStandardItem(tio.getComposer()); | ||
887 | 145 | row_data.insert(COLUMN_COMPOSER, item); | ||
888 | 146 | |||
889 | 144 | item = new QStandardItem(tio.getComment()); | 147 | item = new QStandardItem(tio.getComment()); |
890 | 145 | row_data.insert(COLUMN_COMMENT, item); | 148 | row_data.insert(COLUMN_COMMENT, item); |
891 | 146 | 149 | ||
892 | 147 | 150 | ||
893 | === modified file 'mixxx/src/library/dao/trackdao.cpp' | |||
894 | --- mixxx/src/library/dao/trackdao.cpp 2011-10-21 00:42:23 +0000 | |||
895 | +++ mixxx/src/library/dao/trackdao.cpp 2011-12-28 23:47:25 +0000 | |||
896 | @@ -240,13 +240,13 @@ | |||
897 | 240 | } | 240 | } |
898 | 241 | 241 | ||
899 | 242 | void TrackDAO::prepareLibraryInsert(QSqlQuery& query) { | 242 | void TrackDAO::prepareLibraryInsert(QSqlQuery& query) { |
902 | 243 | query.prepare("INSERT INTO library (artist, title, album, year, genre, tracknumber, " | 243 | query.prepare("INSERT INTO library (artist, title, album, year, genre, composer, " |
903 | 244 | "filetype, location, comment, url, duration, rating, key, " | 244 | "tracknumber, filetype, location, comment, url, duration, rating, key, " |
904 | 245 | "bitrate, samplerate, cuepoint, bpm, replaygain, wavesummaryhex, " | 245 | "bitrate, samplerate, cuepoint, bpm, replaygain, wavesummaryhex, " |
905 | 246 | "timesplayed, " | 246 | "timesplayed, " |
906 | 247 | "channels, mixxx_deleted, header_parsed, beats_version, beats) " | 247 | "channels, mixxx_deleted, header_parsed, beats_version, beats) " |
907 | 248 | "VALUES (:artist, " | 248 | "VALUES (:artist, " |
909 | 249 | ":title, :album, :year, :genre, :tracknumber, " | 249 | ":title, :album, :year, :genre, :composer, :tracknumber, " |
910 | 250 | ":filetype, :location, :comment, :url, :duration, :rating, :key, " | 250 | ":filetype, :location, :comment, :url, :duration, :rating, :key, " |
911 | 251 | ":bitrate, :samplerate, :cuepoint, :bpm, :replaygain, :wavesummaryhex, " | 251 | ":bitrate, :samplerate, :cuepoint, :bpm, :replaygain, :wavesummaryhex, " |
912 | 252 | ":timesplayed, " | 252 | ":timesplayed, " |
913 | @@ -260,6 +260,7 @@ | |||
914 | 260 | query.bindValue(":album", pTrack->getAlbum()); | 260 | query.bindValue(":album", pTrack->getAlbum()); |
915 | 261 | query.bindValue(":year", pTrack->getYear()); | 261 | query.bindValue(":year", pTrack->getYear()); |
916 | 262 | query.bindValue(":genre", pTrack->getGenre()); | 262 | query.bindValue(":genre", pTrack->getGenre()); |
917 | 263 | query.bindValue(":composer", pTrack->getComposer()); | ||
918 | 263 | query.bindValue(":tracknumber", pTrack->getTrackNumber()); | 264 | query.bindValue(":tracknumber", pTrack->getTrackNumber()); |
919 | 264 | query.bindValue(":filetype", pTrack->getType()); | 265 | query.bindValue(":filetype", pTrack->getType()); |
920 | 265 | query.bindValue(":location", trackLocationId); | 266 | query.bindValue(":location", trackLocationId); |
921 | @@ -421,7 +422,8 @@ | |||
922 | 421 | // but marked deleted? Skip this track. | 422 | // but marked deleted? Skip this track. |
923 | 422 | LOG_FAILED_QUERY(query) | 423 | LOG_FAILED_QUERY(query) |
924 | 423 | << "Failed to INSERT new track into library:" | 424 | << "Failed to INSERT new track into library:" |
926 | 424 | << pTrack->getFilename(); | 425 | << pTrack->getFilename() |
927 | 426 | << ", composer: \'" << pTrack->getComposer() << "\'"; | ||
928 | 425 | continue; | 427 | continue; |
929 | 426 | } | 428 | } |
930 | 427 | int trackId = query.lastInsertId().toInt(); | 429 | int trackId = query.lastInsertId().toInt(); |
931 | @@ -557,6 +559,7 @@ | |||
932 | 557 | QString album = query.value(query.record().indexOf("album")).toString(); | 559 | QString album = query.value(query.record().indexOf("album")).toString(); |
933 | 558 | QString year = query.value(query.record().indexOf("year")).toString(); | 560 | QString year = query.value(query.record().indexOf("year")).toString(); |
934 | 559 | QString genre = query.value(query.record().indexOf("genre")).toString(); | 561 | QString genre = query.value(query.record().indexOf("genre")).toString(); |
935 | 562 | QString composer = query.value(query.record().indexOf("composer")).toString(); | ||
936 | 560 | QString tracknumber = query.value(query.record().indexOf("tracknumber")).toString(); | 563 | QString tracknumber = query.value(query.record().indexOf("tracknumber")).toString(); |
937 | 561 | QString comment = query.value(query.record().indexOf("comment")).toString(); | 564 | QString comment = query.value(query.record().indexOf("comment")).toString(); |
938 | 562 | QString url = query.value(query.record().indexOf("url")).toString(); | 565 | QString url = query.value(query.record().indexOf("url")).toString(); |
939 | @@ -591,6 +594,7 @@ | |||
940 | 591 | pTrack->setAlbum(album); | 594 | pTrack->setAlbum(album); |
941 | 592 | pTrack->setYear(year); | 595 | pTrack->setYear(year); |
942 | 593 | pTrack->setGenre(genre); | 596 | pTrack->setGenre(genre); |
943 | 597 | pTrack->setComposer(composer); | ||
944 | 594 | pTrack->setTrackNumber(tracknumber); | 598 | pTrack->setTrackNumber(tracknumber); |
945 | 595 | pTrack->setRating(rating); | 599 | pTrack->setRating(rating); |
946 | 596 | pTrack->setKey(key); | 600 | pTrack->setKey(key); |
947 | @@ -704,7 +708,7 @@ | |||
948 | 704 | QSqlQuery query(m_database); | 708 | QSqlQuery query(m_database); |
949 | 705 | 709 | ||
950 | 706 | query.prepare( | 710 | query.prepare( |
952 | 707 | "SELECT library.id, artist, title, album, year, genre, tracknumber, " | 711 | "SELECT library.id, artist, title, album, year, genre, composer, tracknumber, " |
953 | 708 | "filetype, rating, key, track_locations.location as location, " | 712 | "filetype, rating, key, track_locations.location as location, " |
954 | 709 | "track_locations.filesize as filesize, comment, url, duration, bitrate, " | 713 | "track_locations.filesize as filesize, comment, url, duration, bitrate, " |
955 | 710 | "samplerate, cuepoint, bpm, replaygain, wavesummaryhex, channels, " | 714 | "samplerate, cuepoint, bpm, replaygain, wavesummaryhex, channels, " |
956 | @@ -747,7 +751,7 @@ | |||
957 | 747 | query.prepare("UPDATE library " | 751 | query.prepare("UPDATE library " |
958 | 748 | "SET artist=:artist, " | 752 | "SET artist=:artist, " |
959 | 749 | "title=:title, album=:album, year=:year, genre=:genre, " | 753 | "title=:title, album=:album, year=:year, genre=:genre, " |
961 | 750 | "filetype=:filetype, tracknumber=:tracknumber, " | 754 | "composer=:composer, filetype=:filetype, tracknumber=:tracknumber, " |
962 | 751 | "comment=:comment, url=:url, duration=:duration, rating=:rating, key=:key, " | 755 | "comment=:comment, url=:url, duration=:duration, rating=:rating, key=:key, " |
963 | 752 | "bitrate=:bitrate, samplerate=:samplerate, cuepoint=:cuepoint, " | 756 | "bitrate=:bitrate, samplerate=:samplerate, cuepoint=:cuepoint, " |
964 | 753 | "bpm=:bpm, replaygain=:replaygain, wavesummaryhex=:wavesummaryhex, " | 757 | "bpm=:bpm, replaygain=:replaygain, wavesummaryhex=:wavesummaryhex, " |
965 | @@ -760,6 +764,7 @@ | |||
966 | 760 | query.bindValue(":album", pTrack->getAlbum()); | 764 | query.bindValue(":album", pTrack->getAlbum()); |
967 | 761 | query.bindValue(":year", pTrack->getYear()); | 765 | query.bindValue(":year", pTrack->getYear()); |
968 | 762 | query.bindValue(":genre", pTrack->getGenre()); | 766 | query.bindValue(":genre", pTrack->getGenre()); |
969 | 767 | query.bindValue(":composer", pTrack->getComposer()); | ||
970 | 763 | query.bindValue(":filetype", pTrack->getType()); | 768 | query.bindValue(":filetype", pTrack->getType()); |
971 | 764 | query.bindValue(":tracknumber", pTrack->getTrackNumber()); | 769 | query.bindValue(":tracknumber", pTrack->getTrackNumber()); |
972 | 765 | query.bindValue(":comment", pTrack->getComment()); | 770 | query.bindValue(":comment", pTrack->getComment()); |
973 | @@ -984,6 +989,7 @@ | |||
974 | 984 | tagger.setArtist(pTrack->getArtist()); | 989 | tagger.setArtist(pTrack->getArtist()); |
975 | 985 | tagger.setTitle(pTrack->getTitle()); | 990 | tagger.setTitle(pTrack->getTitle()); |
976 | 986 | tagger.setGenre(pTrack->getGenre()); | 991 | tagger.setGenre(pTrack->getGenre()); |
977 | 992 | tagger.setComposer(pTrack->getComposer()); | ||
978 | 987 | tagger.setAlbum(pTrack->getAlbum()); | 993 | tagger.setAlbum(pTrack->getAlbum()); |
979 | 988 | tagger.setComment(pTrack->getComment()); | 994 | tagger.setComment(pTrack->getComment()); |
980 | 989 | tagger.setTracknumber(pTrack->getTrackNumber()); | 995 | tagger.setTracknumber(pTrack->getTrackNumber()); |
981 | 990 | 996 | ||
982 | === modified file 'mixxx/src/library/dao/trackdao.h' | |||
983 | --- mixxx/src/library/dao/trackdao.h 2011-10-21 00:42:23 +0000 | |||
984 | +++ mixxx/src/library/dao/trackdao.h 2011-12-28 23:47:25 +0000 | |||
985 | @@ -25,6 +25,7 @@ | |||
986 | 25 | const QString LIBRARYTABLE_ALBUM = "album"; | 25 | const QString LIBRARYTABLE_ALBUM = "album"; |
987 | 26 | const QString LIBRARYTABLE_YEAR = "year"; | 26 | const QString LIBRARYTABLE_YEAR = "year"; |
988 | 27 | const QString LIBRARYTABLE_GENRE = "genre"; | 27 | const QString LIBRARYTABLE_GENRE = "genre"; |
989 | 28 | const QString LIBRARYTABLE_COMPOSER = "composer"; | ||
990 | 28 | const QString LIBRARYTABLE_TRACKNUMBER = "tracknumber"; | 29 | const QString LIBRARYTABLE_TRACKNUMBER = "tracknumber"; |
991 | 29 | const QString LIBRARYTABLE_FILETYPE = "filetype"; | 30 | const QString LIBRARYTABLE_FILETYPE = "filetype"; |
992 | 30 | const QString LIBRARYTABLE_LOCATION = "location"; | 31 | const QString LIBRARYTABLE_LOCATION = "location"; |
993 | 31 | 32 | ||
994 | === modified file 'mixxx/src/library/mixxxlibraryfeature.cpp' | |||
995 | --- mixxx/src/library/mixxxlibraryfeature.cpp 2011-12-18 20:23:14 +0000 | |||
996 | +++ mixxx/src/library/mixxxlibraryfeature.cpp 2011-12-28 23:47:25 +0000 | |||
997 | @@ -28,6 +28,7 @@ | |||
998 | 28 | << "library." + LIBRARYTABLE_DURATION | 28 | << "library." + LIBRARYTABLE_DURATION |
999 | 29 | << "library." + LIBRARYTABLE_RATING | 29 | << "library." + LIBRARYTABLE_RATING |
1000 | 30 | << "library." + LIBRARYTABLE_GENRE | 30 | << "library." + LIBRARYTABLE_GENRE |
1001 | 31 | << "library." + LIBRARYTABLE_COMPOSER | ||
1002 | 31 | << "library." + LIBRARYTABLE_FILETYPE | 32 | << "library." + LIBRARYTABLE_FILETYPE |
1003 | 32 | << "library." + LIBRARYTABLE_TRACKNUMBER | 33 | << "library." + LIBRARYTABLE_TRACKNUMBER |
1004 | 33 | << "library." + LIBRARYTABLE_KEY | 34 | << "library." + LIBRARYTABLE_KEY |
1005 | 34 | 35 | ||
1006 | === modified file 'mixxx/src/library/trackcollection.cpp' | |||
1007 | --- mixxx/src/library/trackcollection.cpp 2011-10-21 02:09:53 +0000 | |||
1008 | +++ mixxx/src/library/trackcollection.cpp 2011-12-28 23:47:25 +0000 | |||
1009 | @@ -67,7 +67,7 @@ | |||
1010 | 67 | return false; | 67 | return false; |
1011 | 68 | } | 68 | } |
1012 | 69 | 69 | ||
1014 | 70 | int requiredSchemaVersion = 13; | 70 | int requiredSchemaVersion = 14; |
1015 | 71 | if (!SchemaManager::upgradeToSchemaVersion(m_pConfig, m_db, | 71 | if (!SchemaManager::upgradeToSchemaVersion(m_pConfig, m_db, |
1016 | 72 | requiredSchemaVersion)) { | 72 | requiredSchemaVersion)) { |
1017 | 73 | QMessageBox::warning(0, tr("Cannot upgrade database schema"), | 73 | QMessageBox::warning(0, tr("Cannot upgrade database schema"), |
1018 | 74 | 74 | ||
1019 | === modified file 'mixxx/src/soundsource.cpp' | |||
1020 | --- mixxx/src/soundsource.cpp 2011-03-22 16:24:04 +0000 | |||
1021 | +++ mixxx/src/soundsource.cpp 2011-12-28 23:47:25 +0000 | |||
1022 | @@ -110,6 +110,10 @@ | |||
1023 | 110 | { | 110 | { |
1024 | 111 | return m_sGenre; | 111 | return m_sGenre; |
1025 | 112 | } | 112 | } |
1026 | 113 | QString SoundSource::getComposer() | ||
1027 | 114 | { | ||
1028 | 115 | return m_sComposer; | ||
1029 | 116 | } | ||
1030 | 113 | QString SoundSource::getTrackNumber() | 117 | QString SoundSource::getTrackNumber() |
1031 | 114 | { | 118 | { |
1032 | 115 | return m_sTrackNumber; | 119 | return m_sTrackNumber; |
1033 | @@ -167,6 +171,10 @@ | |||
1034 | 167 | { | 171 | { |
1035 | 168 | m_sGenre = genre; | 172 | m_sGenre = genre; |
1036 | 169 | } | 173 | } |
1037 | 174 | void SoundSource::setComposer(QString composer) | ||
1038 | 175 | { | ||
1039 | 176 | m_sComposer = composer; | ||
1040 | 177 | } | ||
1041 | 170 | void SoundSource::setTrackNumber(QString trackNumber) | 178 | void SoundSource::setTrackNumber(QString trackNumber) |
1042 | 171 | { | 179 | { |
1043 | 172 | m_sTrackNumber = trackNumber; | 180 | m_sTrackNumber = trackNumber; |
1044 | @@ -326,6 +334,12 @@ | |||
1045 | 326 | } | 334 | } |
1046 | 327 | } | 335 | } |
1047 | 328 | } | 336 | } |
1048 | 337 | TagLib::ID3v2::FrameList composerFrame = id3v2->frameListMap()["TCOM"]; | ||
1049 | 338 | if (!composerFrame.isEmpty()) { | ||
1050 | 339 | QString sComposer = TStringToQString(composerFrame.front()->toString()); | ||
1051 | 340 | setComposer(sComposer); | ||
1052 | 341 | } | ||
1053 | 342 | |||
1054 | 329 | return true; | 343 | return true; |
1055 | 330 | } | 344 | } |
1056 | 331 | 345 | ||
1057 | 332 | 346 | ||
1058 | === modified file 'mixxx/src/soundsource.h' | |||
1059 | --- mixxx/src/soundsource.h 2011-11-02 01:09:26 +0000 | |||
1060 | +++ mixxx/src/soundsource.h 2011-12-28 23:47:25 +0000 | |||
1061 | @@ -75,6 +75,7 @@ | |||
1062 | 75 | virtual QString getComment(); | 75 | virtual QString getComment(); |
1063 | 76 | virtual QString getYear(); | 76 | virtual QString getYear(); |
1064 | 77 | virtual QString getGenre(); | 77 | virtual QString getGenre(); |
1065 | 78 | virtual QString getComposer(); | ||
1066 | 78 | virtual QString getTrackNumber(); | 79 | virtual QString getTrackNumber(); |
1067 | 79 | virtual float getReplayGain(); | 80 | virtual float getReplayGain(); |
1068 | 80 | virtual QString getKey(); | 81 | virtual QString getKey(); |
1069 | @@ -91,6 +92,7 @@ | |||
1070 | 91 | virtual void setComment(QString); | 92 | virtual void setComment(QString); |
1071 | 92 | virtual void setYear(QString); | 93 | virtual void setYear(QString); |
1072 | 93 | virtual void setGenre(QString); | 94 | virtual void setGenre(QString); |
1073 | 95 | virtual void setComposer(QString); | ||
1074 | 94 | virtual void setTrackNumber(QString); | 96 | virtual void setTrackNumber(QString); |
1075 | 95 | virtual void setReplayGain(float); | 97 | virtual void setReplayGain(float); |
1076 | 96 | virtual void setKey(QString); | 98 | virtual void setKey(QString); |
1077 | @@ -122,6 +124,7 @@ | |||
1078 | 122 | QString m_sComment; | 124 | QString m_sComment; |
1079 | 123 | QString m_sYear; | 125 | QString m_sYear; |
1080 | 124 | QString m_sGenre; | 126 | QString m_sGenre; |
1081 | 127 | QString m_sComposer; | ||
1082 | 125 | QString m_sTrackNumber; | 128 | QString m_sTrackNumber; |
1083 | 126 | float m_fReplayGain; | 129 | float m_fReplayGain; |
1084 | 127 | QString m_sKey; | 130 | QString m_sKey; |
1085 | 128 | 131 | ||
1086 | === modified file 'mixxx/src/soundsourceproxy.cpp' | |||
1087 | --- mixxx/src/soundsourceproxy.cpp 2011-12-15 21:15:41 +0000 | |||
1088 | +++ mixxx/src/soundsourceproxy.cpp 2011-12-28 23:47:25 +0000 | |||
1089 | @@ -302,7 +302,8 @@ | |||
1090 | 302 | p->setType(sndsrc->getType()); | 302 | p->setType(sndsrc->getType()); |
1091 | 303 | p->setYear(sndsrc->getYear()); | 303 | p->setYear(sndsrc->getYear()); |
1092 | 304 | p->setGenre(sndsrc->getGenre()); | 304 | p->setGenre(sndsrc->getGenre()); |
1094 | 305 | p->setComment(sndsrc->getComment()); | 305 | p->setComposer(sndsrc->getComposer()); |
1095 | 306 | p->setComment(sndsrc->getComment()); | ||
1096 | 306 | p->setTrackNumber(sndsrc->getTrackNumber()); | 307 | p->setTrackNumber(sndsrc->getTrackNumber()); |
1097 | 307 | p->setReplayGain(sndsrc->getReplayGain()); | 308 | p->setReplayGain(sndsrc->getReplayGain()); |
1098 | 308 | p->setBpm(sndsrc->getBPM()); | 309 | p->setBpm(sndsrc->getBPM()); |
1099 | 309 | 310 | ||
1100 | === modified file 'mixxx/src/trackinfoobject.cpp' | |||
1101 | --- mixxx/src/trackinfoobject.cpp 2011-12-18 20:23:14 +0000 | |||
1102 | +++ mixxx/src/trackinfoobject.cpp 2011-12-28 23:47:25 +0000 | |||
1103 | @@ -508,6 +508,22 @@ | |||
1104 | 508 | setDirty(true); | 508 | setDirty(true); |
1105 | 509 | } | 509 | } |
1106 | 510 | 510 | ||
1107 | 511 | QString TrackInfoObject::getComposer() const | ||
1108 | 512 | { | ||
1109 | 513 | QMutexLocker lock(&m_qMutex); | ||
1110 | 514 | return m_sComposer; | ||
1111 | 515 | } | ||
1112 | 516 | |||
1113 | 517 | void TrackInfoObject::setComposer(QString s) | ||
1114 | 518 | { | ||
1115 | 519 | QMutexLocker lock(&m_qMutex); | ||
1116 | 520 | s = s.trimmed(); | ||
1117 | 521 | bool dirty = m_sComposer != s; | ||
1118 | 522 | m_sComposer = s; | ||
1119 | 523 | if (dirty) | ||
1120 | 524 | setDirty(true); | ||
1121 | 525 | } | ||
1122 | 526 | |||
1123 | 511 | QString TrackInfoObject::getTrackNumber() const | 527 | QString TrackInfoObject::getTrackNumber() const |
1124 | 512 | { | 528 | { |
1125 | 513 | QMutexLocker lock(&m_qMutex); | 529 | QMutexLocker lock(&m_qMutex); |
1126 | 514 | 530 | ||
1127 | === modified file 'mixxx/src/trackinfoobject.h' | |||
1128 | --- mixxx/src/trackinfoobject.h 2011-10-03 22:37:35 +0000 | |||
1129 | +++ mixxx/src/trackinfoobject.h 2011-12-28 23:47:25 +0000 | |||
1130 | @@ -77,6 +77,7 @@ | |||
1131 | 77 | Q_PROPERTY(QString title READ getTitle WRITE setTitle) | 77 | Q_PROPERTY(QString title READ getTitle WRITE setTitle) |
1132 | 78 | Q_PROPERTY(QString album READ getAlbum WRITE setAlbum) | 78 | Q_PROPERTY(QString album READ getAlbum WRITE setAlbum) |
1133 | 79 | Q_PROPERTY(QString genre READ getGenre WRITE setGenre) | 79 | Q_PROPERTY(QString genre READ getGenre WRITE setGenre) |
1134 | 80 | Q_PROPERTY(QString composer READ getComposer WRITE setComposer) | ||
1135 | 80 | Q_PROPERTY(QString year READ getYear WRITE setYear) | 81 | Q_PROPERTY(QString year READ getYear WRITE setYear) |
1136 | 81 | Q_PROPERTY(QString track_number READ getTrackNumber WRITE setTrackNumber) | 82 | Q_PROPERTY(QString track_number READ getTrackNumber WRITE setTrackNumber) |
1137 | 82 | Q_PROPERTY(int times_played READ getTimesPlayed) | 83 | Q_PROPERTY(int times_played READ getTimesPlayed) |
1138 | @@ -172,6 +173,10 @@ | |||
1139 | 172 | QString getGenre() const; | 173 | QString getGenre() const; |
1140 | 173 | /** Set genre */ | 174 | /** Set genre */ |
1141 | 174 | void setGenre(QString); | 175 | void setGenre(QString); |
1142 | 176 | /** Return composer */ | ||
1143 | 177 | QString getComposer() const; | ||
1144 | 178 | /** Set composer */ | ||
1145 | 179 | void setComposer(QString); | ||
1146 | 175 | /** Return Track Number */ | 180 | /** Return Track Number */ |
1147 | 176 | QString getTrackNumber() const; | 181 | QString getTrackNumber() const; |
1148 | 177 | /** Set Track Number */ | 182 | /** Set Track Number */ |
1149 | @@ -317,6 +322,8 @@ | |||
1150 | 317 | QString m_sTitle; | 322 | QString m_sTitle; |
1151 | 318 | /** Genre */ | 323 | /** Genre */ |
1152 | 319 | QString m_sGenre; | 324 | QString m_sGenre; |
1153 | 325 | /** Composer */ | ||
1154 | 326 | QString m_sComposer; | ||
1155 | 320 | /** Year */ | 327 | /** Year */ |
1156 | 321 | QString m_sYear; | 328 | QString m_sYear; |
1157 | 322 | /** Track Number */ | 329 | /** Track Number */ |
Thanks Jonathan! I'll get the code reviewed this weekend.