]> xmof Git - DeDRM.git/commitdiff
Strip whitespace from Kindle serials (#158)
authorNoDRM <no_drm123@protonmail.com>
Wed, 19 Oct 2022 14:39:39 +0000 (16:39 +0200)
committerNoDRM <no_drm123@protonmail.com>
Wed, 19 Oct 2022 14:39:39 +0000 (16:39 +0200)
CHANGELOG.md
DeDRM_plugin/config.py

index 6886c0e2f5eadb2b024f14ccc8edb07561c4e482..26c27fab4da65b6f8267deabc2713b12225861a3 100644 (file)
@@ -82,3 +82,4 @@ List of changes since the fork of Apprentice Harper's repository:
 - Fix a bug that would sometimes cause corrupted keys to be added when adding them through the config dialog (fixes #145, #134, #119, #116, #115, #109).
 - Update the README (fixes #136) to indicate that Apprentice Harper's version is no longer being updated.
 - Fix a bug where PDFs with empty arrays (`<>`) in a PDF object failed to decrypt, fixes #183.
+- Automatically strip whitespace from entered Amazon Kindle serial numbers, should fix #158.
index 79129c315b596daa9bac88aa8a51a61c1cd6ca33..82ee89f3b68db09f1ef9037a935d717bfa9bbaf1 100755 (executable)
@@ -1326,7 +1326,7 @@ class AddSerialDialog(QDialog):
 
     @property
     def key_value(self):
-        return str(self.key_ledit.text()).replace(' ', '')
+        return str(self.key_ledit.text()).replace(' ', '').replace('\r', '').replace('\n', '').replace('\t', '')
 
     def accept(self):
         if len(self.key_name) == 0 or self.key_name.isspace():