fix for no sub languages and avoid hdmv_pgs_subtitle codecs. Fixes #474

This commit is contained in:
clinton-hall 2014-07-30 07:16:29 +09:30
parent 37f1f1c179
commit d154b663ca
2 changed files with 4 additions and 2 deletions

View file

@ -122,7 +122,8 @@ def buildCommands(file, newDir):
videoStreams = [item for item in video_details["streams"] if item["codec_type"] == "video"]
audioStreams = [item for item in video_details["streams"] if item["codec_type"] == "audio"]
subStreams = [item for item in video_details["streams"] if item["codec_type"] == "subtitle"]
if nzbtomedia.VEXTENSION not in ['.mkv', '.mpegts']:
subStreams = [item for item in video_details["streams"] if item["codec_type"] == "subtitle" and item["codec_name"] != "hdmv_pgs_subtitle"]
for video in videoStreams:
codec = video["codec_name"]
@ -377,7 +378,7 @@ def extract_subs(file, newfilePath, bitbucket):
video_details, result = getVideoDetails(file)
if not video_details:
return
subStreams = [item for item in video_details["streams"] if item["codec_type"] == "subtitle"]
subStreams = [item for item in video_details["streams"] if item["codec_type"] == "subtitle" and item["codec_name"] != "hdmv_pgs_subtitle"]
if nzbtomedia.SUBSDIR:
subdir = nzbtomedia.SUBSDIR
else: