diff --git a/maloja/database.py b/maloja/database.py index cff3f4a..13b0f12 100644 --- a/maloja/database.py +++ b/maloja/database.py @@ -69,6 +69,8 @@ MEDALS_TRACKS = {} WEEKLY_TOPTRACKS = {} WEEKLY_TOPARTISTS = {} +ISSUES = {} + cla = CleanerAgent() coa = CollectorAgent() clients = [] @@ -727,17 +729,13 @@ def newrule(**keys): db_rulestate = False -@dbserver.get("issues") -def issues_external(): #probably not even needed - return issues() - - def issues(): + return ISSUES + +def check_issues(): combined = [] duplicates = [] newartists = [] - inconsistent = not db_rulestate - # if the user manually edits files while the server is running this won't show, but too lazy to check the rulestate here import itertools import difflib @@ -820,7 +818,8 @@ def issues(): # duplicates.append((c[0],c[1])) - return {"duplicates":duplicates,"combined":combined,"newartists":newartists,"inconsistent":inconsistent} + return {"duplicates":duplicates,"combined":combined,"newartists":newartists} + @dbserver.post("importrules") @@ -981,6 +980,9 @@ def build_db(): global db_rulestate db_rulestate = utilities.consistentRulestate(datadir("scrobbles"),cla.checksums) + global ISSUES + ISSUES = check_issues() + log("Database fully built!") diff --git a/maloja/web/issues.py b/maloja/web/issues.py index eac9cdc..b5033d0 100644 --- a/maloja/web/issues.py +++ b/maloja/web/issues.py @@ -8,12 +8,12 @@ def instructions(keys): i = 0 html = "" - if db_data["inconsistent"]: - html += "" - html += "" - html += """""" - html += "" - i += 1 +# if db_data["inconsistent"]: +# html += "" +# html += "" +# html += """""" +# html += "" +# i += 1 for d in db_data["duplicates"]: html += "" html += "
The current database wasn't built with all current rules in effect. Any problem below might be a false alarm and fixing it could create redundant rules.
Rebuild the database
The current database wasn't built with all current rules in effect. Any problem below might be a false alarm and fixing it could create redundant rules.
Rebuild the database
'" + artistLink(d[0]) + "'"