Skip to content

Commit

Permalink
fix(playlist): app crashes when downloading playlist
Browse files Browse the repository at this point in the history
  • Loading branch information
JunkFood02 committed Mar 29, 2024
1 parent 6035e38 commit b9c05a3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/src/main/java/com/junkfood/seal/Downloader.kt
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,11 @@ object Downloader {
)

val playlistIndex = indexList[i]
val playlistEntry = playlistItemList[playlistIndex]
val title = playlistEntry.title
val playlistEntry = playlistItemList.getOrNull(i)

Log.d(TAG, playlistEntry?.title.toString())

val title = playlistEntry?.title

DownloadUtil.fetchVideoInfoFromUrl(
url = url,
Expand All @@ -606,7 +609,7 @@ object Downloader {
}.onFailure { th ->
manageDownloadError(
th = th,
url = playlistEntry.url,
url = playlistEntry?.url,
title = title,
isFetchingInfo = true,
isTaskAborted = false
Expand Down

0 comments on commit b9c05a3

Please sign in to comment.