From: W. Trevor King Date: Thu, 13 May 2010 14:08:54 +0000 (-0400) Subject: Save playlist digest on loading. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5bb2759ddcd34da4a06ca8a9149f59ac20aceeb2;p=hooke.git Save playlist digest on loading. 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. --- diff --git a/hooke/playlist.py b/hooke/playlist.py index 0be9e1e..1d5e994 100644 --- a/hooke/playlist.py +++ b/hooke/playlist.py @@ -224,14 +224,15 @@ class FilePlaylist (Playlist): 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.