From efd362eb6286b61aa0a7374c8c209db9b1a11253 Mon Sep 17 00:00:00 2001 From: jo Date: Wed, 18 Aug 2021 16:19:58 +0200 Subject: [PATCH] Scheduler should prepare 1 day ahead, not 1 hour The old API client v1 used to call the following action, and underlying schedule model: https://github.com/LibreTime/libretime/blob/d6093f7356d262838e866deb80439dadf3220e78/airtime_mvc/application/controllers/ApiController.php#L720-L730 https://github.com/LibreTime/libretime/blob/d6093f7356d262838e866deb80439dadf3220e78/airtime_mvc/application/models/Schedule.php#L1118-L1140 The new API v2 prepared 1 hour of scheduled track instead of 1 day in the old API. --- python_apps/api_clients/api_clients/version2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_apps/api_clients/api_clients/version2.py b/python_apps/api_clients/api_clients/version2.py index 5ffb72048..6e4bc71e9 100644 --- a/python_apps/api_clients/api_clients/version2.py +++ b/python_apps/api_clients/api_clients/version2.py @@ -47,7 +47,7 @@ class AirtimeApiClient: def get_schedule(self): current_time = datetime.datetime.utcnow() - end_time = current_time + datetime.timedelta(hours=1) + end_time = current_time + datetime.timedelta(days=1) str_current = current_time.isoformat(timespec="seconds") str_end = end_time.isoformat(timespec="seconds")