mirror of
https://github.com/CDrummond/bliss-analyser.git
synced 2025-04-08 05:00:02 +03:00
If album missing, then set to audio filename (without extension)
This commit is contained in:
parent
f3a86414dc
commit
a859f7ac0f
@ -64,6 +64,14 @@ pub fn parse(audio_path:&PathBuf, cue_path:&PathBuf) -> Vec<CueTrack> {
|
||||
if ctrack.artist.is_empty() && !ctrack.album_artist.is_empty() {
|
||||
ctrack.artist = ctrack.album_artist.clone();
|
||||
}
|
||||
if ctrack.album.is_empty() {
|
||||
let mut path = audio_path.clone();
|
||||
path.set_extension("");
|
||||
match path.file_name() {
|
||||
Some(n) => { ctrack.album = String::from(n.to_string_lossy()); }
|
||||
None => { }
|
||||
}
|
||||
}
|
||||
resp.push(ctrack);
|
||||
},
|
||||
None => { }
|
||||
|
Loading…
x
Reference in New Issue
Block a user