refactor (#24)
Reviewed-on: #24 Co-authored-by: phoenix <kundeng00@pm.me> Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
@@ -8,3 +8,19 @@ pub enum Type {
|
||||
Track,
|
||||
Disc,
|
||||
}
|
||||
|
||||
pub mod access {
|
||||
|
||||
pub fn get_type(t: super::Type) -> Result<String, std::io::Error> {
|
||||
match t {
|
||||
super::Type::Title => Ok("TITLE".to_owned()),
|
||||
super::Type::Artist => Ok("ARTIST".to_owned()),
|
||||
super::Type::Album => Ok("ALBUM".to_owned()),
|
||||
super::Type::AlbumArtist => Ok("ALBUMARTIST".to_owned()),
|
||||
super::Type::Genre => Ok("GENRE".to_owned()),
|
||||
super::Type::Date => Ok("DATE".to_owned()),
|
||||
super::Type::Track => Ok("TRACKNUMBER".to_owned()),
|
||||
super::Type::Disc => Ok("DISCNUMBER".to_owned()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user