mirror of
https://github.com/bkerler/edl.git
synced 2024-11-14 19:14:58 -05:00
Fix loader db issues on invalid filenames
This commit is contained in:
parent
44e91cc789
commit
3cf600372b
1 changed files with 9 additions and 1 deletions
|
@ -43,7 +43,15 @@ class loader_utils(metaclass=LogBase):
|
|||
try:
|
||||
hwid = filename.split("_")[0].lower()
|
||||
msmid = hwid[:8]
|
||||
try:
|
||||
int(msmid,16)
|
||||
except:
|
||||
continue
|
||||
devid = hwid[8:]
|
||||
if devid == '':
|
||||
continue
|
||||
if len(filename.split("_"))<2:
|
||||
continue
|
||||
pkhash = filename.split("_")[1].lower()
|
||||
for msmid in self.convertmsmid(msmid):
|
||||
mhwid = msmid + devid
|
||||
|
@ -53,7 +61,7 @@ class loader_utils(metaclass=LogBase):
|
|||
if pkhash not in self.loaderdb[mhwid]:
|
||||
self.loaderdb[mhwid][pkhash] = fn
|
||||
except Exception as e: # pylint: disable=broad-except
|
||||
self.debug(str(e))
|
||||
self.debug(f"Filename:{filename} => {str(e)}")
|
||||
continue
|
||||
return self.loaderdb
|
||||
|
||||
|
|
Loading…
Reference in a new issue