1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Compare commits

..

No commits in common. "fe21894c5ecf3a53c9c5c00453abfc7f41c6a83e" and "e9bf65da345bad3424419fbc4527e8a70e53c301" have entirely different histories.

8 changed files with 5 additions and 78 deletions

View File

@ -97,7 +97,7 @@ You must publish a port on your host machine to bind to the container's web port
An example of a minimum run configuration to access maloja via `localhost:42010`:
```console
docker run -p 42010:42010 -v $PWD/malojadata:/mljdata -e MALOJA_DATA_DIRECTORY=/mljdata krateng/maloja
docker run -p 42010:42010 -v $PWD/malojadata:/mljdata -e MALOJA_DATA_DIRECTORY=/mljdata maloja
```
### Extras

View File

@ -4,7 +4,6 @@ minor_release_name: "Yeonhee"
notes:
- "[Architecture] Switched to SQLite for main database"
- "[Architecture] Switched to SQLite for artwork cache"
- "[Feature] Added scrobble deletion from web interface"
3.0.1:
commit: "700b81217cb585df631d6f069243c56074cd1b71"
notes:
@ -28,7 +27,3 @@ minor_release_name: "Yeonhee"
- "[Feature] Added better feedback to native API endpoints"
- "[Bugfix] Fixed native API receiving superfluous keywords"
- "[Bugfix] Fixed crash when importing scrobbles with artists with similar names"
3.0.5:
notes:
- "[Feature] Added notification system for web interface"
- "[Bugfix] Fixed crash when encountering error in Lastfm import"

View File

@ -4,7 +4,7 @@
# you know what f*ck it
# this is hardcoded for now because of that damn project / package name discrepancy
# i'll fix it one day
VERSION = "3.0.5"
VERSION = "3.0.4"
HOMEPAGE = "https://github.com/krateng/maloja"

View File

@ -268,17 +268,11 @@ def parse_lastfm(inputf):
with open(inputf,'r',newline='') as inputfd:
reader = csv.reader(inputfd)
line = 0
for row in reader:
line += 1
try:
artist,album,title,time = row
except ValueError:
yield ('FAIL',None,f"{row} (Line {line}) does not look like a valid entry. Scrobble not imported.")
continue
if time == '':
yield ('FAIL',None,f"{row} (Line {line}) is missing a timestamp.")
yield ('FAIL',None,f"{row} does not look like a valid entry. Scrobble not imported.")
continue
try:
@ -293,7 +287,7 @@ def parse_lastfm(inputf):
'scrobble_duration':None
},'')
except Exception as e:
yield ('FAIL',None,f"{row} (Line {line}) could not be parsed. Scrobble not imported. ({repr(e)})")
yield ('FAIL',None,f"{entry} could not be parsed. Scrobble not imported. ({repr(e)})")
continue

View File

@ -18,7 +18,6 @@
<script src="/search.js"></script>
<script src="/neopolitan.js"></script>
<script src="/upload.js"></script>
<script src="/notifications.js"></script>
<link rel="preload" href="/static/ttf/Ubuntu-Regular.ttf" as="font" type="font/woff2" crossorigin />
@ -50,9 +49,6 @@
{% endblock %}
{% endblock %}
<div id="notification_area">
</div>
<div class="footer">

View File

@ -185,29 +185,6 @@ div.searchresults table.searchresults_tracks td span:nth-child(1) {
}
/**
Notifications
**/
div#notification_area {
position: fixed;
width:420px;
bottom:40px;
right:20px;
}
div#notification_area div.notification {
background-color:white;
width:400px;
height:100px;
margin-bottom:7px;
padding:9px;
opacity:0.4;
}
div#notification_area div.notification:hover {
opacity:0.95;
}
@media (max-width: 1000px) {
div.footer {

View File

@ -1,35 +0,0 @@
// JS for feedback to the user whenever any XHTTP action is taken
const colors = {
'warning':'red',
'info':'green'
}
const notification_template = info => `
<div class="notification" style="background-color:${colors[type]};">
<b>${info.title}</b><br/>
<span>${info.body}</span>
</div>
`
function htmlToElement(html) {
template = document.createElement('template');
html = html.trim();
template.innerHTML = html;
return template.content.firstChild;
}
function notify(title,msg,type='info',reload=false) {
info = {
'title':title,
'body':msg,
'type':type
}
var element = htmlToElement(notification_template(info));
document.getElementById('notification_area').append(element);
setTimeout(function(e){e.remove();},7000,element);
}

View File

@ -1,6 +1,6 @@
[project]
name = "malojaserver"
version = "3.0.5"
version = "3.0.4"
description = "Self-hosted music scrobble database"
readme = "./README.md"
requires-python = ">=3.6"