diff --git a/wallpaper_changer/main.py b/wallpaper_changer/main.py index 026b9d2..181477d 100755 --- a/wallpaper_changer/main.py +++ b/wallpaper_changer/main.py @@ -2,6 +2,8 @@ import sys from pathlib import Path +from serverlibrary import setup_logging + from wallpaper_changer.argument_parser import parse_args from wallpaper_changer.config import Config from wallpaper_changer.encryption_manager import EncryptionManager @@ -11,8 +13,6 @@ from wallpaper_changer.monitor_manager import MonitorManager from wallpaper_changer.wallpaper_builder import WallpaperBuilder from wallpaper_changer.wallpaper_setter import WallpaperSetter -from serverlibrary import setup_logging - logger = get_logger(__name__) diff --git a/wallpaper_changer/src/wallpaper_changer/config.py b/wallpaper_changer/src/wallpaper_changer/config.py index e373643..e4aeb8b 100644 --- a/wallpaper_changer/src/wallpaper_changer/config.py +++ b/wallpaper_changer/src/wallpaper_changer/config.py @@ -36,7 +36,8 @@ class Config: } if ( - args.check_encryption or args.decode_all or args.decode_argument or args.printNT or args.decryptNT or args.encryptNT + args.check_encryption or args.decode_all or args.decode_argument or + args.printNT or args.decryptNT or args.encryptNT ) and args.mode == "default" and args.folder is None: args.mode = "x" diff --git a/wallpaper_changer/src/wallpaper_changer/image_repository.py b/wallpaper_changer/src/wallpaper_changer/image_repository.py index a74535b..0274194 100644 --- a/wallpaper_changer/src/wallpaper_changer/image_repository.py +++ b/wallpaper_changer/src/wallpaper_changer/image_repository.py @@ -120,11 +120,13 @@ class ImageRepository: existing_entry = None for entry in naming_table: if entry.image_hash == file_hash and not replace and len(entry.image_name) >= len(image_path.name): - logger.warning(f"Skipping already encrypted image: {image_path.name}, Entry: {entry.image_name}:{entry.encrypted_file}") + logger.warning(f"Skipping already encrypted image: {image_path.name}, " + f"Entry: {entry.image_name}:{entry.encrypted_file}") skip = True break elif entry.image_hash == file_hash and not replace and len(entry.image_name) < len(image_path.name): - logger.warning(f"Already encrypted image updated with longer name {entry.image_name} -> {image_path.name}") + logger.warning(f"Already encrypted image updated with longer name " + f"{entry.image_name} -> {image_path.name}") entry.image_name = image_path.name skip = True break @@ -256,7 +258,8 @@ class ImageRepository: if image_name is None: image_name = self._find_name_in_legacy_tables(encrypted_path.name) logger.warning( - f"Could not find original name for {encrypted_path.name} in naming table, checking legacy tables: {image_name}" + f"Could not find original name for {encrypted_path.name} in naming table, " + f"checking legacy tables: {image_name}" ) if image_name is None: image_name = f"Sexy_MISSING_{len(decoded_paths) + 1}.jpg" @@ -290,7 +293,8 @@ class ImageRepository: naming_table_path, private_key ) selected_entries = [ - entry for entry in naming_table if matcher.search(f"{entry.image_name};{entry.encrypted_file};{entry.image_hash}") + entry for entry in naming_table if matcher.search( + f"{entry.image_name};{entry.encrypted_file};{entry.image_hash}") ] decoded_paths = []