-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alternative 'simplified' approach #3
Conversation
metaron-uk
commented
Jun 26, 2015
Files Modified: pvr.mythtv/resources/language/English/strings.po src/cppmyth/MythScheduleHelper75.cpp src/cppmyth/MythScheduleHelper76.cpp src/cppmyth/MythScheduleHelper85.cpp src/cppmyth/MythScheduleManager.cpp src/cppmyth/MythScheduleManager.h src/pvrclient-mythtv.cpp
@metaron-uk , i added new commit with one of your fix and one more to keep track of epg based. All epg based have search type NoSearch as required in mythtv sources. I will check if now we can allow to update channel of an existing rule without breaking rule. That avoid to create an other rule as you requested. Also this feature exists already for rule "Record one" or "Record all" using overriding as i explain above, but if it runs why not. |
The code is very tricky because we have to check the reversibility on each change made in functions FillTimerEntry / NewFromTimer. Else the big bug occurs and with an update you could break the recording rule. I don't want to be here when a user will break his stuff ... ;) |
I am thinking to code a test tools to check reversibility ... |
@janbar - Some thoughts based on your comments:
|
I think we have probably same idea or resolution at same time. Probably because we are working on this feature just born. Your opinion and your work is very important and i take care of them. Until now you are the one of two guy to propose improvement. Thanks for that. Now i am trying to stabilize the big changes we have made (i cherry picked several of your changes) and i would like to build a test tool to validate the reversibility before merging more change. Also i would like you push a PR containing only the add for new timer TEXT_SEARH based on my last commit. |
Until commit 8b0f1a1 , i check the validity of epg info for rule requires one (because they have it on create). The objective is to never check reversibility in NewFromTimer or FillTimerEntry, but only in the caller (here UpdateRecordingRule). Like that it allows to implement only tranformation rules in these functions and nothing else, to make to code as clear/clean/readable/testable as possible. |
So you could push one PR with commit to add new timer TEXT_SEARCH. You can take as sample the commit 979aec4. Like that the new improvement can easily be tested without breaking others. Myself I am afraid to break all ;) |
Finally your solution MythVersionHelper::UpdateRuleFromTimer could be the best. But it requires to maintain a third method. If we cannot avoid it then we will create it. |
Maybe MythRecordingRule MythVersionHelperXX::GetRuleFromTimer(const MythTimerEntry& entry, const MythRecordingRule& oldrule, bool withTemplate) would be a more elegant solution. One PR for TEXT_SEARCH rule coming up. 😃 Once this is done I will look at possible solutions for fitting Autoexpire / Record new+expire old / Number of episodes to keep into the "Lifetime" list. (I had some ideas when discussing this with Ksooo originally). |