1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +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; padding: 8px;
display: grid; display: grid;
.ryg-logo {
width: 32px;
height: 32px;
vertical-align: middle;
}
.left .left
{ {
grid-column: 1; grid-column: 1;

View file

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

View file

@ -15,7 +15,7 @@
<div class="game-score last-video" title="{{ record["last_song"] }}"> <div class="game-score last-video" title="{{ record["last_song"] }}">
{{ record["last_song"] }} {{ record["last_song"] }}
</div> </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 %} {% else %}
<div class="game-title last-video none">Ultima canzone</div> <div class="game-title last-video none">Ultima canzone</div>
<div class="game-score last-video none"> <div class="game-score last-video none">

View file

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