diff --git a/websitepart.py b/websitepart.py index 7d9a88f..914f054 100644 --- a/websitepart.py +++ b/websitepart.py @@ -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 += '

Lyrics:

\n' html += '
\n' for lyric in lyrics: