Sat, 14 Jun 2008 15:56:53 +0200 <thp@perli.net>
Make things less verbose and fix a problem with cover art handling * src/gpodder/gui.py: Fix problem when trying to remove a non-existent podcast cover art from the cache; make things less verbose * src/gpodder/*.py: Make things less verbose git-svn-id: svn://svn.berlios.de/gpodder/trunk@739 b0d088ad-0a06-0410-aad2-9ed5178a7e87
This commit is contained in:
parent
02192cc97a
commit
1174dd057c
|
@ -1,3 +1,10 @@
|
|||
Sat, 14 Jun 2008 15:56:53 +0200 <thp@perli.net>
|
||||
Make things less verbose and fix a problem with cover art handling
|
||||
|
||||
* src/gpodder/gui.py: Fix problem when trying to remove a non-existent
|
||||
podcast cover art from the cache; make things less verbose
|
||||
* src/gpodder/*.py: Make things less verbose
|
||||
|
||||
Sat, 14 Jun 2008 15:16:09 +0200 <thp@perli.net>
|
||||
Detect HTML and OPML content when adding a podcast subscription
|
||||
|
||||
|
|
|
@ -694,8 +694,10 @@ class gPodder(GladeWidget):
|
|||
for row in self.treeChannels.get_model():
|
||||
if row[COLUMN_URL] == channel_url:
|
||||
row[COLUMN_PIXBUF] = None
|
||||
del self.cover_cache[(channel_url, gl.config.podcast_list_icon_size, \
|
||||
gl.config.podcast_list_icon_size)]
|
||||
key = (channel_url, gl.config.podcast_list_icon_size, \
|
||||
gl.config.podcast_list_icon_size)
|
||||
if key in self.cover_cache:
|
||||
del self.cover_cache[key]
|
||||
|
||||
|
||||
def cover_download_finished(self, channel_url, pixbuf):
|
||||
|
|
|
@ -146,7 +146,6 @@ class podcastChannel(list):
|
|||
# If we have an old instance of this channel, and
|
||||
# feedcache says the feed hasn't changed, return old
|
||||
if not updated and old_channel:
|
||||
log('using old channel for %s', url)
|
||||
return old_channel
|
||||
|
||||
channel = podcastChannel( url)
|
||||
|
@ -631,7 +630,8 @@ class podcastItem(object):
|
|||
episode.url = entry.link
|
||||
|
||||
if not episode.url:
|
||||
raise ValueError( 'Episode has an invalid URL')
|
||||
# This item in the feed has no downloadable enclosure
|
||||
return None
|
||||
|
||||
if not episode.pubDate:
|
||||
metainfo = episode.get_metainfo()
|
||||
|
@ -754,7 +754,6 @@ class podcastItem(object):
|
|||
|
||||
def __cmp__( self, other):
|
||||
if self.pubDate == other.pubDate:
|
||||
log('pubDate equal, comparing titles (buggy feed?)', sender=self)
|
||||
return cmp(self.title, other.title)
|
||||
|
||||
try:
|
||||
|
|
|
@ -100,7 +100,7 @@ class Importer(object):
|
|||
if not len(self.items):
|
||||
log( 'OPML import finished, but no items found: %s', url, sender = self)
|
||||
except:
|
||||
log( 'Cannot import OPML from URL: %s', url, sender = self)
|
||||
log( 'Cannot import OPML from URL: %s', url, traceback=True, sender = self)
|
||||
|
||||
def format_channel( self, channel):
|
||||
"""
|
||||
|
|
|
@ -176,7 +176,7 @@ class CoverDownloader(ObservableService):
|
|||
try:
|
||||
loader.close()
|
||||
except:
|
||||
log('Cannot load channel from %s', url, sender=self)
|
||||
pass
|
||||
|
||||
if pixbuf is not None:
|
||||
new_pixbuf = util.resize_pixbuf_keep_ratio(pixbuf, self.MAX_SIZE, self.MAX_SIZE)
|
||||
|
|
|
@ -980,7 +980,6 @@ def resize_pixbuf_keep_ratio(pixbuf, max_width, max_height, key=None, cache=None
|
|||
|
||||
if cache is not None:
|
||||
if (key, max_width, max_height) in cache:
|
||||
log('Loading from cache: %s', key)
|
||||
return cache[(key, max_width, max_height)]
|
||||
|
||||
# Resize if too wide
|
||||
|
@ -1000,7 +999,6 @@ def resize_pixbuf_keep_ratio(pixbuf, max_width, max_height, key=None, cache=None
|
|||
if changed:
|
||||
result = pixbuf
|
||||
if cache is not None:
|
||||
log('Storing in cache: %s', key)
|
||||
cache[(key, max_width, max_height)] = result
|
||||
else:
|
||||
result = None
|
||||
|
|
Loading…
Reference in New Issue