mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Small fixes
This commit is contained in:
parent
8da02a679f
commit
b58190495f
|
@ -22,7 +22,9 @@ I like to name my projects after regions in Grisons, Switzerland. Don't waste yo
|
||||||
|
|
||||||
## Current status
|
## Current status
|
||||||
|
|
||||||
Deep in development. I just uploaded Maloja here in case I die tomorrow. It can accept scrobbles and return a few webpages (/artist, /scrobbles, /topartists).
|
You can check [my own Maloja page](https://maloja.krateng.ch) to see what it currently looks like.
|
||||||
|
|
||||||
|
The software works fairly well and has a few web views, but there is only one scrobbler (a Chrome extension for Plex).
|
||||||
|
|
||||||
## How to install
|
## How to install
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,10 @@ def get_scrobbles():
|
||||||
r = db_query(artists=keys.getall("artist"),title=keys.get("title"),since=keys.get("since"),to=keys.get("to"),associated=(keys.get("associated")!=None))
|
r = db_query(artists=keys.getall("artist"),title=keys.get("title"),since=keys.get("since"),to=keys.get("to"),associated=(keys.get("associated")!=None))
|
||||||
r.reverse()
|
r.reverse()
|
||||||
|
|
||||||
return {"list":r} ##json can't be a list apparently???
|
if keys.get("max") is not None:
|
||||||
|
return {"list":r[:int(keys.get("max"))]}
|
||||||
|
else:
|
||||||
|
return {"list":r} ##json can't be a list apparently???
|
||||||
|
|
||||||
@dbserver.route("/numscrobbles")
|
@dbserver.route("/numscrobbles")
|
||||||
def get_scrobbles():
|
def get_scrobbles():
|
||||||
|
|
|
@ -70,7 +70,7 @@ def shutdown():
|
||||||
def graceful_exit(sig=None,frame=None):
|
def graceful_exit(sig=None,frame=None):
|
||||||
urllib.request.urlopen("http://localhost:" + str(DATABASE_PORT) + "/sync")
|
urllib.request.urlopen("http://localhost:" + str(DATABASE_PORT) + "/sync")
|
||||||
log("Server shutting down...")
|
log("Server shutting down...")
|
||||||
sys.exit()
|
os._exit(42)
|
||||||
|
|
||||||
|
|
||||||
@webserver.route("/images/<pth:re:.*\\.jpeg>")
|
@webserver.route("/images/<pth:re:.*\\.jpeg>")
|
||||||
|
|
|
@ -231,10 +231,10 @@ table.tiles_top td {
|
||||||
border:0px;
|
border:0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.tiles_top:hover td div {
|
table.tiles_top:hover td td {
|
||||||
opacity:0.2;
|
opacity:0.2;
|
||||||
}
|
}
|
||||||
table.tiles_top:hover td div:hover {
|
table.tiles_top:hover td td:hover {
|
||||||
opacity:1;
|
opacity:1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -264,6 +264,11 @@ table.tiles_top td span {
|
||||||
background-color:rgba(0,0,0,0.7);
|
background-color:rgba(0,0,0,0.7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table.tiles_1x1 td {
|
||||||
|
height:100%;
|
||||||
|
width:100%;
|
||||||
|
font-size:100%
|
||||||
|
}
|
||||||
table.tiles_2x2 td {
|
table.tiles_2x2 td {
|
||||||
height:50%;
|
height:50%;
|
||||||
width:50%;
|
width:50%;
|
||||||
|
|
|
@ -16,7 +16,13 @@
|
||||||
<h1><a href="/topartists">Top Artists</a></h1>
|
<h1><a href="/topartists">Top Artists</a></h1>
|
||||||
<table class="tiles_top">
|
<table class="tiles_top">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="background-image:url('KEY_ARTISTIMAGE')"><span class="stats">KEY_POSITION_ARTIST</span> <span>KEY_ARTISTLINK</span></td>
|
<td>
|
||||||
|
<table class="tiles_1x1 tiles_sub">
|
||||||
|
<tr>
|
||||||
|
<td style="background-image:url('KEY_ARTISTIMAGE')"><span class="stats">KEY_POSITION_ARTIST</span> <span>KEY_ARTISTLINK</span></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<table class="tiles_2x2 tiles_sub">
|
<table class="tiles_2x2 tiles_sub">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -60,7 +66,13 @@
|
||||||
<h1><a href="/toptracks">Top Tracks</a></h1>
|
<h1><a href="/toptracks">Top Tracks</a></h1>
|
||||||
<table class="tiles_top">
|
<table class="tiles_top">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="background-image:url('KEY_TRACKIMAGE')"><span class="stats">KEY_POSITION_TRACK</span> <span>KEY_TRACKLINK</span></td>
|
<td>
|
||||||
|
<table class="tiles_1x1 tiles_sub">
|
||||||
|
<tr>
|
||||||
|
<td style="background-image:url('KEY_TRACKIMAGE')"><span class="stats">KEY_POSITION_TRACK</span> <span>KEY_TRACKLINK</span></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<table class="tiles_2x2 tiles_sub">
|
<table class="tiles_2x2 tiles_sub">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user