don't toast when livestream

This commit is contained in:
Bnyro 2022-11-05 19:10:48 +01:00
parent 9795f9846f
commit 74c0fe85e2

View File

@ -863,20 +863,16 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
} }
}) })
// check if livestream binding.relPlayerDownload.setOnClickListener {
if (response.duration > 0) { if (response.duration <= 0) {
// download clicked Toast.makeText(context, R.string.cannotDownload, Toast.LENGTH_SHORT).show()
binding.relPlayerDownload.setOnClickListener { } else if (!DownloadService.IS_DOWNLOAD_RUNNING) {
if (!DownloadService.IS_DOWNLOAD_RUNNING) { val newFragment = DownloadDialog(videoId!!)
val newFragment = DownloadDialog(videoId!!) newFragment.show(childFragmentManager, DownloadDialog::class.java.name)
newFragment.show(childFragmentManager, DownloadDialog::class.java.name) } else {
} else { Toast.makeText(context, R.string.dlisinprogress, Toast.LENGTH_SHORT)
Toast.makeText(context, R.string.dlisinprogress, Toast.LENGTH_SHORT) .show()
.show()
}
} }
} else {
Toast.makeText(context, R.string.cannotDownload, Toast.LENGTH_SHORT).show()
} }
if (response.hls != null) { if (response.hls != null) {