Added requirements.txt and loading of track metadata.

This commit is contained in:
The Wobbler 2024-12-29 13:50:19 +01:00
parent af2b7b6c8d
commit 8fbb40d2f9
4 changed files with 12 additions and 3 deletions

View file

@ -3,6 +3,7 @@
from pydub import AudioSegment
from pydub.effects import normalize
from pygame.mixer import Sound
from tinytag import TinyTag
class Track:
@ -16,8 +17,8 @@ class Track:
self.property_string = property_string
self.cached = cache
# get filename (will be replaced by proper name getter in future)
self.title = path.split("/")[-1].split(".")[0]
self.tags = TinyTag.get(self.path)
self.audio = None
self.sound = None
self.duration = 0