[mythtv] Enable 4 digit channels in dct-channel

Daniel Smith ralyon at hotmail.com
Fri Oct 10 18:16:27 UTC 2008


My apologies if I'm not handling this properly as this is the first time
I've submitted a code change.

My cable provider (Verizon FiOS) has recently rearranged their channels
and are now in the 1000's and after not finding a solution to 'channel'
only allowing 1 to 999 I went ahead and changed the code myself. This is
working for me, but I am certainly no expert to know if it might have an
adverse affect somewhere else. I would appreciate it if someone were to
look over these changes and maybe add them back into MythTV if they are
fine.

Modified file: /trunk/mythtv/contrib/channel_changers/dct-channel/channel.c

Line 145

-       if ((send_keypress(KEY_0+((chan/100)%10)))<0 ||
+       if ((send_keypress(KEY_0+((chan/1000)%10)))<0 ||
+          (send_keypress(KEY_0+((chan/100)%10)))<0 ||

Line 201

+       blind_key(KEY_0+((chan/1000)%10));
+       usleep(BLIND_SLEEP * 1000);

Lines 302 - 304

-       if (*end!='\0' || chan<1 || chan>999) {
+       if (*end!='\0' || chan<1 || chan>9999) {
            fprintf(stderr,"Invalid channel: %s\n",argv[optind]);
-           fprintf(stderr,"valid channels are 1 - 999\n");
+           fprintf(stderr,"valid channels are 1 - 9999\n");


I hope this helps,
ralyon




More information about the mythtv-dev mailing list