add navbar and new logo

This commit is contained in:
geoffrey45
2022-03-04 08:02:01 +03:00
parent 6931cd926c
commit eebe6b4440
11 changed files with 201 additions and 55 deletions
+21 -3
View File
@@ -43,8 +43,9 @@ def reindex_tracks():
flag = False
while flag is False:
functions.populate()
functions.populate_images()
# functions.populate()
functions.get_all_albums()
# functions.populate_images()
# functions.save_t_colors()
time.sleep(300)
@@ -188,6 +189,23 @@ def get_album_duration(album: List[models.Track]) -> int:
album_duration = 0
for track in album:
album_duration += track.length
try:
album_duration += track.length
except AttributeError:
album_duration += track["length"]
return album_duration
def get_album_image(album: list) -> str:
"""
Gets the image of an album.
"""
for track in album:
img = functions.extract_thumb(track["filepath"])
if img is not None:
return img
return functions.use_defaults()