1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 13:34:28 +00:00

non mi ricordo ma ok

This commit is contained in:
Steffo 2018-07-29 18:00:30 +02:00
parent 83a9263fbc
commit 0b7b5a0619
5 changed files with 23 additions and 16 deletions

BIN
static/FixMeRYGLogo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View file

@ -113,6 +113,12 @@ nav {
padding: 8px;
display: grid;
.ryg-logo {
width: 32px;
height: 32px;
vertical-align: middle;
}
.left
{
grid-column: 1;

View file

@ -13,6 +13,7 @@
<body>
<nav>
<div class="left">
<img src="{{ url_for('static', filename='FixMeRYGLogo.jpg') }}" class="ryg-logo">
<b>Royalnet</b>
<a href="/">Home</a>
<span class="desktop-only">

View file

@ -15,7 +15,7 @@
<div class="game-score last-video" title="{{ record["last_song"] }}">
{{ record["last_song"] }}
</div>
<div class="game-extra last-video">{{ record["last_play_time"] }}</div>
<div class="game-extra last-video">{{ record["last_play_time"].strftime('%Y-%m-%d %H:%M:%S %Z') }}</div>
{% else %}
<div class="game-title last-video none">Ultima canzone</div>
<div class="game-score last-video none">

View file

@ -88,21 +88,21 @@ try:
sleep_time = 1 - time.clock() + t
time.sleep(sleep_time if sleep_time > 0 else 0)
# Update Overwatch
print("OVERWATCH")
for user in session.query(db.Overwatch).all():
t = time.clock()
print(f"Updating {user.royal.username}", end="\t\t", flush=True)
try:
user.update()
except errors.RequestError:
print("Request Error")
except errors.NotFoundError:
print("Not Found Error (?)")
else:
print("OK")
finally:
sleep_time = 1 - time.clock() + t
time.sleep(sleep_time if sleep_time > 0 else 0)
# print("OVERWATCH")
# for user in session.query(db.Overwatch).all():
# t = time.clock()
# print(f"Updating {user.royal.username}", end="\t\t", flush=True)
# try:
# user.update()
# except errors.RequestError:
# print("Request Error")
# except errors.NotFoundError:
# print("Not Found Error (?)")
# else:
# print("OK")
# finally:
# sleep_time = 1 - time.clock() + t
# time.sleep(sleep_time if sleep_time > 0 else 0)
print("Committing...\t\t")
session.commit()
print("OK")