mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
QoL fixes
This commit is contained in:
parent
30881099bf
commit
d703e87851
@ -25,6 +25,8 @@ class CleanerAgent:
|
||||
(title,moreartists) = self.parseTitleForArtists(title)
|
||||
artists += moreartists
|
||||
|
||||
artists.sort()
|
||||
|
||||
return (list(set(artists)),title)
|
||||
|
||||
def removespecial(self,s):
|
||||
|
@ -496,6 +496,8 @@ def issues():
|
||||
|
||||
@dbserver.post("/rebuild")
|
||||
def rebuild():
|
||||
global db_rulestate
|
||||
db_rulestate = False
|
||||
sync()
|
||||
os.system("python3 fixexisting.py")
|
||||
global cla, coa
|
||||
@ -585,7 +587,9 @@ def sync():
|
||||
|
||||
t = getScrobbleObject(SCROBBLES[idx])
|
||||
|
||||
artistss = "␟".join(t["artists"])
|
||||
artistlist = list(t["artists"])
|
||||
artistlist.sort() #we want the order of artists to be deterministic so when we update files with new rules a diff can see what has actually been changed
|
||||
artistss = "␟".join(artistlist)
|
||||
timestamp = datetime.date.fromtimestamp(t["time"])
|
||||
|
||||
entry = [str(t["time"]),artistss,t["title"]]
|
||||
|
@ -18,6 +18,7 @@ for fn in os.listdir("scrobbles/"):
|
||||
a = a.replace("␟",";")
|
||||
|
||||
(al,t) = wendigo.fullclean(a,t)
|
||||
al.sort()
|
||||
a = "␟".join(al)
|
||||
fnew.write(r1 + a + r2 + t + r3 + "\n")
|
||||
#print("Artists: " + a)
|
||||
@ -29,6 +30,8 @@ for fn in os.listdir("scrobbles/"):
|
||||
f.close()
|
||||
fnew.close()
|
||||
|
||||
os.system("diff " + "scrobbles/" + fn + "_new" + " " + "scrobbles/" + fn)
|
||||
|
||||
os.rename("scrobbles/" + fn + "_new","scrobbles/" + fn)
|
||||
|
||||
checkfile = open("scrobbles/" + fn + ".rulestate","w")
|
||||
|
@ -10,7 +10,6 @@ The first column defines the type of the rule:
|
||||
Second column is the 'wrong' spelling
|
||||
Third column the correct spelling
|
||||
replaceartist Defines and alternative spelling of an artist that should be replaced
|
||||
Any artist mentioned here will automatically be replaced, there is no need for a separate belongtogether entry
|
||||
Second column is the 'wrong' spelling
|
||||
Third column the correct spelling. Use ␟ if the spelling should correct to several artists
|
||||
countas Defines an artist that should be counted together with another artist for chart statistics etc.
|
||||
@ -29,5 +28,4 @@ belongtogether AC/DC # / and ; separate even when there are no spaces, s
|
||||
replacetitle 첫 사랑니 (Rum Pum Pum Pum) Rum Pum Pum Pum
|
||||
replaceartist Dal Shabet Dal★Shabet
|
||||
replaceartist Mr FijiWiji, AgNO3 Mr FijiWiji␟AgNO3 # one artist is replaced by two artists
|
||||
replaceartist Selena Gomez & the Scene Selena Gomez & The Scene # note how there is a &, but we do not need an extra belongtogether entry.
|
||||
countas Trouble Maker HyunA
|
||||
|
@ -16,7 +16,7 @@
|
||||
<span>with your library</span>
|
||||
<p class="stats"><a href="/scrobbles?artist=KEY_ENC_ARTISTNAME">KEY_ISSUES Issues</a></p>
|
||||
|
||||
<p>Maloja can identify possible problems with consistency or redundancy in your library.</p>
|
||||
<p>Maloja can identify possible problems with consistency or redundancy in your library. After making any changes, you should <a onclick='fullrebuild()'>rebuild your library</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user