OOPed the way playlist views are created.

This commit is contained in:
The Wobbler 2025-01-25 17:21:43 +01:00
parent 88b846f3b6
commit 028c38b1b6
7 changed files with 61 additions and 67 deletions

View file

@ -18,8 +18,9 @@ class Track:
Class containing data for a track like file path, raw data...
"""
def __init__(self, app, path: str, property_string: str=None, cache: bool=False):
def __init__(self, app, index: int, path: str, property_string: str=None, cache: bool=False):
self.app = app
self.index_custom_sort = index
self.path = path
self.property_string = property_string
@ -30,6 +31,8 @@ class Track:
self.sound = None
self.duration = 0
self.item = None
if cache:
self.cache()