Skip to content

Commit

Permalink
Release v1.0.4 (10040)
Browse files Browse the repository at this point in the history
  • Loading branch information
JunkFood02 committed Aug 13, 2022
1 parent e5c6685 commit ea3a6dd
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,14 @@ class DownloadViewModel @Inject constructor() : ViewModel() {
with(mutableStateFlow) {
lateinit var videoInfo: VideoInfo
try {
update { it.copy(isFetchingInfo = true) }
videoInfo = DownloadUtil.fetchVideoInfo(url, index)
update { it.copy(isFetchingInfo = false) }
} catch (e: Exception) {
manageDownloadError(e)
return
}
update { it.copy(isDownloadError = false, isFetchingInfo = true) }
update { it.copy(isDownloadError = false) }
Log.d(TAG, "downloadVideo: $index" + videoInfo.title)
if (value.isCancelled) return
update {
Expand Down Expand Up @@ -371,6 +372,7 @@ class DownloadViewModel @Inject constructor() : ViewModel() {
it.copy(
progress = 100f,
isProcessRunning = false,
isFetchingInfo = false,
progressText = "",
downloadItemCount = 0,
isDownloadingPlaylist = false,
Expand Down

0 comments on commit ea3a6dd

Please sign in to comment.