cleanup
This commit is contained in:
parent
49b3c33fbc
commit
0ebd067bc2
22 changed files with 121 additions and 68 deletions
|
@ -45,9 +45,18 @@ class SubtitleDownloader {
|
|||
}
|
||||
|
||||
//actually downloads lol
|
||||
suspend fun downloadSubtitle(context: Context, url: String, downloadedType: DownloadedType) {
|
||||
suspend fun downloadSubtitle(
|
||||
context: Context,
|
||||
url: String,
|
||||
downloadedType: DownloadedType
|
||||
) {
|
||||
try {
|
||||
val directory = DownloadsManager.getDirectory(context, downloadedType.type, downloadedType.title, downloadedType.chapter)
|
||||
val directory = DownloadsManager.getDirectory(
|
||||
context,
|
||||
downloadedType.type,
|
||||
downloadedType.title,
|
||||
downloadedType.chapter
|
||||
)
|
||||
if (!directory.exists()) { //just in case
|
||||
directory.mkdirs()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue