diff --git a/DeDRM_plugin/__init__.py b/DeDRM_plugin/__init__.py index f433949..0afa712 100644 --- a/DeDRM_plugin/__init__.py +++ b/DeDRM_plugin/__init__.py @@ -232,7 +232,7 @@ class DeDRM(FileTypePlugin): # Remove watermarks (Amazon or LemonInk) from the OPF file path_to_ebook = watermark.removeOPFwatermarks(self, path_to_ebook) or path_to_ebook - # Remove watermarks (Adobe or LemonInk) from all HTML and XHTML files + # Remove watermarks (Adobe, Pocketbook or LemonInk) from all HTML and XHTML files path_to_ebook = watermark.removeHTMLwatermarks(self, path_to_ebook) or path_to_ebook @@ -606,7 +606,9 @@ class DeDRM(FileTypePlugin): return self.postProcessEPUB(inf.name) #raise DeDRMError("{0} v{1}: Couldn't decrypt after {2:.1f} seconds. DRM free perhaps?".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime)) - def PDFDecrypt(self,path_to_ebook): + + # No DRM? + return self.postProcessEPUB(inf.name) import calibre_plugins.dedrm.prefs as prefs import calibre_plugins.dedrm.ineptpdf as ineptpdf import calibre_plugins.dedrm.lcpdedrm as lcpdedrm diff --git a/DeDRM_plugin/epubwatermark.py b/DeDRM_plugin/epubwatermark.py index 9545975..176c77f 100644 --- a/DeDRM_plugin/epubwatermark.py +++ b/DeDRM_plugin/epubwatermark.py @@ -30,7 +30,7 @@ def removeHTMLwatermarks(object, path_to_ebook): modded_contents = [] count_adept = 0 - + count_pocketbook = 0 count_lemonink_invisible = 0 count_lemonink_visible = 0 lemonink_trackingID = None @@ -53,6 +53,14 @@ def removeHTMLwatermarks(object, path_to_ebook): if (str_new != pre_remove): count_adept += 1 + # Remove Pocketbook watermarks + pre_remove = str_new + str_new = re.sub(r'\