mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
fa09d8a460
commit
5cac5890d9
@ -113,7 +113,7 @@ class NewsItem(NewsTreeItem):
|
|||||||
if icon in self.favicons:
|
if icon in self.favicons:
|
||||||
try:
|
try:
|
||||||
with zipfile.ZipFile(self.zf, 'r') as zf:
|
with zipfile.ZipFile(self.zf, 'r') as zf:
|
||||||
p.loadFromData(zf.read(icon))
|
p.loadFromData(zf.read(self.favicons[icon]))
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
if not p.isNull():
|
if not p.isNull():
|
||||||
@ -140,7 +140,7 @@ class RecipeModel(QAbstractItemModel, SearchQueryParser):
|
|||||||
self.scheduler_config = SchedulerConfig()
|
self.scheduler_config = SchedulerConfig()
|
||||||
try:
|
try:
|
||||||
with zipfile.ZipFile(P('builtin_recipes.zip'), 'r') as zf:
|
with zipfile.ZipFile(P('builtin_recipes.zip'), 'r') as zf:
|
||||||
self.favicons = frozenset([x for x in zf.namelist() if
|
self.favicons = dict([(x, zf.getinfo(x)) for x in zf.namelist() if
|
||||||
x.endswith('.png')])
|
x.endswith('.png')])
|
||||||
except:
|
except:
|
||||||
self.favicons = frozenset()
|
self.favicons = frozenset()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user