Skip to content

Commit 4c431a4

Browse files
committed
Album Tagging (beatport only for test), match reason
1 parent 41f7229 commit 4c431a4

19 files changed

+344
-30
lines changed

Cargo.lock

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/src/components/AutotaggerAdvanced.vue

+20
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,26 @@
174174
v-model='$1t.config.value.capitalizeGenres'
175175
></AdvancedSettingsToggle>
176176

177+
<!-- Album Tagging -->
178+
<AdvancedSettingsToggle
179+
label="Album Tagging"
180+
tooltip="Treat folders as albums"
181+
v-model='$1t.config.value.albumTagging'
182+
></AdvancedSettingsToggle>
183+
<div class='row justify-center items-center q-px-md' v-if='$1t.config.value.albumTagging'>
184+
<div class='q-pb-lg'>How many % of tracks must be from same album to be treated as album: </div>
185+
<q-slider
186+
class='q-mt-sm'
187+
:min='0.0'
188+
:max='1.0'
189+
:step='0.02'
190+
v-model='$1t.config.value.albumTaggingRatio'
191+
label
192+
label-always
193+
:label-value="`${Math.round($1t.config.value.albumTaggingRatio * 100)}%`"
194+
></q-slider>
195+
</div>
196+
177197
<!-- Duration -->
178198
<div class='row justify-center items-center q-px-md'>
179199
<div>Match duration</div>

client/src/scripts/autotagger.ts

+2
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ class AutotaggerConfig {
8080
id3CommLang?: string;
8181
removeAllCovers: boolean = false;
8282
fetchAllResults: boolean = false;
83+
albumTagging: boolean = false;
84+
albumTaggingRatio: number = 0.5;
8385

8486
spotify?: SpotifyConfig;
8587

client/src/views/AutotaggerStatus.vue

+1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@
120120
</q-tooltip>
121121
<q-tooltip v-if='i.status.status == "ok"'>
122122
Accuracy: {{ (i.status.accuracy * 100).toFixed(2) }}%
123+
<span v-if='i.status.reason'>, Reason: {{ i.status.reason }}</span>
123124
</q-tooltip>
124125
</q-icon>
125126
<span class='q-px-sm' v-if='index < item.length - 1'>|</span>

crates/onetagger-autotag/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ edition = "2021"
77

88
[dependencies]
99
log = "0.4"
10+
rand = "0.8"
1011
regex = "1.10"
1112
dunce = "1.0"
1213
image = "0.25"

crates/onetagger-autotag/src/audiofeatures.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ impl AudioFeatures {
182182
let mut status = TaggingStatus {
183183
status: TaggingState::Error,
184184
path: file.to_owned(),
185-
message: None, accuracy: None, used_shazam: false
185+
message: None, accuracy: None, used_shazam: false, release_id: None, reason: None
186186
};
187187
// Load file
188188
if let Ok(info) = AudioFileInfo::load_file(&file, None, None) {

0 commit comments

Comments
 (0)