//map.insert (Property ("lyrics", ""));
//map.insert (Property ("media", ""));
//map.insert (Property ("label", ""));
- //map.insert (Property ("barcode", ""));
+ map.insert (Property ("barcode", ""));
//map.insert (Property ("encoded_by", ""));
//map.insert (Property ("catalog_number", ""));
//map.insert (Property ("album_sort", ""));
//map.insert (Property ("album_artist_sort", ""));
//map.insert (Property ("artist_sort", ""));
- //map.insert (Property ("title_sort", ""));\
-
+ //map.insert (Property ("title_sort", ""));
+
/*** Globals ***/
user_map.insert (Property ("user_name", ""));
user_map.insert (Property ("user_email", ""));
if (it == map.end()) {
it = user_map.find (name);
if (it == user_map.end()) {
- // Should not be reached!
- std::cerr << "Programming error in SessionMetadata::get_value" << std::endl;
+ // Should not be reached, except if loading metadata from a newer version with a new type
+ std::cerr << "Programming error in SessionMetadata::get_value (" << name << ")" << std::endl;
return "";
}
}
if (it == map.end()) {
it = user_map.find (name);
if (it == user_map.end()) {
- // Should not be reached!
- std::cerr << "Programming error in SessionMetadata::set_value" << std::endl;
+ // Should not be reached, except if loading metadata from a newer version with a new type
+ std::cerr << "Programming error in SessionMetadata::set_value (" << name << ")" << std::endl;
return;
}
}
}
int
-SessionMetadata::set_state (const XMLNode & state, int version_num)
+SessionMetadata::set_state (const XMLNode & state, int /*version_num*/)
{
const XMLNodeList & children = state.children();
string name;
return get_value("grouping");
}
+string
+SessionMetadata::barcode () const
+{
+ return get_value("barcode");
+}
+
string
SessionMetadata::title () const
{
set_value ("grouping", v);
}
+void
+SessionMetadata::set_barcode (const string & v)
+{
+ set_value ("barcode", v);
+}
+
void
SessionMetadata::set_title (const string & v)
{