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:
parent
83a9263fbc
commit
0b7b5a0619
5 changed files with 23 additions and 16 deletions
BIN
static/FixMeRYGLogo.jpg
Normal file
BIN
static/FixMeRYGLogo.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
|
@ -113,6 +113,12 @@ nav {
|
|||
padding: 8px;
|
||||
display: grid;
|
||||
|
||||
.ryg-logo {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.left
|
||||
{
|
||||
grid-column: 1;
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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">
|
||||
|
|
30
update.py
30
update.py
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue