http://bugs.gpodder.org/show_bug.cgi?id=124





--- Comment #9 from Thomas Perl <[EMAIL PROTECTED]>  2008-06-13 10:15:11 ---
I think in the part

+        # Update the cached newest_pubdate_downloaded() result.
+        if not self.cached_npd:
+            self.cached_npd = item.pubDate
+        else:
+            self.cached_npd = item.newer_pubdate( self.cached_npd)

You have to deal with two different values of cached_npd:

 * If self.cached_npd is None (None), you have to call
newest_pubdate_downloaded before changing cached_npd

after that cached_npd will be either zero (0) or some value other than None.

 * If self.cached_npd is zero (0), you set the cached_npd to the
just-downloaded file
 * In any other situation (i.e. cached_npd is neither None or 0), you have to
do a comparison like the one you already have in place in the "else" branch of
the above code snippet.

When I come to think of it, deleting an episode is not a problem (because it
will be marked with the trash can icon after deletion and not be considered
"new", anyway). The problem I was thinking about was when a "trash can" episode
is marked as "not downloaded" - then it might be considered "new" again. So,
marking an episode as "not downloaded" should remove the cached value.

This should take care of most things :)


-- 
Configure bugmail: http://bugs.gpodder.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
_______________________________________________
gPodder-Bugs mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/gpodder-bugs

Reply via email to