Skip to content

Commit

Permalink
fix keep undefined audio_streams_list
Browse files Browse the repository at this point in the history
  • Loading branch information
yajrendrag committed Mar 3, 2024
1 parent 3903482 commit 258d262
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions source/keep_stream_by_language/changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

**<span style="color:#56adda">0.0.29</span>**
- fix keep undefined audio_streams_list list builder - last time should have been an 'or'

**<span style="color:#56adda">0.0.28</span>**
- fix fail safe function - it was only working when the config list was shorter than streams list

Expand Down
2 changes: 1 addition & 1 deletion source/keep_stream_by_language/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"on_worker_process": 1
},
"tags": "audio,subtitle, ffmpeg,library file test",
"version": "0.0.28"
"version": "0.0.29"
}
2 changes: 1 addition & 1 deletion source/keep_stream_by_language/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def keep_undefined(mapper, streams, keep_commentary):
if keep_commentary:
audio_streams_list = [i for i in range(0, len(streams)) if "codec_type" in streams[i] and streams[i]["codec_type"] == "audio" and ("tags" not in streams[i] or ("tags" in streams[i] and "language" not in streams[i]["tags"]))]
else:
audio_streams_list = [i for i in range(0, len(streams)) if "codec_type" in streams[i] and streams[i]["codec_type"] == "audio" and ("tags" not in streams[i] or ("tags" in streams[i] and "language" not in streams[i]["tags"])) and
audio_streams_list = [i for i in range(0, len(streams)) if "codec_type" in streams[i] and streams[i]["codec_type"] == "audio" and ("tags" not in streams[i] or ("tags" in streams[i] and "language" not in streams[i]["tags"])) or
("tags" in streams[i] and "title" in streams[i]["tags"] and "commentary" not in streams[i]["tags"]["title"].lower())]
subtitle_streams_list = [i for i in range(0, len(streams)) if "codec_type" in streams[i] and streams[i]["codec_type"] == "subtitle" and ("tags" not in streams[i] or ("tags" in streams[i] and "language" not in streams[i]["tags"]))]
stream_iterator(mapper, subtitle_streams_list, streams, 's')
Expand Down

0 comments on commit 258d262

Please sign in to comment.