Opened 2 years ago

Closed 2 years ago

Last modified 21 months ago

#13135 closed Developer Task (fixed)

Previously recorded list

Reported by: Peter Bennett Owned by: Peter Bennett
Priority: minor Milestone: 30.0
Component: MythTV - General Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

The previously recorded list can become huge. There is a limit of 20000, which reduces its usefulness. Scrolling through thousands of entries is not optimal.

As a solution, add a search menu to the previously recorded list, with options for searching on title and date range. The search will apply at the sql level.

With this change, I may reduce the default number of entries, perhaps to 10000, to improve performance and reduce memory usage. Entries that are not reached because of the limit can be accessed with an appropriate search. The number of entries returned can be overridden with a setting.

I will also add a notification to inform the user if the limit has been reached and some entries are not shown.

Attachments (3)

20171017_#13135_prevrec.patch (62.6 KB) - added by Peter Bennett 2 years ago.
Implementation of new Previously Recorded screen
20171019_#13135_prevrec_2.patch (66.0 KB) - added by Peter Bennett 2 years ago.
Updated Implementation of new Previously Recorded screen
20171022_#13135_prevrec_3.patch (66.2 KB) - added by Peter Bennett 2 years ago.
v3 of this patch

Download all attachments as: .zip

Change History (37)

comment:1 Changed 2 years ago by Peter Bennett

Status: newaccepted

comment:2 Changed 2 years ago by J.Pilk@…

This looks a good idea - but there is already a search facility, activated by Ctrl/S. I believe it works within the items available for display and it has seemed to eat memory, releasable only(?) by restarting mythfrontend. I have only tried it recently on a box running 30-pre-22, without the latest updates.

comment:3 Changed 2 years ago by Peter Bennett

After some discussion with developers I plan to take a different approach, and create a better solution.

Create a layout that has two columns. The first column is title and the second column has details such as date recorded, subtitle, Season and episode, depending on the theme. Moving the cursor to a title in the first column will fill in the second column. This is similar to the program finder window which displays programs in the guide.

You will be able to switch between title based and a date based display, perhaps with the 1 and 2 options currently used for changing the sort. In the date based display the left hand column will contain month and year, and when a row is selected the right hand column will display information for one month's history: title, date recorded and other infirmation depending on the theme.

There will be no need for the 20000 limit as the episodes are read from the database as needed when a row on the left is highlighted.

comment:4 Changed 2 years ago by Peter Bennett

I noticed while working on the rewrite that the "Previously Recorded" page has a menu option "Edit Schedule" which purports to edit the recording rule, but does not work. It allows you to enter all the recording options and click Save, but nothing is saved, and no message tells you it is not saved. The code does a SQL update on a row that does not exist. I will remove this option since there is no way I think it can be made to work sensibly, as the recording rule may have been deleted or there may be other recording rules for the same program which the code cannot easily know about.

comment:5 in reply to:  4 Changed 2 years ago by gigem

Peter, the Edit Schedule option is known not to work when the recording rule no longer exists. It should work, however, when the rule still exists. If that is broken, it should be fixed. For the former case, it might be desirable to provide a way to create a new rule.

comment:6 Changed 2 years ago by Peter Bennett

I see it works if the rule still exists. I will add it back and add an error message for the case where the rule does not exist. It does not make sense to me to create a new rule, because there may already be another rule for the series, perhaps created by this same option on another episode. You could land up with multiple rules for the same series.

comment:7 Changed 2 years ago by gigem

That's fine. I mainly wanted to make sure the existing rule case continued to work.

comment:8 Changed 2 years ago by Peter Bennett

The attached patch implements the new Previously Recorded screen. The left column is switchable between month dates and titles, and the right column gives a list of previously recorded episodes of the show selected on the left, or a list of recordings for the month selected on the left. As far as I can see, all features of the original Previously Recorded screen are available.

The old previously recorded screen is atill available in the default menu, for comparison purposes. If all is well I will remove it. Also, some code can be removed from proglist.cpp that supports the old Previously Recorded screen.

There is one new window "prevreclist" in schedule-ui.xml to support the new Previously Recorded list, that can be customized as needed in themes.

It works with all themes, but in the following themes the display is unacceptable because of clashing colors or overlapping and incorrectly sized elements:

  • Childish
  • Graphite
  • LCARS
  • Willi

For these themes, the authors need to design the window within the theme so as to be usable. With other themes, theme authors may want to design the window to fit better with the theme's concepts.

To allow the default version of prevreclist to work with all resolutions I have added an optional parameter to <area> and <buttonarea> tags, that designate the resolution the default theme was designed for, to enable it to be appropriately resized in all themes. This only needs to be used in the default and default-wide themes.

Let me know if there are any comments or suggestions.

Changed 2 years ago by Peter Bennett

Implementation of new Previously Recorded screen

comment:9 Changed 2 years ago by jpoet

Peter,

This looks pretty good.

I would request that the textarea "title" be changed to "buttontext" in the "titles" buttonlist. With that change, I could directly inherit the "groups" buttonlist defined for the Watch Recording screen. With it the way it currently is, I will have to do:

       <buttonlist name="titles" from="groupsList">
            <statetype name="buttonitem">
                <state name="inactive">
                    <textarea name="title" from="buttontext"/>
                </state>
                <state name="active" from="inactive" />
                <state name="selectedinactive">
                    <textarea name="title" from="buttontext"/>
                </state>
                <state name="selectedactive">
                    <textarea name="title" from="buttontext"/>
                </state>
            </statetype>
        </buttonlist>

which is okay, but if that was changed, I could simply do:

       <buttonlist name="titles" from="groupsList" />

I see an error when I enter that window:

Container '' is missing child 'search' at

I don't see that defined in your default window. Can you provide an example of what you expect that element to look like?

It looks like "reverse" sorting is still supported. In the old window, there was "curview" textarea used to let the user know how the items were being sorted. Is there something similar with the new window?

Thanks,

John

comment:10 Changed 2 years ago by Peter Bennett

John

Thanks for looking at it. I will make the change to "buttontext".

"search" is an error - I removed it but it looks like I forgot something - I will fix that.

I did not implement "curview" - I will add that, once I figure out what it is doing.

Peter

comment:11 Changed 2 years ago by gigem

Peter, in all, pretty nice, but... :)

The functionality to never record an episode of allow an episode to re-record appears to be missing.

I'd much prefer the menu reached from pressing <enter> to offer the most common options relating to the currently highlighted episode or series and the menu reached from pressing <menu> to have everything else. That's my understanding of how we try to distinguish the two.

I think the date sorted version should be the default. Or better, save the current sorting in a setting so it can be restored the next time the screen is entered. Also, I'd really like to have something like "Last Two Weeks" as one of the "month" entries when sorting by date. I prune my oldrecorded entries about once a week and the last two weeks is what I would use the most.

comment:12 Changed 2 years ago by J.Pilk@…

Peter: Thank you. I have this on the f25 box with a short history. It works well for me. I haven't used many of the options recently and will look more closely at what's on offer and what has been suggested. I hope to try it soon on the main el7 box.

I presume the 'Delete' options still don't delete the content - just keep it permanently off these screens?

comment:13 in reply to:  11 ; Changed 2 years ago by Peter Bennett

Replying to gigem:

Peter, in all, pretty nice, but... :)

The functionality to never record an episode of allow an episode to re-record appears to be missing.

If you select an episode on the right and press enter or M, one of the options is "prevent from rerecording" or "allow to rerecord" as appropriate. These are only visible if the episode was actually recorded, not a "previously recorded" or some other status

I'd much prefer the menu reached from pressing <enter> to offer the most common options relating to the currently highlighted episode or series and the menu reached from pressing <menu> to have everything else. That's my understanding of how we try to distinguish the two.

OK I was not sure, I have everything on both. - I will fix it.

I think the date sorted version should be the default. Or better, save the current sorting in a setting so it can be restored the next time the screen is entered. Also, I'd really like to have something like "Last Two Weeks" as one of the "month" entries when sorting by date. I prune my oldrecorded entries about once a week and the last two weeks is what I would use the most.

Ok I will look into that.

Last edited 2 years ago by Peter Bennett (previous) (diff)

comment:14 in reply to:  12 Changed 2 years ago by Peter Bennett

Replying to J.Pilk@…:

I presume the 'Delete' options still don't delete the content - just keep it permanently off these screens?

Yes. It does draw attention to that in the confirmation message before you select OK

comment:15 Changed 2 years ago by J.Pilk@…

Thanks for confirming that. I hadn't wanted to risk a test.

It's working well on the el7 box with nearly 47000 rows in oldrecorded.

I suppose I use it most often indirectly, from the guide > E > Schedule Info > Previously recorded, where quite often the final item would be apparently unrelated, and often before 2012. I haven't yet seen that in the new version.

comment:16 in reply to:  13 Changed 2 years ago by gigem

Replying to pbennett:

Replying to gigem:

The functionality to never record an episode of allow an episode to re-record appears to be missing.

If you select an episode on the right and press enter or M, one of the options is "prevent from rerecording" or "allow to rerecord" as appropriate. These are only visible if the episode was actually recorded, not a "previously recorded" or some other status

I thought I'd checked that appropriately, but I guess not. Thanks.

comment:17 in reply to:  15 ; Changed 2 years ago by J.Pilk@…

Continuing from J.Pilk@…:

I suppose I use it most often indirectly, from the guide > E > Schedule Info > Previously recorded, where quite often the final item would be apparently unrelated, and often before 2012. I haven't yet seen that in the new version.

If a new programme in the guide is marked to record, an apparently unconnected old recording is often returned - although all I have seen at present are dated 6 Apr 2012, and are listed there in a search-by-date. Else nothing is returned, as expected.

As always, this might be an artefact from a merge of oldrecorded from two boxes in Aug 2014. The DB starts in Jan 2005

comment:18 in reply to:  17 Changed 2 years ago by Peter Bennett

Replying to J.Pilk@…:

Continuing from J.Pilk@…:

I suppose I use it most often indirectly, from the guide > E > Schedule Info > Previously recorded, where quite often the final item would be apparently unrelated, and often before 2012. I haven't yet seen that in the new version.

If a new programme in the guide is marked to record, an apparently unconnected old recording is often returned - although all I have seen at present are dated 6 Apr 2012, and are listed there in a search-by-date. Else nothing is returned, as expected.

As always, this might be an artefact from a merge of oldrecorded from two boxes in Aug 2014. The DB starts in Jan 2005

Each recording rule has a sequence number. The search from the Schedule matches on number or title. If something caused new recording rules to take the numbers from prior recording rules, you could see unrelated recordings showing up. Probably your two boxes had overlapping sequences of recording rules.

comment:19 Changed 2 years ago by J.Pilk@…

That probably explains what I have seen, both now and earlier. I have few persistent rules (and, fwiw, almost no downloaded metadata) and the deprecated 'merge' affected only the oldrecorded table. I may investigate more, but the unexpected returns are easy to spot and ignore.

comment:20 Changed 2 years ago by Peter Bennett

Attached a new version of "Previously Recorded" implementation. Remove the previous patch before applying this one, it is a complete replacement.

Changes since first patch:

  • Changed left hand buttonlist to use "buttontext" as suggested by John.
  • Support "curview" as suggested by John.
  • Added a title "Previously Recorded" plus key instructions and "curview" view description to the page in default and MythCenter? themes, to match old "Previously Recorded"
  • Removed unused "search" textarea.
  • Separated menus from "Menu" key and "Select" key into the usage as pointed out by David, matching the usage in the old "Previously Recorded"
  • Added "Never record" and "Allow re-record" items to the "enter" menu, even for items that have not been recorded, conforming to the old "Previously Recorded"
  • Changed the default sort to be Reverse Time as suggested by David.
  • Save the sort settings and restore them the next time you enter the screen as suggested by David.
  • Added missing items "Upcoming" and "Channel Search" to menu.
  • Added entry "Last two weeks" to time sorted view as suggested by David.

Changed 2 years ago by Peter Bennett

Updated Implementation of new Previously Recorded screen

comment:21 Changed 2 years ago by J.Pilk@…

I have this running in f25. It feels initially strange that 'select' (space bar) has no effect when a month or title is highlighted, needing a L/R arrow instead, but it works.

More worryingly, I saw no guide data, although 'Watch this channel' worked. It's there now, after what seemed longer than usual and a few kicks. I guess it could just have expired.

After that fright I'll build again for el7. Database digging shows three sequences of 'recordid' in the unsupportedly-merged oldrecorded table; the first two cannot mean anything now, but I still want their title and related fields.

comment:22 Changed 2 years ago by jpoet

Hi Peter,

From a themers perspective, this looks good.

Thanks,

John

comment:23 Changed 2 years ago by Peter Bennett

A couple of minor changes in v3 of the patch

  • If Previously Recorded is invoked from a recording rule to filter on a set of recordings, always start Title sort mode. This does not use or change the stored settings used when starting from the menu.
  • Remove one unneeded if statement.

Changed 2 years ago by Peter Bennett

v3 of this patch

comment:24 Changed 2 years ago by J.Pilk@…

I have v3 on the f25 test machine and it's working well. The auto mode-switch is good. Thank you. Time to commit?

comment:25 Changed 2 years ago by J.Pilk@…

Update. I installed on the production box and set out to edit/cut the recent recordings. On hitting 'E' I get 'Recording rule does not exist' - which is true because most of my recordings are from one-off selections from the guide.

Back to v2, I'm afraid.

comment:26 Changed 2 years ago by J.Pilk@…

Sorry ... I have to be playing the recording before I hit E. Delete comment 25. Forward to to v3 again.

comment:27 Changed 2 years ago by J.Pilk@…

That certainly feels like a change, but I can probably get any meaningful action by using M here, when not playing, instead of E. E when playing is fine. Both boxes currently have v3; I'll perhaps compare with the current 'buntu unpatched build later.

comment:28 Changed 2 years ago by Peter Bennett <pbennett@…>

Resolution: fixed
Status: acceptedclosed

In 61c6429d7b7a695683b910600b552607ce8955d0/mythtv:

Redesigned Previously Recorded Screen

Implements a new Previously Recorded screen. The left column is
switchable between month dates and titles, and the right column
gives a list of previously recorded episodes of the show selected
on the left, or a list of recordings for the month selected on the
left.

The old Previously Recorded screen is still available via the
Default menu.

Fixes #13135

comment:29 Changed 2 years ago by Peter Bennett <pbennett@…>

In 9ec28e70d0fa9bcdb3d5a650060410c3b803287a/mythtv:

Replace a QT 5.5 function with one that is compatible with older versions

Part of the new Previously Recorded screen
Refs #13135

comment:30 Changed 2 years ago by J.Pilk@…

I've used the ctrl/s search in MythCenter?-wide in the lower RH panel, and the search box obscures some of the list displayed. This is a Deja Vu moment and I've tried to move it by editing schedule-ui.xml, but without success. Perhaps I don't have the right buttonlist?

Here's a link to the previous solution, by Paul H. It's very near the end of a long thread, and may need two clicks.

https://lists.gt.net/mythtv/users/589278#589278

comment:31 Changed 2 years ago by J.Pilk@…

It's a re-learning process. The info from the search appears in the upper window, so is not obscured. Problem solved, at least in this case.

comment:32 Changed 2 years ago by Peter Bennett <pbennett@…>

In 9464e6e0ec6deb9a384a7dc5e28312f57905b29a/mythtv:

Prev Recorded List - add busy popup when loading episode list

Refs #13135 - On Raspberry Pi and maybe other low end systems,
the episode list takes a few seconds when Last Two Weeks is
selected. Use a busy popup for that case.

comment:33 Changed 2 years ago by Peter Bennett <pbennett@…>

In 8dec03655526ac185d58213b391b8d76c441e13b/mythtv:

Previously Recorded List: Remove old deprecated list from menu

This just removes the menu item.
There is still code that is no longer used and can be cleaned up.

Refs #13135

comment:34 Changed 21 months ago by Peter Bennett

Owner: changed from Peter Bennett to Peter Bennett
Note: See TracTickets for help on using tickets.