Added support for new types
This commit is contained in:
@@ -211,6 +211,12 @@ pub mod metadata {
|
|||||||
types::Type::Track => {
|
types::Type::Track => {
|
||||||
vb.set_track(pre_value.parse().unwrap());
|
vb.set_track(pre_value.parse().unwrap());
|
||||||
}
|
}
|
||||||
|
types::Type::TrackCount => {
|
||||||
|
vb.set_track_total(pre_value.parse().unwrap());
|
||||||
|
}
|
||||||
|
types::Type::DiscCount => {
|
||||||
|
vb.set_disk_total(pre_value.parse().unwrap());
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(value.to_owned())
|
Ok(value.to_owned())
|
||||||
|
@@ -7,6 +7,8 @@ pub enum Type {
|
|||||||
Date,
|
Date,
|
||||||
Track,
|
Track,
|
||||||
Disc,
|
Disc,
|
||||||
|
TrackCount,
|
||||||
|
DiscCount,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub mod access {
|
pub mod access {
|
||||||
@@ -21,6 +23,8 @@ pub mod access {
|
|||||||
super::Type::Date => Ok("DATE".to_owned()),
|
super::Type::Date => Ok("DATE".to_owned()),
|
||||||
super::Type::Track => Ok("TRACKNUMBER".to_owned()),
|
super::Type::Track => Ok("TRACKNUMBER".to_owned()),
|
||||||
super::Type::Disc => Ok("DISCNUMBER".to_owned()),
|
super::Type::Disc => Ok("DISCNUMBER".to_owned()),
|
||||||
|
super::Type::TrackCount => Ok("TRACKCOUNT".to_owned()),
|
||||||
|
super::Type::DiscCount => Ok("DISCCOUNT".to_owned()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user