Unverified Commit 565383e0 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

normalise root path


Signed-off-by: Sebastian Schüpbach's avatarSebastian Schüpbach <sebastian.schuepbach@unibas.ch>
parent 9bd362f4
......@@ -27,19 +27,22 @@ trait FileUtils {
val rootPath: String
private val normalize: String => String =
path => if (path.endsWith("/")) path.substring(0, path.length - 1) else path
val videoFilePath: (String, MimeType) => String =
(id, mimeType) => s"$rootPath/$id.${getFileTypeExtension(mimeType).get}"
(id, mimeType) => s"${normalize(rootPath)}/$id.${getFileTypeExtension(mimeType).get}"
val videoPosterPath: String => String =
id => s"$rootPath/${id.replace("/derived", "")}-poster.jp2"
id => s"${normalize(rootPath)}/${id.replace("/derived", "")}-poster.jp2"
val audioFilePath: String => String =
id => s"$rootPath/$id.mp4"
id => s"${normalize(rootPath)}/$id.mp4"
val audioSnippetPath: String => String =
id => s"$rootPath/$id-intro.mp3"
id => s"${normalize(rootPath)}/$id-intro.mp3"
val imageFilePath: String => String =
id => s"$rootPath/$id.jp2"
id => s"${normalize(rootPath)}/$id.jp2"
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment