This commit is contained in:
Kovid Goyal 2012-10-22 08:17:01 +05:30
parent d210af8860
commit 9070385bb7
2 changed files with 3 additions and 1 deletions

View File

@ -1368,6 +1368,8 @@ class DeviceBooksModel(BooksModel): # {{{
return QVariant(authors_to_string(au))
elif cname == 'size':
size = self.db[self.map[row]].size
if not isinstance(size, (float, int)):
size = 0
return QVariant(human_readable(size))
elif cname == 'timestamp':
dt = self.db[self.map[row]].datetime

View File

@ -549,7 +549,7 @@ def option_parser(usage=_('%prog URL\n\nWhere URL is for example http://google.c
def create_fetcher(options, image_map={}, log=None):
if log is None:
log = Log()
log = Log(level=Log.DEBUG) if options.verbose else Log()
return RecursiveFetcher(options, log, image_map={})
def main(args=sys.argv):