mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +05:30
fix: can't download new video while other download in progress
This commit is contained in:
parent
6a2c83a7bb
commit
5b5fcb4324
@ -998,13 +998,10 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
|
||||
binding.relPlayerDownload.setOnClickListener {
|
||||
if (streams.duration <= 0) {
|
||||
Toast.makeText(context, R.string.cannotDownload, Toast.LENGTH_SHORT).show()
|
||||
} else if (!DownloadService.IS_DOWNLOAD_RUNNING) {
|
||||
} else {
|
||||
val newFragment = DownloadDialog()
|
||||
newFragment.arguments = bundleOf(IntentData.videoId to videoId)
|
||||
newFragment.show(childFragmentManager, DownloadDialog::class.java.name)
|
||||
} else {
|
||||
Toast.makeText(context, R.string.dlisinprogress, Toast.LENGTH_SHORT)
|
||||
.show()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user