mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-16 07:10:29 +05:30
25 lines
527 B
Kotlin
25 lines
527 B
Kotlin
|
package com.github.libretube.util
|
||
|
|
||
|
import android.content.Context
|
||
|
import java.io.File
|
||
|
|
||
|
object DownloadHelper {
|
||
|
private fun getOfflineStorageDir(context: Context): File {
|
||
|
return context.getExternalFilesDir(null)!!
|
||
|
}
|
||
|
|
||
|
fun getVideoDir(context: Context): File {
|
||
|
return File(
|
||
|
getOfflineStorageDir(context),
|
||
|
"video"
|
||
|
)
|
||
|
}
|
||
|
|
||
|
fun getAudioDir(context: Context): File {
|
||
|
return File(
|
||
|
getOfflineStorageDir(context),
|
||
|
"audio"
|
||
|
)
|
||
|
}
|
||
|
}
|