|
|
This page documents the process of selecting & discriminating against album candidates
|
|
|
|
|
|
```mermaid
|
|
|
graph TB
|
|
|
entrypoint[A new track is added]-->check_album_name
|
|
|
check_album_name[Check its album name]-- If it's empty -->if_empty
|
|
|
check_album_name-- If a title is provided -->if_not_empty
|
|
|
|
|
|
subgraph Handle unknown albums
|
|
|
if_empty["Is there an album artist provided for this track?"]-- Yes -->use_album_artist_unknown_album["Use the
|
|
|
album artist's unknown album"]
|
|
|
if_empty-- No -->check_track_artist_unknown_album
|
|
|
check_track_artist_unknown_album["Is there an artist provided for this track?"]-- Yes -->use_track_artist_unknown_album["Use the track artist's unknown album"]
|
|
|
check_track_artist_unknown_album-- No -->use_unknown["Use unknown artist's unknown album"]
|
|
|
end
|
|
|
|
|
|
if_not_empty[Is the new track in the same folder and with the same title as the previously analyzed track?] -- Yes -->return_last_candidate[Return the previously selected album]
|
|
|
if_not_empty-- No -->get_candidates
|
|
|
get_candidates[Fetch all album with the same title]-->for_each
|
|
|
for_each[For each album candidate]-->check_new_track_album_artist
|
|
|
subgraph Main album selection loop
|
|
|
check_new_track_album_artist[Does the new track have an album artist]-- Yes --> compare_album_artist
|
|
|
compare_album_artist["Does the album artist differ from the candidate album?"] -->discard_candidate
|
|
|
check_new_track_album_artist-- No -->check_multi_disc
|
|
|
check_multi_disc["Is the album tagged as multi disc?"] -- No -->check_different_folder
|
|
|
check_multi_disc -- Yes --> accept_candidate
|
|
|
check_different_folder["Is the new track in the same folder as the candidate album tracks?"]-- Yes -->accept_candidate
|
|
|
check_different_folder-- No -->check_multi_artists
|
|
|
check_multi_artists["Are there multiple artists in the candidate album?"]-- No -->check_date
|
|
|
check_multi_artists-- Yes -->discard_candidate
|
|
|
check_date["Are all of the candidate album tracks released on the same date?"]-- Yes -->accept_candidate
|
|
|
check_date-- No -->discard_candidate
|
|
|
discard_candidate[Discard this album candidate]-->for_each
|
|
|
accept_candidate[Accept this album candidate]-->for_each
|
|
|
end
|
|
|
|
|
|
for_each-->choose_candidate
|
|
|
choose_candidate["How many candidates are there left?"]-- 0 -->create_album["Create a new album"]
|
|
|
choose_candidate-- 1 -->select_candidate["Select that candidate"]
|
|
|
choose_candidate-- 2 -->select_first_candidate["Warn and select the 1st candidate"]
|
|
|
``` |
|
|
\ No newline at end of file |