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

Implemented proper range descriptions

This commit is contained in:
Krateng
2019-03-02 22:55:22 +01:00
parent 9d0fc8e073
commit 0c42531218
12 changed files with 505 additions and 279 deletions

View File

@@ -4,8 +4,9 @@ import database
def instructions(keys):
from utilities import getArtistInfo, getTrackInfo
from htmlgenerators import getTimeDesc, artistLink, artistLinks, trackLink, scrobblesLink, keysToUrl, getRangeDesc, KeySplit
from htmlmodules import module_pulse
from htmlgenerators import artistLink, artistLinks, trackLink, scrobblesLink, keysToUrl, KeySplit
from htmlmodules import module_pulse
from malojatime import range_desc, delimit_desc
filterkeys, timekeys, delimitkeys, _ = KeySplit(keys)
@@ -26,6 +27,10 @@ def instructions(keys):
moreartists = data["associated"]
if moreartists != []:
limitstring += " <span class='extra'>including " + artistLinks(moreartists) + "</span>"
limitstring += " " + range_desc(**timekeys)
delimitstring = delimit_desc(**delimitkeys)
# get image
@@ -42,7 +47,7 @@ def instructions(keys):
html_pulse = module_pulse(**filterkeys,**timekeys,**delimitkeys)
replace = {"KEY_PULSE_TABLE":html_pulse,"KEY_IMAGEURL":imgurl,"KEY_LIMITS":limitstring}
replace = {"KEY_PULSE_TABLE":html_pulse,"KEY_IMAGEURL":imgurl,"KEY_LIMITS":limitstring,"KEY_PULSEDETAILS":delimitstring}
return (replace,pushresources)