[mythtv] [PATCH] use presets instead of channums

Leandro Dardini ldardini at tiscali.it
Fri Apr 25 10:28:34 EDT 2003


I'll apply immediately to my source. I was awaiting this from a long time
and never had the time to implement myself.

Leandro

----- Original Message ----- 
From: "Bjorn Hijmans" <bjorn at hijmans.nl>
To: <mythtv-dev at snowman.net>
Sent: Thursday, April 24, 2003 9:40 PM
Subject: [mythtv] [PATCH] use presets instead of channums


> Hi,
>
> Attached a patch to use presets instead of channelnumbers to change
> channels. The preset will be printed in the OSD as well. Execute the
> following query to enable this (you cant change this in the setup):
>
> insert into settings (value, data, hostname) values ('HideChannum', 1,
> '<yourhost>');
>
> The preset is derived from the chanid. I order my channels using the
> chanid. Also, in my database (and probably others that have loaded their
> channels using mythfilldatabase --xawchannels) the chanid starts with
> 1000. So, the preset is the chanid - 999.
>
> In the UpdateOSD method the channum is rewritten by the preset (chanid -
> 999). In the ChannelCommit method, the ProgramInfo class is used to
> lookup the channum from the chanid so the channum can be used to change
> the channel (ChangeChannelByString). Because other functions like the EPG
> and the new browse function queue a channum, I have introduced a new
> boolean to indicate a chanid was queued.
>
> I know the implementation isnt very decent. But, to do it the right way, I
> should add an extra column in the channels table. This would require
> rewriting a lot of code (especially because in the majority of the methods
> the channum instead of the chanid is used to refer to a record in the
> channels table).
>
> Also, because of the risc Isaac doesnt want this in MythTV I have tried to
> write as little code as possible. This will make it easy to merge in new
> versions.
>
> Maybe somebody is willing to think about a more decent implementation. I
> think a lot of european users will be very happy if they could use presets
> to change the channel.
>
> Bjorn
>


----------------------------------------------------------------------------
----


> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-dev
>



More information about the mythtv-dev mailing list