Opened 14 years ago

Closed 14 years ago

#602 closed enhancement (fixed)

Add ability to see recording changes resulting from a schedule change

Reported by: mythtv@… Owned by: bjm
Priority: minor Milestone: 0.19
Component: mythtv Version:
Severity: low Keywords:
Cc: Ticket locked: no

Description

When configuring a scheduled recording, I often think "If I save now, how will my scheduled recording change?". This patch adds the ability to answer that question.

From the UI standpoint, it creates a new option in the menu "Display recording changes". Selecting this pulls up a new display (after about a second delay on my machine) that lists all the scheduled recordings that have changed, what the old status was, and what the new status will be. For example: ....The Secret Life Of ... - "Christmas" C 1 says that that particular show used to be a confilcting recording, but will now be recorded. This allows you to instantly see what will change if you save your current options when adding a new recording or editting an old one.

Programmatically, there are many more changes. A new object is added, called ViewScheduleDiff? to hold the UI of this screen. A new table is added, record_tmp, that stores the proposed changes. To prevent race conditions, a MySQL lock is obtained before using that table. QUERY_GETALLPENDING gets an optional argument - the table from which to pull the "record" data. Configurable gets a new virtual function save(QString destination) (necessary to save the displayed options to record_tmp). The last change touches a lot of files without making substantative changes in them.

Potential drawbacks:

  • The screen is somewhat slow to display on my machine due to the scheduling calculations, and it may take much longer on slower processors to compute what the new schedule would be.
    • The recording options edit page now scrolls one line.

Advantages:

  • Can visually see the results of edits in recording options, without the need to remember the entire schedule.

Potential extensions:

  • Ability to see the results of priority changes, overrides, "never record", or other changes.

Attachments (10)

viewscheddiff2.patch (39.2 KB) - added by mythtv@… 14 years ago.
Patch against 7738
viewscheddiff2.tar (20.0 KB) - added by mythtv@… 14 years ago.
new files - viewschdiff.{cpp,h}
viewscheddiff2-themes.patch (4.2 KB) - added by mythtv@… 14 years ago.
Theme changes - only Titivillus, rest forthcoming
viewscheddiff3.patch (49.4 KB) - added by anonymous 14 years ago.
UI support for all themes, fixed blocking query error that occurred on new system
viewscheddiff3-themes.patch (15.1 KB) - added by mythtv@… 14 years ago.
UI support for all themes
viewscheddiff4.patch (53.0 KB) - added by mythtv@… 14 years ago.
improved version
viewscheddiff4.tar (20.0 KB) - added by mythtv@… 14 years ago.
improved version
viewscheddiff5.patch (53.8 KB) - added by mythtv@… 14 years ago.
Do not use viewscheddiff4.patch (deletes program if you speculative schedule a new program). Fixed here.
viewscheddiff6.patch (54.7 KB) - added by mythtv@… 14 years ago.
better manual record support
preview1.tgz (23.0 KB) - added by anonymous 14 years ago.
Bundle for the laterst changes. Complies agains SVN 7738

Download all attachments as: .zip

Change History (16)

Changed 14 years ago by mythtv@…

Attachment: viewscheddiff2.patch added

Patch against 7738

Changed 14 years ago by mythtv@…

Attachment: viewscheddiff2.tar added

new files - viewschdiff.{cpp,h}

Changed 14 years ago by mythtv@…

Attachment: viewscheddiff2-themes.patch added

Theme changes - only Titivillus, rest forthcoming

Changed 14 years ago by anonymous

Attachment: viewscheddiff3.patch added

UI support for all themes, fixed blocking query error that occurred on new system

Changed 14 years ago by mythtv@…

Attachment: viewscheddiff3-themes.patch added

UI support for all themes

comment:1 Changed 14 years ago by mythtv@…

Comments from bjm (paraphrased):

  • Bug: On his system (two entries in capturecard and cardinput, but only one card), it schedules as if there are two cards. I'm uncertain why this is happening.
  • Could speed up by saving recordmatch and only updating where necessary (a la rescheduling requests).
  • bjm does not like recording options scrolling. I agree. He suggests a submenu for "Program Details", "List upcoming episodes", and "Program recording changes". I'm no thrilled with that (leaving an empty line unnecessarily seems a waste), but do not have any solution I'm really happy with.

Also reported bug fixed in new version of patch: viedscheddiff3.patch.

comment:2 Changed 14 years ago by bjm <bjm@…>

Milestone: 0.19
Owner: changed from Isaac Richards to anonymous
Severity: mediumlow
Status: newassigned

comment:3 Changed 14 years ago by bjm <bjm@…>

Owner: changed from anonymous to bjm
Status: assignednew

Changed 14 years ago by mythtv@…

Attachment: viewscheddiff4.patch added

improved version

Changed 14 years ago by mythtv@…

Attachment: viewscheddiff4.tar added

improved version

comment:4 Changed 14 years ago by mythtv@…

Version 4 is "not safe" to use, but is much faster. It re-uses the recordmatch information in the main scheduler. Its unsafeness is that recordmatch may be in flux if the scheduler thread is currently using it. This is fixable with some locking, but haven't put that end yet. The result of this unsafeness is incorrect information displayed in the speculative scheduler (it won't mess-up the main scheduler).

Changes:

  • Improved speed by reusing recordmatch data
  • Name change to fix abstraction (database => table)
  • Alternative technique to store speculative recording data (traverses children lists and builds update query itself) (save(QString) code has not been removed yet, as I'm not thrilled with the new technique either)

Changed 14 years ago by mythtv@…

Attachment: viewscheddiff5.patch added

Do not use viewscheddiff4.patch (deletes program if you speculative schedule a new program). Fixed here.

Changed 14 years ago by mythtv@…

Attachment: viewscheddiff6.patch added

better manual record support

comment:5 Changed 14 years ago by bjm

Bundle for the laterst changes. preview1.tgz includes diffs and files that complies agains SVN 7738 but will be merges with current SVN for commit after Live TV settles a bit. Recent changes:

  • On the diff page, removed some unneeded fields, update some wording, show the test rule title in the upper right, enabled DETAILS, INFO, and UPCOMING keys for the current item.
  • On the options page, changed the button name to "Preview schedule changes", created a sub group for "Schedule Information" to make room by moving "Program details" and "List upcoming episodes"
  • "Schedule Information" also includes "List previous episodes" which is a mini Previously Recorded page which displays the oldrecorded items that match the recordid or title of the current item.
  • Added a bool specsched to flag execptions for the test schedule.
  • Fixed a bug when previewing a new Manual record.
  • Fixed a bug where previewing a recording in progress with the end time set earlier than now would cause the recording to stop.
  • General touch ups and small fixes.

Changed 14 years ago by anonymous

Attachment: preview1.tgz added

Bundle for the laterst changes. Complies agains SVN 7738

comment:6 Changed 14 years ago by bjm

Resolution: fixed
Status: newclosed

(In [7931]) Closes #602

Hal Burch's patch to preview schedule changes plus enhancements.

NOTE: You need to run ./configure and may need to "make distclean" if you have trouble compiling.

NOTE: Update myththemes to current SVN if you use any of those themes. If you are using a third party theme, make the equivalent changes as the latest diffs for myththemes.

This adds a new item to the recording options page labeled "Preview schedule changes". When selected, a 'speculative scheduler' is run which includes any changes to the rule that is being edited. The result is compared with the real schedule and the differences are displayed on a page similar to the normal schedule page except that there are two status columns showing the old and new statuses for these items that would change.

In order to make room on the options page, a new group "Schedule Information" holds "Program details" and "List upcoming episodes" plus "List previous episodes", a mini Previously Recorded page which displays the oldrecorded items that match the recordid or title of the current item.

Note: See TracTickets for help on using tickets.