From 495b00803de85482de001e0ef19549d959846ff2 Mon Sep 17 00:00:00 2001 From: Krateng Date: Thu, 27 Jun 2019 10:40:38 +0200 Subject: [PATCH] Added weeks on #1 stat to artist and track pages --- database.py | 13 +++++++++++-- website/artist.html | 2 +- website/artist.py | 8 ++++++++ website/css/maloja.css | 5 +++++ website/media/star.png | Bin 0 -> 9081 bytes website/media/star_alt.png | Bin 0 -> 9413 bytes website/track.html | 2 +- website/track.py | 7 +++++++ 8 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 website/media/star.png create mode 100644 website/media/star_alt.png diff --git a/database.py b/database.py index 3daa304..afbc1e1 100644 --- a/database.py +++ b/database.py @@ -535,7 +535,14 @@ def artistInfo(artist): c = [e for e in charts if e["artist"] == artist][0] others = [a for a in coa.getAllAssociated(artist) if a in ARTISTS] position = c["rank"] - return {"scrobbles":scrobbles,"position":position,"associated":others,"medals":MEDALS.get(artist)} + performance = get_performance(artist=artist,step="week") + return { + "scrobbles":scrobbles, + "position":position, + "associated":others, + "medals":MEDALS.get(artist), + "topweeks":len([p for p in performance if p["rank"] == 1]) + } except: # if the artist isnt in the charts, they are not being credited and we # need to show information about the credited one @@ -567,6 +574,7 @@ def trackInfo(track): c = [e for e in charts if e["track"] == track][0] scrobbles = c["scrobbles"] position = c["rank"] + performance = get_performance(track=track,step="week") cert = None threshold_gold, threshold_platinum, threshold_diamond = settings.get_settings("SCROBBLES_GOLD","SCROBBLES_PLATINUM","SCROBBLES_DIAMOND") if scrobbles >= threshold_diamond: cert = "diamond" @@ -577,7 +585,8 @@ def trackInfo(track): "scrobbles":scrobbles, "position":position, "medals":MEDALS_TRACKS.get((frozenset(track["artists"]),track["title"])), - "certification":cert + "certification":cert, + "topweeks":len([p for p in performance if p["rank"] == 1]) } diff --git a/website/artist.html b/website/artist.html index 135281e..d9f4a03 100644 --- a/website/artist.html +++ b/website/artist.html @@ -22,7 +22,7 @@

KEY_SCROBBLES Scrobbles

KEY_DESCRIPTION

- KEY_MEDALS KEY_CERTS + KEY_MEDALS KEY_TOPWEEKS KEY_CERTS diff --git a/website/artist.py b/website/artist.py index dc93883..bf3f2fa 100644 --- a/website/artist.py +++ b/website/artist.py @@ -41,6 +41,13 @@ def instructions(keys): html_cert += "".format(tooltip=tooltip,img=img,link=tracklink) + html_topweeks = "" + if data.get("topweeks") not in [0,None]: + link = "/performance?artist=" + urllib.parse.quote(keys["artist"]) + "&trail=1&step=week" + title = str(data["topweeks"]) + " weeks on #1" + html_topweeks = "" + str(data["topweeks"]) + "" + + credited = data.get("replace") includestr = " " if credited is not None: @@ -81,6 +88,7 @@ def instructions(keys): "KEY_ASSOCIATED":includestr, "KEY_MEDALS":html_medals, "KEY_CERTS":html_cert, + "KEY_TOPWEEKS":html_topweeks, # tracks "KEY_TRACKLIST":html_tracks, # pulse diff --git a/website/css/maloja.css b/website/css/maloja.css index 8cc92a1..ca50cec 100644 --- a/website/css/maloja.css +++ b/website/css/maloja.css @@ -389,6 +389,11 @@ img.certrecord_small { vertical-align: text-bottom; } +img.star { + height:20px; + vertical-align: text-bottom; +} + /* ** diff --git a/website/media/star.png b/website/media/star.png new file mode 100644 index 0000000000000000000000000000000000000000..23dfd6b6dc4ff3795ca4de540ada4c9a473d3b00 GIT binary patch literal 9081 zcmV-5<;j+2noG|V2~n3X#yf3QHm}ig08r`KiyT=T~HJY zC<+KRr0dd~CLusV62hbx(#!O6XYR}`PdVrJ$MZ}w#6*xy0?E$z^?F{ri<=bZC7 z-+I2^b76>vXh+i1|9R-pBz)ND;eR{CdE(nAxmxSpek^iN0A$Q?4m3sUg+IGtq%{P{ zhk*7PH)d?nux@DXD!RM-Sj^qI^Rw?glget_lF~T2uNWTF-EWNmmJe~r2Sjf^`aD6o zkSv$V=Li9P1^*&|FI{}(5Fj4}eenh8@68{CW{hK-_@4SKz@3lG9RlQoBHt@tWw{A# z$3$s$z^5mVJP_dDrhH@wkX=o`xOag->r32B7Spzo0=#lz3cw39UKs*pmnrjyE&|}d z?ki3=4Wq)z)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bO${JKvLtKBUCSsUM*R+Y|NKfl>kMh}lqFVWPh=*UHT7`7>1F-`mAsc&`u z{-Dt?<*dW`^Ne+Tko3^BR<1a6Uw-@i%EC#PU4M}@j9a7>?WJOr6H!)C@Uc{c(AVRF za(SoxV&zT|Sug$cl!mluf6B3Xj(BQrKl7IcwD&-F9xT)RUNT|)__akH9efDs+@sSx zH9M-6{KQd}$N9eczGbNsQyEFIs7V=7SzaPxd@WmDbH`5~Tdh9yO5N(;aIh`%<6m1* zV)62TLRrvP6dk5%Pfob@zrVJqqr(QyJa*p?9UxE5?&G2pqoj)`=j3J@ru~U9G=CC! z8pjnB!ziR*Dsxt@BbT`0!h=4%B5Uf;Kg#ky9Awng2gk2!FDK_LDC28XzQAkJbdG9V z)j8DWb9wt(6PUBCncanc{PG+wIzBr0 z@lS8`+^s_U%uGhi@O4x)S||md0J!E8hkbZ;$b+|xnXsxgzi8=te{m4Xe|}_o?m2)H zCsoi;F_uSX%w~6^YtKK3p7s?y{A$28=QUKfw-;|VRrqgZPb_}w&EA7Ql%2l!+h+ps zy(#s#UUy!_OBWtj+c5Ci1t*VSPoS$m8Rs8ojun?rt~ux8<1*g)$2IK#q3-l8R}Q~+ z;Pqvv)Ul`01s^+vDIawsfX-|fb;(J?&->7F$mOSOd4I!YBiWPbv!~W?etp&?@!{;` reRo~?j{BZY-@Ew>@3;@q9!UQm(5sX*aR?jt00000NkvXXu0mjf44YRd literal 0 HcmV?d00001 diff --git a/website/media/star_alt.png b/website/media/star_alt.png new file mode 100644 index 0000000000000000000000000000000000000000..007d9a2a86568f734da7d35a8c2dbfa0b69ae88a GIT binary patch literal 9413 zcmV;$Bs$xPP)U7q9`_Y}+RQ000McNliru;|3cDBQ7{F&7=STAOJ~3 zK~#9!?R|NCRMpx4_ndoYPcqp9Bq8jCov=etHbt~6z;QA`?5JnVA-fJ~L8`|ARr6eo4=S=7&2 z!g~Svp+|Gw!|)8>gzlOv22&aHHf*RvQ$r}#DaWq>fUfFGdja`Dt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ah0NcO!}qo00000 LNkvXXu0mjff6K(N literal 0 HcmV?d00001 diff --git a/website/track.html b/website/track.html index bc99a11..c67b824 100644 --- a/website/track.html +++ b/website/track.html @@ -21,7 +21,7 @@

KEY_SCROBBLES Scrobbles

- KEY_MEDALS + KEY_MEDALS KEY_TOPWEEKS diff --git a/website/track.py b/website/track.py index 9fa0406..8f108e7 100644 --- a/website/track.py +++ b/website/track.py @@ -37,6 +37,12 @@ def instructions(keys): for y in data["medals"]["bronze"]: html_medals += "" + str(y) + "" + html_topweeks = "" + if data.get("topweeks") not in [0,None]: + link = "/performance?" + compose_querystring(keys) + "&trail=1&step=week" + title = str(data["topweeks"]) + " weeks on #1" + html_topweeks = "" + str(data["topweeks"]) + "" + html_scrobbles, _, _ = module_scrobblelist(track=track,max_=10,earlystop=True) # we have the number already from the trackinfo @@ -65,6 +71,7 @@ def instructions(keys): "KEY_SCROBBLELINK":compose_querystring(keys), "KEY_MEDALS":html_medals, "KEY_CERTS":html_cert, + "KEY_TOPWEEKS":html_topweeks, "KEY_SCROBBLELIST":html_scrobbles, # pulse "KEY_PULSE_MONTHS":html_pulse_months,