mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-06 21:21:12 -07:00
try again without show_error. Fixes #480
This commit is contained in:
parent
14935b5388
commit
17073857e1
1 changed files with 11 additions and 3 deletions
|
@ -43,14 +43,22 @@ def getVideoDetails(videofile):
|
|||
result = 1
|
||||
if not nzbtomedia.FFPROBE:
|
||||
return video_details, result
|
||||
command = [nzbtomedia.FFPROBE, '-v', 'quiet', '-print_format', 'json', '-show_format', '-show_streams', '-show_error', videofile]
|
||||
try:
|
||||
command = [nzbtomedia.FFPROBE, '-v', 'quiet', '-print_format', 'json', '-show_format', '-show_streams', '-show_error', videofile]
|
||||
proc = subprocess.Popen(command, stdout=subprocess.PIPE)
|
||||
out, err = proc.communicate()
|
||||
result = proc.returncode
|
||||
video_details = json.loads(out)
|
||||
except:
|
||||
logger.error("Checking [%s] has failed" % (videofile), 'TRANSCODER')
|
||||
except: pass
|
||||
if not video_details:
|
||||
try:
|
||||
command = [nzbtomedia.FFPROBE, '-v', 'quiet', '-print_format', 'json', '-show_format', '-show_streams', videofile]
|
||||
proc = subprocess.Popen(command, stdout=subprocess.PIPE)
|
||||
out, err = proc.communicate()
|
||||
result = proc.returncode
|
||||
video_details = json.loads(out)
|
||||
except:
|
||||
logger.error("Checking [%s] has failed" % (videofile), 'TRANSCODER')
|
||||
return video_details, result
|
||||
|
||||
def buildCommands(file, newDir):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue