refactor #24

Merged
phoenix merged 6 commits from refactor into devel 2025-04-19 01:31:58 +00:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit 6735a0a24f - Show all commits

View File

@@ -149,7 +149,7 @@ pub mod metadata {
) {
Ok(flac_file) => match flac_file.vorbis_comments() {
Some(vb) => {
let type_str: String = types::o::get_type(t).unwrap();
let type_str: String = types::access::get_type(t).unwrap();
match vb.get(&type_str) {
Some(val) => Ok(val.to_owned()),
None => Err(std::io::Error::new(
@@ -192,13 +192,13 @@ pub mod metadata {
vb.set_album(pre_value);
}
types::Type::AlbumArtist => {
vb.insert(types::o::get_type(t).unwrap(), pre_value);
vb.insert(types::access::get_type(t).unwrap(), pre_value);
}
types::Type::Artist => {
vb.set_artist(pre_value);
}
types::Type::Date => {
vb.insert(types::o::get_type(t).unwrap(), pre_value);
vb.insert(types::access::get_type(t).unwrap(), pre_value);
}
types::Type::Disc => {
vb.set_disk(pre_value.parse().unwrap());

View File

@@ -9,7 +9,7 @@ pub enum Type {
Disc,
}
pub mod o {
pub mod access {
pub fn get_type(t: super::Type) -> Result<String, std::io::Error> {
match t {