From 06df18bea331b6e26dd416e8c58dec17d538a942 Mon Sep 17 00:00:00 2001 From: NoDRM Date: Wed, 19 Oct 2022 16:39:39 +0200 Subject: [PATCH] Strip whitespace from Kindle serials (#158) --- CHANGELOG.md | 1 + DeDRM_plugin/config.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6886c0e..26c27fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/DeDRM_plugin/config.py b/DeDRM_plugin/config.py index 79129c3..82ee89f 100755 --- a/DeDRM_plugin/config.py +++ b/DeDRM_plugin/config.py @@ -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():