Merge branch 'dev' of https://github.com/rebelonion/Dantotsu into dev
This commit is contained in:
commit
31a67c8edb
12 changed files with 693 additions and 5 deletions
|
@ -1,3 +1,5 @@
|
|||
// this code was kanged from the greatest mind of this era, aka shivam brahmkshatriya
|
||||
// please subscribe to my only fans here: https://github.com/brahmkshatriya
|
||||
package ani.dantotsu.connections.discord
|
||||
|
||||
|
||||
|
@ -56,4 +58,4 @@ class RPCExternalAsset(
|
|||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,14 +72,14 @@ class SubtitleDownloader {
|
|||
|
||||
val client = Injekt.get<NetworkHelper>().client
|
||||
val request = Request.Builder().url(url).build()
|
||||
val reponse = client.newCall(request).execute()
|
||||
val response = client.newCall(request).execute()
|
||||
|
||||
if (!reponse.isSuccessful) {
|
||||
if (!response.isSuccessful) {
|
||||
snackString("Failed to download subtitle")
|
||||
return
|
||||
}
|
||||
|
||||
reponse.body.byteStream().use { input ->
|
||||
response.body.byteStream().use { input ->
|
||||
subtitleFile.openOutputStream(context, false).use { output ->
|
||||
if (output == null) throw Exception("Could not open output stream")
|
||||
input.copyTo(output)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue