Private GIT

Skip to content
Snippets Groups Projects
Commit 959570e7 authored by Dustyn Gibson's avatar Dustyn Gibson
Browse files

Try destructing the hachoir objects as soon as possible, to hopefully ensure...

Try destructing the hachoir objects as soon as possible, to hopefully ensure the file is closed before pp file operations
SiCKRAGETV/sickrage-issues#2534
parent 281a8eee
No related branches found
No related tags found
No related merge requests found
......@@ -275,7 +275,12 @@ class Quality:
from hachoir_parser import createParser
from hachoir_metadata import extractMetadata
try:
parser = createParser(filename)
except Exception:
parser = None
pass
if not parser:
return Quality.UNKNOWN
......@@ -285,6 +290,8 @@ class Quality:
metadata = None
pass
del parser
if not metadata:
return Quality.UNKNOWN
......@@ -298,6 +305,8 @@ class Quality:
if metagroup.has('height'):
height = int(metagroup.get('height') or 0)
del metadata
if not height:
return Quality.UNKNOWN
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment