mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-08-12 02:59:53 +00:00
edgecase fix
This commit is contained in:
parent
86bd71b89c
commit
b3f9de3b83
1 changed files with 7 additions and 0 deletions
|
@ -565,7 +565,9 @@ abstract class FutoVideoPlayerBase : RelativeLayout {
|
||||||
|
|
||||||
if(videoSource.hasGenerate) {
|
if(videoSource.hasGenerate) {
|
||||||
findViewTreeLifecycleOwner()?.lifecycle?.coroutineScope?.launch(Dispatchers.IO) {
|
findViewTreeLifecycleOwner()?.lifecycle?.coroutineScope?.launch(Dispatchers.IO) {
|
||||||
|
var startId = -1;
|
||||||
try {
|
try {
|
||||||
|
startId = videoSource?.getUnderlyingPlugin()?.getUnderlyingPlugin()?.startId ?: -1;
|
||||||
val generated = videoSource.generate();
|
val generated = videoSource.generate();
|
||||||
if (generated != null) {
|
if (generated != null) {
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
|
@ -592,6 +594,11 @@ abstract class FutoVideoPlayerBase : RelativeLayout {
|
||||||
}
|
}
|
||||||
catch(reloadRequired: ScriptReloadRequiredException) {
|
catch(reloadRequired: ScriptReloadRequiredException) {
|
||||||
Logger.i(TAG, "Reload required detected");
|
Logger.i(TAG, "Reload required detected");
|
||||||
|
val plugin = videoSource.getUnderlyingPlugin();
|
||||||
|
if(plugin == null)
|
||||||
|
return@launch;
|
||||||
|
if(startId != -1 && plugin.getUnderlyingPlugin()?.startId != startId)
|
||||||
|
return@launch;
|
||||||
StatePlatform.instance.handleReloadRequired(reloadRequired, {
|
StatePlatform.instance.handleReloadRequired(reloadRequired, {
|
||||||
onReloadRequired.emit();
|
onReloadRequired.emit();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue