|
@@ -158,15 +158,11 @@ async def last_update_route(request, *args, **kwargs):
|
158
|
158
|
elif request['method'] == 'POST':
|
159
|
159
|
body = await request.body()
|
160
|
160
|
last_update = int(body.decode() or 0)
|
161
|
|
- print(f'Last update set : {last_update}')
|
162
|
161
|
if last_update == 0:
|
163
|
|
- print('Reset last update to current time')
|
|
162
|
+ print(f'Reset last update to current time')
|
164
|
163
|
last_update = int(datetime.now().strftime('%s'))
|
165
|
|
- elif last_update <= 0:
|
166
|
|
- print('Forward of {last_update} seconds')
|
167
|
|
- last_update = int(datetime.now().strftime('%s')) + last_update
|
168
|
164
|
else:
|
169
|
|
- print('Rewind of {last_update} seconds')
|
|
165
|
+ print(f'{"Forward" if last_update < 0 else "Rewind"} of {last_update} seconds')
|
170
|
166
|
last_update = int(datetime.now().strftime('%s')) - last_update
|
171
|
167
|
|
172
|
168
|
|