You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:return: Selected subtitle physical position integer or None
852
896
"""
853
897
854
-
filtered_streams=filter_undesired_streams(streams) # Remove descriptive streams before subtitle selection
898
+
filtered_streams=filter_undesired_streams(streams) # Remove undesired streams before subtitle selection
855
899
candidate_streams= [sforsinfiltered_streamsifs.get(pos_key) inkept_positions] # Keep only mapped subtitle candidates
856
900
857
901
forpreferredinpriority_names: # Iterate configured subtitle language priorities in order
@@ -1442,7 +1486,7 @@ def main():
1442
1486
:return: None
1443
1487
"""
1444
1488
1445
-
globalREMOVE_OTHER_AUDIO_TRACKS, REMOVE_OTHER_SUBTITLE_TRACKS, REMOVE_DESCRIPTIVE_STREAMS# Make descriptive config writable
1489
+
globalREMOVE_OTHER_AUDIO_TRACKS, REMOVE_OTHER_SUBTITLE_TRACKS, REMOVE_DESCRIPTIVE_STREAMS, REMOVE_FORCED_STREAMS# Make descriptive and forced config writable
1446
1490
1447
1491
# Parse command-line arguments
1448
1492
parser=argparse.ArgumentParser(
@@ -1466,6 +1510,12 @@ def main():
1466
1510
default=None, # Default to None so absence does not override constants
1467
1511
help="Remove descriptive/SDH streams before selection"
1468
1512
)
1513
+
parser.add_argument( # Register the remove forced streams flag
1514
+
"--remove-forced-streams",
1515
+
action="store_true", # Use presence to set True when explicitly passed
1516
+
default=None, # Default to None so absence does not override constants
1517
+
help="Remove forced streams before selection"# Describe the forced stream filter
1518
+
)
1469
1519
args=parser.parse_args()
1470
1520
1471
1521
ifargs.remove_other_audioisnotNone: # Only override when flag explicitly present
@@ -1474,6 +1524,8 @@ def main():
1474
1524
REMOVE_OTHER_SUBTITLE_TRACKS=args.remove_other_subtitles# Override global constant accordingly
1475
1525
ifargs.remove_descriptive_streamsisnotNone: # Only override when flag explicitly present
1476
1526
REMOVE_DESCRIPTIVE_STREAMS=args.remove_descriptive_streams# Override global constant accordingly
1527
+
ifargs.remove_forced_streamsisnotNone: # Only override when flag explicitly present
1528
+
REMOVE_FORCED_STREAMS=args.remove_forced_streams# Override global constant accordingly
1477
1529
1478
1530
print(
1479
1531
f"{BackgroundColors.CLEAR_TERMINAL}{BackgroundColors.BOLD}{BackgroundColors.GREEN}Welcome to the {BackgroundColors.CYAN}Default Audio Track Switcher{BackgroundColors.GREEN}!{Style.RESET_ALL}\n"
0 commit comments