Fix bug where wallpaper_list could not be assigned

This commit is contained in:
Emma Nora Theuer 2025-01-26 23:34:46 +01:00
parent ee2d17355e
commit 6c72bdc31b

View file

@ -211,7 +211,8 @@ class ConfigValidity(_ConfigLib):
class WallpaperLogic(_ConfigLib): class WallpaperLogic(_ConfigLib):
def __init__(self) -> None: def __init__(self) -> None:
super().__init__() super().__init__()
self.chosen_wallpaper_set: str = "fFTojkvCLIkGVlC6vUo4701djCZczmJDiyHKj4Qdj0zwkLyETsPxP88DLmY9In0I" self.wallpaper_list: List[str] = None # pyright: ignore
self.chosen_wallpaper_set: str = None # pyright: ignore
# NOTE: This function could be in a different file because it's not needed in the case only 1 wallpaper per set is needed. # NOTE: This function could be in a different file because it's not needed in the case only 1 wallpaper per set is needed.
# Returns a list of a split string that contains a changing time from the config file # Returns a list of a split string that contains a changing time from the config file
@ -261,7 +262,7 @@ class WallpaperLogic(_ConfigLib):
# TODO: Add an way for the user to choose if the wallpaper should scale, fill or otherwise. This needs to be editable in the config file. # TODO: Add an way for the user to choose if the wallpaper should scale, fill or otherwise. This needs to be editable in the config file.
def set_wallpaper_by_time(self) -> bool: def set_wallpaper_by_time(self) -> bool:
# Ensure use of a consistent wallpaper set # Ensure use of a consistent wallpaper set
if self.chosen_wallpaper_set != "fFTojkvCLIkGVlC6vUo4701djCZczmJDiyHKj4Qdj0zwkLyETsPxP88DLmY9In0I": if not self.chosen_wallpaper_set:
self._choose_wallpaper_set() self._choose_wallpaper_set()
for time_range in range(self.config_total_changing_times - 1): for time_range in range(self.config_total_changing_times - 1):
self.current_time_range = time_range # Store current time for better debugging output self.current_time_range = time_range # Store current time for better debugging output