Flagen Hintergrund Styling

This commit is contained in:
mikka 2026-05-16 10:41:56 +02:00
parent 661c703dd7
commit 916553ad47
3 changed files with 8 additions and 7 deletions

4
app.py
View file

@ -249,12 +249,14 @@ def loeschen():
except TypeError:
return "Irgendwas ist GANZ falsch", 400
try:
with open(dateiNameFürListe(liste), "x") as f:
with open(dateiNameFürListe(liste), "r+") as f:
songs = json.load(f)
if len(songs) < song + 1:
return "Das Lied Gibt es Nicht", 400
del songs[song]
f.seek(0)
json.dump(songs, f, indent=2, ensure_ascii=False)
f.truncate()
return redirect("/remove?liste=" + liste, 303)
except FileNotFoundError:
return "Die Liste Ist nicht da (Du kannst Sie anlegen)", 400