chore: update SubtitleDownloader.kt (#509)

reponse -> response
This commit is contained in:
Ikko Eltociear Ashimine 2024-10-30 21:47:53 +09:00 committed by GitHub
parent dec990c24c
commit 4e76e8e6e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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)