Extended funtionality of lgchanedit executable

Ir abajo

Extended funtionality of lgchanedit executable

Mensaje  Co0olCat el Miér Sep 29, 2010 2:00 pm

Hi,

First, it is a great work. I am looking forward to be able to schedule records from work.
At the moment I have observed following problem. In Australia (Sydney) we have 39 tv and radio channels. Unfortunately they are spread in programming space from 1 to 99. First 10 channels have no gaps in between. They occupy 1, 2, 3, ...10. After that channels are spread with irregular intervals. The last channel is at program number 99.
After checking php code it looks like that new records are assigned according to their position in the list but not by the program number. When the record is scheduled using web interface there are cases when selected number does not have corresponding program number in LG.
I would like to ask whether some of you could include in lgchanedit ability to extract program number along with name and so on. Once this version is compiled I can use this functionality to correctly schedule new recordings through web interface.

Thank you in advance.

Kind regards,
TY

Co0olCat

Mensajes : 17
Fecha de inscripción : 31/01/2010

Ver perfil de usuario

Volver arriba Ir abajo

Australian modification

Mensaje  Co0olCat el Miér Nov 10, 2010 2:42 pm

Hi,

As I was already writing before in Sydney (Australia) channels are spread between 1 and 99. With total 23 channels this brings plenty of gaps.

I have done simple workaround to take advantage of schedule web functionality. Here is mod which I have implemented in act_Schedule.inc:

$mychan = array(1, 2, 3, 7, 9, 10, 11, 12, 21, 22, 23, 24, 30, 32, 33, 34, 44, 70, 71, 72, 73, 90, 99); // Actual numbering of my channels
//print_r($mychan);

$out = exec($lg_list, $list);
if ($out == "Error reading input file.") {
$list = array();
} else {
$c = count($list);
$chlist = array();
$iCounter = -1;
for ($i = 0; $i<$c; $i++) {
$chlist[$i] = (list($ch_index, $ch_name, $ch_name2, $ch_type) = explode(":", $list[$i]));
// Make corrections
if ($chlist[$i][3] == "TV") {
$iCounter++;
$chlist[$i][0] = $mychan[$iCounter];
} else {
$chlist[$i][0] = 0;
}
}
}

Second change needs to be done later:

Find row with "print $chlist[$row["channel"]-1][1];"
and replace it with "print $chlist[array_search($row["channel"], $mychan)][1];"

Thank you.

Kind regards,
TY.

P.S. I am looking into MythWeb. Will need to install/enable Perl and rewrite DB module to use SQLite3 instead of MySQL. Thank you

Co0olCat

Mensajes : 17
Fecha de inscripción : 31/01/2010

Ver perfil de usuario

Volver arriba Ir abajo

Re: Extended funtionality of lgchanedit executable

Mensaje  Keltek el Mar Nov 16, 2010 11:24 pm

Hi Co0olCat,
I'm sorry I write this message late but I have now more work than before.
Issue you describe is little more complicated. I describe it on French forum.

I make a little C program to handle with dtv_channel.txt which internally display the id of channel in sequence (as I write before) so the output which I use in web pages looks like:
Código:
1:TF1:TF1:TV
2:France 2:France 2:TV
3:France 3:France 3:TV
4:CANAL+:CANAL+:TV
5:France 5:France 5:TV
6:M6:M6:TV
7:ARTE:ARTE:TV
8:Direct 8:Direct 8:TV
9:W9:W9:TV
10:TMC:TMC:TV
11:NT1:NT1:TV
12:NRJ12:NRJ12:TV
13:LCP:LCP:TV
14:France 4:France 4:TV
15:BFM TV:BFM TV:TV
16:i>TELE:i>TELE:TV
17:Virgin 17:Virgin 17:TV
18:Gulli:Gulli:TV
19:CANAL INFO:CANAL INFO:TV
20:France Ô:♣France ▒:TV
21:Canal 21:Canal 21:TV
22:IDF1:IDF1:TV
23:NRJ Paris:NRJ Paris:TV
24:CAP 24:CAP 24:TV
25:NUMERICABLE:NUMERICABLE:TV
26:VIDEOCLUB NUMERICABLE:VIDEOCLUB NUMERICABLE:TV
27:TF1 HD:TF1 HD:TV
28:France 2 HD:France 2 HD:TV
29:M6HD:M6HD:TV
30:ARTE HD:ARTE HD:TV
31:::TV
32:EUROPE 1:EUROPE 1:RADIO
33:RMC:RMC:RADIO
34:RTL:RTL:RADIO
35:FRANCE INFO:FRANCE INFO:RADIO
36:FRANCE INTER:FRANCE INTER:RADIO
37:FRANCE BLEU IDF:FRANCE BLEU IDF:RADIO
38:NOSTALGIE:NOSTALGIE:RADIO
39:NRJ:NRJ:RADIO
40:SKYROCK:SKYROCK:RADIO
41:FUN RADIO:FUN RADIO:RADIO

But if I take a look into file with HexEditor, I see the "TF1 HD" with index 51 and channel number 51.

If I internally disable renumber the channels, the result is:
Código:
1:TF1:TF1:TV
2:France 2:France 2:TV
3:France 3:France 3:TV
4:CANAL+:CANAL+:TV
5:France 5:France 5:TV
6:M6:M6:TV
7:ARTE:ARTE:TV
8:Direct 8:Direct 8:TV
9:W9:W9:TV
10:TMC:TMC:TV
11:NT1:NT1:TV
12:NRJ12:NRJ12:TV
13:LCP:LCP:TV
14:France 4:France 4:TV
15:BFM TV:BFM TV:TV
16:i>TELE:i>TELE:TV
17:Virgin 17:Virgin 17:TV
18:Gulli:Gulli:TV
19:CANAL INFO:CANAL INFO:TV
20:France Ô:♣France ▒:TV
27:Canal 21:Canal 21:TV
22:IDF1:IDF1:TV
23:NRJ Paris:NRJ Paris:TV
24:CAP 24:CAP 24:TV
25:NUMERICABLE:NUMERICABLE:TV
50:VIDEOCLUB NUMERICABLE:VIDEOCLUB NUMERICABLE:TV
51:TF1 HD:TF1 HD:TV
52:France 2 HD:France 2 HD:TV
56:M6HD:M6HD:TV
57:ARTE HD:ARTE HD:TV
21:::TV
451:EUROPE 1:EUROPE 1:RADIO
452:RMC:RMC:RADIO
453:RTL:RTL:RADIO
454:FRANCE INFO:FRANCE INFO:RADIO
455:FRANCE INTER:FRANCE INTER:RADIO
456:FRANCE BLEU IDF:FRANCE BLEU IDF:RADIO
457:NOSTALGIE:NOSTALGIE:RADIO
458:NRJ:NRJ:RADIO
459:SKYROCK:SKYROCK:RADIO
460:FUN RADIO:FUN RADIO:RADIO

Please, can you tell me if the channel "Canal 21" (with ID 27) is before channel "IDF1" (with ID 21 but after ID 27) on LG screen?

I have a workaround:
- at the "Channels" page press "Edit" button
- move first channel down
- move first channel down (this operation only swap first two channels and swap it again so the order is observed)
- press the "Save" button, restart the LG and you have all ordered

I think I'm impossible handle this in easy way so I must make a renumbering before you access the LGM Channels and/or the channels from LG.
avatar
Keltek

Mensajes : 291
Fecha de inscripción : 10/03/2010
Edad : 40
Localización : Praha - Czech Republic

Ver perfil de usuario http://www.fozona.cz/

Volver arriba Ir abajo

Re: Extended funtionality of lgchanedit executable

Mensaje  Contenido patrocinado


Contenido patrocinado


Volver arriba Ir abajo

Volver arriba

- Temas similares

 
Permisos de este foro:
No puedes responder a temas en este foro.