- xmlpp::Document doc;
- xmlpp::Element* root = doc.create_root_node ("DCPPlaylist");
- root->set_attribute ("Name", name);
-
- BOOST_FOREACH (SPLEntry i, playlist) {
- xmlpp::Element* d = root->add_child ("DCP");
- d->set_attribute ("CPL", i.cpl->id());
- d->add_child_text (i.directory.string());
+ _spl.clear ();
+ _missing = false;
+ cxml::Document doc ("SPL");
+ doc.read_file (path);
+ _id = doc.string_child("Id");
+ _name = doc.string_child("Name");
+ for (auto i: doc.node_children("Entry")) {
+ auto c = store->get(i->string_child("Digest"));
+ if (c) {
+ add (SPLEntry(c));
+ } else {
+ _missing = true;
+ }