mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-18 06:53:55 +00:00
Merge branch 'main' into dev
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user