From cadbbc59b26b4d58d7eebb522cafb2a8e043fa06 Mon Sep 17 00:00:00 2001 From: ambition_echo Date: Sat, 6 Aug 2022 13:33:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(scripts):=20=E4=BF=AE=E5=A4=8D=E6=97=B6?= =?UTF-8?q?=E6=AE=B5=E8=AE=A1=E7=AE=97=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 时段最后一部分比较错误 Author: ambition-echo --- scripts/6.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/6.py b/scripts/6.py index d5909f6..fa30e84 100644 --- a/scripts/6.py +++ b/scripts/6.py @@ -77,7 +77,7 @@ def read_json(sunrise, day, sunset, night): print(day) num = len(day) // len(theme["dayImageList"]) index = day.index(hour) // num - if index >= len(theme["sunriseImageList"]): + if index >= len(theme["dayImageList"]): index = -1 set_wallpaper(unpackDir + "/" + theme["imageFilename"].replace( "*", str(theme["dayImageList"][index]))) @@ -85,7 +85,7 @@ def read_json(sunrise, day, sunset, night): print(sunset) num = len(sunset) // len(theme["sunsetImageList"]) index = sunset.index(hour) // num - if index >= len(theme["sunriseImageList"]): + if index >= len(theme["sunsetImageList"]): index = -1 set_wallpaper(unpackDir + "/" + theme["imageFilename"].replace( "*", str(theme["sunsetImageList"][index]))) @@ -93,7 +93,7 @@ def read_json(sunrise, day, sunset, night): print(night) num = len(night) // len(theme["nightImageList"]) index = night.index(hour) // num - if index >= len(theme["sunriseImageList"]): + if index >= len(theme["nightImageList"]): index = -1 set_wallpaper(unpackDir + "/" + theme["imageFilename"].replace( "*", str(theme["nightImageList"][index])))