Add name substitie to args also

Signed-off-by: anasty17 <e.anastayyar@gmail.com>
This commit is contained in:
anasty17 2024-03-12 21:12:35 +02:00
parent af8aa70951
commit 9bc4406dee
3 changed files with 14 additions and 0 deletions

View File

@ -181,6 +181,14 @@ If DEFAULT_UPLOAD is `gd` then you can pass up: `rc` to upload to RCLONE_PATH.
/cmd rcl or rclonePath -up rclonePath or rc or rcl
/cmd mrcc:rclonePath -up rcl or rc(if you have add rclone path from usetting) (to use user config)"""
name_sub = """<b>Name Substitution</b>: -ns
/cmd link -ns tea : coffee : s|ACC : : s|mP4
This will effect on all files. Formate: wordToReplace : wordToReplaceWith : sensitiveCase
1. tea will get replaced by coffee with sensitive case because I have added `s` last of the option.
2. ACC will get removed because I have added nothing between to replace with sensitive case because I have added `s` last of the option.
3. mP4 will get removed because I have added nothing to replace with
"""
YT_HELP_DICT = {
"main": yt,
"New-Name": f"{new_name}\nNote: Don't add file extension",
@ -198,6 +206,7 @@ YT_HELP_DICT = {
"Screenshot": screenshot,
"Convert-Media": convert_media,
"Force-Start": force_start,
"Name-Substitute": name_sub,
}
MIRROR_HELP_DICT = {
@ -223,6 +232,7 @@ MIRROR_HELP_DICT = {
"Convert-Media": convert_media,
"Force-Start": force_start,
"User-Download": user_download,
"Name-Substitute": name_sub,
}
CLONE_HELP_DICT = {

View File

@ -98,6 +98,7 @@ class Mirror(TaskListener):
"-t": "",
"-ca": "",
"-cv": "",
"-ns": "",
}
args = arg_parser(input_list[1:], arg_base)
@ -120,6 +121,7 @@ class Mirror(TaskListener):
self.forceUpload = args["-fu"]
self.convertAudio = args["-ca"]
self.convertVideo = args["-cv"]
self.nameSub = args["-ns"]
headers = args["-h"]
isBulk = args["-b"]

View File

@ -309,6 +309,7 @@ class YtDlp(TaskListener):
"-t": "",
"-ca": "",
"-cv": "",
"-ns": "",
}
args = arg_parser(input_list[1:], arg_base)
@ -333,6 +334,7 @@ class YtDlp(TaskListener):
self.forceUpload = args["-fu"]
self.convertAudio = args["-ca"]
self.convertVideo = args["-cv"]
self.nameSub = args["-ns"]
isBulk = args["-b"]
folder_name = args["-m"]