Skip to content

Commit

Permalink
added optiont o leave commentary tracks alone
Browse files Browse the repository at this point in the history
  • Loading branch information
revenz committed Jan 21, 2024
1 parent 0f04b2f commit 000e1af
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Scripts/Flow/Video/Video - Set Stream Titles.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ import { Language } from 'Shared/Language';
/**
* Updates audio and or subtitle titles to format `Language / Codec / Bitrate / SampleRate` or `Language / Forced / Codec`
* @author John Andrews
* @revision 1
* @revision 2
* @minimumVersion 24.01.3.0
* @param {bool} Audio If audio stream titles should be updated
* @param {bool} Subtitle If subtitle stream titles should be updated
* @param {bool} LeaveCommentaryAlone If commentary streams should be left alone and not renamed
* @output Titles were changed
* @output No changes were made
*/
function Script(Audio, Subtitles)
function Script(Audio, Subtitles, LeaveCommentaryAlone)
{
let langHelper = new Language();

Expand All @@ -26,7 +27,10 @@ function Script(Audio, Subtitles)
{
let as = Variables.FfmpegBuilderModel.AudioStreams[i];
if(!as)
continue; // no title already
continue; // error handling

if(LeaveCommentaryAlone && as.Title && /commentary/i.test(as.Title))
continue;

let params = [];
if(as.Language)
Expand Down

0 comments on commit 000e1af

Please sign in to comment.