Connected PlaylistView.itemDoubleClicked to a function that then tells the player to play that track.

This commit is contained in:
The Wobbler 2024-12-29 14:31:21 +01:00
parent 8fbb40d2f9
commit da27963884
5 changed files with 34 additions and 6 deletions

View file

@ -15,15 +15,15 @@ class Track:
self.app = app
self.path = path
self.property_string = property_string
self.cached = cache
self.tags = TinyTag.get(self.path)
self.cached = False
self.audio = None
self.sound = None
self.duration = 0
if self.cached:
if cache:
self.cache()
def cache(self):
@ -36,6 +36,8 @@ class Track:
self.duration = len(self.audio) # track duration in milliseconds
self.cached = True
def remaining(self, position: int):
remaining_audio = self.audio[position:]