Skip to content

Commit

Permalink
Show download count in Jobs list.
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmXinu committed Feb 14, 2016
1 parent 2af3a44 commit f090485
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 119 deletions.
7 changes: 5 additions & 2 deletions calibre-plugin/fff_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1308,11 +1308,14 @@ def prep_download_loop(self,book,

if collision == OVERWRITE and \
db.has_format(book_id,formmapping[fileform],index_is_id=True):
logger.debug("OVERWRITE file: "+db.format_abspath(book_id, formmapping[fileform], index_is_id=True))
fileupdated=datetime.fromtimestamp(os.stat(db.format_abspath(book_id, formmapping[fileform], index_is_id=True))[8])
book['fileupdated']=fileupdated
logger.debug("OVERWRITE file updated: %s"%fileupdated)
book['updated']=fileupdated
if not bgmeta:
# check make sure incoming is newer.
lastupdated=story.getMetadataRaw('dateUpdated')
logger.debug("OVERWRITE site updated: %s"%lastupdated)

# updated doesn't have time (or is midnight), use dates only.
# updated does have time, use full timestamps.
Expand Down Expand Up @@ -1473,7 +1476,7 @@ def __init__(self,result):
cpus = self.gui.job_manager.server.pool_size
args = ['calibre_plugins.fanficfare_plugin.jobs', 'do_download_worker',
(book_list, options, cpus, merge)]
desc = _('Download FanFiction Book')
desc = _('Download %s FanFiction Book(s)') % len(filter(lambda x : x['good'], book_list))
job = self.gui.job_manager.run_job(
self.Dispatcher(partial(self.download_list_completed,options=options,merge=merge)),
func, args=args,
Expand Down
Loading

0 comments on commit f090485

Please sign in to comment.