mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 22:30:30 +05:30
don't toast when livestream
This commit is contained in:
parent
9795f9846f
commit
74c0fe85e2
@ -863,11 +863,10 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
|
||||
}
|
||||
})
|
||||
|
||||
// check if livestream
|
||||
if (response.duration > 0) {
|
||||
// download clicked
|
||||
binding.relPlayerDownload.setOnClickListener {
|
||||
if (!DownloadService.IS_DOWNLOAD_RUNNING) {
|
||||
if (response.duration <= 0) {
|
||||
Toast.makeText(context, R.string.cannotDownload, Toast.LENGTH_SHORT).show()
|
||||
} else if (!DownloadService.IS_DOWNLOAD_RUNNING) {
|
||||
val newFragment = DownloadDialog(videoId!!)
|
||||
newFragment.show(childFragmentManager, DownloadDialog::class.java.name)
|
||||
} else {
|
||||
@ -875,9 +874,6 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
|
||||
.show()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(context, R.string.cannotDownload, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
|
||||
if (response.hls != null) {
|
||||
binding.relPlayerOpen.setOnClickListener {
|
||||
|
Loading…
Reference in New Issue
Block a user