fixed parse metadata not working correctly on custom command
This commit is contained in:
parent
3e8cda1901
commit
d17aea86ee
1 changed files with 20 additions and 18 deletions
|
|
@ -89,6 +89,7 @@ class DownloadWorker(
|
||||||
}
|
}
|
||||||
val limitRate = sharedPreferences.getString("limit_rate", "")
|
val limitRate = sharedPreferences.getString("limit_rate", "")
|
||||||
if (limitRate != "") request.addOption("-r", limitRate!!)
|
if (limitRate != "") request.addOption("-r", limitRate!!)
|
||||||
|
if(downloadItem.type != DownloadViewModel.Type.command){
|
||||||
if (downloadItem.SaveThumb) {
|
if (downloadItem.SaveThumb) {
|
||||||
request.addOption("--write-thumbnail")
|
request.addOption("--write-thumbnail")
|
||||||
request.addOption("--convert-thumbnails", "png")
|
request.addOption("--convert-thumbnails", "png")
|
||||||
|
|
@ -109,6 +110,7 @@ class DownloadWorker(
|
||||||
request.addCommands(listOf("--replace-in-metadata","uploader",".*.",downloadItem.author))
|
request.addCommands(listOf("--replace-in-metadata","uploader",".*.",downloadItem.author))
|
||||||
}
|
}
|
||||||
if (downloadItem.customFileNameTemplate.isEmpty()) downloadItem.customFileNameTemplate = "%(uploader)s - %(title)s"
|
if (downloadItem.customFileNameTemplate.isEmpty()) downloadItem.customFileNameTemplate = "%(uploader)s - %(title)s"
|
||||||
|
}
|
||||||
|
|
||||||
request.addOption("--restrict-filenames")
|
request.addOption("--restrict-filenames")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue