[mythtv-users] changing channel lineups

Bruce Markey bjm at lvcm.com
Tue Mar 7 06:21:40 UTC 2006


Robert Tsai wrote:
> Are there any kind of "best practices" for changing channel lineups
> while having a bunch of stored recordings (e.g., moving, or otherwise
> changing television service)?
> 
> The problem is that when you re-setup all the channels, etc., certain
> chanids might get re-used, so that a given chanid in one place is
> either non-existent or something else in another place, which would
> then cause the recordings info to be incorrect.
> 
> The only thing I can think of is to kind of "move" all the old
> recordings into a separate range of chanids that won't conflict with
> the new chanids, save that off, re-scan for channels, and then merge
> the saved-off information back in. Eventually when the recordings get
> deleted, I can delete the old channel information.
> 
> Any other ideas?

Chanids are normally sourceid * 1000 + channum so KRAP channel 5 on
source 1 is 1005. If you add a new video source, the source id will
be incremented so KRUD channel 5 on your new source 2 will be 2005.
Both will show up in the EPG presented as "5" but there is no confusion
as one is "5 KRAP" (1005) and the other is the listings for 5 KRUD
(chanid 2005). If you later delete the channel entries for 1000-1999,
The program info will show "#1005" in place of "5 KRAP" as it no
longer has the callsign, channum or any other information about this
channel.

If you are moving so you have a new source in place of your old source
but still have recordings from the old channels, I'd suggest the
following.

1) Don not remove your current video source or clear the channel table.
2) Add your new source to get the next higher sourceid.
3) Set the old source to use "no grabber".
4) delete from program where chanid > 1000 and chanid < 2000;
5) update channel set visible=0 where chanid > 1000 and chanid < 2000;

3 will stop getting new listings, 4 clears out the current listings
and 5 makes sure the channels aren't seen in the EPG or used for
scheduling. However, since the rows are still in channel and unique,
you will still see the channel info for your old recordings.

Hope this helps,

--  bjm






More information about the mythtv-users mailing list