forked from Wobbl/Wobuzz
Tried to improve file tag loading time by tweaking some parameters of TinyTag.get().
This commit is contained in:
parent
bff8681f5b
commit
f77bba0818
1 changed files with 3 additions and 3 deletions
|
@ -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):
|
||||||
|
|
Loading…
Add table
Reference in a new issue