diff --git a/websitepart.py b/websitepart.py
index 8513897..305748e 100644
--- a/websitepart.py
+++ b/websitepart.py
@@ -43,20 +43,23 @@ def musicstatus():
history.append(currentbeforereset)
html += f'
Currently Playing: {history[-1][0]}
\n'
html += f'Last Update Time: {datetime.datetime.fromtimestamp(int(history[-1][1]), datetime.timezone.utc).strftime("%Y-%m-%d %H:%M:%S")} (UTC +0)
\n'
- if os.path.exists("lyrics/" + history[-1][0] + ".txt"):
- with open("lyrics/" + history[-1][0] + ".txt", "r") as f:
+ 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 i.startswith("["):
- lyrics[i] = lyrics[i][10:]
- html += 'Lyrics:
\n'
- html += '\n'
+ if lyrics[i].startswith("["):
+ if ":" in lyrics[i][1:3]:
+ lyrics.pop(i)
+ else:
+ lyrics[i] = lyrics[i][10:]
+ html += '
Lyrics:
\n'
+ html += '\n'
for lyric in lyrics:
- html += lyric + "\n"
- html += '\n'
+ html += f'
{lyric}
\n'
+ html += '
\n'
html += '\n\nMusic Name | \nTime | \n
\n'
for music in history[::-1]:
html += '\n' + music[0] + ' | \n' + datetime.datetime.fromtimestamp(int(music[1]), datetime.timezone.utc).strftime("%Y-%m-%d %H:%M:%S") + ' | \n
\n'