fixing /live

master
Aevann1 2022-09-25 13:28:53 +02:00
parent 8269b0dc0f
commit 3339baee54
1 changed files with 6 additions and 8 deletions

View File

@ -492,7 +492,6 @@ if SITE == 'pcmemes.net':
unit = 'year' unit = 'year'
modifier = 525600 modifier = 525600
print(unit, flush=True)
minutes = quantity * modifier minutes = quantity * modifier
actual = f'{quantity} {unit}' actual = f'{quantity} {unit}'
@ -524,10 +523,9 @@ if SITE == 'pcmemes.net':
live = sorted(live, key=lambda x: x[5], reverse=True) live = sorted(live, key=lambda x: x[5], reverse=True)
offline = sorted(offline, key=lambda x: x[4]) offline = sorted(offline, key=lambda x: x[4])
cache.set('live', live) if live: cache.set('live', live)
cache.set('offline', offline) if offline: cache.set('offline', offline)
return live, offline
@app.get('/live') @app.get('/live')
@app.get('/logged_out/live') @app.get('/logged_out/live')
@ -575,8 +573,8 @@ if SITE == 'pcmemes.net':
live = sorted(live, key=lambda x: x[5], reverse=True) live = sorted(live, key=lambda x: x[5], reverse=True)
offline = sorted(offline, key=lambda x: x[4]) offline = sorted(offline, key=lambda x: x[4])
cache.set('live', live) if live: cache.set('live', live)
cache.set('offline', offline) if offline: cache.set('offline', offline)
return redirect('/live') return redirect('/live')
@ -597,7 +595,7 @@ if SITE == 'pcmemes.net':
live = [x for x in live if x[0] != id] live = [x for x in live if x[0] != id]
offline = [x for x in offline if x[0] != id] offline = [x for x in offline if x[0] != id]
cache.set('live', live) if live: cache.set('live', live)
cache.set('offline', offline) if offline: cache.set('offline', offline)
return redirect('/live') return redirect('/live')