[mythtv-commits] Ticket #13500: Deleting channels can orphan references in recorded and oldrecorded

MythTV noreply at mythtv.org
Fri Nov 8 23:23:39 UTC 2019


#13500: Deleting channels can orphan references in recorded and oldrecorded
------------------------------+---------------------------
 Reporter:  gigem             |          Owner:  gigem
     Type:  Developer Task    |         Status:  assigned
 Priority:  minor             |      Milestone:  31.0
Component:  MythTV - General  |        Version:  v30-fixes
 Severity:  medium            |     Resolution:
 Keywords:                    |  Ticket locked:  0
------------------------------+---------------------------

Comment (by gigem):

 Thanks for testing, Klaas.  The new patch addresses the bug you spotted.
 It also includes the schema update in the bindings that I forget and is
 updated to current master.

 The problem being solved is to preserve the channel information for
 recordings (recorded table) as you noted but also for the recording
 history (oldrecorded table).  When that information is missing, MythTV
 reports it as either empty or as #<chanid>.

 In addition, this implementation is greatly influenced by feature requests
 relayed to me by others.  While I have no immediate plans to implement
 those features, I tried to not make their possible implementation more
 difficult.  Those feature requests are the following.

 Be able to "undelete" deleted channels.  That's why unreferenced channels
 are kept for at least one day rather than deleting them immediately.

 Be able to track the period of time that channels were active for both
 past changes and future changes that are known or expected.  That's why
 channel.deleted is a timestamp instead of simply a boolean.
 channel.deleted indicates when that channels active time ended.  A future
 change might add channel.created to indicate when the active time
 began/begins.

 As for deleting, rescanning and undeleting channels, I feel that's an
 improvement that belongs in the scanner to consider.  Ideally, deleting
 and undeleting shouldn't even be necessary.  If it doesn't already, the
 scanner should do a better job of reconciling the changes found in a
 rescan.

 Finally, you mentioned the chanid = sourceid * n + channum "feature".
 That was a bad, design decision when it was added and it's still a bad
 design decision.  If this change is the one to finally kill it off, then
 hooray.

-- 
Ticket URL: <https://code.mythtv.org/trac/ticket/13500#comment:4>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list