From ebd22ff96622958df71a750eafffbcedbfc740a6 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Thu, 31 May 2012 18:52:45 -0500 Subject: [PATCH] Tweak plugin chapter range, bump appspot version. --- app.yaml | 2 +- calibre-plugin/ffdl_plugin.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app.yaml b/app.yaml index d153a1db..5a7ee1ff 100644 --- a/app.yaml +++ b/app.yaml @@ -1,6 +1,6 @@ # ffd-retief-hrd fanfictiondownloader application: fanfictiondownloader -version: 4-4-13 +version: 4-4-14 runtime: python27 api_version: 1 threadsafe: true diff --git a/calibre-plugin/ffdl_plugin.py b/calibre-plugin/ffdl_plugin.py index a31dc726..0593dead 100644 --- a/calibre-plugin/ffdl_plugin.py +++ b/calibre-plugin/ffdl_plugin.py @@ -954,12 +954,14 @@ make_firstimage_cover:true uniqueurls = set() for url in urls: # look here for [\d,\d] at end of url, and remove? - mc = re.match(r"^(?P.*?)(?:\[(?P\d+)?(?:,(?P\d+))?\])?$",url) + mc = re.match(r"^(?P.*?)(?:\[(?P\d+)?(?P,)?(?P\d+)?\])?$",url) print("url:(%s) begin:(%s) end:(%s)"%(mc.group('url'),mc.group('begin'),mc.group('end'))) url = mc.group('url') book = self._convert_url_to_book(url) book['begin'] = mc.group('begin') book['end'] = mc.group('end') + if book['begin'] and not mc.group('comma'): + book['end'] = book['begin'] if book['url'] in uniqueurls: book['good'] = False book['comment'] = "Same story already included."