Fixed some problem

This commit is contained in:
Halhadus 2024-12-09 20:43:15 +03:00
parent 91fbd168a2
commit 3fd4e8c7ec

View file

@ -11,7 +11,7 @@ def read_music_database():
conn.close()
return music_list
def read_count_database(year: int: datetime.datetime.now().year):
def read_count_database(year: int = datetime.datetime.now().year):
if year == datetime.datetime.now().year:
conn = sqlite3.connect(f'assets/localwrapped/count.db')
c = conn.cursor()
@ -52,7 +52,7 @@ def generatehtmlcode(year: int):
if year == datetime.datetime.now().year:
html += '<h2>Last Updated: ' + datetime.datetime.utcfromtimestamp(os.path.getmtime('assets/localwrapped/count.db').strftime('%Y-%m-%d %H:%M:%S') + ' (UTC +0, I hope.)</h2>\n'
else:
html += '<h2>Last Updated: ' + datetime.datetime.utcfromtimestamp(os.path.getmtime(f'assets/localwrapped/count-{year}.db').strftime('%Y-%m-%d %H:%M:%S') + ' (UTC +0, I hope.)</h2>\n'
html += '<h2>Last Updated: ' + datetime.datetime.utcfromtimestamp(os.path.getmtime(f'assets/localwrapped/count-{year}.db').strftime('%Y-%m-%d %H:%M:%S') + ' (UTC +0, I hope.)</h2>\n'
html += '<h3>Most Played Musics</h3>\n'
html += '<ol>\n'
count_list_formatted = []