mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'patch-2' of https://github.com/felagund/calibre
This commit is contained in:
commit
13db00d50c
@ -1457,7 +1457,8 @@ class BasicNewsRecipe(Recipe):
|
||||
def publication_date(self):
|
||||
'''
|
||||
Use this method to set the date when this issue was published.
|
||||
Defaults to the moment of download.
|
||||
Defaults to the moment of download. Must return a :class:`datetime.datetime`
|
||||
object.
|
||||
'''
|
||||
return nowf()
|
||||
|
||||
@ -1465,8 +1466,9 @@ class BasicNewsRecipe(Recipe):
|
||||
if dir is None:
|
||||
dir = self.output_dir
|
||||
title = self.short_title()
|
||||
pdate = self.publication_date()
|
||||
if self.output_profile.periodical_date_in_title:
|
||||
title += strftime(self.timefmt)
|
||||
title += strftime(self.timefmt, pdate)
|
||||
mi = MetaInformation(title, [__appname__])
|
||||
mi.publisher = __appname__
|
||||
mi.author_sort = __appname__
|
||||
@ -1489,7 +1491,7 @@ class BasicNewsRecipe(Recipe):
|
||||
language = canonicalize_lang(self.language)
|
||||
if language is not None:
|
||||
mi.language = language
|
||||
mi.pubdate = self.publication_date()
|
||||
mi.pubdate = pdate
|
||||
opf_path = os.path.join(dir, 'index.opf')
|
||||
ncx_path = os.path.join(dir, 'index.ncx')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user