From 5bb2759ddcd34da4a06ca8a9149f59ac20aceeb2 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 13 May 2010 10:08:54 -0400 Subject: [PATCH] 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. --- hooke/playlist.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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. -- 2.26.2