From 7a58ea13ed56ae53dec1bdcf5895075b6eb32e9f Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Fri, 27 Jan 2012 20:25:10 -0600 Subject: [PATCH] Fix adastra changed date format. Plugin-Fix updatemeta checkbox. --- calibre-plugin/dialogs.py | 4 ++-- fanficdownloader/adapters/adapter_adastrafanficcom.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/calibre-plugin/dialogs.py b/calibre-plugin/dialogs.py index 43fe702b..5ab82df6 100644 --- a/calibre-plugin/dialogs.py +++ b/calibre-plugin/dialogs.py @@ -152,7 +152,7 @@ class AddNewDialog(SizePersistedDialog): return { 'fileform': unicode(self.fileform.currentText()), 'collision': unicode(self.collision.currentText()), - 'updatemeta': unicode(self.updatemeta.isChecked()), + 'updatemeta': self.updatemeta.isChecked(), } def get_urlstext(self): @@ -417,7 +417,7 @@ class UpdateExistingDialog(SizePersistedDialog): return { 'fileform': unicode(self.fileform.currentText()), 'collision': unicode(self.collision.currentText()), - 'updatemeta': unicode(self.updatemeta.isChecked()), + 'updatemeta': self.updatemeta.isChecked(), } def display_story_list(gui, header, prefs, icon, books, diff --git a/fanficdownloader/adapters/adapter_adastrafanficcom.py b/fanficdownloader/adapters/adapter_adastrafanficcom.py index 14fe48e3..a92fa778 100644 --- a/fanficdownloader/adapters/adapter_adastrafanficcom.py +++ b/fanficdownloader/adapters/adapter_adastrafanficcom.py @@ -174,12 +174,12 @@ class AdAstraFanficComSiteAdapter(BaseSiteAdapter): self.story.setMetadata('status', 'In-Progress') if 'Published' in label: - self.story.setMetadata('datePublished', makeDate(value.strip(), "%m/%d/%Y")) + self.story.setMetadata('datePublished', makeDate(value.strip(), "%d %b %Y")) if 'Updated' in label: # there's a stray [ at the end. #value = value[0:-1] - self.story.setMetadata('dateUpdated', makeDate(value.strip(), "%m/%d/%Y")) + self.story.setMetadata('dateUpdated', makeDate(value.strip(), "%d %b %Y")) def getChapterText(self, url):