Sort fandoms properly, don’t return false positives for locked fics

master
trémeur 1 year ago
parent 909ba4749c
commit f2e67ef6c0

@ -47,9 +47,9 @@ def fandomlist(local=False):
newfandom = "FF0" + fandom[-1] newfandom = "FF0" + fandom[-1]
else: else:
newfandom = fandom newfandom = fandom
fandomlist.append({"searchname":fandom,"sortname":newfandom.replace("FF","Final Fantasy "),"displayname":fandom.replace("FF","Final Fantasy ")}) fandomlist.append({"searchname":fandom,"sortname":newfandom.replace("FF","Final Fantasy ").lower(),"displayname":fandom.replace("FF","Final Fantasy ")})
else: else:
fandomlist.append({"searchname":fandom,"sortname":fandom,"displayname":fandom}) fandomlist.append({"searchname":fandom,"sortname":fandom.lower(),"displayname":fandom})
fandomlist = sorted(fandomlist, key=lambda d: d["sortname"]) fandomlist = sorted(fandomlist, key=lambda d: d["sortname"])
for fandom in fandomlist: for fandom in fandomlist:
fandomfics = [] fandomfics = []

@ -17,11 +17,11 @@ do
then then
if test -f "originalsmeta/${ficstring}.py" if test -f "originalsmeta/${ficstring}.py"
then then
if grep -q "locked = True" "originalsmeta/${ficstring}.py" if grep -q "^locked = True" "originalsmeta/${ficstring}.py"
then then
builddir="secret" builddir="secret"
else else
if grep -q "locked = False" "originalsmeta/${ficstring}.py" if grep -q "^locked = False" "originalsmeta/${ficstring}.py"
then then
builddir="files" builddir="files"
fi fi
@ -29,11 +29,11 @@ do
else else
if test -f "translationsmeta/${ficstring}.py" if test -f "translationsmeta/${ficstring}.py"
then then
if grep -q "locked = True" "translationsmeta/${ficstring}.py" if grep -q "^locked = True" "translationsmeta/${ficstring}.py"
then then
builddir="secret" builddir="secret"
else else
if grep -q "locked = False" "translationsmeta/${ficstring}.py" if grep -q "^locked = False" "translationsmeta/${ficstring}.py"
then then
builddir="files" builddir="files"
fi fi

Loading…
Cancel
Save