1 | #ifndef MULTIEPG_H |
---|
2 | #define MULTIEPG_H |
---|
3 | |
---|
4 | #define TEXTPOSEPG 250 |
---|
5 | |
---|
6 | struct epg* readepgdesc(struct channel* curchannel, int epgnr) |
---|
7 | { |
---|
8 | int i = 0; |
---|
9 | struct epg* epgnode = NULL; |
---|
10 | |
---|
11 | epgnode = getepgakt(curchannel); |
---|
12 | |
---|
13 | while(epgnode != NULL){ |
---|
14 | if(i >= epgnr) break; |
---|
15 | epgnode = epgnode->next; |
---|
16 | i++; |
---|
17 | } |
---|
18 | return epgnode; |
---|
19 | } |
---|
20 | |
---|
21 | int selectchannelmepg(struct skin* listbox) |
---|
22 | { |
---|
23 | struct skin* node = listbox; |
---|
24 | struct channel* chnode = NULL; |
---|
25 | listbox->aktpage = -1; |
---|
26 | listbox->aktline = 1; |
---|
27 | |
---|
28 | listbox->select = NULL; |
---|
29 | |
---|
30 | if(status.servicetype == 0) |
---|
31 | chnode = getchannel(getconfigint("serviceid", NULL), getconfiglu("transponderid", NULL)); |
---|
32 | else |
---|
33 | chnode = getchannel(getconfigint("rserviceid", NULL), getconfiglu("rtransponderid", NULL)); |
---|
34 | |
---|
35 | if(chnode == NULL) |
---|
36 | { |
---|
37 | debug(1000, "out -> NULL detect"); |
---|
38 | return 1; |
---|
39 | } |
---|
40 | |
---|
41 | while(node != NULL) |
---|
42 | { |
---|
43 | if(node->deaktivcol > -1) |
---|
44 | { |
---|
45 | node = node->next; |
---|
46 | continue; |
---|
47 | } |
---|
48 | if(chnode == (struct channel*) node->handle) |
---|
49 | return 0; |
---|
50 | |
---|
51 | if(node->del == 1) listbox->aktline++; |
---|
52 | node = node->next; |
---|
53 | } |
---|
54 | listbox->aktline = 1; |
---|
55 | return 1; |
---|
56 | } |
---|
57 | |
---|
58 | int showallmepgchannel(struct skin* multiepg, struct skin* listbox, int epgnr) |
---|
59 | { |
---|
60 | int treffer = 0; |
---|
61 | struct skin* chnode = NULL; |
---|
62 | struct channel* tmpchannel = channel; |
---|
63 | struct epg* epgnode = NULL; |
---|
64 | struct tm *loctime = NULL; |
---|
65 | char* tmpstr = NULL, *buf = NULL; |
---|
66 | |
---|
67 | if(multiepg != NULL) |
---|
68 | delmarkedscreennodes(multiepg, 1); |
---|
69 | |
---|
70 | buf = malloc(MINMALLOC); |
---|
71 | if(buf == NULL) |
---|
72 | { |
---|
73 | err("no mem"); |
---|
74 | return 1; |
---|
75 | } |
---|
76 | |
---|
77 | while(tmpchannel != NULL) |
---|
78 | { |
---|
79 | if(tmpchannel->servicetype == status.servicetype) |
---|
80 | { |
---|
81 | chnode = addlistbox(multiepg, listbox, chnode, 1); |
---|
82 | if(chnode != NULL) |
---|
83 | { |
---|
84 | changetext(chnode, tmpchannel->name); |
---|
85 | |
---|
86 | epgnode = readepgdesc(tmpchannel, epgnr); |
---|
87 | if(epgnode != NULL) |
---|
88 | { |
---|
89 | treffer = 1; |
---|
90 | |
---|
91 | chnode->type = MULTIPROGRESSBAR; |
---|
92 | chnode->progresscol = listbox->progresscol; |
---|
93 | chnode->epgrecord = getepgrecord(tmpchannel, epgnode); |
---|
94 | |
---|
95 | loctime = localtime(&epgnode->starttime); |
---|
96 | ostrftime(buf, MINMALLOC, listbox->param1, loctime); |
---|
97 | tmpstr = ostrcat(tmpstr, buf, 1, 0); |
---|
98 | loctime = localtime(&epgnode->endtime); |
---|
99 | ostrftime(buf, MINMALLOC, listbox->param2, loctime); |
---|
100 | tmpstr = ostrcat(tmpstr, buf, 1, 0); |
---|
101 | tmpstr = ostrcat(tmpstr, " - ", 1, 0); |
---|
102 | tmpstr = ostrcat(tmpstr, epgnode->title, 1, 0); |
---|
103 | changetext2(chnode, tmpstr); |
---|
104 | free(tmpstr); tmpstr = NULL; |
---|
105 | chnode->textposx2 = TEXTPOSEPG; |
---|
106 | chnode->handle1 = (char*) epgnode; |
---|
107 | } |
---|
108 | |
---|
109 | chnode->handle = (char*) tmpchannel; |
---|
110 | if(channelnottunable(tmpchannel) == 1) |
---|
111 | chnode->deaktivcol = convertcol("deaktivcol"); |
---|
112 | } |
---|
113 | } |
---|
114 | tmpchannel = tmpchannel->next; |
---|
115 | } |
---|
116 | free(buf); |
---|
117 | return treffer; |
---|
118 | } |
---|
119 | |
---|
120 | int showbouquetmepgchannel(struct skin* multiepg, struct skin* listbox, struct bouquet* firstbouquet, int epgnr) |
---|
121 | { |
---|
122 | int treffer = 0; |
---|
123 | struct skin* chnode = NULL; |
---|
124 | struct bouquet* tmpbouquet = firstbouquet; |
---|
125 | struct epg* epgnode = NULL; |
---|
126 | struct tm *loctime = NULL; |
---|
127 | char* tmpstr = NULL, *tmpnr = NULL, *buf = NULL; |
---|
128 | |
---|
129 | if(multiepg != NULL) |
---|
130 | delmarkedscreennodes(multiepg, 1); |
---|
131 | |
---|
132 | buf = malloc(MINMALLOC); |
---|
133 | if(buf == NULL) |
---|
134 | { |
---|
135 | err("no mem"); |
---|
136 | return 1; |
---|
137 | } |
---|
138 | |
---|
139 | while(tmpbouquet != NULL) |
---|
140 | { |
---|
141 | if(tmpbouquet->channel != NULL) |
---|
142 | { |
---|
143 | if(tmpbouquet->channel->servicetype == status.servicetype) |
---|
144 | { |
---|
145 | chnode = addlistbox(multiepg, listbox, chnode, 1); |
---|
146 | if(chnode != NULL) |
---|
147 | { |
---|
148 | tmpnr = oitoa(tmpbouquet->nr); |
---|
149 | changeret(chnode, tmpnr); |
---|
150 | tmpstr = ostrcat(tmpstr, tmpnr, 1, 1); |
---|
151 | tmpstr = ostrcat(tmpstr, " ", 1, 0); |
---|
152 | tmpstr = ostrcat(tmpstr, tmpbouquet->channel->name, 1, 0); |
---|
153 | changetext(chnode, tmpstr); |
---|
154 | free(tmpstr); tmpstr = NULL; |
---|
155 | |
---|
156 | epgnode = readepgdesc(tmpbouquet->channel, epgnr); |
---|
157 | if(epgnode != NULL) |
---|
158 | { |
---|
159 | treffer = 1; |
---|
160 | |
---|
161 | chnode->type = MULTIPROGRESSBAR; |
---|
162 | chnode->progresscol = listbox->progresscol; |
---|
163 | chnode->epgrecord = getepgrecord(tmpbouquet->channel, epgnode); |
---|
164 | |
---|
165 | loctime = localtime(&epgnode->starttime); |
---|
166 | ostrftime(buf, MINMALLOC, listbox->param1, loctime); |
---|
167 | tmpstr = ostrcat(tmpstr, buf, 1, 0); |
---|
168 | |
---|
169 | loctime = localtime(&epgnode->endtime); |
---|
170 | ostrftime(buf, MINMALLOC, listbox->param2, loctime); |
---|
171 | tmpstr = ostrcat(tmpstr, buf, 1, 0); |
---|
172 | tmpstr = ostrcat(tmpstr, " - ", 1, 0); |
---|
173 | tmpstr = ostrcat(tmpstr, epgnode->title, 1, 0); |
---|
174 | changetext2(chnode, tmpstr); |
---|
175 | free(tmpstr); tmpstr = NULL; |
---|
176 | chnode->textposx2 = TEXTPOSEPG; |
---|
177 | chnode->handle1 = (char*) epgnode; |
---|
178 | } |
---|
179 | chnode->handle = (char*) tmpbouquet->channel; |
---|
180 | if(channelnottunable(tmpbouquet->channel) == 1) |
---|
181 | chnode->deaktivcol = convertcol("deaktivcol"); |
---|
182 | } |
---|
183 | } |
---|
184 | } |
---|
185 | tmpbouquet = tmpbouquet->next; |
---|
186 | } |
---|
187 | free(buf); |
---|
188 | return treffer; |
---|
189 | } |
---|
190 | |
---|
191 | int showprovidermepgchannel(struct skin* multiepg, struct skin* listbox, struct provider* providernode, int epgnr) |
---|
192 | { |
---|
193 | int treffer = 0; |
---|
194 | struct skin* chnode = NULL; |
---|
195 | struct channel* tmpchannel = channel; |
---|
196 | struct epg* epgnode = NULL; |
---|
197 | struct tm *loctime = NULL; |
---|
198 | char* tmpstr = NULL, *buf = NULL; |
---|
199 | |
---|
200 | if(multiepg != NULL) |
---|
201 | delmarkedscreennodes(multiepg, 1); |
---|
202 | |
---|
203 | buf = malloc(MINMALLOC); |
---|
204 | if(buf == NULL) |
---|
205 | { |
---|
206 | err("no mem"); |
---|
207 | return 1; |
---|
208 | } |
---|
209 | |
---|
210 | while(tmpchannel != NULL) |
---|
211 | { |
---|
212 | if(tmpchannel->provider == providernode) |
---|
213 | { |
---|
214 | if(tmpchannel->servicetype == status.servicetype) |
---|
215 | { |
---|
216 | chnode = addlistbox(multiepg, listbox, chnode, 1); |
---|
217 | if(chnode != NULL) |
---|
218 | { |
---|
219 | changetext(chnode, tmpchannel->name); |
---|
220 | |
---|
221 | epgnode = readepgdesc(tmpchannel, epgnr); |
---|
222 | if(epgnode != NULL) |
---|
223 | { |
---|
224 | treffer = 1; |
---|
225 | |
---|
226 | chnode->type = MULTIPROGRESSBAR; |
---|
227 | chnode->progresscol = listbox->progresscol; |
---|
228 | chnode->epgrecord = getepgrecord(tmpchannel, epgnode); |
---|
229 | |
---|
230 | loctime = localtime(&epgnode->starttime); |
---|
231 | ostrftime(buf, MINMALLOC, listbox->param1, loctime); |
---|
232 | tmpstr = ostrcat(tmpstr, buf, 1, 0); |
---|
233 | loctime = localtime(&epgnode->endtime); |
---|
234 | ostrftime(buf, MINMALLOC, listbox->param2, loctime); |
---|
235 | tmpstr = ostrcat(tmpstr, buf, 1, 0); |
---|
236 | tmpstr = ostrcat(tmpstr, " - ", 1, 0); |
---|
237 | tmpstr = ostrcat(tmpstr, epgnode->title, 1, 0); |
---|
238 | changetext2(chnode, tmpstr); |
---|
239 | free(tmpstr); tmpstr = NULL; |
---|
240 | chnode->textposx2 = TEXTPOSEPG; |
---|
241 | chnode->handle1 = (char*) epgnode; |
---|
242 | } |
---|
243 | chnode->handle = (char*) tmpchannel; |
---|
244 | if(channelnottunable(tmpchannel) == 1) |
---|
245 | chnode->deaktivcol = convertcol("deaktivcol"); |
---|
246 | } |
---|
247 | } |
---|
248 | } |
---|
249 | tmpchannel = tmpchannel->next; |
---|
250 | } |
---|
251 | free(buf); |
---|
252 | return treffer; |
---|
253 | } |
---|
254 | |
---|
255 | int showsatmepgchannel(struct skin* multiepg, struct skin* listbox, struct sat* satnode, int epgnr) |
---|
256 | { |
---|
257 | int treffer = 0; |
---|
258 | struct skin* chnode = NULL; |
---|
259 | struct channel* tmpchannel = channel; |
---|
260 | struct epg* epgnode = NULL; |
---|
261 | struct tm *loctime = NULL; |
---|
262 | char* tmpstr = NULL, *buf = NULL; |
---|
263 | |
---|
264 | if(satnode == NULL) |
---|
265 | return 1; |
---|
266 | |
---|
267 | if(multiepg != NULL) |
---|
268 | delmarkedscreennodes(multiepg, 1); |
---|
269 | |
---|
270 | buf = malloc(MINMALLOC); |
---|
271 | if(buf == NULL) |
---|
272 | { |
---|
273 | err("no mem"); |
---|
274 | return 1; |
---|
275 | } |
---|
276 | |
---|
277 | while(tmpchannel != NULL) |
---|
278 | { |
---|
279 | if(tmpchannel->transponder != NULL && tmpchannel->transponder->orbitalpos == satnode->orbitalpos) |
---|
280 | { |
---|
281 | if(tmpchannel->servicetype == status.servicetype) |
---|
282 | { |
---|
283 | chnode = addlistbox(multiepg, listbox, chnode, 1); |
---|
284 | if(chnode != NULL) |
---|
285 | { |
---|
286 | changetext(chnode, tmpchannel->name); |
---|
287 | |
---|
288 | epgnode = readepgdesc(tmpchannel, epgnr); |
---|
289 | if(epgnode != NULL) |
---|
290 | { |
---|
291 | treffer = 1; |
---|
292 | |
---|
293 | chnode->type = MULTIPROGRESSBAR; |
---|
294 | chnode->progresscol = listbox->progresscol; |
---|
295 | chnode->epgrecord = getepgrecord(tmpchannel, epgnode); |
---|
296 | |
---|
297 | loctime = localtime(&epgnode->starttime); |
---|
298 | ostrftime(buf, MINMALLOC, listbox->param1, loctime); |
---|
299 | tmpstr = ostrcat(tmpstr, buf, 1, 0); |
---|
300 | loctime = localtime(&epgnode->endtime); |
---|
301 | ostrftime(buf, MINMALLOC, listbox->param2, loctime); |
---|
302 | tmpstr = ostrcat(tmpstr, buf, 1, 0); |
---|
303 | tmpstr = ostrcat(tmpstr, " - ", 1, 0); |
---|
304 | tmpstr = ostrcat(tmpstr, epgnode->title, 1, 0); |
---|
305 | changetext2(chnode, tmpstr); |
---|
306 | free(tmpstr); tmpstr = NULL; |
---|
307 | chnode->textposx2 = TEXTPOSEPG; |
---|
308 | chnode->handle1 = (char*) epgnode; |
---|
309 | } |
---|
310 | chnode->handle = (char*) tmpchannel; |
---|
311 | if(channelnottunable(tmpchannel) == 1) |
---|
312 | chnode->deaktivcol = convertcol("deaktivcol"); |
---|
313 | } |
---|
314 | } |
---|
315 | } |
---|
316 | tmpchannel = tmpchannel->next; |
---|
317 | } |
---|
318 | free(buf); |
---|
319 | return treffer; |
---|
320 | } |
---|
321 | |
---|
322 | int showazmepgchannel(struct skin* multiepg, struct skin* listbox, int character, int epgnr) |
---|
323 | { |
---|
324 | int treffer = 0; |
---|
325 | struct skin* chnode = NULL; |
---|
326 | struct channel* tmpchannel = channel; |
---|
327 | struct epg* epgnode = NULL; |
---|
328 | struct tm *loctime = NULL; |
---|
329 | char* tmpstr = NULL, *buf = NULL; |
---|
330 | |
---|
331 | if(multiepg != NULL) |
---|
332 | delmarkedscreennodes(multiepg, 1); |
---|
333 | |
---|
334 | buf = malloc(MINMALLOC); |
---|
335 | if(buf == NULL) |
---|
336 | { |
---|
337 | err("no mem"); |
---|
338 | return 1; |
---|
339 | } |
---|
340 | |
---|
341 | while(tmpchannel != NULL) |
---|
342 | { |
---|
343 | if(tmpchannel->name != NULL && (tmpchannel->name[0] == character || tmpchannel->name[0] == character + 32)) |
---|
344 | { |
---|
345 | if(tmpchannel->servicetype == status.servicetype) |
---|
346 | { |
---|
347 | chnode = addlistbox(multiepg, listbox, chnode, 1); |
---|
348 | if(chnode != NULL) |
---|
349 | { |
---|
350 | changetext(chnode, tmpchannel->name); |
---|
351 | epgnode = readepgdesc(tmpchannel, epgnr); |
---|
352 | if(epgnode != NULL) |
---|
353 | { |
---|
354 | treffer = 1; |
---|
355 | |
---|
356 | chnode->type = MULTIPROGRESSBAR; |
---|
357 | chnode->progresscol = listbox->progresscol; |
---|
358 | chnode->epgrecord = getepgrecord(tmpchannel, epgnode); |
---|
359 | |
---|
360 | loctime = localtime(&epgnode->starttime); |
---|
361 | ostrftime(buf, MINMALLOC, listbox->param1, loctime); |
---|
362 | tmpstr = ostrcat(tmpstr, buf, 1, 0); |
---|
363 | loctime = localtime(&epgnode->endtime); |
---|
364 | ostrftime(buf, MINMALLOC, listbox->param2, loctime); |
---|
365 | tmpstr = ostrcat(tmpstr, buf, 1, 0); |
---|
366 | tmpstr = ostrcat(tmpstr, " - ", 1, 0); |
---|
367 | tmpstr = ostrcat(tmpstr, epgnode->title, 1, 0); |
---|
368 | changetext2(chnode, tmpstr); |
---|
369 | free(tmpstr); tmpstr = NULL; |
---|
370 | chnode->textposx2 = TEXTPOSEPG; |
---|
371 | chnode->handle1 = (char*) epgnode; |
---|
372 | } |
---|
373 | chnode->handle = (char*) tmpchannel; |
---|
374 | if(channelnottunable(tmpchannel) == 1) |
---|
375 | chnode->deaktivcol = convertcol("deaktivcol"); |
---|
376 | } |
---|
377 | } |
---|
378 | } |
---|
379 | tmpchannel = tmpchannel->next; |
---|
380 | } |
---|
381 | free(buf); |
---|
382 | return treffer; |
---|
383 | } |
---|
384 | |
---|
385 | void drawchannellistmepg(struct skin* multiepg, int list, struct skin* listbox) |
---|
386 | { |
---|
387 | status.markedchannel = NULL; |
---|
388 | |
---|
389 | if(list == ALLCHANNEL || list == SATCHANNEL || list == PROVIDERCHANNEL || list == AZCHANNEL || list == BOUQUETCHANNEL) |
---|
390 | { |
---|
391 | if(listbox->select == NULL) |
---|
392 | { |
---|
393 | status.screencalc = 2; |
---|
394 | drawscreen(multiepg, 0); |
---|
395 | status.screencalc = 0; |
---|
396 | } |
---|
397 | if(listbox->select != NULL) |
---|
398 | status.markedchannel = (struct channel*)listbox->select->handle; |
---|
399 | } |
---|
400 | drawscreen(multiepg, 0); |
---|
401 | } |
---|
402 | |
---|
403 | void screenmultiepg(struct channel* chnode, struct epg* epgnode, int flag) |
---|
404 | { |
---|
405 | int rcret = 0, ret = 0, epgscreenconf = 0; |
---|
406 | struct skin* multiepg = getscreen("multiepg"); |
---|
407 | struct skin* listbox = getscreennode(multiepg, "listbox"); |
---|
408 | struct skin* b2 = getscreennode(multiepg, "b2"); |
---|
409 | struct skin* b3 = getscreennode(multiepg, "b3"); |
---|
410 | struct skin* b4 = getscreennode(multiepg, "b4"); |
---|
411 | |
---|
412 | int list = ALLCHANNEL; |
---|
413 | char* tmpstr = NULL, *tmpstr1 = NULL; |
---|
414 | void* aktlist = NULL; |
---|
415 | int epgnr = 0; |
---|
416 | int character = 0; |
---|
417 | struct sat* satnode = NULL; |
---|
418 | struct provider* providernode = NULL; |
---|
419 | int nochanneltitle = getskinconfigint("nochanneltitle", NULL); |
---|
420 | |
---|
421 | epgscreenconf = getconfigint("epg_screen", NULL); |
---|
422 | |
---|
423 | if(status.servicetype == 0) |
---|
424 | tmpstr = getconfig("channellist", NULL); |
---|
425 | else |
---|
426 | tmpstr = getconfig("rchannellist", NULL); |
---|
427 | if(ostrncmp("(BOUQUET)-", tmpstr, 10) == 0 && strlen(tmpstr) > 10) |
---|
428 | { |
---|
429 | struct mainbouquet* mainbouquetnode = NULL; |
---|
430 | mainbouquetnode = getmainbouquet(tmpstr + 10); |
---|
431 | if(mainbouquetnode != NULL && mainbouquetnode->bouquet != NULL) |
---|
432 | { |
---|
433 | tmpstr1 = ostrcat(tmpstr1, _("MULTI EPG - Bouquets"), 0, 0); |
---|
434 | tmpstr1 = ostrcat(tmpstr1, " - ", 1, 0); |
---|
435 | tmpstr1 = ostrcat(tmpstr1, tmpstr + 10, 1, 0); |
---|
436 | if(nochanneltitle == 0) changetitle(multiepg, tmpstr1); |
---|
437 | free(tmpstr1); tmpstr1 = NULL; |
---|
438 | list = BOUQUETCHANNEL; |
---|
439 | aktlist = (void*)mainbouquetnode; |
---|
440 | showbouquetmepgchannel(multiepg, listbox, mainbouquetnode->bouquet, epgnr); |
---|
441 | selectchannelmepg(listbox); |
---|
442 | } |
---|
443 | } |
---|
444 | else if(ostrncmp("(A-Z)-", tmpstr, 6) == 0 && strlen(tmpstr) > 6) |
---|
445 | { |
---|
446 | tmpstr1 = ostrcat(tmpstr1, _("MULTI EPG - Channel"), 0, 0); |
---|
447 | tmpstr1 = ostrcat(tmpstr1, " - ", 1, 0); |
---|
448 | tmpstr1 = ostrcat(tmpstr1, tmpstr + 6, 1, 0); |
---|
449 | if(nochanneltitle == 0) changetitle(multiepg, tmpstr1); |
---|
450 | free(tmpstr1); tmpstr1 = NULL; |
---|
451 | list = AZCHANNEL; |
---|
452 | character = (int)tmpstr[6]; |
---|
453 | aktlist = (void*)(int)tmpstr[6]; |
---|
454 | showazmepgchannel(multiepg, listbox, character, epgnr); |
---|
455 | selectchannelmepg(listbox); |
---|
456 | } |
---|
457 | else if(ostrncmp("(SAT)-", tmpstr, 6) == 0 && strlen(tmpstr) > 6) |
---|
458 | { |
---|
459 | tmpstr1 = ostrcat(tmpstr1, _("MULTI EPG - Satellites"), 0, 0); |
---|
460 | tmpstr1 = ostrcat(tmpstr1, " - ", 1, 0); |
---|
461 | tmpstr1 = ostrcat(tmpstr1, tmpstr + 6, 1, 0); |
---|
462 | if(nochanneltitle == 0) changetitle(multiepg, tmpstr1); |
---|
463 | free(tmpstr1); tmpstr1 = NULL; |
---|
464 | satnode = getsat(tmpstr + 6); |
---|
465 | list = SATCHANNEL; |
---|
466 | aktlist = (void*)satnode; |
---|
467 | showsatmepgchannel(multiepg, listbox, satnode, epgnr); |
---|
468 | selectchannelmepg(listbox); |
---|
469 | } |
---|
470 | else if(ostrncmp("(PROVIDER)-", tmpstr, 11) == 0 && strlen(tmpstr) > 6) |
---|
471 | { |
---|
472 | tmpstr1 = ostrcat(tmpstr1, _("MULTI EPG - Provider"), 0, 0); |
---|
473 | tmpstr1 = ostrcat(tmpstr1, " - ", 1, 0); |
---|
474 | tmpstr1 = ostrcat(tmpstr1, tmpstr + 11, 1, 0); |
---|
475 | if(nochanneltitle == 0) changetitle(multiepg, tmpstr1); |
---|
476 | free(tmpstr1); tmpstr1 = NULL; |
---|
477 | providernode = getproviderbyname(tmpstr + 11); |
---|
478 | list = PROVIDERCHANNEL; |
---|
479 | aktlist = (void*)providernode; |
---|
480 | showprovidermepgchannel(multiepg, listbox, providernode, epgnr); |
---|
481 | selectchannelmepg(listbox); |
---|
482 | } |
---|
483 | else |
---|
484 | { |
---|
485 | if(nochanneltitle == 0) changetitle(multiepg, _("MULTI EPG - All Channels")); |
---|
486 | list = ALLCHANNEL; |
---|
487 | showallmepgchannel(multiepg, listbox, epgnr); |
---|
488 | selectchannelmepg(listbox); |
---|
489 | } |
---|
490 | |
---|
491 | if(flag == 0 && epgscreenconf == 2) |
---|
492 | { |
---|
493 | b2->hidden = NO; |
---|
494 | b3->hidden = NO; |
---|
495 | b4->hidden = NO; |
---|
496 | } |
---|
497 | else |
---|
498 | { |
---|
499 | b2->hidden = YES; |
---|
500 | b3->hidden = YES; |
---|
501 | b4->hidden = YES; |
---|
502 | } |
---|
503 | |
---|
504 | tmpstr = NULL; |
---|
505 | status.screencalc = 2; |
---|
506 | drawscreen(multiepg, 0); |
---|
507 | status.screencalc = 0; |
---|
508 | addscreenrc(multiepg, listbox); |
---|
509 | |
---|
510 | drawchannellistmepg(multiepg, list, listbox); |
---|
511 | |
---|
512 | while(1) |
---|
513 | { |
---|
514 | status.screencalc = 2; |
---|
515 | rcret = waitrc(multiepg, 0, 0); |
---|
516 | status.screencalc = 0; |
---|
517 | |
---|
518 | if((rcret == getrcconfigint("rcexit", NULL)) || (rcret == getrcconfigint("rcepg", NULL))) break; |
---|
519 | //if(rcret == getrcconfigint("rcinfo", NULL)) break; |
---|
520 | if(rcret == getrcconfigint("rcok", NULL)) |
---|
521 | { |
---|
522 | servicecheckret(servicestart((struct channel*)listbox->select->handle, NULL, NULL, 0), 0); |
---|
523 | break; |
---|
524 | } |
---|
525 | if(rcret == getrcconfigint("rcinfo", NULL)) |
---|
526 | { |
---|
527 | if(listbox->select != NULL) |
---|
528 | { |
---|
529 | clearscreen(multiepg); |
---|
530 | screenepg((struct channel*)listbox->select->handle, (struct epg*)listbox->select->handle1, 1); |
---|
531 | drawscreen(multiepg, 0); |
---|
532 | } |
---|
533 | } |
---|
534 | |
---|
535 | if(flag == 0 && epgscreenconf == 2 && rcret == getrcconfigint("rcgreen", NULL)) |
---|
536 | { |
---|
537 | if(listbox->select != NULL) |
---|
538 | { |
---|
539 | clearscreen(multiepg); |
---|
540 | screenepg((struct channel*)listbox->select->handle, (struct epg*)listbox->select->handle1, 0); |
---|
541 | //drawscreen(multiepg, 0); |
---|
542 | break; |
---|
543 | } |
---|
544 | } |
---|
545 | if(flag == 0 && epgscreenconf == 2 && rcret == getrcconfigint("rcyellow", NULL)) |
---|
546 | { |
---|
547 | if(listbox->select != NULL) |
---|
548 | { |
---|
549 | clearscreen(multiepg); |
---|
550 | screensingleepg((struct channel*)listbox->select->handle, NULL, 0); |
---|
551 | //drawscreen(multiepg, 0); |
---|
552 | break; |
---|
553 | } |
---|
554 | } |
---|
555 | if(flag == 0 && epgscreenconf == 2 && rcret == getrcconfigint("rcblue", NULL)) |
---|
556 | { |
---|
557 | if(listbox->select != NULL) |
---|
558 | { |
---|
559 | clearscreen(multiepg); |
---|
560 | screengmultiepg((struct channel*)listbox->select->handle, NULL, 0); |
---|
561 | //drawscreen(multiepg, 0); |
---|
562 | break; |
---|
563 | } |
---|
564 | } |
---|
565 | |
---|
566 | if(rcret == getrcconfigint("rcff", NULL)) |
---|
567 | { |
---|
568 | epgnr++; |
---|
569 | |
---|
570 | if(list == BOUQUETCHANNEL) |
---|
571 | { |
---|
572 | if(showbouquetmepgchannel(multiepg, listbox, ((struct mainbouquet*)aktlist)->bouquet, epgnr) == 0) |
---|
573 | { |
---|
574 | epgnr--; |
---|
575 | if(epgnr < 0) |
---|
576 | epgnr = 0; |
---|
577 | else |
---|
578 | showbouquetmepgchannel(multiepg, listbox, ((struct mainbouquet*)aktlist)->bouquet, epgnr); |
---|
579 | |
---|
580 | } |
---|
581 | } |
---|
582 | else if(list == ALLCHANNEL) |
---|
583 | { |
---|
584 | if(showallmepgchannel(multiepg, listbox, epgnr) == 0) |
---|
585 | { |
---|
586 | epgnr--; |
---|
587 | if(epgnr < 0) |
---|
588 | epgnr = 0; |
---|
589 | else |
---|
590 | showallmepgchannel(multiepg, listbox, epgnr); |
---|
591 | } |
---|
592 | } |
---|
593 | else if(list == AZCHANNEL) |
---|
594 | { |
---|
595 | if(showazmepgchannel(multiepg, listbox, character, epgnr) == 0) |
---|
596 | { |
---|
597 | epgnr--; |
---|
598 | if(epgnr < 0) |
---|
599 | epgnr = 0; |
---|
600 | else |
---|
601 | showazmepgchannel(multiepg, listbox, character, epgnr); |
---|
602 | } |
---|
603 | } |
---|
604 | else if(list == SATCHANNEL) |
---|
605 | { |
---|
606 | if(showsatmepgchannel(multiepg, listbox, satnode, epgnr) == 0) |
---|
607 | { |
---|
608 | epgnr--; |
---|
609 | if(epgnr < 0) |
---|
610 | epgnr = 0; |
---|
611 | else |
---|
612 | showsatmepgchannel(multiepg, listbox, satnode, epgnr); |
---|
613 | } |
---|
614 | } |
---|
615 | else if(list == PROVIDERCHANNEL) |
---|
616 | { |
---|
617 | if(showprovidermepgchannel(multiepg, listbox, providernode, epgnr) == 0) |
---|
618 | { |
---|
619 | epgnr--; |
---|
620 | if(epgnr < 0) |
---|
621 | epgnr = 0; |
---|
622 | else |
---|
623 | showprovidermepgchannel(multiepg, listbox, providernode, epgnr); |
---|
624 | } |
---|
625 | } |
---|
626 | drawscreen(multiepg, 0); |
---|
627 | continue; |
---|
628 | } |
---|
629 | |
---|
630 | if(rcret == getrcconfigint("rcfr", NULL)) |
---|
631 | { |
---|
632 | epgnr--; |
---|
633 | if(epgnr < 0) epgnr = 0; |
---|
634 | |
---|
635 | if(list == BOUQUETCHANNEL) |
---|
636 | showbouquetmepgchannel(multiepg, listbox, ((struct mainbouquet*)aktlist)->bouquet, epgnr); |
---|
637 | else if(list == ALLCHANNEL) |
---|
638 | showallmepgchannel(multiepg, listbox, epgnr); |
---|
639 | else if(list == AZCHANNEL) |
---|
640 | showazmepgchannel(multiepg, listbox, character, epgnr); |
---|
641 | else if(list == SATCHANNEL) |
---|
642 | showsatmepgchannel(multiepg, listbox, satnode, epgnr); |
---|
643 | else if(list == PROVIDERCHANNEL) |
---|
644 | showprovidermepgchannel(multiepg, listbox, providernode, epgnr); |
---|
645 | drawscreen(multiepg, 0); |
---|
646 | continue; |
---|
647 | } |
---|
648 | |
---|
649 | if(rcret == getrcconfigint("rcred", NULL) && listbox->select != NULL) |
---|
650 | { |
---|
651 | clearscreen(multiepg); |
---|
652 | ret = addrecepg((struct channel*)listbox->select->handle, readepgdesc((struct channel*)listbox->select->handle, epgnr), NULL); |
---|
653 | drawscreen(multiepg, 0); |
---|
654 | continue; |
---|
655 | } |
---|
656 | |
---|
657 | drawscreen(multiepg, 0); |
---|
658 | } |
---|
659 | |
---|
660 | status.markedchannel = NULL; |
---|
661 | status.markmodus = 0; |
---|
662 | status.screencalc = 0; |
---|
663 | delmarkedscreennodes(multiepg, 1); |
---|
664 | delownerrc(multiepg); |
---|
665 | clearscreen(multiepg); |
---|
666 | } |
---|
667 | |
---|
668 | #endif |
---|