mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 21:03:14 -07:00
Fix filtering of hdmv_pgs_subtitle subtitles on newer ffmpeg versions
This commit is contained in:
parent
cacc32020c
commit
22cd673c0f
1 changed files with 3 additions and 3 deletions
|
@ -124,7 +124,7 @@ def buildCommands(file, newDir):
|
||||||
audioStreams = [item for item in video_details["streams"] if item["codec_type"] == "audio"]
|
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"]
|
subStreams = [item for item in video_details["streams"] if item["codec_type"] == "subtitle"]
|
||||||
if nzbtomedia.VEXTENSION not in ['.mkv', '.mpegts']:
|
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"]
|
subStreams = [item for item in video_details["streams"] if item["codec_type"] == "subtitle" and item["codec_name"] != "hdmv_pgs_subtitle" and item["codec_name"] != "pgssub"]
|
||||||
|
|
||||||
for video in videoStreams:
|
for video in videoStreams:
|
||||||
codec = video["codec_name"]
|
codec = video["codec_name"]
|
||||||
|
@ -397,9 +397,9 @@ def extract_subs(file, newfilePath, bitbucket):
|
||||||
name = os.path.splitext(os.path.split(newfilePath)[1])[0]
|
name = os.path.splitext(os.path.split(newfilePath)[1])[0]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
subStreams = [item for item in video_details["streams"] if item["codec_type"] == "subtitle" and item["tags"]["language"] in nzbtomedia.SLANGUAGES and item["codec_name"] != "hdmv_pgs_subtitle"]
|
subStreams = [item for item in video_details["streams"] if item["codec_type"] == "subtitle" and item["tags"]["language"] in nzbtomedia.SLANGUAGES and item["codec_name"] != "hdmv_pgs_subtitle" and item["codec_name"] != "pgssub"]
|
||||||
except:
|
except:
|
||||||
subStreams = [item for item in video_details["streams"] if item["codec_type"] == "subtitle" and item["codec_name"] != "hdmv_pgs_subtitle"]
|
subStreams = [item for item in video_details["streams"] if item["codec_type"] == "subtitle" and item["codec_name"] != "hdmv_pgs_subtitle" and item["codec_name"] != "pgssub"]
|
||||||
num = len(subStreams)
|
num = len(subStreams)
|
||||||
for n in range(num):
|
for n in range(num):
|
||||||
sub = subStreams[n]
|
sub = subStreams[n]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue