Support #991

idle.py enhancement????

Added by bgrant3406 about 9 years ago. Updated about 9 years ago.

Status:Closed Start date:03/05/2015
Priority:Normal Due date:
Assignee:brfransen % Done:

0%

Category:Packages: Core Spent time: -
Target version:-

Description

I don't believe this is a bug, nor a feature, so...

With the log files associated with myth_mc being generated, I noticed that the logs were getting large based on one or more frontends not being considered idle.

The issue is one where after a recording is watched, the system stays in the "Watch Recordings" window, which leaves the frontend in an "idle state", but it's location is in "playbackbox" which causes idle.py to determine that the fronted is not idle.

In the mythFE_check section, for the playing or in menu's section, can we add the bolded info in the line below?
if '.xml' in location or 'mainmenu' in location or 'playback' in location:

def mythfe_check(cmdargs,cursor,mythDB):                                                                                                       

         if ( location.startswith('Playback ') ):                                                                                           
                msg(cmdargs,"            %s's mythfrontend is PLAYING." %i)                                                                    
                return False                                                                                                                   
            else:                                                                                                                              
                msg(cmdargs,"            %s's mythfrontend is NOT playing." %i)                                                                
            if '.xml' in location or 'mainmenu' in location or 'playback' in location:                                                         
                msg(cmdargs,"            %s's mythfrontend is in MENUS." %i)                                                                   

I've had this mod in my main system since 8.2 and added it to my slave backends with the upgrade to 8.3, I have seen no detrimental issues or other problems arise with this mod.

History

Updated by brfransen about 9 years ago

  • Assignee set to brfransen
  • Category set to Packages: Core
  • Status changed from New to Closed

One of idle.py basic rules has been that mythfrontend is idle when it is in the menus and not in any other module (recordings, videos, music, etc). This would change that. Also, idle.py is used in more places than just myth_mtc. When it is used with mythwelcome or for a shutdown check we only want idle.py to report idle when it is in the menus. With this change there are situations where idle.py would report idle and the machine would shutdown while navigating the playback screen to watch something else which is not desirable.
I think the best solution would be if we could get the mythfrontend idle time though the py bindings we could use that instead of having to base idle on positionally where mythfrontend is.

Also available in: Atom PDF