Commit 868b146b authored by Leonardo Schwarz's avatar Leonardo Schwarz

Remove a todo, better docs

parent 0391e93a
......@@ -84,8 +84,8 @@ impl FromXml for Label {
label_code: reader.read_option(".//mb:label/mb:label-code/text()")?,
label_type: reader.read_option(".//mb:label/@type")?,
country: reader.read_option(".//mb:label/mb:country/text()")?,
ipi_code: None, // TODO
isni_code: None, // TODO
ipi_code: reader.read_option(".//mb:label/mb:ipi/text()")?,
isni_code: reader.read_option(".//mb:label/mb:isni-list/mb-isni/text()")?,
begin_date: reader.read_option(".//mb:label/mb:life-span/mb:begin/text()")?,
end_date: reader.read_option(".//mb:label/mb:life-span/mb:end/text()")?,
})
......
......@@ -67,11 +67,7 @@ impl FromXml for Language {
}
}
// This is needed for it to be able to be used as `SearchField` value.
//
// TODO: Consider whether we should actually create our own trait as `ToString`
// might be a bit
// misleading. Maybe `to_search_value` would be more precise?
// This is needed when we use a `Language` as a `SearchField` value.
impl ToString for Language {
fn to_string(&self) -> String
{
......
//! Defines types representing the entities from the MusicBrainz database.
/// TODO consider what type to use
pub use std::time::Duration;
#[macro_use]
......
......@@ -29,7 +29,7 @@ pub struct Recording {
/// Disambiguation comment.
pub disambiguation: Option<String>,
/// Annotation if present.
/// Any additional free form annotation for this `Recording`.
pub annotation: Option<String>,
}
......
......@@ -190,7 +190,10 @@ pub struct Release {
/// A disambiguation comment if present, which allows to differentiate this
/// release easily from
/// other releases with the same or very similar name.
pub disambiguation: Option<String>, // TODO: annotations
pub disambiguation: Option<String>,
/// Any additional free form annotation for this `Release`.
pub annotation: Option<String>,
/// The mediums (disks) of the release.
pub mediums: Vec<ReleaseMedium>,
......@@ -203,6 +206,7 @@ impl FromXml for Release {
R: XpathReader<'d>,
{
Ok(Release {
annotation: reader.read_option(".//mb:release/mb:annotation/mb:text/text()")?,
artists: reader.read_vec(".//mb:release/mb:artist-credit/mb:name-credit")?,
barcode: reader.read_option(".//mb:release/mb:barcode/text()")?,
country: reader.read_option(".//mb:release/mb:country/text()")?,
......@@ -229,7 +233,7 @@ impl Resource for Release {
fn get_incs() -> &'static str
{
"aliases+artists+labels+recordings"
"aliases+annotation+artists+labels+recordings"
}
}
......
......@@ -31,6 +31,7 @@ pub struct Series {
pub disambiguation: Option<String>,
/// Any additional free form annotation for this `Series`.
pub annotation: Option<String>,
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment