diff --git a/CHANGELOG.md b/CHANGELOG.md index 5164ce10..f01cf6be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -731,7 +731,6 @@ Accepted variables: TYPE -> it can be: audio,video,command BACKGROUND -> whether the app downloads on its own and wont show the download card if you have it on -COMMAND -> if your preferred type is audio/video or you set the TYPE variable as so, this will be appended to your Extra Commands string. If the type is command, the whole command will be used for the download The intent that needs to be created is of android.intent.action.SEND and the intent text should be the url that you need to download. > # 1.6.9 (2023-11) diff --git a/README-es.md b/README-es.md index cb9972e2..c0017baa 100644 --- a/README-es.md +++ b/README-es.md @@ -119,7 +119,6 @@ Variables aceptadas: TIPO -> puede ser: audio, video, comando
BACKGROUND -> puede ser: verdadero, falso. Si es cierto, la aplicación no mostrará la tarjeta de descarga pase lo que pase y ejecutará la descarga en segundo plano.
-COMMAND -> Si su tipo preferido es audio/video o configura la variable TIPO como uno de ellos, esto se agregará a su cadena de Comandos adicionales. Si el tipo es comando, todo el comando que escribió aquí se usará para la descarga.
### Tasker Ejemplo de descarga de un audio en segundo plano 1. Crear tarea de intención de envío diff --git a/README-ja.md b/README-ja.md index b5ad63fb..03bbabc2 100644 --- a/README-ja.md +++ b/README-ja.md @@ -129,7 +129,6 @@ TaskerやMacrodroidなどのアプリでインテントを使用して、ユー TYPE -> audio, video, commandのいずれか
BACKGROUND -> true, falseのいずれか。trueの場合、アプリはダウンロードカードを表示せず、バックグラウンドでダウンロードを実行
-COMMAND -> 優先タイプがaudio/videoの場合、またはTYPE変数をそれらのいずれかに設定した場合、これは追加コマンド文字列に追加されます。タイプがcommandの場合、ここに書いたコマンド全体がダウンロードに使用されます
### Taskerでバックグラウンドでオーディオをダウンロードする例 1. 送信インテントタスクを作成 diff --git a/README.md b/README.md index 1ff71229..80ed2d9f 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,6 @@ Accepted variables: TYPE -> it can be: audio,video,command
BACKGROUND -> it can be: true,false. If its true the app won't show the download card no matter what and run the download in the background
-COMMAND -> if your preferred type is audio/video or you set the TYPE variable as one of them, this will be appended to your Extra Commands string. If the type is command, the whole command you wrote here will be used for the download
### Tasker Example of downloading an audio in the background 1. Create Send Intent task diff --git a/app/src/main/java/com/deniscerri/ytdl/util/extractors/YTDLPUtil.kt b/app/src/main/java/com/deniscerri/ytdl/util/extractors/YTDLPUtil.kt index 86ad751d..65d3bdc5 100644 --- a/app/src/main/java/com/deniscerri/ytdl/util/extractors/YTDLPUtil.kt +++ b/app/src/main/java/com/deniscerri/ytdl/util/extractors/YTDLPUtil.kt @@ -1012,7 +1012,7 @@ class YTDLPUtil(private val context: Context, private val commandTemplateDao: Co val useArtistTags = if (downloadItem.url.isYoutubeURL()) "artists,artist," else "" if (downloadItem.author.isBlank()) { - metadataCommands.addOption("--parse-metadata", """%(${useArtistTags}uploader,channel,creator|null)l:^(?P.*?)(?:(?= - Topic)|$)""") + metadataCommands.addOption("--parse-metadata", """%(${useArtistTags}uploader,channel,creator|)l:^(?P.*?)(?:(?= - Topic)|$)""") } if (downloadItem.audioPreferences.splitByChapters && downloadItem.downloadSections.isBlank()){ @@ -1384,7 +1384,9 @@ class YTDLPUtil(private val context: Context, private val commandTemplateDao: Co val cacheDirArg = """(--cache-dir (".*"))""".toRegex().find(downloadItem.extraCommands) if (cacheDirArg != null) { ytDlRequest.addOption("--cache-dir", cacheDirArg.groupValues.last().replace("\"", "")) - downloadItem.extraCommands.replace(cacheDirArg.value, "") + kotlin.runCatching { + downloadItem.extraCommands = downloadItem.extraCommands.replace(cacheDirArg.value, "") + } } request.addOption(downloadItem.extraCommands) }