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

Compare commits

...

3 Commits

Author SHA1 Message Date
krateng
20aae955b2 Version bump 2022-04-27 20:30:15 +02:00
krateng
d83b44de6e Added tooltip for image upload, GH-138 2022-04-27 17:51:39 +02:00
krateng
8197548285 Improved cache memory output 2022-04-26 19:58:36 +02:00
7 changed files with 21 additions and 11 deletions

View File

@ -10,3 +10,7 @@ minor_release_name: "Soyeon"
- "[Performance] Adjusted cache sizes"
- "[Logging] Added cache memory use information"
- "[Technical] Bumped Python Version and various dependencies"
3.1.1:
notes:
- "[Bugfix] Fixed inclusion of custom css files"
- "[Bugfix] Fixed list values in configuration"

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.1.0"
VERSION = "3.1.1"
HOMEPAGE = "https://github.com/krateng/maloja"

View File

@ -162,11 +162,15 @@ def get_size_of(obj,counted=None):
return size
def human_readable_size(obj):
units = ['','K','M','G','T','P']
idx = 0
bytes = get_size_of(obj)
while bytes > 1024 and len(units) > idx+1:
bytes = bytes / 1024
idx += 1
units = ['','Ki','Mi','Gi','Ti','Pi']
magnitude = 0
return f"{bytes:.2f} {units[idx]}B"
bytes = get_size_of(obj)
while bytes > 1024 and len(units) > magnitude+1:
bytes = bytes / 1024
magnitude += 1
if magnitude > 2:
return f"{bytes:.2f} {units[magnitude]}B"
else:
return f"{bytes:.0f} {units[magnitude]}B"

View File

@ -54,6 +54,7 @@
<div
class="changeable-image" data-uploader="b64=>upload('{{ encodedartist }}',b64)"
style="background-image:url('{{ images.get_artist_image(artist) }}');"
title="Drag & Drop to upload new image"
></div>
{% else %}
<div style="background-image:url('{{ images.get_artist_image(artist) }}');">

View File

@ -51,6 +51,7 @@
<div
class="changeable-image" data-uploader="b64=>upload('{{ encodedtrack }}',b64)"
style="background-image:url('{{ images.get_track_image(track) }}');"
title="Drag & Drop to upload new image"
></div>
{% else %}
<div style="background-image:url('{{ images.get_track_image(track) }}');">

View File

@ -1,6 +1,6 @@
[project]
name = "malojaserver"
version = "3.1.0"
version = "3.1.1"
description = "Self-hosted music scrobble database"
readme = "./README.md"
requires-python = ">=3.7"
@ -21,7 +21,7 @@ classifiers = [
dependencies = [
"bottle>=0.12.16",
"waitress>=2.1.0",
"doreah>=1.9.1, <2",
"doreah>=1.9.2, <2",
"nimrodel>=0.8.0",
"setproctitle>=1.1.10",
#"pyvips>=2.1.16",

View File

@ -1,6 +1,6 @@
bottle>=0.12.16
waitress>=2.1.0
doreah>=1.9.1, <2
doreah>=1.9.2, <2
nimrodel>=0.8.0
setproctitle>=1.1.10
jinja2>=3.0.0