Skip to content

Commit 0cd8bd1

Browse files
committed
Adjusted formatting to fit my style, added custom icon
1 parent b6031a7 commit 0cd8bd1

File tree

4 files changed

+3
-9
lines changed

4 files changed

+3
-9
lines changed

assets/icon.png

-31.5 KB
Binary file not shown.

assets/icons/favicon.png

248 KB
Loading

assets/icons/icon.ico

103 KB
Binary file not shown.

main.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,8 @@ async def metadata():
120120
if audio.tags is None:
121121
audio.add_tags()
122122
with open(f"{temp}/CoverGen/data/{track_name}/thumbnail.jpg" if os.path.exists(f"{temp}/CoverGen/data/{track_name}/thumbnail.jpg") else "CoverGen/src/assets/Cover.jpg", "rb") as f:
123-
audio.tags.add(
124-
APIC(
125-
encoding=0, # 3 is for utf-8
126-
mime="image/jpeg", # image/jpeg or image/png
127-
type=3, # 3 is for the cover image
128-
desc=u"Cover",
129-
data=f.read()
130-
))
123+
audio.tags.add(APIC(encoding=0,mime="image/jpeg",type=3, desc=u"Cover", data=f.read()))
124+
131125
elif track_path.suffix == ".flac":
132126
audio = FLAC(track.path)
133127
audio["title"] = track.title
@@ -254,4 +248,4 @@ def spotify_creds(e):
254248
ft.Row([cover]),
255249
ft.Row([error]))
256250

257-
ft.app(target=main)
251+
ft.app(target=main, assets_dir="assets")

0 commit comments

Comments
 (0)