Lyrics added

This commit is contained in:
Halhadus 2024-12-22 16:41:28 +03:00
parent 8b95e2ab8b
commit 00be7a6563

View file

@ -46,15 +46,8 @@ def musicstatus():
if os.path.exists("lyrics/" + history[-1][0] + ".lrc"):
with open("lyrics/" + history[-1][0] + ".lrc", "r") as f:
lyrics = f.read().split("\n")
for i in range(len(lyrics)):
if lyrics[i] == "":
lyrics.pop(i)
for i in range(len(lyrics)):
if lyrics[i].startswith("["):
if ":" in lyrics[i].split("]")[0]:
lyrics.pop(i)
else:
lyrics[i] = lyrics[i][10:]
lyrics = [lyric.split("]")[1] for lyric in lyrics if "]" in lyric]
lyrics = [lyric for lyric in lyrics if not lyric == ""]
html += '<h3>Lyrics:</h3>\n'
html += '<div style="border: 1px solid #ffffff; padding: 10px; text-align: center;">\n'
for lyric in lyrics: