Git Product home page Git Product logo

Comments (17)

oottppxx avatar oottppxx commented on August 23, 2024

That annoying behaviour is well known, the workaround is to increase the restart interval to give the human a chance to zap away, or use the right options to move away to another bouquet (e.g., using channel up/down while bouquet is open, or make the settings

Your suggestion is actually quite good and simple, actually, although the implementation might be tricky (especially testing it across a bunch of distros would be quite time consuming) - I'll try to implement and test on oatv, but no promises on how soon that will be.

from enigma2.

oottppxx avatar oottppxx commented on August 23, 2024

Did it the easy way, and now the service doesn't restart if there's any GUI interaction ongoing (menus open, etc...).

Caveat: only tested it on OpenATV 6.2.

Please make sure to test and let me know how it works for you.

from enigma2.

defkev avatar defkev commented on August 23, 2024

Now its no longer working at all...

# /tmp/quarterpounder-debug.log
Mon Sep 27 00:06:09 2021 -> evUpdatedEventInfo
Mon Sep 27 00:06:09 2021 -> recEvRecordRunning
Mon Sep 27 00:06:09 2021 -> evVideoFramerateChanged
Mon Sep 27 00:06:09 2021 -> UNKNOWN (REC) 16
Mon Sep 27 00:06:09 2021 -> evVideoSizeChanged
Mon Sep 27 00:06:09 2021 -> UNKNOWN (REC) 15
Mon Sep 27 00:06:09 2021 -> evVideoProgressiveChanged
Mon Sep 27 00:06:09 2021 -> UNKNOWN (REC) 17
Mon Sep 27 00:06:10 2021 -> evUpdatedInfo
Mon Sep 27 00:06:10 2021 -> recEvRecordStopped
Mon Sep 27 00:06:19 2021 -> evEOF
Mon Sep 27 00:06:19 2021   handling...
Mon Sep 27 00:06:19 2021 Service restarting...
Mon Sep 27 00:06:19 2021 GUI interaction detected, aborting restart...
Mon Sep 27 00:06:19 2021 -> recEvRecordWriteError

There was no GUI open, not even the infobar.

OpenATV 6.4 w/ the big update from last week

from enigma2.

oottppxx avatar oottppxx commented on August 23, 2024

Thanks for the feedback, I'll have a look... Should have included extra debug info as well :-(

from enigma2.

oottppxx avatar oottppxx commented on August 23, 2024

Couldn't reproduce on oatv6.4, but it hadn't the latest update.

Updating now, it seems like a big one, yes.

from enigma2.

oottppxx avatar oottppxx commented on August 23, 2024

Nope, can't reproduce it, maybe some plugin/extension you have installed?

If you can, edit the /usr/lib/enigma2/python/Plugins/Extensions/QuarterPounder/plugin.py file and add the following line under the GUI interaction message (make sure to indent exactly as the previous one):
DEBUG('(%s)\n' % SESSION.dialog_stack)

Then restart the GUI (or the box) and check what's in the debug message, please.

from enigma2.

defkev avatar defkev commented on August 23, 2024

Looks like Plugins.Extensions.WebkitHbbTV.plugin.VBMain is sporting some invisible dialog blocking the restart which is funny considering this is an IP channel which doesn't even have HbbTV :D

I fiddled around and updated it to:
a) only trigger if the bouquet is open
b) instead of straight out cancel the restart postpone it for 5 seconds until the bouquet is closed

I will push a PR momentarily.

from enigma2.

oottppxx avatar oottppxx commented on August 23, 2024

Yeah, I was wondering if other plugins would be the same (Jedi, other "shells", VoD players and the like).

I partially like your InfoBar check - thanks for the pull request - but I'm not sure it's the right way to go as is:

  • why would you just want to delay the restart? Might as well avoid completely;
  • having InfoBar on the stack but with shown==False is something I didn't expect (the dialog is visible after all). It might be a nice trick to detect that particular interaction, but I'd rather just avoid it and not restart if InfoBar is present.

I might want to complicate things slighter via a setting - currently I have it named "GUI Check", with possible values of "InfoBar" (if it detects InfoBar on the dialog_stack, like your code), "Any" (if there's anything in the dialog_stack), and "None" (to disable the check altogether).

I was considering to only really bother with the check if shown==True, but the fact that the bouquets have it as False while still showing might not warrant such check - curious to know what was the value for shown w/that plugin of yours, can you please paste the dialog_stack output as I've asked previously, showing WebkitHbbbTV in it?

Current draft of the code, besides the setting change would be as follows (but again, bouquets having shown==False throw a spanner in the works):
if SESSION.dialog_stack and GUI_CHECK != 'None': DEBUG('Dialog stack: %s\n' % SESSION.dialog_stack) for dialog, shown in SESSION.dialog_stack: if (isinstance(dialog, InfoBar) or GUI_CHECK == 'Any') and shown: DEBUG('GUI interaction detected, aborting restart...\n') return

from enigma2.

defkev avatar defkev commented on August 23, 2024

If you open the bouquet to check whats running on other channels without actually changing the channel, which i do quite often (no bully) you will have to toggle a stuck channel if you cancel the restart.
This way the restart is simply delayed until the bouquet is closed or you navigate to a different channel, which the issue pretty much is all about.

dialog_stack is a list() of tuples with class:bool, e.g. <class 'Plugins.Extensions.WebkitHbbTV.plugin.VBMain'>, True or <class 'Screens.InfoBar.InfoBar'>, False
I don't see a benefit to extend this to cover all dialogs, the bouquet is imho the only one where it actually interferes with the navigation flow. It doesn't even get in the way if you navigate to a different bouquet, i have one for Sat and one for IP for clarity.
The bool might be is_dialog according to https://dream.reichholf.net/pydoc/html/d0/de7/classmytest_1_1Session.html#a2d313dbe89c24ce5b63af68b79083877 tho this is just a wild guess on my part, i am proficient in Python but never developed anything for enigma2.

But i fully agree on making this an option without altering the default behavior, will update the PR in a moment.

Edit: For clarification by delay restart i mean delay the restart until the dialog is no longer open (checked every 5sec), not delay-delay it, which wouldn't make a whole lot of sense to begin with.

from enigma2.

oottppxx avatar oottppxx commented on August 23, 2024

If you open the bouquet to check whats running on other channels without actually changing the channel, which i do quite often (no bully) you will have to toggle a stuck channel if you cancel the restart.

From my experience, the evEOF events will continue to be triggered, so there's no need for a timer to callback to the restart routine. This is exactly the same as avoiding the restarts when the restart delay is >0 (experiment with restart delay of 5 and you should see 3 to 4 "Ignoring: not enabled and/or still backing off..." messages before a real restart happens).

If your experience differs, please confirm it with a debug log.

dialog_stack is a list() of tuples with class:bool, e.g. <class 'Plugins.Extensions.WebkitHbbTV.plugin.VBMain'>, True or <class 'Screens.InfoBar.InfoBar'>, False

Ok, I'm guessing you posted 2 examples, and InfoBar isn't listed always, but WebkitHbbTV is (in your particular case)?

I don't see a benefit to extend this to cover all dialogs, the bouquet is imho the only one where it actually interferes with the navigation flow. It doesn't even get in the way if you navigate to a different bouquet, i have one for Sat and one for IP for clarity.

The benefit is to make it simple and cover other unexpected cases; as can be seen from this exchange we're having, I figure each person will have a different setup and set of conditions - again, it would be nicer if the boolean really reflected visibility, which apparently it sometimes does not.

The bool might be is_dialog according to https://dream.reichholf.net/pydoc/html/d0/de7/classmytest_1_1Session.html#a2d313dbe89c24ce5b63af68b79083877 tho this is just a wild guess on my part, i am proficient in Python but never developed anything for enigma2.

https://github.com/openatv/enigma2/blob/ce2e12f62d8b5500bac43331133cfae4aaaba14f/lib/python/StartEnigma.py#L134 would imply the boolean is for shown (which I was taking as visible) vs not shown, but apparently that's not the case for bouquets, for some reason I didn't dig into.

But i fully agree on making this an option without altering the default behavior, will update the PR in a moment.

Thanks, but I have the code ready, it's just a matter of tweaking the condition after a bit more of consideration. Please do that check about the timer and confirm here, I can push it out later on.

from enigma2.

defkev avatar defkev commented on August 23, 2024

Screens.InfoBar.InfoBar is the bouquet which of course isn't always visible.

From my (limited) testing nothing happens after the stream stops (EOF) which makes sense considering a stopped stream couldn't trigger another stop but i will take another look at it later today, maybe i was to impatient.

from enigma2.

oottppxx avatar oottppxx commented on August 23, 2024

Screens.InfoBar.InfoBar is the bouquet which of course isn't always visible.

Well, for some definition of "of course" :-)

I'd expect (again, my expectation only) that when one's navigating bouquets for it to show in the dialog stack as visible (shown==True); I'll need to dig into this further.

From my (limited) testing nothing happens after the stream stops (EOF) which makes sense considering a stopped stream couldn't trigger another stop but i will take another look at it later today, maybe i was to impatient.

Yes, please look into it - again, different setups might have a different behaviour as well; on oatv6.2 (and 6.4), the events seem to be constantly triggered, at least if I'm using serviceapp on default settings and players, with stream type of 1/DVB (I should test with other stream types/players, I'll do that later).

from enigma2.

oottppxx avatar oottppxx commented on August 23, 2024

Perhaps we're overcomplicating anyway... From PyShell debug when bouquets are open:

print session.current_dialog
!e
StdOut/StdErr:
<class 'Screens.ChannelSelection.ChannelSelection'>
Last Unhandled Exception:
None

So it might just be the case of forgetting dialog_stack and instead checking current_dialog against an instance of that particular class... Again, I'll give it some thought, but I won't have time but in a few hours.

from enigma2.

defkev avatar defkev commented on August 23, 2024

Stayed on a stuck channel for 5 mins (with the bouquet open) after commenting the restart out and nothing happened, as i expected. Then closed the bouquet and waited another 5 mins, again, nothing.

Tue Sep 28 07:54:05 2021 -> UNKNOWN (REC) 16
Tue Sep 28 07:54:05 2021 -> evVideoSizeChanged
Tue Sep 28 07:54:05 2021 -> UNKNOWN (REC) 15
Tue Sep 28 07:54:06 2021 -> evUpdatedInfo
Tue Sep 28 07:54:06 2021 -> recEvRecordStopped
Tue Sep 28 07:54:11 2021 -> evEOF
Tue Sep 28 07:54:11 2021   handling...
Tue Sep 28 07:54:11 2021 Service restarting...
Tue Sep 28 07:54:11 2021 Bouquet open, postponing restart...
Tue Sep 28 07:54:11 2021 -> recEvRecordWriteError
Tue Sep 28 07:55:05 2021 -> evUpdatedEventInfo
Tue Sep 28 07:55:05 2021 -> recEvRecordRunning

Stream is video/mp2t using ExtEplayer3 (serviceapp 5002)

Looking at the source you posted earlier current_dialog probably really is the better more generic approach.
Let me take a look what i get here...

Edit:
SESSION.current_dialog is <class 'Screens.ChannelSelection.ChannelSelection'> for the bouquet and <class 'Screens.InfoBar.InfoBar'> for the Infobar so checking for None also wouldn't work since a restart triggers the infobar unless disabled.

from enigma2.

oottppxx avatar oottppxx commented on August 23, 2024

I've uploaded a new version, please take a look.

I'll come back to this later this evening.

from enigma2.

defkev avatar defkev commented on August 23, 2024

Tested the Channels (postpone) option, which matches my PR from the looks of it.
Working as expected.
Cheers

from enigma2.

oottppxx avatar oottppxx commented on August 23, 2024

Great, thanks a lot for your suggestions, testing, and feedback!

from enigma2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.