The previous implementation felt that playlists were not saved
(.is_saved() -> False) when the playlists had not been altered since
loading.
We *don't* save the digest when we load from a string, because
that string is not necessarily on disk and we *do* want to save
it, even if the playlist hasn't change since loading.
I also removed the return bits, since FilePlaylist._from_xml_doc()
doesn't return anything.
path/to/curve/two
"""
doc = xml.dom.minidom.parseString(string)
- return self._from_xml_doc(doc)
+ self._from_xml_doc(doc)
def load(self, path=None):
"""Load a playlist from a file.
"""
self.set_path(path)
doc = xml.dom.minidom.parse(self.path)
- return self._from_xml_doc(doc)
+ self._from_xml_doc(doc)
+ self._digest = self.digest()
def save(self, path=None):
"""Saves the playlist in a XML file.