-
Notifications
You must be signed in to change notification settings - Fork 0
/
conf.h
714 lines (589 loc) · 24.6 KB
/
conf.h
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
#pragma once
#include "conf_flag_mng.h"
#include "formatting_script.h"
//CFG_SAVE_ALBUM_ART/save_album_art
#define ARTSAVE_SKIP_USER_FLAG 1 << 0
#define ARTSAVE_SKIP_CUST_FLAG 1 << 1
#define ARTSAVE_FILEMATCH_APP_FLAG 1 << 2
//CFG_TAGSAVE_FLAGS/tag_save_flags
#define TAGSAVE_LOG_FLAG 1 << 0
#define TAGSAVE_AUTO_MULTIV_FLAG 1 << 1
#define TAGSAVE_PREVIEW_STICKY_FLAG 1 << 2
//CFG_SKIP_MNG_FLAG/skip_mng_flag
#define SKIP_RELEASE_DLG_MATCHED 1 << 0
#define SKIP_RELEASE_DLG_IDED 1 << 1
#define SKIP_PREVIEW_DLG 1 << 2
#define SKIP_BRAINZ_ID_FETCH 1 << 5
//CONFIG IDS
#define CFG_REPLACE_ANVS 1
#define CFG_MOVE_THE_AT_BEGINNING 2
#define CFG_DISCARD_NUMERIC_SUFFIX 3
#define CFG_DISPLAY_EXACT_MATCHES 13
#define CFG_ENABLE_AUTOSEARCH 14
#define CFG_DISPLAY_ANVS 17
#define CFG_TAGSAVE_FLAGS 18
#define DEPRI_CFG_FIND_RELEASE_DIALOG_SIZE 19
#define DEPRI_CFG_FIND_RELEASE_DIALOG_POSITION 20
#define DEPRI_CFG_RELEASE_DIALOG_SIZE 21
#define DEPRI_CFG_RELEASE_DIALOG_POSITION 22
#define DEPRI_CFG_EDIT_TAGS_DIALOG_SIZE 23
#define DEPRI_CFG_EDIT_TAGS_DIALOG_POSITION 24
#define CFG_EDIT_TAGS_DIALOG_COL1_WIDTH 25
#define CFG_EDIT_TAGS_DIALOG_COL2_WIDTH 26
#define CFG_EDIT_TAGS_DIALOG_COL3_WIDTH 27
#define CFG_SAVE_ALBUM_ART 9
#define CFG_ALBUM_ART_DIRECTORY_STRING 28
#define CFG_ALBUM_ART_FILENAME_STRING 29
#define CFG_ALBUM_ART_FETCH_ALL 11
#define CFG_ALBUM_ART_OVERWRITE 12
#define CFG_ALBUM_ART_EMBED 59
#define CFG_SAVE_ARTIST_ART 10
#define CFG_ARTIST_ART_DIRECTORY_STRING 30
#define CFG_ARTIST_ART_FILENAME_STRING 31
#define CFG_ARTIST_ART_FETCH_ALL 36
#define CFG_ARTIST_ART_OVERWRITE 37
#define CFG_ARTIST_ART_IDS_TF_STRING 45
#define CFG_ARTIST_ART_EMBED 60
#define CFG_OAUTH_TOKEN 32
#define CFG_OAUTH_TOKEN_SECRET 33
#define CFG_REMOVE_OTHER_TAGS 34
#define CFG_REMOVE_EXCLUDE_TAGS 35
#define CFG_MATCH_TRACKS_USING_DURATION 6
#define CFG_MATCH_TRACKS_USING_NUMBER 38
#define DEPRI_NA_CFG_TRACKS_USING_META 39
#define CFG_ASSUME_TRACKS_SORTED 40
#define CFG_LAST_CONF_TAB 46
#define CFG_SEARCH_RELEASE_FORMAT_STRING 43
#define CFG_SEARCH_MASTER_FORMAT_STRING 44
#define CFG_SEARCH_MASTER_SUB_FORMAT_STRING 51
#define CFG_DISCOGS_TRACK_FORMAT_STRING 47
#define CFG_FILE_TRACK_FORMAT_STRING 48
#define CFG_PREVIEW_MODE 51
#define CFG_UPDATE_PREVIEW_CHANGES 52
#define DEPRI_CFG_PREVIEW_DIALOG_SIZE 53
#define DEPRI_CFG_PREVIEW_DIALOG_POSITION 54
#define CFG_UPDATE_TAGS_MANUALLY_PROMPT 55
#define CFG_PARSE_HIDDEN_AS_REGULAR 56
#define CFG_SKIP_VIDEO_TRACKS 58
#define CFG_CACHE_MAX_OBJECTS 57
// 2001 = 2 (v2), 0 (bool), 01 (id)
// 2101 = 2 (v2), 1 (int), 01 (id)
// 2201 = 2 (v2), 2 (str), 01 (id)
// BOOLS ---------------------------------------
#define CFG_EDIT_TAGS_DIALOG_SHOW_TM_STATS 2001
#define DEPRI_CFG_FIND_RELEASE_DIALOG_SHOW_ID 2002
#define CFG_RELEASE_ENTER_KEY_OVR 2003
//v206 (1.0.8)
#define CFG_AUTO_REL_LOAD_ON_OPEN 2004
#define CFG_AUTO_REL_LOAD_ON_SELECT 2005
#define CFG_PARSE_HIDDEN_MERGE_TITLES 2006
//DEPRI v205
#define DEPRI_CFG_SKIP_RELEASE_DLG_IF_MATCHED 41
#define DEPRI_CFG_SKIP_FIND_RELEASE_DLG_IF_IDED 42
#define DEPRI_CFG_SKIP_PREVIEW_DIALOG 49
//
// INTS ----------------------------------------
#define CFG_PREVIEW_TAGS_DIALOG_COL1_WIDTH 2101
#define CFG_PREVIEW_TAGS_DIALOG_COL2_WIDTH 2102
#define CFG_MATCH_TRACKS_DISCOGS_COL1_WIDTH 2103
#define CFG_MATCH_TRACKS_DISCOGS_COL2_WIDTH 2104
#define CFG_MATCH_TRACKS_FILES_COL1_WIDTH 2105
#define CFG_MATCH_TRACKS_FILES_COL2_WIDTH 2106
//v201
#define CFG_MATCH_TRACKS_DISCOGS_STYLE 2107
#define CFG_MATCH_TRACKS_FILES_STYLE 2108
#define CFG_PREVIEW_TAGS_DIALOG_W_WIDTH 2109
#define CFG_PREVIEW_TAGS_DIALOG_U_WIDTH 2110
#define CFG_PREVIEW_TAGS_DIALOG_S_WIDTH 2111
#define CFG_PREVIEW_TAGS_DIALOG_E_WIDTH 2112
//v202
#define CFG_CACHE_OFFLINE_CACHE_FLAG 2113
//v203
#define CFG_DISCOGS_ARTWORK_RA_WIDTH 2114
#define CFG_DISCOGS_ARTWORK_TYPE_WIDTH 2115
#define CFG_DISCOGS_ARTWORK_DIM_WIDTH 2116
#define CFG_DISCOGS_ARTWORK_SAVE_WIDTH 2117
#define CFG_DISCOGS_ARTWORK_OVR_WIDTH 2118
#define CFG_DISCOGS_ARTWORK_EMBED_WIDTH 2119
#define CFG_MATCH_FILE_ARTWORK_NAME_WIDTH 2120
#define CFG_MATCH_FILE_ARTWORK_DIM_WIDTH 2121
#define CFG_MATCH_FILE_ARTWORK_SIZE_WIDTH 2122
#define CFG_MATCH_DISCOGS_ARTWORK_STYLE 2123
#define CFG_MATCH_FILE_ARTWORKS_STYLE 2124
#define CFG_ALBUM_ART_SKIP_DEFAULT_CUST 2125
#define CFG_EDIT_TAGS_DIALOG_FLAGS 2126
//v205 (1.0.6)
#define CFG_DC_DB_FLAG 2127
#define CFG_FIND_RELEASE_FILTER_FLAG 2128
#define CFG_SKIP_MNG_FLAG 2129
#define DEPRI_CFG_EDIT_CAT_CREDIT_DIALOG_SIZE 2130
#define DEPRI_CFG_EDIT_CAT_CREDIT_DIALOG_POS 2131
#define CFG_LIST_STYLE 2132
#define CFG_HISTORY_MAX_ITEMS 2133
#define CFG_FIND_RELEASE_DIALOG_FLAG 2134
//v206 (1.0.8)
#define CFG_DISCOGS_ARTWORK_INDEX_WIDTH 2135
#define CFG_MATCH_FILE_ARTWORK_INDEX_WIDTH 2136
#define CFG_PREVIEW_LEADING_TAGS_DLG_COLS_WIDTH 2137
//v207 (1.0.13)
#define CFG_DISCOGS_ARTWORK_TL_RA_WIDTH 2138
#define CFG_DISCOGS_ARTWORK_TL_TYPE_WIDTH 2139
#define CFG_DISCOGS_ARTWORK_TL_DIM_WIDTH 2140
#define CFG_DISCOGS_ARTWORK_TL_SAVE_WIDTH 2141
#define CFG_DISCOGS_ARTWORK_TL_OVR_WIDTH 2142
#define CFG_DISCOGS_ARTWORK_TL_EMBED_WIDTH 2143
#define CFG_DISCOGS_ARTWORK_TL_INDEX_WIDTH 2144
#define CFG_CUSTOM_FONT 2145
//v209 (1.0.16.1)
#define CFG_ALT_WRITE_FLAGS 2146
//v210 (1.0.21)
#define CFG_DISK_CACHE_EXP 2147
// STRINGS -------------------------------------
#define CFG_EDIT_TAGS_DIALOG_HL_KEYWORD 2201
//v205 (1.0.6/1.1.0)
#define CFG_DC_DB_PATH 2202
//v208 (1.0.15)
#define CFG_MULTIVALUE_FIELDS 2203
//..
typedef struct
{
int id;
bool value;
} conf_bool_entry;
typedef struct
{
int id;
int value;
} conf_int_entry;
inline bool operator==(const conf_int_entry& lhs, const conf_int_entry& rhs) {
return (lhs.id == rhs.id &&
lhs.value == rhs.value);
}
inline bool operator==(const conf_bool_entry& lhs, const conf_bool_entry& rhs) {
return (lhs.id == rhs.id &&
lhs.value == rhs.value);
}
inline int compare_id(const conf_bool_entry& p_entry, const conf_bool_entry& p_entry2) {
int res;
res = p_entry.id == p_entry2.id ? 0 : p_entry.id > p_entry2.id ? 1 : -1;
return res;
}
typedef struct
{
int id;
pfc::string8 value;
} conf_string_entry;
extern conf_bool_entry make_conf_entry(int i, bool v);
extern conf_int_entry make_conf_entry(int i, int v);
extern conf_string_entry make_conf_entry(int i, const pfc::string8 &v);
FB2K_STREAM_READER_OVERLOAD(conf_bool_entry) {
int id;
bool v;
stream >> id >> v;
value.id = id;
value.value = v;
return stream;
}
FB2K_STREAM_READER_OVERLOAD(conf_int_entry) {
int id;
int v;
stream >> id >> v;
value.id = id;
value.value = v;
return stream;
}
FB2K_STREAM_READER_OVERLOAD(conf_string_entry) {
int id;
pfc::string8 v;
stream >> id >> v;
value.id = id;
value.value = v;
return stream;
}
FB2K_STREAM_WRITER_OVERLOAD(conf_bool_entry) {
stream << value.id << value.value;
return stream;
}
FB2K_STREAM_WRITER_OVERLOAD(conf_int_entry) {
stream << value.id << value.value;
return stream;
}
FB2K_STREAM_WRITER_OVERLOAD(conf_string_entry) {
stream << value.id << value.value;
return stream;
}
#ifndef VSPECS
#define VSPECS
const struct vspec;
typedef std::vector<vspec> vec_spec_t;
const struct vspec {
t_size boolvals; t_size intvals; t_size stringvals;
vec_spec_t* vspecs;
vspec() : vspecs(nullptr), boolvals(0), intvals(0), stringvals(0) {}
vspec(vec_spec_t* specs, t_size boolvals, t_size intvals, t_size stringvals)
: vspecs(specs), boolvals(boolvals), intvals(intvals), stringvals(stringvals)
{
if (vspecs != nullptr) {
vspecs->emplace_back((vspec)*this);
}
}
inline bool operator==(const vspec& rhs) {
return (this->boolvals == rhs.boolvals &&
this->intvals == rhs.intvals &&
this->stringvals == rhs.stringvals);
}
inline bool operator<(const vspec& rhs)
{
//null specs vector not allowed in rhs
PFC_ASSERT(rhs.vspecs != nullptr);
vec_spec_t* vec = rhs.vspecs;
auto itrhs = std::find_if(vec->begin(), vec->end(),
[rhs](auto e) {return e == rhs; });
auto itthis = std::find_if(vec->begin(), vec->end(),
[=](auto e) {return e == *this; });
return ((itthis != vec->end()) && itthis < itrhs);
}
inline bool operator>(const vspec& rhs)
{
//specs vector in lhs can be null
PFC_ASSERT(rhs.vspecs != nullptr);
vec_spec_t* vec = rhs.vspecs;
auto itrhs = std::find_if(vec->begin(), vec->end(),
[rhs](auto e) {return e == rhs; });
auto itthis = std::find_if(vec->begin(), vec->end(),
[=](auto e) {return e == *this; });
return (itthis == vec->end() || itthis > itrhs);
}
};
#endif
class CConf
{
private:
vec_spec_t vec_specs;
public:
CConf(std::string name = "") {
vflags.emplace_back(CFG_CACHE_OFFLINE_CACHE_FLAG);
vflags.emplace_back(CFG_DC_DB_FLAG);
vflags.emplace_back(CFG_FIND_RELEASE_FILTER_FLAG);
vflags.emplace_back(CFG_FIND_RELEASE_DIALOG_FLAG);
vflags.emplace_back(CFG_SKIP_MNG_FLAG);
//..
}
// shallow copy
CConf::CConf(CConf const& other) {
*this = other;
}
void SetName(pfc::string8 name) {};
bool GetFlagVar(int ID, FlgMng& flgmng);
enum class cfgFilter :uint8_t {
CONF = 0,
FIND,
PREVIEW,
PREVIEW_MODAL,
TAG,
TRACK,
UPDATE_ART,
UPDATE_TAG,
CAT_CREDIT,
};
int* id_to_ref_int(int id, bool assert = true);
static bool id_to_val_int(int id, const CConf & in_conf, int &out, bool assert = true);
static bool id_to_val_bool(int id, const CConf & in_conf, bool &out, bool assert = true);
static bool id_to_val_str(int id, const CConf & in_conf, pfc::string8& out, bool assert = true);
bool load();
bool bool_load(const conf_bool_entry& item);
bool int_load(const conf_int_entry& item);
bool string_load(const conf_string_entry& item);
//save all
void save();
//save only active config tab by #
void save_active_config_tab(int newtab);
//save only preview modal tab widths
void save_preview_modal_tab_widths(int newwidths);
template <typename Enumeration>
//as_integer
auto asi(Enumeration const value)
-> typename std::underlying_type<Enumeration>::type
{
return static_cast<typename std::underlying_type<Enumeration>::type>(value);
}
//note: 1x1 group membership
std::vector<std::pair<int, int>> idarray
{
// **** CONF (configuration_dialog)
{ asi(cfgFilter::CONF), CFG_REPLACE_ANVS },
{ asi(cfgFilter::CONF), CFG_MOVE_THE_AT_BEGINNING},
{ asi(cfgFilter::CONF), CFG_DISCARD_NUMERIC_SUFFIX},
{ asi(cfgFilter::CONF), CFG_ENABLE_AUTOSEARCH},
{ asi(cfgFilter::CONF), CFG_DISPLAY_ANVS},
{ asi(cfgFilter::CONF), CFG_SAVE_ALBUM_ART},
{ asi(cfgFilter::CONF), CFG_ALBUM_ART_DIRECTORY_STRING},
{ asi(cfgFilter::CONF), CFG_ALBUM_ART_FILENAME_STRING},
{ asi(cfgFilter::CONF), CFG_ALBUM_ART_FETCH_ALL},
{ asi(cfgFilter::CONF), CFG_ALBUM_ART_OVERWRITE},
{ asi(cfgFilter::CONF), CFG_ALBUM_ART_EMBED},
{ asi(cfgFilter::CONF), CFG_SAVE_ARTIST_ART},
{ asi(cfgFilter::CONF), CFG_ARTIST_ART_DIRECTORY_STRING},
{ asi(cfgFilter::CONF), CFG_ARTIST_ART_FILENAME_STRING},
{ asi(cfgFilter::CONF), CFG_ARTIST_ART_FETCH_ALL},
{ asi(cfgFilter::CONF), CFG_ARTIST_ART_OVERWRITE},
{ asi(cfgFilter::CONF), CFG_ARTIST_ART_IDS_TF_STRING},
{ asi(cfgFilter::CONF), CFG_ARTIST_ART_EMBED},
{ asi(cfgFilter::CONF), CFG_OAUTH_TOKEN},
{ asi(cfgFilter::CONF), CFG_OAUTH_TOKEN_SECRET},
{ asi(cfgFilter::CONF), CFG_REMOVE_OTHER_TAGS},
{ asi(cfgFilter::CONF), CFG_REMOVE_EXCLUDE_TAGS},
{ asi(cfgFilter::CONF), CFG_MATCH_TRACKS_USING_DURATION},
{ asi(cfgFilter::CONF), CFG_MATCH_TRACKS_USING_NUMBER},
{ asi(cfgFilter::CONF), DEPRI_NA_CFG_TRACKS_USING_META},
{ asi(cfgFilter::CONF), CFG_ASSUME_TRACKS_SORTED},
{ asi(cfgFilter::CONF), DEPRI_CFG_SKIP_RELEASE_DLG_IF_MATCHED},
{ asi(cfgFilter::CONF), DEPRI_CFG_SKIP_FIND_RELEASE_DLG_IF_IDED},
{ asi(cfgFilter::CONF), CFG_SEARCH_RELEASE_FORMAT_STRING},
{ asi(cfgFilter::CONF), CFG_SEARCH_MASTER_FORMAT_STRING},
{ asi(cfgFilter::CONF), CFG_SEARCH_MASTER_SUB_FORMAT_STRING},
{ asi(cfgFilter::CONF), CFG_LAST_CONF_TAB},
{ asi(cfgFilter::CONF), CFG_DISCOGS_TRACK_FORMAT_STRING},
{ asi(cfgFilter::CONF), CFG_FILE_TRACK_FORMAT_STRING},
{ asi(cfgFilter::CONF), DEPRI_CFG_SKIP_PREVIEW_DIALOG},
{ asi(cfgFilter::CONF), CFG_PARSE_HIDDEN_AS_REGULAR},
{ asi(cfgFilter::CONF), CFG_SKIP_VIDEO_TRACKS},
{ asi(cfgFilter::CONF), CFG_CACHE_MAX_OBJECTS},
{ asi(cfgFilter::CONF), CFG_RELEASE_ENTER_KEY_OVR},
{ asi(cfgFilter::CONF), CFG_CACHE_OFFLINE_CACHE_FLAG},
//v203
//{ asi(cfgFilter::CONF), CFG_ALBUM_ART_SKIP_DEFAULT_CUST },
//v205 (1.0.6)
{ asi(cfgFilter::CONF), CFG_DC_DB_PATH},
{ asi(cfgFilter::CONF), CFG_DC_DB_FLAG},
{ asi(cfgFilter::CONF), CFG_SKIP_MNG_FLAG},
{ asi(cfgFilter::CONF), CFG_LIST_STYLE},
{ asi(cfgFilter::CONF), CFG_HISTORY_MAX_ITEMS},
{ asi(cfgFilter::CONF), CFG_FIND_RELEASE_DIALOG_FLAG },
//v206 (1.0.8)
{ asi(cfgFilter::CONF), CFG_AUTO_REL_LOAD_ON_OPEN},
{ asi(cfgFilter::CONF), CFG_AUTO_REL_LOAD_ON_SELECT},
{ asi(cfgFilter::CONF), CFG_PARSE_HIDDEN_MERGE_TITLES},
//v207
{ asi(cfgFilter::CONF), CFG_CUSTOM_FONT},
//v208
{ asi(cfgFilter::CONF), CFG_MULTIVALUE_FIELDS},
//v210
{ asi(cfgFilter::CONF), CFG_DISK_CACHE_EXP},
//..
// **** FIND (find_release_dialog)
{ asi(cfgFilter::FIND), CFG_DISPLAY_EXACT_MATCHES },
//v200
{ asi(cfgFilter::FIND), DEPRI_CFG_FIND_RELEASE_DIALOG_SHOW_ID },
//v205
{ asi(cfgFilter::FIND), CFG_FIND_RELEASE_FILTER_FLAG },
{ asi(cfgFilter::FIND), CFG_FIND_RELEASE_DIALOG_FLAG },
//..
// **** PREVIEW (preview_dialog)
{ asi(cfgFilter::PREVIEW), CFG_PREVIEW_MODE },
{ asi(cfgFilter::PREVIEW), CFG_REPLACE_ANVS }, //<<
//v200
{ asi(cfgFilter::PREVIEW), CFG_PREVIEW_TAGS_DIALOG_COL1_WIDTH },
{ asi(cfgFilter::PREVIEW), CFG_PREVIEW_TAGS_DIALOG_COL2_WIDTH },
{ asi(cfgFilter::PREVIEW), CFG_EDIT_TAGS_DIALOG_SHOW_TM_STATS },
//v201
{ asi(cfgFilter::PREVIEW), CFG_PREVIEW_TAGS_DIALOG_W_WIDTH },
{ asi(cfgFilter::PREVIEW), CFG_PREVIEW_TAGS_DIALOG_U_WIDTH },
{ asi(cfgFilter::PREVIEW), CFG_PREVIEW_TAGS_DIALOG_S_WIDTH },
{ asi(cfgFilter::PREVIEW), CFG_PREVIEW_TAGS_DIALOG_E_WIDTH },
//v203
//{ asi(cfgFilter::PREVIEW), CFG_ALBUM_ART_SKIP_DEFAULT_CUST }
//v204 (1.0.4)
{ asi(cfgFilter::PREVIEW), CFG_EDIT_TAGS_DIALOG_FLAGS},
//..
// **** PREVIEW MODAL(LEAD-IN) TAG (preview result modal tag)
//v206 (1.0.8)
{ asi(cfgFilter::PREVIEW_MODAL), CFG_PREVIEW_LEADING_TAGS_DLG_COLS_WIDTH },
//..
// **** TAG (tag_mappings_dialog)
{ asi(cfgFilter::TAG), CFG_EDIT_TAGS_DIALOG_COL1_WIDTH },
{ asi(cfgFilter::TAG), CFG_EDIT_TAGS_DIALOG_COL2_WIDTH },
{ asi(cfgFilter::TAG), CFG_EDIT_TAGS_DIALOG_COL3_WIDTH },
//v200
{ asi(cfgFilter::TAG), CFG_EDIT_TAGS_DIALOG_HL_KEYWORD },
//v209 (1.0.16.1)
//todo: (ref patch 1.0.21.1)
//use cfgFilter::CONF instead
{ asi(cfgFilter::TAG), CFG_ALT_WRITE_FLAGS },
//..
// **** TRACK (track_matching_dialog)
//v200
{ asi(cfgFilter::TRACK), CFG_MATCH_TRACKS_DISCOGS_COL1_WIDTH },
{ asi(cfgFilter::TRACK), CFG_MATCH_TRACKS_DISCOGS_COL2_WIDTH },
{ asi(cfgFilter::TRACK), CFG_MATCH_TRACKS_FILES_COL1_WIDTH },
{ asi(cfgFilter::TRACK), CFG_MATCH_TRACKS_FILES_COL2_WIDTH },
{ asi(cfgFilter::TRACK), CFG_MATCH_TRACKS_DISCOGS_STYLE },
{ asi(cfgFilter::TRACK), CFG_MATCH_TRACKS_FILES_STYLE },
{ asi(cfgFilter::TRACK), CFG_DISCOGS_ARTWORK_RA_WIDTH },
{ asi(cfgFilter::TRACK), CFG_DISCOGS_ARTWORK_TYPE_WIDTH },
{ asi(cfgFilter::TRACK), CFG_DISCOGS_ARTWORK_DIM_WIDTH },
{ asi(cfgFilter::TRACK), CFG_DISCOGS_ARTWORK_SAVE_WIDTH },
{ asi(cfgFilter::TRACK), CFG_DISCOGS_ARTWORK_OVR_WIDTH },
{ asi(cfgFilter::TRACK), CFG_DISCOGS_ARTWORK_EMBED_WIDTH },
{ asi(cfgFilter::TRACK), CFG_MATCH_FILE_ARTWORK_NAME_WIDTH },
{ asi(cfgFilter::TRACK), CFG_MATCH_FILE_ARTWORK_DIM_WIDTH },
{ asi(cfgFilter::TRACK), CFG_MATCH_FILE_ARTWORK_SIZE_WIDTH },
{ asi(cfgFilter::TRACK), CFG_MATCH_DISCOGS_ARTWORK_STYLE },
{ asi(cfgFilter::TRACK), CFG_MATCH_FILE_ARTWORKS_STYLE },
//v203
{ asi(cfgFilter::TRACK), CFG_ALBUM_ART_SKIP_DEFAULT_CUST },
//v205
//v206
{ asi(cfgFilter::TRACK), CFG_DISCOGS_ARTWORK_INDEX_WIDTH },
{ asi(cfgFilter::TRACK), CFG_MATCH_FILE_ARTWORK_INDEX_WIDTH },
//v207
{ asi(cfgFilter::TRACK), CFG_DISCOGS_ARTWORK_TL_RA_WIDTH },
{ asi(cfgFilter::TRACK), CFG_DISCOGS_ARTWORK_TL_TYPE_WIDTH },
{ asi(cfgFilter::TRACK), CFG_DISCOGS_ARTWORK_TL_DIM_WIDTH },
{ asi(cfgFilter::TRACK), CFG_DISCOGS_ARTWORK_TL_SAVE_WIDTH },
{ asi(cfgFilter::TRACK), CFG_DISCOGS_ARTWORK_TL_OVR_WIDTH },
{ asi(cfgFilter::TRACK), CFG_DISCOGS_ARTWORK_TL_EMBED_WIDTH },
{ asi(cfgFilter::TRACK), CFG_DISCOGS_ARTWORK_TL_INDEX_WIDTH },
//..
// **** PREVIEW TAGSAVE
{ asi(cfgFilter::CONF), CFG_TAGSAVE_FLAGS },
//v200
//..
// **** UPDATE_TAG (update_tags_dialog)
{ asi(cfgFilter::UPDATE_TAG), CFG_REPLACE_ANVS }, //<<
{ asi(cfgFilter::UPDATE_TAG), CFG_UPDATE_TAGS_MANUALLY_PROMPT },
{ asi(cfgFilter::UPDATE_TAG), CFG_UPDATE_PREVIEW_CHANGES },
//v200
//..
};
void save(cfgFilter cfgfilter, const CConf & in_conf);
void save(cfgFilter cfgfilter, const CConf & in_conf, int id);
bool history_enabled();
bool expiration_enabled();
int expiration_days();
void set_expiration_enabled(bool enabled);
void set_expiration_days(int days);
bool awt_get_alt_mode();
bool awt_set_alt_mode(bool enabled);
bool replace_ANVs = false;
bool move_the_at_beginning = true;
bool discard_numeric_suffix = true;
bool double_digits_track_numbers = true;
bool number_each_disc_from_one = true;
bool match_tracks_using_duration = true;
bool match_tracks_using_number = true;
bool assume_tracks_sorted = false;
bool save_album_art = true;
bool album_art_fetch_all = false;
bool album_art_overwrite = false;
bool save_artist_art = false;
bool artist_art_fetch_all = false;
bool artist_art_overwrite = false;
bool embed_album_art = false;
bool embed_artist_art = false;
formatting_script album_art_directory_string = "$directory_path(%path%)";
formatting_script artist_art_directory_string = "$directory_path(%path%)";
formatting_script album_art_filename_string = "cover$ifequal(%IMAGE_NUMBER%,1,,_%IMAGE_NUMBER%)";
formatting_script artist_art_filename_string = "artist%ARTIST_ID%$ifequal(%IMAGE_NUMBER%,1,,_%IMAGE_NUMBER%)";
formatting_script artist_art_id_format_string = "%DISCOGS_ARTIST_ID%";
bool display_exact_matches = true;
bool enable_autosearch = true;
bool update_tags_preview_changes = true;
bool update_tags_manually_match = true;
bool parse_hidden_as_regular = false;
bool skip_video_tracks = false;
int preview_mode = 1;
bool display_ANVs = false;
int tag_save_flags = 0;
pfc::string8 oauth_token = "";
pfc::string8 oauth_token_secret = "";
int edit_tags_dialog_col1_width = 0;
int edit_tags_dialog_col2_width = 0;
int edit_tags_dialog_col3_width = 0;
int last_conf_tab = 0;
int cache_max_objects = 1000;
bool remove_other_tags = false;
pfc::array_t<pfc::string8> remove_exclude_tags;
pfc::string8 raw_remove_exclude_tags;
inline void set_remove_exclude_tags(const pfc::string8 &s) {
tokenize(s, ",", remove_exclude_tags, true);
raw_remove_exclude_tags = s;
}
formatting_script search_release_format_string = "$join($append(%RELEASE_TITLE%,%RELEASE_SEARCH_LABELS%,%RELEASE_SEARCH_MAJOR_FORMATS%,%RELEASE_SEARCH_FORMATS%,%RELEASE_YEAR%,%RELEASE_SEARCH_CATNOS%))";
formatting_script search_master_format_string = "'[master] '$join($append(%MASTER_RELEASE_TITLE%,%MASTER_RELEASE_YEAR%))";
formatting_script search_master_sub_format_string = "' '$ifequal(%RELEASE_ID%,%MASTER_RELEASE_MAIN_RELEASE_ID%,'* ',' ')$join($append(%RELEASE_TITLE%,%RELEASE_SEARCH_LABELS%,%RELEASE_SEARCH_MAJOR_FORMATS%,%RELEASE_SEARCH_FORMATS%,%RELEASE_YEAR%,%RELEASE_SEARCH_CATNOS%,%RELEASE_COUNTRY%))";
formatting_script release_discogs_format_string = "$ifgreater(%RELEASE_TOTAL_DISCS%,1,%DISC_NUMBER%-,)$num(%TRACK_DISC_TRACK_NUMBER%,2) - $multi_if($multi_and(%ARTISTS_NAME_VARIATION%,$multi_not(%REPLACE_ANVS%)),%ARTISTS_NAME_VARIATION%$multi_if(%DISPLAY_ANVS%,*,),%ARTISTS_NAME%) - %TRACK_TITLE%$ifequal(%TRACK_TOTAL_HIDDEN_TRACKS%,0,,' ['%TRACK_TOTAL_HIDDEN_TRACKS%' HIDDEN]')";
formatting_script release_file_format_string = "$if($strcmp($ext(%path%),tags),$info(@),%path%)";
//v200
int preview_tags_dialog_col1_width = 0;
int preview_tags_dialog_col2_width = 0;
int match_tracks_discogs_col1_width = 0;
int match_tracks_discogs_col2_width = 0;
int match_tracks_files_col1_width = 0;
int match_tracks_files_col2_width = 0;
pfc::string8 edit_tags_dlg_hl_keyword = "";
bool edit_tags_dlg_show_tm_stats = false;
bool release_enter_key_override = true;
int match_tracks_discogs_style = static_cast<int>(LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER | LVS_EX_HEADERDRAGDROP);
int match_tracks_files_style = static_cast<int>(LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER | LVS_EX_HEADERDRAGDROP);
int preview_tags_dialog_w_width = 40;
int preview_tags_dialog_u_width = 40;
int preview_tags_dialog_s_width = 40;
int preview_tags_dialog_e_width = 40;
int cache_offline_cache_flag = /*OC_READ*/1 << 0 | 1 << 1/*OC_WRITE*/;
int match_discogs_artwork_ra_width = 0;
int match_discogs_artwork_type_width = 0;
int match_discogs_artwork_dim_width = 0;
int match_discogs_artwork_save_width = 0;
int match_discogs_artwork_ovr_width = 0;
int match_discogs_artwork_embed_width = 0;
int match_file_artwork_name_width = 0;
int match_file_artwork_dim_width = 0;
int match_file_artwork_size_width = 0;
//todo: depri
int match_discogs_artwork_art_style = static_cast<int>(LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER | LVS_EX_HEADERDRAGDROP);
int match_file_artworks_art_style = static_cast<int>(LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER | LVS_EX_HEADERDRAGDROP);
//..
int album_art_skip_default_cust = 0;
//v204 (1.0.4)
int edit_tags_dlg_flags = 0;
//v205 (1.0.6)
pfc::string8 db_dc_path = "";
int db_dc_flag = 0;
int find_release_filter_flag = 0;
int skip_mng_flag = SKIP_BRAINZ_ID_FETCH;
int list_style = 2;
int history_enabled_max = MAKELPARAM(10, 1); //enabled-max20
int find_release_dlg_flags = 0;
//v206 (1.0.8)
int match_discogs_artwork_index_width = MAKELPARAM(HDF_CENTER * 10 + 6, 30); //justify mode*10 + index, def width
int match_file_artwork_index_width = MAKELPARAM(HDF_CENTER *10 + 3, 30); //justify mode*10 + index, def width
int preview_leading_tags_dlg_cols_width = 0; //lo #col, hi track col
//v207 (1.0.13)
int match_discogs_artwork_tl_ra_width = 0;
int match_discogs_artwork_tl_type_width = 0;
int match_discogs_artwork_tl_dim_width = 0;
int match_discogs_artwork_tl_save_width = 0;
int match_discogs_artwork_tl_ovr_width = 0;
int match_discogs_artwork_tl_embed_width = 0;
int match_discogs_artwork_tl_index_width = 0;
int custom_font = 0;
bool auto_rel_load_on_open = true;
bool auto_rel_load_on_select = false;
bool parse_hidden_merge_titles = true;
//v208
pfc::string8 multivalue_fields = "ARTIST;ALBUM ARTIST;PRODUCER;COMPOSER;PERFORMER;GENRE;STYLE";
//v209 (1.0.16.1)
int alt_write_flags = 0;
//v210 (1.0.21)
int disk_cache_exp = 30; //hi flags, lo days
//..
std::vector<int> vflags;
friend class FlgMng;
};
typedef CConf foo_conf;
inline CConf CONF("Global");
#ifdef SIM_VA_MA_BETA
inline std::vector<std::string> g_va_ma_releases;
extern void g_clear_va_ma_releases();
#endif