Skip to content

Commit

Permalink
Merge pull request #8 from DevER-M/fix-transparent
Browse files Browse the repository at this point in the history
fix transparent issue and theme issue
  • Loading branch information
DevER-M authored Nov 23, 2024
2 parents fa0f48d + 77fa920 commit 2ff3d34
Show file tree
Hide file tree
Showing 18 changed files with 17 additions and 18 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ __pycache__
token
*.egg-info
dist
.venv*
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
recursive-include data *
recursive-include yami/data *
recursive-include .assets *
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "yami-music-player"
version = "1.0.0"
version = "1.0.1"
description="An open-source music player with simple UI"
readme = "README.md"
requires-python = ">=3.8"
Expand Down Expand Up @@ -44,7 +44,7 @@ include-package-data = true
where=["."]

[tool.setuptools.package-data]
yami = ["./data/*"]
yami = ["./yami/data/*"]

[project.scripts]
yami = "yami.main:entry"
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ mutagen==1.47.0
Pillow==11.0.0
pygame==2.6.1
spotdl==4.2.8
tk
2 changes: 0 additions & 2 deletions yami/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from .music import MusicPlayer

__all__ = ["MusicPlayer"]
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
3 changes: 3 additions & 0 deletions yami/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@
def entry():
app = MusicPlayer()
app.mainloop()

if __name__=="__main__":
entry()
22 changes: 9 additions & 13 deletions yami/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
import tempfile
import asyncio
import logging
import os


from mutagen import File, id3
import customtkinter as ctk
from PIL import Image, ImageDraw,ImageTk
from PIL import Image, ImageDraw
import spotdl
import pygame

Expand All @@ -21,7 +21,7 @@
from .util import GEOMETRY, TITLE, PlayerState, EVENT_INTERVAL


ctk.set_default_color_theme("data/theme.json")
ctk.set_default_color_theme("yami/data/theme.json")
ctk.set_appearance_mode("dark")


Expand All @@ -35,10 +35,6 @@ def __init__(self: ctk.CTk, loop=None):
# CONFIG
self.geometry(GEOMETRY)
self.title(TITLE)
self.attributes("-alpha", 0.4)
self.iconpath = ImageTk.PhotoImage(file=os.path.join(".assets","default.png"))
self.wm_iconbitmap()
self.iconphoto(False, self.iconpath)

# STATE
self.playlist = []
Expand Down Expand Up @@ -245,12 +241,12 @@ def check_for_events(self):
self.play_next_song()

def setup_icons(self):
self.play_icon = ctk.CTkImage(Image.open("data/play_arrow.png"))
self.pause_icon = ctk.CTkImage(Image.open("data/pause.png"))
self.prev_icon = ctk.CTkImage(Image.open("data/skip_prev.png"))
self.next_icon = ctk.CTkImage(Image.open("data/skip_next.png"))
self.folder_icon = ctk.CTkImage(Image.open("data/folder.png"))
self.music_icon = ctk.CTkImage(Image.open("data/music.png"))
self.play_icon = ctk.CTkImage(Image.open("yami/data/play_arrow.png"))
self.pause_icon = ctk.CTkImage(Image.open("yami/data/pause.png"))
self.prev_icon = ctk.CTkImage(Image.open("yami/data/skip_prev.png"))
self.next_icon = ctk.CTkImage(Image.open("yami/data/skip_next.png"))
self.folder_icon = ctk.CTkImage(Image.open("yami/data/folder.png"))
self.music_icon = ctk.CTkImage(Image.open("yami/data/music.png"))
logging.info("icons setup")

def setup_bindings(self):
Expand Down

0 comments on commit 2ff3d34

Please sign in to comment.