diff --git a/README.md b/README.md index 8ea587a..c6cf8f3 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,7 @@ The tool currently supports the following ISOs: - OpenSUSE (editions: "leap", "leap-micro", "jump") - TrueNAS (editions: "scale") - Tails - - ChromeOS (editions: "LTC", "LTR", "DEV", "STABLE") + - ChromeOS (editions: "ltc", "ltr", "stable") - **Windows** - Windows 11 (Multi-edition ISO, Any language) - Windows 10 (Multi-edition ISO, Any language) diff --git a/config/config.toml.default b/config/config.toml.default index bd57d35..277db45 100644 --- a/config/config.toml.default +++ b/config/config.toml.default @@ -120,8 +120,8 @@ enabled = true [OperatingSystems.Linux.ChromeOS] enabled = true # Available editions: -# "LTC", "LTR", "DEV", "STABLE" -editions = ["STABLE"] +# "ltc", "ltr", "stable" +editions = ["stable"] # Windows [OperatingSystems.Windows] diff --git a/modules/updaters/ChromeOS.py b/modules/updaters/ChromeOS.py index b3115fd..9cea2e5 100644 --- a/modules/updaters/ChromeOS.py +++ b/modules/updaters/ChromeOS.py @@ -27,25 +27,20 @@ class ChromeOS(GenericUpdater): """ def __init__(self, folder_path: str, edition: str) -> None: - self.valid_editions = ["LTC", "LTR", "DEV", "STABLE"] + self.valid_editions = ["ltc", "ltr", "stable"] self.edition = edition file_path = os.path.join(folder_path, FILE_NAME) super().__init__(file_path) - # Make the parameter case insensitive, and find back the correct case using valid_editions - self.edition = next( - valid_ed - for valid_ed in self.valid_editions - if valid_ed.lower() == self.edition.lower() - ) - self.chromium_releases_info: list[dict] = requests.get( f"{DOMAIN}/dl/edgedl/chromeos/recovery/cloudready_recovery2.json" ).json() self.cur_edition_info: dict = next( - d for d in self.chromium_releases_info if d["channel"] == self.edition + d + for d in self.chromium_releases_info + if d["channel"].lower() == self.edition ) @cache