Merge branch 'main' into dev

This commit is contained in:
rebel onion 2025-01-05 08:56:20 -06:00 committed by GitHub
commit a8958a76cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 693 additions and 5 deletions

View file

@ -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(
})
}
}
}
}

View file

@ -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)