handle error when reading using mutagen
This commit is contained in:
parent
c2cd3b0301
commit
e9e363a13a
|
@ -149,7 +149,12 @@ class SoundFile:
|
|||
|
||||
def read_file_info(self):
|
||||
""" Read file information and metadata. """
|
||||
return mutagen.File(self.path) if os.path.exists(self.path) else None
|
||||
try:
|
||||
if os.path.exists(self.path):
|
||||
return mutagen.File(self.path)
|
||||
except Exception:
|
||||
pass
|
||||
return None
|
||||
|
||||
def find_episode(self, sound, path_info):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user