From 2c640c662d7915e1f8956f59d5a5296665690aef Mon Sep 17 00:00:00 2001 From: Katherine Blizard <414924+kabliz@users.noreply.github.com> Date: Wed, 18 Sep 2024 11:35:16 -0700 Subject: [PATCH] [APT-10393] Cleanup id copying. The data isn't used as an ID, but its passed into Exoplayer. We still have to set the ID ourselves. --- .../main/java/com/scribd/armadillo/download/DownloadEngine.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Armadillo/src/main/java/com/scribd/armadillo/download/DownloadEngine.kt b/Armadillo/src/main/java/com/scribd/armadillo/download/DownloadEngine.kt index a1671b6..283a89d 100644 --- a/Armadillo/src/main/java/com/scribd/armadillo/download/DownloadEngine.kt +++ b/Armadillo/src/main/java/com/scribd/armadillo/download/DownloadEngine.kt @@ -82,8 +82,8 @@ internal class ExoplayerDownloadEngine @Inject constructor( downloadHelper.prepare(object : DownloadHelper.Callback { override fun onPrepared(helper: DownloadHelper) { - var request = helper.getDownloadRequest(audioPlayable.id.encodeInByteArray()) - request = request.copyWithId(audioPlayable.id.toString()) + val request = helper.getDownloadRequest(audioPlayable.id.encodeInByteArray()) + .copyWithId(audioPlayable.id.toString()) try { startDownload(context, request) } catch (e: Exception) {