seed random numbers

This commit is contained in:
2024-03-18 11:44:27 -04:00
parent 4ea26f70db
commit f84b1d2fba

View File

@@ -4,6 +4,7 @@ import inky_helper as ih
import inky_frame
import gc
import random
import time
def write_err(text):
with open('/sd/errors.log', 'a+') as error_log:
@@ -54,6 +55,7 @@ if response != None:
for item in response:
if item.url_path == last_file:
response.remove(item)
random.seed(time.time())
ran = random.choice(response)
if ran.mimetype == "image/jpeg":
with open('/sd/last_wallpaper', 'w+') as update_last: