diff --git a/calibre-plugin/ffdl_plugin.py b/calibre-plugin/ffdl_plugin.py index dc42777..dd9ac94 100644 --- a/calibre-plugin/ffdl_plugin.py +++ b/calibre-plugin/ffdl_plugin.py @@ -2004,7 +2004,9 @@ class FanFictionDownLoaderPlugin(InterfaceAction): # cust cols can convert back to numbers and # add. book['anthology_meta_list'][k]=True - + + print("book['url']:%s"%book['url']) + configuration = get_ffdl_config(book['url'],fileform) if existingbook: book['title'] = deftitle = existingbook['title'] book['comments'] = existingbook['comments'] @@ -2023,7 +2025,6 @@ class FanFictionDownLoaderPlugin(InterfaceAction): book['title'] = deftitle break - configuration = get_ffdl_config(book['url'],fileform) logger.debug("anthology_title_pattern:%s"%configuration.getConfig('anthology_title_pattern')) if configuration.getConfig('anthology_title_pattern'): tmplt = Template(configuration.getConfig('anthology_title_pattern')) @@ -2039,7 +2040,7 @@ class FanFictionDownLoaderPlugin(InterfaceAction): for v in ['Completed','In-Progress']: if v in book['tags']: book['tags'].remove(v) - book['tags'].append('Anthology') + book['tags'].extend(configuration.getConfigList('anthology_tags')) book['all_metadata']['anthology'] = "true" return book diff --git a/plugin-defaults.ini b/plugin-defaults.ini index 352be84..f43310e 100644 --- a/plugin-defaults.ini +++ b/plugin-defaults.ini @@ -289,6 +289,10 @@ chapter_title_add_pattern:${index}. ${title} ## anthologies. anthology_title_pattern:${title} Anthology +## Add tag(s) for anthology (series) books. Set to empty to not add +## any anthology tags. +anthology_tags:Anthology + ## Reorder ships so b/a and c/b/a become a/b and a/b/c. Only separates ## on '/', so use replace_metadata to change separator first if ## needed. Something like: ships=>[ ]*(/|&|&)[ ]*=>/ You can use