Skip to content

Commit

Permalink
Album Tagging (beatport only for test), match reason
Browse files Browse the repository at this point in the history
  • Loading branch information
Marekkon5 committed Sep 9, 2024
1 parent 41f7229 commit 4c431a4
Show file tree
Hide file tree
Showing 19 changed files with 344 additions and 30 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions client/src/components/AutotaggerAdvanced.vue
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,26 @@
v-model='$1t.config.value.capitalizeGenres'
></AdvancedSettingsToggle>

<!-- Album Tagging -->
<AdvancedSettingsToggle
label="Album Tagging"
tooltip="Treat folders as albums"
v-model='$1t.config.value.albumTagging'
></AdvancedSettingsToggle>
<div class='row justify-center items-center q-px-md' v-if='$1t.config.value.albumTagging'>
<div class='q-pb-lg'>How many % of tracks must be from same album to be treated as album: </div>
<q-slider
class='q-mt-sm'
:min='0.0'
:max='1.0'
:step='0.02'
v-model='$1t.config.value.albumTaggingRatio'
label
label-always
:label-value="`${Math.round($1t.config.value.albumTaggingRatio * 100)}%`"
></q-slider>
</div>

<!-- Duration -->
<div class='row justify-center items-center q-px-md'>
<div>Match duration</div>
Expand Down
2 changes: 2 additions & 0 deletions client/src/scripts/autotagger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ class AutotaggerConfig {
id3CommLang?: string;
removeAllCovers: boolean = false;
fetchAllResults: boolean = false;
albumTagging: boolean = false;
albumTaggingRatio: number = 0.5;

spotify?: SpotifyConfig;

Expand Down
1 change: 1 addition & 0 deletions client/src/views/AutotaggerStatus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
</q-tooltip>
<q-tooltip v-if='i.status.status == "ok"'>
Accuracy: {{ (i.status.accuracy * 100).toFixed(2) }}%
<span v-if='i.status.reason'>, Reason: {{ i.status.reason }}</span>
</q-tooltip>
</q-icon>
<span class='q-px-sm' v-if='index < item.length - 1'>|</span>
Expand Down
1 change: 1 addition & 0 deletions crates/onetagger-autotag/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ edition = "2021"

[dependencies]
log = "0.4"
rand = "0.8"
regex = "1.10"
dunce = "1.0"
image = "0.25"
Expand Down
2 changes: 1 addition & 1 deletion crates/onetagger-autotag/src/audiofeatures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ impl AudioFeatures {
let mut status = TaggingStatus {
status: TaggingState::Error,
path: file.to_owned(),
message: None, accuracy: None, used_shazam: false
message: None, accuracy: None, used_shazam: false, release_id: None, reason: None
};
// Load file
if let Ok(info) = AudioFileInfo::load_file(&file, None, None) {
Expand Down
Loading

0 comments on commit 4c431a4

Please sign in to comment.