Kodi Community Forum

Full Version: RFC: Tweak to PVR Timers/Timer Rules context menu
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a small PR I'd like to put in regarding the context menus in the PVR Timers and Timer Rules areas, I thought I'd ask the community if this would be a good way to go or not.  The small problem is that the context menu in Timers can be inconsistent with that in Timer Rules.  Right-clicking on a Timer with a parent Timer Rule will always show "Edit Timer Rule", even if the Timer Rule is read-only (and also "Delete Timer Rule", for what it's worth).  When the Timer Rule is right-clicked via Timer Rules, the "Edit" option will not be available if it is read-only.

The simplest solution for consistency would be to filter out "Edit Timer Rule" if the parent is read-only and match what Timer Rules does, but "Edit Timer Rule" against a read-only parent accesses a highly convenient read-only display of the rule.  I personally like this very much.

So what I'm thinking of submitting is a set of small changes to adapt "Edit Timer Rule" (Timers) and "Edit" (Timer Rules) to instead be "View" if the timer rule is read-only, so there will always be either "Edit" or "View" in the context menus.  At the same time also remove the "Delete Timer Rule" from the context menu in Timers if the parent happens to not be deletable.  I think there some additional consequences regarding delete to consider with the Timers menus, there is that pop-up that asks to delete just the timer or the timer rule, I honestly haven't looked at that yet.  I've barely looked at what I am proposing for what it's worth -- for all I know there already is a "View" in there Smile

Anyway, if you folks think this is worth adjusting or not and if the plan sounds reasonable I would appreciate the feedback.
I feel like an idiot, is there no "edit" button for posts? ha.

Regardless of that, I looked at how things work today and there is existing precedent for having the "Edit" labels switch at runtime to "View" labels in the Timers context menus, that seems like the best approach.  Should be pretty unintrusive, just need to add that ability for the Timer Rule specific context menus.  I'll pitch changing "View timer information" to "View timer" to match the other items as well, at least in English.

If anyone thinks this is a bad/useless idea or it would adversely affect them please do let me know, of course.  My world won't end if this change can't happen.  Thanks!
Sounds like a good idea. Go ahead and submit a PR if you like.