mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Various fixes
This commit is contained in:
parent
608986b239
commit
b96f0cfc08
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1 @@
|
||||
custom: ["https://flattr.com/@Krateng", "https://paypal.me/krateng", "bitcoin:1krat8JMniJBTiHftMfR1LtF3Y1w5DAxx"]
|
@ -115,7 +115,7 @@ def trim_cache():
|
||||
ramprct = psutil.virtual_memory().percent
|
||||
if ramprct > malojaconfig["DB_MAX_MEMORY"]:
|
||||
log(f"{ramprct}% RAM usage, reducing caches!")
|
||||
ratio = (malojaconfig["DB_MAX_MEMORY"] / ramprct) ** 3
|
||||
ratio = (ramprct/100) ** 3
|
||||
targetsize = max(int(len(cache) * ratio),100)
|
||||
cache.set_size(targetsize)
|
||||
cache.set_size(HIGH_NUMBER)
|
||||
|
@ -2,7 +2,6 @@ from .globalconf import data_dir, malojaconfig
|
||||
from . import thirdparty
|
||||
from . import database
|
||||
|
||||
from doreah import caching
|
||||
from doreah.logging import log
|
||||
|
||||
import itertools
|
||||
|
@ -236,7 +236,6 @@ def static(path):
|
||||
|
||||
### DYNAMIC
|
||||
|
||||
@profile
|
||||
def jinja_page(name):
|
||||
if name in aliases: redirect(aliases[name])
|
||||
keys = remove_identical(FormsDict.decode(request.query))
|
||||
|
@ -89,7 +89,9 @@
|
||||
|
||||
<a class="textlink" target="_blank" rel="noopener noreferrer" href="https://github.com/krateng/maloja/issues/new">Report Issue</a><br/>
|
||||
<a class="textlink" target="_blank" rel="noopener noreferrer" href="https://github.com/krateng/maloja/blob/master/README.md">Readme</a><br/>
|
||||
<a class="textlink" target="_blank" rel="noopener noreferrer" href="https://pypi.org/project/malojaserver/">PyPi</a><br/>
|
||||
<a class="textlink" target="_blank" rel="noopener noreferrer" href="https://pypi.org/project/malojaserver/">PyPi</a> |
|
||||
<a class="textlink" target="_blank" rel="noopener noreferrer" href="https://hub.docker.com/r/krateng/maloja">Dockerhub</a> |
|
||||
<a class="textlink" target="_blank" rel="noopener noreferrer" href="https://github.com/krateng/maloja">Github</a><br/>
|
||||
|
||||
|
||||
|
||||
|
@ -130,11 +130,12 @@ function searchresult_manualscrobbling() {
|
||||
track.innerHTML = "<a href='" + tracklink + "'>" + trackstr + "</a>";
|
||||
row = document.createElement("tr")
|
||||
col1 = document.createElement("td")
|
||||
col1.className = "button"
|
||||
col1.innerHTML = "Scrobble!"
|
||||
col1.onclick = function(){ scrobble(t["artists"],t["title"])};
|
||||
button = document.createElement("button")
|
||||
button.innerHTML = "Scrobble!"
|
||||
button.onclick = function(){ scrobble(t["artists"],t["title"])};
|
||||
col2 = document.createElement("td")
|
||||
row.appendChild(col1)
|
||||
col1.appendChild(button)
|
||||
row.appendChild(col2)
|
||||
col2.appendChild(track)
|
||||
document.getElementById("searchresults").appendChild(row);
|
||||
|
Loading…
Reference in New Issue
Block a user