diff --git a/calibre-plugin/ffdl_plugin.py b/calibre-plugin/ffdl_plugin.py index d9f606b..d7cd339 100644 --- a/calibre-plugin/ffdl_plugin.py +++ b/calibre-plugin/ffdl_plugin.py @@ -422,6 +422,8 @@ class FanFictionDownLoaderPlugin(InterfaceAction): book['password'] = adapter.password book['icon'] = 'plus.png' + book['pubdate'] = story.getMetadataRaw('datePublished') + book['timestamp'] = None # filled below if not skipped. if collision in (CALIBREONLY): book['icon'] = 'metadata.png' @@ -517,15 +519,11 @@ class FanFictionDownLoaderPlugin(InterfaceAction): print("existing epub tmp:"+tmp.name) book['epub_for_update'] = tmp.name - book['pubdate'] = story.getMetadataRaw('datePublished') - if collision != CALIBREONLY and not skip_date_update: # I'm half convinced this should be dateUpdated instead, but # this behavior matches how epubs come out when imported # dateCreated == packaged--epub/etc created. book['timestamp'] = story.getMetadataRaw('dateCreated') - else: - book['timestamp'] = None if book['good']: # there shouldn't be any !'good' books at this point. # if still 'good', make a temp file to write the output to. diff --git a/downloader.py b/downloader.py index fb55283..a6533a2 100644 --- a/downloader.py +++ b/downloader.py @@ -84,14 +84,17 @@ def main(): conflist = [] homepath = join(expanduser("~"),".fanficdownloader") + if isfile(join(homepath,"defaults.ini")): conflist.append(join(homepath,"defaults.ini")) - if isfile(join(homepath,"personal.ini")): - conflist.append(join(homepath,"personal.ini")) if isfile("defaults.ini"): conflist.append("defaults.ini") + + if isfile(join(homepath,"personal.ini")): + conflist.append(join(homepath,"personal.ini")) if isfile("personal.ini"): conflist.append("personal.ini") + if options.configfile: conflist.extend(options.configfile) diff --git a/fanficdownloader/adapters/base_adapter.py b/fanficdownloader/adapters/base_adapter.py index 655e953..a9bd2a2 100644 --- a/fanficdownloader/adapters/base_adapter.py +++ b/fanficdownloader/adapters/base_adapter.py @@ -243,7 +243,7 @@ def makeDate(string,format): do_abbrev = "%b" in format if "%B" in format or do_abbrev: - format = format.replace("%B","%m") + format = format.replace("%B","%m").replace("%b","%m") for (name,num) in fullmon.items(): if do_abbrev: name = name[:3] # first three for abbrev