Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
[PVR] - Recording edit context menu visible when not supported #15634
PVR Recording edit context menu still visible when backend doesn't have recording editing capability.
Motivation and Context
Fixes recording edit menu opening blank dialog when backend doesn't have recording editing capability.
How Has This Been Tested?
Tested with pvr.dbvlink which doesn't have editing capability. Not tested with PVR with this capability.
Screenshots (if appropriate):
Types of change
Sorry, this is wrong. "Edit recording" menu entry is not for editing EDLs. It opens a recording settings dialog for renaming the recording, setting play count, life time - all according to different client capabilities. The minimum content this dialog will contain is the (read-only) title of the recording. Thus, the conditions for displaying the menu item are correct.
Correct conditions, wrong place. You now make the context menu implementation dependent from recording settings implementation details. If somebody in the future changes the conditions in the settings dialog, one needs to know that context menu implementation must also be changed. This is really bad design. You need the conditions to be all in one place (source file) which is the settings dialog.
ksooo left a comment •
Thanks. In general okay, only needs a bit more love.
And please, for the new code, for the new function's parameters, put the