commit 163984a9c1bf3d8f926ec49d5ae9293ec87f3212
parent 2fa8574151b50da080ca9be0261aa04673c247ca
Author: rhunk <101876869+rhunk@users.noreply.github.com>
Date: Fri, 23 Jun 2023 19:05:54 +0200
fix: media downloader file path
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/src/main/kotlin/me/rhunk/snapenhance/features/impl/downloader/MediaDownloader.kt b/app/src/main/kotlin/me/rhunk/snapenhance/features/impl/downloader/MediaDownloader.kt
@@ -94,11 +94,12 @@ class MediaDownloader : Feature("MediaDownloader", loadParams = FeatureLoadParam
return isFFmpegPresent
}
+ //TODO: implement subfolder argument
private fun createNewFilePath(hexHash: String, mediaDisplayType: String?, pathPrefix: String): String {
val downloadOptions = context.config.options(ConfigProperty.DOWNLOAD_OPTIONS)
val sanitizedPathPrefix = pathPrefix
.replace(" ", "_")
- .replace(Regex("[\\\\/:*?\"<>|]"), "")
+ .replace(Regex("[\\\\:*?\"<>|]"), "")
.ifEmpty { hexHash }
val currentDateTime = SimpleDateFormat("yyyy-MM-dd_HH-mm-ss", Locale.ENGLISH).format(System.currentTimeMillis())