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]
else:
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:
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"])
for fandom in fandomlist:
fandomfics = []

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

Loading…
Cancel
Save