Disable some arguments that are rarely used

The first subtitle will be set to default in every case.
    The script will be executed by default without -e
This commit is contained in:
RealStickman 2023-06-04 19:55:27 +02:00
parent 8820f952dd
commit 0032e9415c

View File

@ -130,6 +130,7 @@ parser.add_argument(
help="Stream identifier for subtitles", help="Stream identifier for subtitles",
) )
"""
parser.add_argument( parser.add_argument(
"-sd", "-sd",
"--set-default-subtitle", "--set-default-subtitle",
@ -137,10 +138,12 @@ parser.add_argument(
action="store_true", action="store_true",
help="If passed, set the first subtitle as default", help="If passed, set the first subtitle as default",
) )
"""
# Output file # Output file
parser.add_argument("-o", "--output-file", required=True, type=str, help="Output file") parser.add_argument("-o", "--output-file", required=True, type=str, help="Output file")
"""
# Execute or print commands # Execute or print commands
parser.add_argument( parser.add_argument(
"-e", "-e",
@ -148,6 +151,7 @@ parser.add_argument(
action="store_true", action="store_true",
help="Execute script. If not set, shows the commands that would be run.", help="Execute script. If not set, shows the commands that would be run.",
) )
"""
args = parser.parse_args() args = parser.parse_args()
@ -212,13 +216,19 @@ else:
subtitle = args.subtitle_name subtitle = args.subtitle_name
subtitlestream = args.subtitle_stream subtitlestream = args.subtitle_stream
"""
if args.set_default_subtitle: if args.set_default_subtitle:
defaultsub = "-disposition:s:0 default" defaultsub = "-disposition:s:0 default"
else: else:
defaultsub = "" defaultsub = ""
"""
defaultsub = "-disposition:s:0 default"
"""
# Flag to actually execute command # Flag to actually execute command
execute = args.execute execute = args.execute
"""
execute = True
# check input file for valid duration # check input file for valid duration
valid_duration(inputfile, "INPUT") valid_duration(inputfile, "INPUT")