Tried to improve file tag loading time by tweaking some parameters of TinyTag.get().

This commit is contained in:
The Wobbler 2025-01-27 14:12:48 +01:00
parent bff8681f5b
commit f77bba0818

View file

@ -23,7 +23,7 @@ class Track:
self.path = path self.path = path
self.property_string = property_string self.property_string = property_string
self.tags = TinyTag.get(self.path) self.tags = TinyTag.get(self.path, ignore_errors=False, duration=False)
self.cached = False self.cached = False
self.audio = None self.audio = None
@ -84,9 +84,9 @@ class Track:
self.duration = 0 self.duration = 0
def load_audio(self): def load_audio(self):
type = self.path.split(".")[-1] file_type = self.path.split(".")[-1]
if type in SUPPORTED_FORMATS: if file_type in SUPPORTED_FORMATS:
self.audio = AudioSegment.from_file(self.path) self.audio = AudioSegment.from_file(self.path)
def remaining(self, position: int): def remaining(self, position: int):