diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..0cad0aa --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +PyQt6 +pygame +tinytag +pydub \ No newline at end of file diff --git a/wobuzz/library/library.py b/wobuzz/library/library.py index f0a5ef7..a460240 100644 --- a/wobuzz/library/library.py +++ b/wobuzz/library/library.py @@ -36,7 +36,9 @@ class Library: for track in playlist.tracks: track_item = QTreeWidgetItem(view) - track_item.setText(1, track.title) + track_item.setText(1, track.tags.title) + track_item.setText(2, track.tags.artist) + track_item.setText(3, track.tags.album) return view diff --git a/wobuzz/player/playlist.py b/wobuzz/player/playlist.py index 4101b0a..fa50f83 100644 --- a/wobuzz/player/playlist.py +++ b/wobuzz/player/playlist.py @@ -32,6 +32,8 @@ class Playlist: file.close() lines = m3u.split("\n") # m3u entries + lines = lines[:-1] + print(lines) i = 0 diff --git a/wobuzz/player/track.py b/wobuzz/player/track.py index 5485e72..a98e075 100644 --- a/wobuzz/player/track.py +++ b/wobuzz/player/track.py @@ -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