added subtitle blacklist tuple also added dvd_subtitle to blacklist
prithugoswami prithugoswami524@gmail.com
Mon, 09 Jul 2018 00:23:40 +0530
1 files changed,
4 insertions(+),
2 deletions(-)
jump to
M
amt.py
→
amt.py
@@ -20,6 +20,9 @@ import tmdbsimple as tmdb
from imdbpie import Imdb from mutagen.mp4 import MP4, MP4Cover +# The following subtitle codecs are ingored if found in the file as they are +# not supported by the mp4 container. These are mainly picture-based subtitles +sub_codec_blacklist = ("dvdsub", "dvd_subtitle", "pgssub") def collect_stream_metadata(filename): """@@ -36,7 +39,6 @@ json_data = JSONDecoder().decode(out)
return json_data - def PrintException(): exc_type, exc_obj, tb = sys.exc_info()@@ -122,7 +124,7 @@ stream_md = collect_stream_metadata(filename)
streams_to_process = [] dvdsub_exists=False for stream in stream_md['streams']: - if not stream['codec_name'] in ("dvdsub", "pgssub"): + if not stream['codec_name'] in sub_codec_blacklist: streams_to_process.append(stream['index']) else: dvdsub_exists=True