1 | #ifndef TITHEK_H |
---|
2 | #define TITHEK_H |
---|
3 | |
---|
4 | #define HTTPAUTH "aXBrLUdaRmg6RkhaVkJHaG56ZnZFaEZERlRHenVpZjU2NzZ6aGpHVFVHQk5Iam0=" |
---|
5 | |
---|
6 | #define TITHEKPATH "/tmp/tithek" |
---|
7 | int tithekdownloadrun = 0; |
---|
8 | int tithekdownloadcount = 0; |
---|
9 | int tithekrun = 0; |
---|
10 | int tithekexit = 0; |
---|
11 | int tithekmovie4k = 0; |
---|
12 | int tithekkinox = 0; |
---|
13 | int titheksolarmovie = 0; |
---|
14 | int tithekmlehd = 0; |
---|
15 | |
---|
16 | //flag 0 - menu |
---|
17 | //flag 1 - menu pay hidden tithek_pay=0/1 0=hidden |
---|
18 | //flag 2 - http (default streamurl) |
---|
19 | //flag 3 - menu cover |
---|
20 | //flag 4 - youtube |
---|
21 | //flag 5 - rtl2now |
---|
22 | //flag 6 - superrtlnow |
---|
23 | //flag 7 - rtlnow |
---|
24 | //flag 8 - voxnow |
---|
25 | //flag 9 - youtube suche 10 |
---|
26 | //flag 10 - youtube suche 25 |
---|
27 | //flag 11 - youtube suche 50 |
---|
28 | //flag 12 - myvideo |
---|
29 | //flag 13 - myvideo search 50 |
---|
30 | //flag 14 - hoster putlocker/sockshare |
---|
31 | //flag 15 - hoster filenuke |
---|
32 | //flag 16 - superrtlnow pay |
---|
33 | //flag 17 - rtlnow pay |
---|
34 | //flag 18 - voxnow pay |
---|
35 | //flag 19 - rtl2now pay |
---|
36 | //flag 20 - hoster StreamCloud |
---|
37 | //flag 21 - kinox search |
---|
38 | //flag 22 - kinox hoster |
---|
39 | //flag 23 - kinox hoster serie |
---|
40 | //flag 24 - hoster flashx |
---|
41 | //flag 25 - hoster vidstream |
---|
42 | //flag 26 - hoster xvidstage |
---|
43 | //flag 27 - hoster nowvideo |
---|
44 | //flag 28 - solarmovie hoster |
---|
45 | //flag 29 - solarmovie search movie |
---|
46 | //flag 30 - solarmovie search serie |
---|
47 | //flag 31 - kinox search cast |
---|
48 | //flag 32 - kinox search cast results |
---|
49 | //flag 33 - movie4k search : serie > open seasons and list episode flag=40 > hoster listed flag=34 |
---|
50 | //flag 34 - movie4k hoster de |
---|
51 | //flag 35 - movie4k hoster other |
---|
52 | //flag 36 - movie4k series de > open seasons and list episode flag=39 > hoster listed flag=34 |
---|
53 | //flag 37 - movie4k series other > open seasons and list episode flag=39 > hoster listed flag=34 |
---|
54 | //flag 38 - mlehd |
---|
55 | //flag 39 - movie4k_hoster_listed |
---|
56 | //flag 40 - movie4k_hoster_series |
---|
57 | //flag 41 - movie4k |
---|
58 | //flag 42 - xvideos |
---|
59 | //flag 43 - solarmovie |
---|
60 | //flag 44 - myvideo Single charts |
---|
61 | //flag 45 - ard |
---|
62 | //flag 46 - ard |
---|
63 | |
---|
64 | //flag 50 - beeg |
---|
65 | //flag 66 - coming soon dummy |
---|
66 | //flag 1000 - menu pincode |
---|
67 | //flag 9999 - menu hidden codecpack |
---|
68 | |
---|
69 | struct tithek |
---|
70 | { |
---|
71 | char* title; |
---|
72 | char* link; |
---|
73 | char* pic; |
---|
74 | char* localname; |
---|
75 | char* menutitle; |
---|
76 | int flag; |
---|
77 | struct tithek* prev; |
---|
78 | struct tithek* next; |
---|
79 | }; |
---|
80 | struct tithek *tithek = NULL; |
---|
81 | |
---|
82 | |
---|
83 | void freetithekcontent(struct tithek* node) |
---|
84 | { |
---|
85 | if(node == NULL) return; |
---|
86 | |
---|
87 | free(node->title); node->title = NULL; |
---|
88 | node->link = NULL; |
---|
89 | node->pic = NULL; |
---|
90 | node->localname = NULL; |
---|
91 | node->menutitle = NULL; |
---|
92 | node->flag = 0; |
---|
93 | } |
---|
94 | |
---|
95 | int addtithekcontent(struct tithek* node, char *line, int len, int count, int pay) |
---|
96 | { |
---|
97 | int ret = 0, i = 0, skip = 0, hid = 0, sos = 0; |
---|
98 | char* tmpstr = NULL, *flag = NULL, *cmd = NULL, *tmp = NULL; |
---|
99 | if(node == NULL) return 1; |
---|
100 | |
---|
101 | if(len > 0) tmpstr = malloc(len + 1); |
---|
102 | if(tmpstr != NULL) |
---|
103 | { |
---|
104 | memcpy(tmpstr, line, len); |
---|
105 | tmpstr[len] = '\0'; |
---|
106 | |
---|
107 | node->title = tmpstr; |
---|
108 | |
---|
109 | while(tmpstr[0] != '\0') |
---|
110 | { |
---|
111 | if(tmpstr[0] == '#') |
---|
112 | { |
---|
113 | tmpstr[0] = '\0'; |
---|
114 | tmpstr++; |
---|
115 | switch(ret) |
---|
116 | { |
---|
117 | case 0: node->link = tmpstr; break; |
---|
118 | case 1: node->pic = tmpstr; break; |
---|
119 | case 2: node->localname = tmpstr; break; |
---|
120 | case 3: node->menutitle = tmpstr; break; |
---|
121 | case 4: flag = tmpstr; break; |
---|
122 | } |
---|
123 | |
---|
124 | ret++; |
---|
125 | } |
---|
126 | else |
---|
127 | tmpstr++; |
---|
128 | } |
---|
129 | } |
---|
130 | |
---|
131 | if(ret != 5) |
---|
132 | { |
---|
133 | if(count > 0) |
---|
134 | { |
---|
135 | err("tithek line %d not ok (ret=%d)", count, ret); |
---|
136 | } |
---|
137 | else |
---|
138 | { |
---|
139 | err("add tithek (ret=%d)", ret); |
---|
140 | } |
---|
141 | freetithekcontent(node); |
---|
142 | return 1; |
---|
143 | } |
---|
144 | |
---|
145 | if(flag != NULL) node->flag = atoi(flag); |
---|
146 | |
---|
147 | sos = getconfigint("sos", NULL); |
---|
148 | hid = getconfigint("tithek_hid_xxx", NULL); |
---|
149 | if(node->flag == 1000 && hid == 1) |
---|
150 | skip = 1; |
---|
151 | else if((node->flag == 9996 || node->flag == 9997 || node->flag == 9998 || node->flag == 9999) && !file_exist("/mnt/swapextensions/etc/.codecpack") && !file_exist("/var/swap/etc/.codecpack") && !file_exist("/var/etc/.codecpack")) |
---|
152 | skip = 1; |
---|
153 | else if(node->flag == 16 && pay == 0) |
---|
154 | skip = 1; |
---|
155 | else if(node->flag == 17 && pay == 0) |
---|
156 | skip = 1; |
---|
157 | else if(node->flag == 18 && pay == 0) |
---|
158 | skip = 1; |
---|
159 | else if(node->flag == 19 && pay == 0) |
---|
160 | skip = 1; |
---|
161 | else if(node->flag == 1 && pay == 0) |
---|
162 | skip = 1; |
---|
163 | else if(node->flag == 35 && pay == 0) |
---|
164 | skip = 1; |
---|
165 | else if(titheksolarmovie == 1 && node->flag == 9996 && sos == 0) |
---|
166 | { |
---|
167 | cmd = ostrcat(cmd, "ww", 1, 0); |
---|
168 | cmd = ostrcat(cmd, "w.sola", 1, 0); |
---|
169 | cmd = ostrcat(cmd, "rmovi", 1, 0); |
---|
170 | cmd = ostrcat(cmd, "e.", 1, 0); |
---|
171 | cmd = ostrcat(cmd, "so", 1, 0); |
---|
172 | |
---|
173 | //if(system(cmd) != 0) |
---|
174 | for(i = 0; i < 3; i++) |
---|
175 | { |
---|
176 | free(tmp); tmp = NULL; |
---|
177 | tmp = gethttp(cmd, "/", 80, NULL, NULL, 5000, NULL, 0); |
---|
178 | if(tmp != NULL) break; |
---|
179 | } |
---|
180 | if(tmp == NULL) |
---|
181 | skip = 1; |
---|
182 | |
---|
183 | titheksolarmovie = 0; |
---|
184 | } |
---|
185 | else if(tithekmovie4k == 1 && node->flag == 9997 && sos == 0) |
---|
186 | { |
---|
187 | cmd = ostrcat(cmd, "ww", 1, 0); |
---|
188 | cmd = ostrcat(cmd, "w.mov", 1, 0); |
---|
189 | cmd = ostrcat(cmd, "ie4k", 1, 0); |
---|
190 | cmd = ostrcat(cmd, ".", 1, 0); |
---|
191 | cmd = ostrcat(cmd, "to", 1, 0); |
---|
192 | |
---|
193 | //if(system(cmd) != 0) |
---|
194 | for(i = 0; i < 3; i++) |
---|
195 | { |
---|
196 | free(tmp); tmp = NULL; |
---|
197 | tmp = gethttp(cmd, "/", 80, NULL, NULL, 5000, NULL, 0); |
---|
198 | if(tmp != NULL) break; |
---|
199 | } |
---|
200 | if(tmp == NULL) |
---|
201 | skip = 1; |
---|
202 | |
---|
203 | tithekmovie4k = 0; |
---|
204 | } |
---|
205 | else if(tithekmlehd == 1 && node->flag == 9998 && sos == 0) |
---|
206 | { |
---|
207 | cmd = ostrcat(cmd, "ww", 1, 0); |
---|
208 | cmd = ostrcat(cmd, "w.mle", 1, 0); |
---|
209 | cmd = ostrcat(cmd, "-hd", 1, 0); |
---|
210 | cmd = ostrcat(cmd, ".", 1, 0); |
---|
211 | cmd = ostrcat(cmd, "se", 1, 0); |
---|
212 | |
---|
213 | //if(system(cmd) != 0) |
---|
214 | for(i = 0; i < 3; i++) |
---|
215 | { |
---|
216 | free(tmp); tmp = NULL; |
---|
217 | tmp = gethttp(cmd, "/", 80, NULL, NULL, 5000, NULL, 0); |
---|
218 | if(tmp != NULL) break; |
---|
219 | } |
---|
220 | if(tmp == NULL) |
---|
221 | skip = 1; |
---|
222 | |
---|
223 | tithekmlehd = 0; |
---|
224 | } |
---|
225 | else if(tithekkinox == 1 && node->flag == 9999 && sos == 0) |
---|
226 | { |
---|
227 | cmd = ostrcat(cmd, "kin", 1, 0); |
---|
228 | cmd = ostrcat(cmd, "ox", 1, 0); |
---|
229 | cmd = ostrcat(cmd, ".", 1, 0); |
---|
230 | cmd = ostrcat(cmd, "to", 1, 0); |
---|
231 | |
---|
232 | //if(system(cmd) != 0) |
---|
233 | for(i = 0; i < 3; i++) |
---|
234 | { |
---|
235 | free(tmp); tmp = NULL; |
---|
236 | tmp = gethttp(cmd, "/", 80, NULL, NULL, 5000, NULL, 0); |
---|
237 | if(tmp != NULL) break; |
---|
238 | } |
---|
239 | if(tmp == NULL) |
---|
240 | skip = 1; |
---|
241 | |
---|
242 | tithekkinox = 0; |
---|
243 | } |
---|
244 | |
---|
245 | if(skip == 1) |
---|
246 | { |
---|
247 | freetithekcontent(node); |
---|
248 | return 1; |
---|
249 | } |
---|
250 | |
---|
251 | free(tmp); tmp = NULL; |
---|
252 | free(cmd), cmd = NULL; |
---|
253 | |
---|
254 | return 0; |
---|
255 | } |
---|
256 | |
---|
257 | struct tithek* addtithek(char *line, int len, int count, struct tithek* last, int pay) |
---|
258 | { |
---|
259 | //debug(1000, "in"); |
---|
260 | struct tithek *newnode = NULL, *prev = NULL, *node = NULL; |
---|
261 | int ret = 0; |
---|
262 | |
---|
263 | if(line == NULL) return NULL; |
---|
264 | |
---|
265 | newnode = (struct tithek*)calloc(1, sizeof(struct tithek)); |
---|
266 | if(newnode == NULL) |
---|
267 | { |
---|
268 | err("no memory"); |
---|
269 | return NULL; |
---|
270 | } |
---|
271 | |
---|
272 | ret = addtithekcontent(newnode, line, len, count, pay); |
---|
273 | if(ret == 1) |
---|
274 | { |
---|
275 | free(newnode); |
---|
276 | return NULL; |
---|
277 | } |
---|
278 | |
---|
279 | node = tithek; |
---|
280 | |
---|
281 | if(last == NULL) |
---|
282 | { |
---|
283 | while(node != NULL) |
---|
284 | { |
---|
285 | prev = node; |
---|
286 | node = node->next; |
---|
287 | } |
---|
288 | } |
---|
289 | else |
---|
290 | { |
---|
291 | prev = last; |
---|
292 | node = last->next; |
---|
293 | } |
---|
294 | |
---|
295 | if(prev == NULL) |
---|
296 | tithek = newnode; |
---|
297 | else |
---|
298 | { |
---|
299 | prev->next = newnode; |
---|
300 | newnode->prev = prev; |
---|
301 | } |
---|
302 | newnode->next = node; |
---|
303 | if(node != NULL) node->prev = newnode; |
---|
304 | |
---|
305 | //debug(1000, "out"); |
---|
306 | return newnode; |
---|
307 | } |
---|
308 | |
---|
309 | struct tithek* createtithek(struct tithek* update, char* title, char* link, char* pic, char* localname, char* menutitle, int flag) |
---|
310 | { |
---|
311 | int pay = 0; |
---|
312 | struct tithek* tnode = NULL; |
---|
313 | char* tmpstr = NULL; |
---|
314 | |
---|
315 | pay = getconfigint("tithek_pay", NULL); |
---|
316 | |
---|
317 | title = stringreplacechar(title, '#', ' '); |
---|
318 | link = stringreplacechar(link, '#', ' '); |
---|
319 | pic = stringreplacechar(pic, '#', ' '); |
---|
320 | localname = stringreplacechar(localname, '#', ' '); |
---|
321 | menutitle = stringreplacechar(menutitle, '#', ' '); |
---|
322 | |
---|
323 | tmpstr = ostrcat(tmpstr, title, 1, 0); |
---|
324 | tmpstr = ostrcat(tmpstr, "#", 1, 0); |
---|
325 | tmpstr = ostrcat(tmpstr, link, 1, 0); |
---|
326 | tmpstr = ostrcat(tmpstr, "#", 1, 0); |
---|
327 | tmpstr = ostrcat(tmpstr, pic, 1, 0); |
---|
328 | tmpstr = ostrcat(tmpstr, "#", 1, 0); |
---|
329 | tmpstr = ostrcat(tmpstr, localname, 1, 0); |
---|
330 | tmpstr = ostrcat(tmpstr, "#", 1, 0); |
---|
331 | tmpstr = ostrcat(tmpstr, menutitle, 1, 0); |
---|
332 | tmpstr = ostrcat(tmpstr, "#", 1, 0); |
---|
333 | tmpstr = ostrcat(tmpstr, oitoa(flag), 1, 1); |
---|
334 | |
---|
335 | tmpstr = string_replace_all("\n", "", tmpstr, 1); |
---|
336 | tmpstr = string_replace_all("\r", "", tmpstr, 1); |
---|
337 | |
---|
338 | if(update != NULL) |
---|
339 | { |
---|
340 | freetithekcontent(update); |
---|
341 | addtithekcontent(update, tmpstr, strlen(tmpstr), 1, pay); |
---|
342 | tnode = update; |
---|
343 | } |
---|
344 | else |
---|
345 | tnode = addtithek(tmpstr, strlen(tmpstr), 1, NULL, pay); |
---|
346 | |
---|
347 | free(tmpstr); |
---|
348 | |
---|
349 | return tnode; |
---|
350 | } |
---|
351 | |
---|
352 | int readtithek(const char* filename) |
---|
353 | { |
---|
354 | debug(1000, "in"); |
---|
355 | FILE *fd = NULL; |
---|
356 | char *fileline = NULL; |
---|
357 | int linecount = 0, len = 0, pay = 0; |
---|
358 | struct tithek* last = NULL, *tmplast = NULL; |
---|
359 | |
---|
360 | fileline = malloc(MINMALLOC); |
---|
361 | if(fileline == NULL) |
---|
362 | { |
---|
363 | err("no memory"); |
---|
364 | return 1; |
---|
365 | } |
---|
366 | |
---|
367 | fd = fopen(filename, "r"); |
---|
368 | if(fd == NULL) |
---|
369 | { |
---|
370 | perr("can't open %s", filename); |
---|
371 | free(fileline); |
---|
372 | return 1; |
---|
373 | } |
---|
374 | |
---|
375 | pay = getconfigint("tithek_pay", NULL); |
---|
376 | |
---|
377 | while(fgets(fileline, MINMALLOC, fd) != NULL) |
---|
378 | { |
---|
379 | if(fileline[0] == '\n') |
---|
380 | continue; |
---|
381 | len = strlen(fileline) - 1; |
---|
382 | if(fileline[len] == '\n') |
---|
383 | fileline[len] = '\0'; |
---|
384 | if(fileline[len - 1] == '\r') |
---|
385 | fileline[len - 1] = '\0'; |
---|
386 | |
---|
387 | linecount++; |
---|
388 | |
---|
389 | if(last == NULL) last = tmplast; |
---|
390 | last = addtithek(fileline, len + 2, linecount, last, pay); |
---|
391 | if(last != NULL) tmplast = last; |
---|
392 | } |
---|
393 | |
---|
394 | free(fileline); |
---|
395 | fclose(fd); |
---|
396 | return linecount; |
---|
397 | } |
---|
398 | |
---|
399 | int deltithek(char* link) |
---|
400 | { |
---|
401 | debug(1000, "in"); |
---|
402 | int ret = 1; |
---|
403 | |
---|
404 | struct tithek *node = tithek, *prev = tithek; |
---|
405 | |
---|
406 | while(node != NULL) |
---|
407 | { |
---|
408 | if(ostrcmp(link, node->link) == 0) |
---|
409 | { |
---|
410 | ret = 0; |
---|
411 | if(node == tithek) |
---|
412 | { |
---|
413 | tithek = node->next; |
---|
414 | if(tithek != NULL) |
---|
415 | tithek->prev = NULL; |
---|
416 | } |
---|
417 | else |
---|
418 | { |
---|
419 | prev->next = node->next; |
---|
420 | if(node->next != NULL) |
---|
421 | node->next->prev = prev; |
---|
422 | } |
---|
423 | |
---|
424 | freetithekcontent(node); |
---|
425 | |
---|
426 | free(node); |
---|
427 | node = NULL; |
---|
428 | |
---|
429 | break; |
---|
430 | } |
---|
431 | |
---|
432 | prev = node; |
---|
433 | node = node->next; |
---|
434 | } |
---|
435 | |
---|
436 | debug(1000, "out"); |
---|
437 | return ret; |
---|
438 | } |
---|
439 | |
---|
440 | void freetithek() |
---|
441 | { |
---|
442 | debug(1000, "in"); |
---|
443 | struct tithek *node = tithek, *prev = tithek; |
---|
444 | |
---|
445 | while(node != NULL) |
---|
446 | { |
---|
447 | prev = node; |
---|
448 | node = node->next; |
---|
449 | if(prev != NULL) |
---|
450 | deltithek(prev->link); |
---|
451 | } |
---|
452 | |
---|
453 | debug(1000, "out"); |
---|
454 | } |
---|
455 | |
---|
456 | void tithekdownloadthread(struct stimerthread* timernode, struct download* node, int flag) |
---|
457 | { |
---|
458 | int defpic = 0; |
---|
459 | |
---|
460 | tithekdownloadcount++; |
---|
461 | |
---|
462 | if(node != NULL) |
---|
463 | { |
---|
464 | m_lock(&status.tithekmutex, 20); |
---|
465 | if(file_exist(node->filename)) |
---|
466 | { |
---|
467 | m_unlock(&status.tithekmutex, 20); |
---|
468 | goto end; |
---|
469 | } |
---|
470 | |
---|
471 | FILE *fd; fd = fopen(node->filename, "w"); |
---|
472 | if(fd != NULL) fclose(fd); |
---|
473 | m_unlock(&status.tithekmutex, 20); |
---|
474 | |
---|
475 | gethttpreal(node->host, node->page, node->port, node->filename, node->auth, NULL, 0, NULL, NULL, node->timeout, 0); |
---|
476 | |
---|
477 | if(tithekrun == 0) |
---|
478 | unlink(node->filename); |
---|
479 | else |
---|
480 | { |
---|
481 | //check file size |
---|
482 | /* |
---|
483 | off64_t checkpic = getfilesize(node->filename); |
---|
484 | if(checkpic < 200) defpic = 1; |
---|
485 | */ |
---|
486 | |
---|
487 | //check file is gif or html |
---|
488 | if(defpic == 0) |
---|
489 | { |
---|
490 | char* tmp = NULL; |
---|
491 | tmp = readbintomem(node->filename, 3); |
---|
492 | if(ostrncmp("GIF", tmp, 3) == 0) defpic = 1; //gif |
---|
493 | if(ostrncmp("<", tmp, 1) == 0) defpic = 1; //html |
---|
494 | free(tmp); tmp = NULL; |
---|
495 | } |
---|
496 | |
---|
497 | if(defpic == 1) |
---|
498 | { |
---|
499 | m_lock(&status.tithekmutex, 20); |
---|
500 | unlink(node->filename); |
---|
501 | symlink("/var/usr/local/share/titan/plugins/tithek/default.jpg", node->filename); |
---|
502 | m_unlock(&status.tithekmutex, 20); |
---|
503 | } |
---|
504 | } |
---|
505 | |
---|
506 | end: |
---|
507 | free(node->host); node->host = NULL; |
---|
508 | free(node->page); node->page = NULL; |
---|
509 | free(node->filename); node->filename = NULL; |
---|
510 | free(node->auth); node->auth = NULL; |
---|
511 | } |
---|
512 | |
---|
513 | free(node); node = NULL; |
---|
514 | |
---|
515 | tithekdownloadcount--; |
---|
516 | tithekdownloadrun = 1; |
---|
517 | } |
---|
518 | |
---|
519 | char* tithekdownload(char* link, char* localname, char* pw, int pic, int flag) |
---|
520 | { |
---|
521 | int ret = 1, port = 80, timeout = 10000; |
---|
522 | char* ip = NULL, *pos = NULL, *path = NULL; |
---|
523 | char* tmpstr = NULL, *localfile = NULL; |
---|
524 | |
---|
525 | if(link == NULL) return NULL; |
---|
526 | if(ostrncmp("http://", link, 7)) return NULL; |
---|
527 | |
---|
528 | ip = string_replace("http://", "", (char*)link, 0); |
---|
529 | // tithek security |
---|
530 | ip = string_replace_all("imageshack.us/md/up/grd/", "atemio.dyndns.tv/", ip, 1); |
---|
531 | |
---|
532 | if(ip != NULL) |
---|
533 | pos = strchr(ip, '/'); |
---|
534 | if(pos != NULL) |
---|
535 | { |
---|
536 | pos[0] = '\0'; |
---|
537 | path = pos + 1; |
---|
538 | } |
---|
539 | |
---|
540 | if(ostrstr(ip, ":") != NULL) |
---|
541 | { |
---|
542 | ip = oregex("http://(.*):.*", link); |
---|
543 | port = atoi(oregex("http://.*:(.*)/.*", link)); |
---|
544 | } |
---|
545 | |
---|
546 | tmpstr = ostrcat(path, NULL, 0, 0); |
---|
547 | |
---|
548 | if(flag == 0) |
---|
549 | { |
---|
550 | localfile = ostrcat(TITHEKPATH, "/", 0, 0); |
---|
551 | if(localname == NULL) |
---|
552 | localfile = ostrcat(localfile, basename(tmpstr), 1, 0); |
---|
553 | else |
---|
554 | localfile = ostrcat(localfile, localname, 1, 0); |
---|
555 | } |
---|
556 | else |
---|
557 | { |
---|
558 | localfile = ostrcat(getconfig("rec_streampath", NULL), "/", 0, 0); |
---|
559 | if(localname == NULL) |
---|
560 | localfile = ostrcat(localfile, basename(tmpstr), 1, 0); |
---|
561 | else |
---|
562 | localfile = ostrcat(localfile, localname, 1, 0); |
---|
563 | } |
---|
564 | |
---|
565 | /* |
---|
566 | debug(99, "---------------------------------------"); |
---|
567 | debug(99, "link: %s", link); |
---|
568 | debug(99, "localname: %s", localname); |
---|
569 | debug(99, "---------------------------------------"); |
---|
570 | debug(99, "ip: %s", ip); |
---|
571 | debug(99, "port: %d", port); |
---|
572 | debug(99, "path: %s", path); |
---|
573 | debug(99, "localfile: %s", localfile); |
---|
574 | // debug(99, "pw: %s", pw); |
---|
575 | debug(99, "---------------------------------------"); |
---|
576 | */ |
---|
577 | if(flag == 0) |
---|
578 | { |
---|
579 | if(localfile != NULL && !file_exist(localfile)) |
---|
580 | { |
---|
581 | if(pic == 1) |
---|
582 | { |
---|
583 | if(tithekdownloadcount >= 24) //start max 24 threads |
---|
584 | gethttp(ip, path, port, localfile, pw, timeout, NULL, 0); |
---|
585 | else |
---|
586 | { |
---|
587 | //dnode is freed in thread |
---|
588 | struct download* dnode = calloc(1, sizeof(struct download)); |
---|
589 | if(dnode != NULL) |
---|
590 | { |
---|
591 | dnode->host = ostrcat(ip, NULL, 0, 0); |
---|
592 | dnode->page = ostrcat(path, NULL, 0, 0); |
---|
593 | dnode->port = port; |
---|
594 | dnode->filename = ostrcat(localfile, NULL, 0, 0); |
---|
595 | dnode->auth = ostrcat(pw, NULL, 0, 0); |
---|
596 | dnode->connfd = -1; |
---|
597 | dnode->ret = -1; |
---|
598 | dnode->timeout = timeout; |
---|
599 | addtimer(&tithekdownloadthread, START, 100, 1, (void*)dnode, NULL, NULL); |
---|
600 | } |
---|
601 | } |
---|
602 | } |
---|
603 | else |
---|
604 | gethttp(ip, path, port, localfile, pw, timeout, NULL, 0); |
---|
605 | } |
---|
606 | } |
---|
607 | else |
---|
608 | { |
---|
609 | |
---|
610 | if(localfile != NULL && file_exist(localfile)) |
---|
611 | ret = textbox(_("Message"), _("File exist, overwrite?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0); |
---|
612 | |
---|
613 | if(localfile != NULL && ret == 1) |
---|
614 | screendownload("Download", ip, path, port, localfile, pw, timeout, 0); |
---|
615 | } |
---|
616 | |
---|
617 | free(ip); ip = NULL; |
---|
618 | free(tmpstr); tmpstr = NULL; |
---|
619 | |
---|
620 | return localfile; |
---|
621 | } |
---|
622 | |
---|
623 | int createtithekplay(char* titheklink, struct skin* grid, struct skin* listbox, struct skin* countlabel, int flag) |
---|
624 | { |
---|
625 | int gridbr = 0, posx = 0, count = 0, sumcount = 0, count1 = 0, pagecount = 0, skip = 0; |
---|
626 | int localfile = 0; |
---|
627 | struct skin* tmp = NULL; |
---|
628 | char* tithekfile = NULL; |
---|
629 | char* tmpstr = NULL; |
---|
630 | |
---|
631 | if(!ostrncmp("http://", titheklink, 7)) |
---|
632 | tithekfile = tithekdownload(titheklink, NULL, HTTPAUTH, 0, 0); |
---|
633 | else |
---|
634 | { |
---|
635 | tithekfile = ostrcat(titheklink, NULL, 0, 0); |
---|
636 | localfile = 1; |
---|
637 | } |
---|
638 | |
---|
639 | delmarkedscreennodes(grid, 1); |
---|
640 | freetithek(); |
---|
641 | // if(readtithek(tithekfile) != 0) return 1; |
---|
642 | int linecount = readtithek(tithekfile); |
---|
643 | // if(linecount == 0) return 1; |
---|
644 | |
---|
645 | struct tithek* titheknode = tithek; |
---|
646 | |
---|
647 | int height = 500; |
---|
648 | int width = 590; |
---|
649 | int picheight = 480; |
---|
650 | int picwidth = 570; |
---|
651 | int zcount = 2; |
---|
652 | int fontsize = 25; |
---|
653 | int pcount = 2; |
---|
654 | |
---|
655 | if(getconfigint("tithek_cover", NULL) == 0 || getconfigint("tithek_view", NULL) == 0) |
---|
656 | { |
---|
657 | if(linecount > 2) |
---|
658 | { |
---|
659 | height = 280; |
---|
660 | width = 390; |
---|
661 | picheight = 230; |
---|
662 | picwidth = 370; |
---|
663 | zcount = 3; |
---|
664 | fontsize = 20; |
---|
665 | pcount = 6; |
---|
666 | } |
---|
667 | |
---|
668 | if(linecount > 8) |
---|
669 | { |
---|
670 | height = 180; |
---|
671 | width = 295; |
---|
672 | picheight = 130; |
---|
673 | picwidth = 270; |
---|
674 | zcount = 4; |
---|
675 | fontsize = 18; |
---|
676 | pcount = 12; |
---|
677 | } |
---|
678 | |
---|
679 | if(linecount > 19) |
---|
680 | { |
---|
681 | height = 140; |
---|
682 | width = 235; |
---|
683 | picheight = 90; |
---|
684 | picwidth = 210; |
---|
685 | zcount = 5; |
---|
686 | fontsize = 16; |
---|
687 | pcount = 20; |
---|
688 | } |
---|
689 | |
---|
690 | if(linecount > 25) |
---|
691 | { |
---|
692 | height = 111; |
---|
693 | width = 196; |
---|
694 | picheight = 60; |
---|
695 | picwidth = 150; |
---|
696 | zcount = 6; |
---|
697 | fontsize = 14; |
---|
698 | pcount = 30; |
---|
699 | } |
---|
700 | } |
---|
701 | |
---|
702 | if((getconfigint("tithek_cover", NULL) == 1 && flag == 3) || (getconfigint("tithek_view", NULL) == 1 && flag != 3)) |
---|
703 | { |
---|
704 | height = 500; |
---|
705 | width = 590; |
---|
706 | picheight = 480; |
---|
707 | picwidth = 570; |
---|
708 | zcount = 2; |
---|
709 | fontsize = 25; |
---|
710 | pcount = 2; |
---|
711 | } |
---|
712 | |
---|
713 | if((getconfigint("tithek_cover", NULL) == 2 && flag == 3) || (getconfigint("tithek_view", NULL) == 2 && flag != 3)) |
---|
714 | { |
---|
715 | height = 280; |
---|
716 | width = 390; |
---|
717 | picheight = 230; |
---|
718 | picwidth = 370; |
---|
719 | zcount = 3; |
---|
720 | fontsize = 20; |
---|
721 | pcount = 6; |
---|
722 | } |
---|
723 | |
---|
724 | if((getconfigint("tithek_cover", NULL) == 3 && flag == 3) || (getconfigint("tithek_view", NULL) == 3 && flag != 3)) |
---|
725 | { |
---|
726 | height = 180; |
---|
727 | width = 295; |
---|
728 | picheight = 130; |
---|
729 | picwidth = 270; |
---|
730 | zcount = 4; |
---|
731 | fontsize = 18; |
---|
732 | pcount = 12; |
---|
733 | } |
---|
734 | |
---|
735 | if((getconfigint("tithek_cover", NULL) == 4 && flag == 3) || (getconfigint("tithek_view", NULL) == 4 && flag != 3)) |
---|
736 | { |
---|
737 | height = 140; |
---|
738 | width = 235; |
---|
739 | picheight = 90; |
---|
740 | picwidth = 210; |
---|
741 | zcount = 5; |
---|
742 | fontsize = 16; |
---|
743 | pcount = 20; |
---|
744 | } |
---|
745 | |
---|
746 | if((getconfigint("tithek_cover", NULL) == 5 && flag == 3) || (getconfigint("tithek_view", NULL) == 5 && flag != 3)) |
---|
747 | { |
---|
748 | height = 111; |
---|
749 | width = 196; |
---|
750 | picheight = 60; |
---|
751 | picwidth = 150; |
---|
752 | zcount = 6; |
---|
753 | fontsize = 14; |
---|
754 | pcount = 30; |
---|
755 | } |
---|
756 | |
---|
757 | if(getconfigint("tithek_pic_ratio", NULL) == 1) |
---|
758 | { |
---|
759 | picwidth = 2; |
---|
760 | picheight = 2; |
---|
761 | } |
---|
762 | |
---|
763 | while(titheknode != NULL) |
---|
764 | { |
---|
765 | tmp = addlistbox(grid, listbox, tmp, 1); |
---|
766 | if(tmp != NULL) |
---|
767 | { |
---|
768 | skip = 0; |
---|
769 | sumcount++; |
---|
770 | count++; |
---|
771 | count1++; |
---|
772 | if(gridbr == 0) |
---|
773 | tmp->type = GRIDBR; |
---|
774 | gridbr = 1; |
---|
775 | tmp->wrap = YES; |
---|
776 | |
---|
777 | tmp->picheight = picheight; |
---|
778 | tmp->picwidth = picwidth; |
---|
779 | |
---|
780 | tmp->fontsize = fontsize; |
---|
781 | tmp->height = height; |
---|
782 | tmp->width = width; |
---|
783 | tmp->prozwidth = 0; |
---|
784 | //tmp->bgcol = 0xffffff; |
---|
785 | tmp->bgspace = 1; |
---|
786 | tmp->vspace = 10; |
---|
787 | tmp->hspace = 10; |
---|
788 | tmp->posx = posx; |
---|
789 | //tmp->fontcol = 0x0000ff; |
---|
790 | tmp->halign = CENTER; |
---|
791 | tmp->valign = TEXTBOTTOM; |
---|
792 | changetext(tmp, titheknode->title); |
---|
793 | tmp->handle = (char*)titheknode; |
---|
794 | posx += tmp->width; |
---|
795 | if(count >= zcount) |
---|
796 | { |
---|
797 | count = 0; |
---|
798 | posx = 0; |
---|
799 | gridbr = 0; |
---|
800 | } |
---|
801 | |
---|
802 | if(count1 >= pcount) |
---|
803 | { |
---|
804 | count1 = 0; |
---|
805 | pagecount++; |
---|
806 | skip = 1; |
---|
807 | } |
---|
808 | } |
---|
809 | titheknode = titheknode->next; |
---|
810 | } |
---|
811 | |
---|
812 | if(skip == 0) |
---|
813 | pagecount++; |
---|
814 | |
---|
815 | tmpstr = oitoa(sumcount); |
---|
816 | |
---|
817 | char* tmpstr1 = ostrcat(_("found"), NULL, 0, 0); |
---|
818 | tmpstr1 = ostrcat(tmpstr1, " ", 1, 0); |
---|
819 | tmpstr1 = ostrcat(tmpstr1, tmpstr, 1, 0); |
---|
820 | free(tmpstr); tmpstr = NULL; |
---|
821 | tmpstr1 = ostrcat(tmpstr1, " ", 1, 0); |
---|
822 | tmpstr1 = ostrcat(tmpstr1, _("Results"), 1, 0); |
---|
823 | changetext(countlabel, tmpstr1); |
---|
824 | free(tmpstr1); tmpstr1 = NULL; |
---|
825 | |
---|
826 | if(localfile == 0) |
---|
827 | unlink(tithekfile); |
---|
828 | |
---|
829 | free(tithekfile); tithekfile = NULL; |
---|
830 | return pagecount; |
---|
831 | } |
---|
832 | |
---|
833 | void removefav(char* title, char* link, char* pic, char* localname, char* menutitle, int flag) |
---|
834 | { |
---|
835 | int count = 0, i = 0; |
---|
836 | char* tmpstr = NULL, *tmpstr1 = NULL, *input = NULL; |
---|
837 | struct splitstr* ret = NULL; |
---|
838 | |
---|
839 | input = ostrcat(input, title, 1, 0); |
---|
840 | input = ostrcat(input, "#", 1, 0); |
---|
841 | input = ostrcat(input, link, 1, 0); |
---|
842 | input = ostrcat(input, "#", 1, 0); |
---|
843 | input = ostrcat(input, pic, 1, 0); |
---|
844 | input = ostrcat(input, "#", 1, 0); |
---|
845 | input = ostrcat(input, localname, 1, 0); |
---|
846 | input = ostrcat(input, "#", 1, 0); |
---|
847 | input = ostrcat(input, menutitle, 1, 0); |
---|
848 | input = ostrcat(input, "#", 1, 0); |
---|
849 | input = ostrcat(input, oitoa(flag), 1, 1); |
---|
850 | |
---|
851 | tmpstr = readfiletomem(getconfig("tithek_fav", NULL), 0); |
---|
852 | |
---|
853 | ret = strsplit(tmpstr, "\n", &count); |
---|
854 | |
---|
855 | if(ret != NULL) |
---|
856 | { |
---|
857 | for(i = 0; i < count; i++) |
---|
858 | { |
---|
859 | if(ostrcmp((ret[i]).part, input) != 0) |
---|
860 | { |
---|
861 | tmpstr1 = ostrcat(tmpstr1, ret[i].part, 1, 0); |
---|
862 | tmpstr1 = ostrcat(tmpstr1, "\n", 1, 0); |
---|
863 | } |
---|
864 | else |
---|
865 | printf("remove: %s\n", ret[i].part); |
---|
866 | } |
---|
867 | } |
---|
868 | |
---|
869 | if(tmpstr1 != NULL && strlen(tmpstr1) > 0) |
---|
870 | tmpstr1[strlen(tmpstr1) - 1] = '\0'; |
---|
871 | |
---|
872 | if(tmpstr1 == NULL) |
---|
873 | writesys(getconfig("tithek_fav", NULL), "", 0); |
---|
874 | else |
---|
875 | writesys(getconfig("tithek_fav", NULL), tmpstr1, 0); |
---|
876 | |
---|
877 | free(ret); ret = NULL; |
---|
878 | free(tmpstr); tmpstr = NULL; |
---|
879 | free(tmpstr1); tmpstr1 = NULL; |
---|
880 | free(input); input = NULL; |
---|
881 | } |
---|
882 | |
---|
883 | void addfav(char* title, char* link, char* pic, char* localname, char* menutitle, int flag) |
---|
884 | { |
---|
885 | int count = 0, i = 0; |
---|
886 | char* tmpstr = NULL, *tmpstr1 = NULL, *input = NULL; |
---|
887 | struct splitstr* ret = NULL; |
---|
888 | |
---|
889 | input = ostrcat(input, title, 1, 0); |
---|
890 | input = ostrcat(input, "#", 1, 0); |
---|
891 | input = ostrcat(input, link, 1, 0); |
---|
892 | input = ostrcat(input, "#", 1, 0); |
---|
893 | input = ostrcat(input, pic, 1, 0); |
---|
894 | input = ostrcat(input, "#", 1, 0); |
---|
895 | input = ostrcat(input, localname, 1, 0); |
---|
896 | input = ostrcat(input, "#", 1, 0); |
---|
897 | input = ostrcat(input, menutitle, 1, 0); |
---|
898 | input = ostrcat(input, "#", 1, 0); |
---|
899 | input = ostrcat(input, oitoa(flag), 1, 1); |
---|
900 | // tithek security |
---|
901 | input = string_replace_all("http://atemio.dyndns.tv/", "http://imageshack.us/md/up/grd/", input, 1); |
---|
902 | |
---|
903 | tmpstr1 = ostrcat(tmpstr1, input, 1, 0); |
---|
904 | tmpstr1 = ostrcat(tmpstr1, "\n", 1, 0); |
---|
905 | |
---|
906 | tmpstr = readfiletomem(getconfig("tithek_fav", NULL), 0); |
---|
907 | |
---|
908 | ret = strsplit(tmpstr, "\n", &count); |
---|
909 | |
---|
910 | if(ret != NULL) |
---|
911 | { |
---|
912 | for(i = 0; i < count; i++) |
---|
913 | { |
---|
914 | if(ostrcmp((ret[i]).part, input) != 0) |
---|
915 | { |
---|
916 | tmpstr1 = ostrcat(tmpstr1, ret[i].part, 1, 0); |
---|
917 | tmpstr1 = ostrcat(tmpstr1, "\n", 1, 0); |
---|
918 | } |
---|
919 | } |
---|
920 | } |
---|
921 | |
---|
922 | if(tmpstr1 != NULL && strlen(tmpstr1) > 0) |
---|
923 | tmpstr1[strlen(tmpstr1) - 1] = '\0'; |
---|
924 | |
---|
925 | writesys(getconfig("tithek_fav", NULL), tmpstr1, 0); |
---|
926 | |
---|
927 | free(ret); ret = NULL; |
---|
928 | free(tmpstr); tmpstr = NULL; |
---|
929 | free(tmpstr1); tmpstr1 = NULL; |
---|
930 | free(input); input = NULL; |
---|
931 | } |
---|
932 | |
---|
933 | void cacheplay(char* link, char* filename, int flag) |
---|
934 | { |
---|
935 | struct skin* load = getscreen("loadingproz"); |
---|
936 | struct skin* proztext = getscreennode(load, "proztext"); |
---|
937 | |
---|
938 | drawscreen(load, 0, 0); |
---|
939 | int port = 80, count = 0, mcount = 0; |
---|
940 | off64_t size = 0, msize = 0; |
---|
941 | char* host = NULL, *pos = NULL, *path = NULL, *file = NULL, *tmpstr = NULL; |
---|
942 | host = string_replace("http://", "", (char*)link, 0); |
---|
943 | |
---|
944 | if(host != NULL) |
---|
945 | pos = strchr(host, '/'); |
---|
946 | if(pos != NULL) |
---|
947 | { |
---|
948 | pos[0] = '\0'; |
---|
949 | path = pos + 1; |
---|
950 | } |
---|
951 | |
---|
952 | file = ostrcat(getconfig("rec_streampath", NULL), "/.cache.", 0, 0); |
---|
953 | file = ostrcat(file, filename, 1, 0); |
---|
954 | |
---|
955 | if(ostrstr(host, ":") != NULL) |
---|
956 | { |
---|
957 | host = oregex("http://(.*):.*", link); |
---|
958 | port = atoi(oregex("http://.*:(.*)/.*", link)); |
---|
959 | } |
---|
960 | |
---|
961 | debug(99, "---------------------------------------"); |
---|
962 | debug(99, "link: %s", link); |
---|
963 | debug(99, "---------------------------------------"); |
---|
964 | debug(99, "host: %s", host); |
---|
965 | debug(99, "port: %d", port); |
---|
966 | debug(99, "path: %s", path); |
---|
967 | debug(99, "local: %s", file); |
---|
968 | debug(99, "---------------------------------------"); |
---|
969 | |
---|
970 | |
---|
971 | struct download* dnode = NULL; |
---|
972 | dnode = calloc(1, sizeof(struct download)); |
---|
973 | if(dnode == NULL) |
---|
974 | { |
---|
975 | err("no mem"); |
---|
976 | return; |
---|
977 | } |
---|
978 | dnode->host = host; |
---|
979 | dnode->page = path; |
---|
980 | dnode->port = port; |
---|
981 | dnode->filename = file; |
---|
982 | dnode->auth = NULL; |
---|
983 | dnode->connfd = -1; |
---|
984 | dnode->ret = -1; |
---|
985 | dnode->timeout = 30000; |
---|
986 | |
---|
987 | addtimer(&gethttpstruct, START, 1000, 1, (void*)dnode, NULL, NULL); |
---|
988 | |
---|
989 | if(flag == 1) |
---|
990 | { |
---|
991 | mcount = 120; |
---|
992 | msize = 10485760; |
---|
993 | } |
---|
994 | else if(flag == 2) |
---|
995 | { |
---|
996 | mcount = 240; |
---|
997 | msize = 20971520; |
---|
998 | } |
---|
999 | else if(flag == 3) |
---|
1000 | { |
---|
1001 | mcount = 360; |
---|
1002 | msize = 31457280; |
---|
1003 | } |
---|
1004 | |
---|
1005 | while(count < mcount || size >= msize) |
---|
1006 | { |
---|
1007 | sleep(1); |
---|
1008 | count++; |
---|
1009 | if(file_exist(file)) |
---|
1010 | size = getfilesize(file); |
---|
1011 | |
---|
1012 | int proz = 0; |
---|
1013 | int proz1 = size * 100 / msize; |
---|
1014 | debug(99, "size (%dprozent)", proz1); |
---|
1015 | |
---|
1016 | int proz2 = count * 100 / mcount; |
---|
1017 | debug(99, "time (%dprozent)", proz2); |
---|
1018 | |
---|
1019 | if(proz1 > proz2) |
---|
1020 | proz = proz1; |
---|
1021 | else |
---|
1022 | proz = proz2; |
---|
1023 | |
---|
1024 | debug(99, "cacheing...(%lldkb) (%dprozent)", size / 1024, proz); |
---|
1025 | |
---|
1026 | if(size >= msize) |
---|
1027 | break; |
---|
1028 | if(count >= mcount) |
---|
1029 | break; |
---|
1030 | |
---|
1031 | tmpstr = ostrcat(_("please wait..."), " (", 0, 0); |
---|
1032 | tmpstr = ostrcat(tmpstr, oitoa(proz), 1, 1); |
---|
1033 | tmpstr = ostrcat(tmpstr, "%)", 1, 0); |
---|
1034 | clearscreen(load); |
---|
1035 | changetext(proztext, tmpstr); |
---|
1036 | drawscreen(load, 0, 0); |
---|
1037 | free(tmpstr), tmpstr = NULL; |
---|
1038 | } |
---|
1039 | |
---|
1040 | screenplay(file, filename, 2, 0); |
---|
1041 | sockclose(&dnode->connfd); |
---|
1042 | free(dnode); dnode = NULL; |
---|
1043 | |
---|
1044 | tmpstr = ostrcat(tmpstr, _("Remove Cachefile ?"), 1, 0); |
---|
1045 | tmpstr = ostrcat(tmpstr, "\n\n", 1, 0); |
---|
1046 | tmpstr = ostrcat(tmpstr, file, 1, 0); |
---|
1047 | |
---|
1048 | if(textbox(_("Message"), tmpstr, _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0) == 1) |
---|
1049 | { |
---|
1050 | unlink(file); |
---|
1051 | } |
---|
1052 | free(tmpstr), tmpstr = NULL; |
---|
1053 | free(file), file = NULL; |
---|
1054 | free(host), host = NULL; |
---|
1055 | } |
---|
1056 | |
---|
1057 | void backgrounddl(char* link, char* filename) |
---|
1058 | { |
---|
1059 | int port = 80, ret = 0; |
---|
1060 | char* host = NULL, *pos = NULL, *path = NULL, *file = NULL, *tmpstr = NULL; |
---|
1061 | host = string_replace("http://", "", (char*)link, 0); |
---|
1062 | |
---|
1063 | if(host != NULL) |
---|
1064 | pos = strchr(host, '/'); |
---|
1065 | if(pos != NULL) |
---|
1066 | { |
---|
1067 | pos[0] = '\0'; |
---|
1068 | path = pos + 1; |
---|
1069 | } |
---|
1070 | |
---|
1071 | file = ostrcat(getconfig("rec_streampath", NULL), "/", 0, 0); |
---|
1072 | file = ostrcat(file, filename, 1, 0); |
---|
1073 | |
---|
1074 | if(ostrstr(host, ":") != NULL) |
---|
1075 | { |
---|
1076 | host = oregex("http://(.*):.*", link); |
---|
1077 | port = atoi(oregex("http://.*:(.*)/.*", link)); |
---|
1078 | } |
---|
1079 | |
---|
1080 | debug(99, "---------------------------------------"); |
---|
1081 | debug(99, "link: %s", link); |
---|
1082 | debug(99, "---------------------------------------"); |
---|
1083 | debug(99, "host: %s", host); |
---|
1084 | debug(99, "port: %d", port); |
---|
1085 | debug(99, "path: %s", path); |
---|
1086 | debug(99, "local: %s", file); |
---|
1087 | debug(99, "---------------------------------------"); |
---|
1088 | |
---|
1089 | ret = startbgdownload(host, path, port, file, NULL, 30000, 1); |
---|
1090 | if(ret == 1) |
---|
1091 | textbox(_("Message"), _("Can't start download.\nPlease try later."), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0); |
---|
1092 | |
---|
1093 | free(tmpstr), tmpstr = NULL; |
---|
1094 | free(file), file = NULL; |
---|
1095 | free(host), host = NULL; |
---|
1096 | } |
---|
1097 | |
---|
1098 | void submenu(struct skin* listbox, struct skin* load, char* title) |
---|
1099 | { |
---|
1100 | int flag = 0; |
---|
1101 | if(status.security == 1 || checkbox("WHITEBOX") == 1) |
---|
1102 | { |
---|
1103 | drawscreen(load, 0, 0); |
---|
1104 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
1105 | char* tmpstr1 = NULL; |
---|
1106 | |
---|
1107 | if(((struct tithek*)listbox->select->handle)->flag == 2) |
---|
1108 | { |
---|
1109 | if(tmpstr != NULL) tmpstr1 = ostrcat(tmpstr, NULL, 0, 0); |
---|
1110 | } |
---|
1111 | else if(((struct tithek*)listbox->select->handle)->flag == 4) |
---|
1112 | { |
---|
1113 | if(tmpstr != NULL) tmpstr1 = youtube(tmpstr, NULL, NULL, 1); |
---|
1114 | } |
---|
1115 | else if(((struct tithek*)listbox->select->handle)->flag == 5) |
---|
1116 | { |
---|
1117 | if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://rtl2now.rtl2.de", "rtl2now", 1); |
---|
1118 | } |
---|
1119 | else if(((struct tithek*)listbox->select->handle)->flag == 6) |
---|
1120 | { |
---|
1121 | if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://www.superrtlnow.de", "superrtlnow", 1); |
---|
1122 | } |
---|
1123 | else if(((struct tithek*)listbox->select->handle)->flag == 7) |
---|
1124 | { |
---|
1125 | if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://rtl-now.rtl.de", "rtlnow", 1); |
---|
1126 | } |
---|
1127 | else if(((struct tithek*)listbox->select->handle)->flag == 8) |
---|
1128 | { |
---|
1129 | if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://www.voxnow.de", "voxnow", 1); |
---|
1130 | } |
---|
1131 | else if(((struct tithek*)listbox->select->handle)->flag == 12) |
---|
1132 | { |
---|
1133 | if(tmpstr != NULL) tmpstr1 = myvideo(tmpstr, NULL, NULL, 1); |
---|
1134 | } |
---|
1135 | else if(((struct tithek*)listbox->select->handle)->flag == 14) |
---|
1136 | { |
---|
1137 | if(tmpstr != NULL) tmpstr1 = kinox(tmpstr, NULL, NULL, 1); |
---|
1138 | } |
---|
1139 | else if(((struct tithek*)listbox->select->handle)->flag == 15) |
---|
1140 | { |
---|
1141 | if(tmpstr != NULL) tmpstr1 = kinox(tmpstr, NULL, NULL, 2); |
---|
1142 | } |
---|
1143 | else if(((struct tithek*)listbox->select->handle)->flag == 16) |
---|
1144 | { |
---|
1145 | if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://www.superrtlnow.de", "superrtlnow", 1); |
---|
1146 | } |
---|
1147 | else if(((struct tithek*)listbox->select->handle)->flag == 17) |
---|
1148 | { |
---|
1149 | if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://rtl-now.rtl.de", "rtlnow", 1); |
---|
1150 | } |
---|
1151 | else if(((struct tithek*)listbox->select->handle)->flag == 18) |
---|
1152 | { |
---|
1153 | if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://www.voxnow.de", "voxnow", 1); |
---|
1154 | } |
---|
1155 | else if(((struct tithek*)listbox->select->handle)->flag == 19) |
---|
1156 | { |
---|
1157 | if(tmpstr != NULL) tmpstr1 = rtl2now(tmpstr, "http://rtl2now.rtl2.de", "rtl2now", 1); |
---|
1158 | } |
---|
1159 | else if(((struct tithek*)listbox->select->handle)->flag == 20) |
---|
1160 | { |
---|
1161 | if(tmpstr != NULL) tmpstr1 = kinox(tmpstr, NULL, NULL, 3); |
---|
1162 | } |
---|
1163 | else if(((struct tithek*)listbox->select->handle)->flag == 24) |
---|
1164 | { |
---|
1165 | if(tmpstr != NULL) tmpstr1 = kinox(tmpstr, NULL, NULL, 4); |
---|
1166 | } |
---|
1167 | else if(((struct tithek*)listbox->select->handle)->flag == 25) |
---|
1168 | { |
---|
1169 | if(tmpstr != NULL) tmpstr1 = kinox(tmpstr, NULL, NULL, 5); |
---|
1170 | } |
---|
1171 | else if(((struct tithek*)listbox->select->handle)->flag == 26) |
---|
1172 | { |
---|
1173 | if(tmpstr != NULL) tmpstr1 = kinox(tmpstr, NULL, NULL, 6); |
---|
1174 | } |
---|
1175 | else if(((struct tithek*)listbox->select->handle)->flag == 27) |
---|
1176 | { |
---|
1177 | if(tmpstr != NULL) tmpstr1 = kinox(tmpstr, NULL, NULL, 7); |
---|
1178 | } |
---|
1179 | else if(((struct tithek*)listbox->select->handle)->flag == 38) |
---|
1180 | { |
---|
1181 | if(tmpstr != NULL) tmpstr1 = mlehd(tmpstr); |
---|
1182 | } |
---|
1183 | else if(((struct tithek*)listbox->select->handle)->flag == 41) |
---|
1184 | { |
---|
1185 | if(tmpstr != NULL) tmpstr1 = movie4k(tmpstr); |
---|
1186 | } |
---|
1187 | else if(((struct tithek*)listbox->select->handle)->flag == 42) |
---|
1188 | { |
---|
1189 | if(tmpstr != NULL) tmpstr1 = xvideos(tmpstr); |
---|
1190 | } |
---|
1191 | else if(((struct tithek*)listbox->select->handle)->flag == 43) |
---|
1192 | { |
---|
1193 | if(tmpstr != NULL) tmpstr1 = solarmovie(tmpstr); |
---|
1194 | } |
---|
1195 | else if(((struct tithek*)listbox->select->handle)->flag == 45) |
---|
1196 | { |
---|
1197 | if(tmpstr != NULL) tmpstr1 = ard(tmpstr); |
---|
1198 | } |
---|
1199 | else if(((struct tithek*)listbox->select->handle)->flag == 46) |
---|
1200 | { |
---|
1201 | if(tmpstr != NULL) tmpstr1 = zdf(tmpstr); |
---|
1202 | } |
---|
1203 | else if(((struct tithek*)listbox->select->handle)->flag == 50) |
---|
1204 | { |
---|
1205 | if(tmpstr != NULL) tmpstr1 = beeg(tmpstr); |
---|
1206 | } |
---|
1207 | |
---|
1208 | free(tmpstr); tmpstr = NULL; |
---|
1209 | |
---|
1210 | if(ostrcmp(title, "TiThek - Internet Radio") == 0) |
---|
1211 | flag = 4; |
---|
1212 | |
---|
1213 | if(ostrstr(tmpstr1, "&") != NULL) |
---|
1214 | { |
---|
1215 | printf("change streamurl from: %s\n", tmpstr1); |
---|
1216 | tmpstr1 = string_replace_all("&", "&", tmpstr1, 1); |
---|
1217 | printf("change streamurl to: %s\n", tmpstr1); |
---|
1218 | } |
---|
1219 | |
---|
1220 | if(tmpstr1 != NULL) |
---|
1221 | { |
---|
1222 | char* filename = ostrcat(title, "_", 0, 0); |
---|
1223 | filename = ostrcat(filename, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
1224 | filename = ostrcat(filename, ".mp4", 1, 0); |
---|
1225 | filename = string_replace_all(" ", ".", filename, 1); |
---|
1226 | filename = string_replace_all("-", "_", filename, 1); |
---|
1227 | filename = string_replace_all("._.", "_", filename, 1); |
---|
1228 | debug(99, "filename: %s", filename); |
---|
1229 | |
---|
1230 | char* keyconf = NULL; |
---|
1231 | char* skintitle = "Choice Playback"; |
---|
1232 | struct menulist* mlist = NULL, *mbox = NULL; |
---|
1233 | |
---|
1234 | addmenulist(&mlist, "Streaming Playback (default)", NULL, NULL, 0, 0); |
---|
1235 | |
---|
1236 | if(!ostrncmp("http://", tmpstr1, 7)) |
---|
1237 | { |
---|
1238 | if(flag == 4) |
---|
1239 | { |
---|
1240 | addmenulist(&mlist, "Streaming Playback Caching (0.5MB)", NULL, NULL, 0, 0); |
---|
1241 | addmenulist(&mlist, "Streaming Playback Caching (1MB)", NULL, NULL, 0, 0); |
---|
1242 | } |
---|
1243 | else if(!ostrncmp("http://", tmpstr1, 7)) |
---|
1244 | { |
---|
1245 | // addmenulist(&mlist, "Streaming Playback Caching (1MB)", NULL, NULL, 0, 0); |
---|
1246 | // addmenulist(&mlist, "Streaming Playback Caching (2MB)", NULL, NULL, 0, 0); |
---|
1247 | // addmenulist(&mlist, "Streaming Playback Caching (3MB)", NULL, NULL, 0, 0); |
---|
1248 | // addmenulist(&mlist, "Streaming Playback Caching (4MB)", NULL, NULL, 0, 0); |
---|
1249 | addmenulist(&mlist, "Streaming Playback Caching (5MB)", NULL, NULL, 0, 0); |
---|
1250 | addmenulist(&mlist, "Streaming Playback Caching (7.5MB)", NULL, NULL, 0, 0); |
---|
1251 | addmenulist(&mlist, "Streaming Playback Caching (10MB)", NULL, NULL, 0, 0); |
---|
1252 | if(file_exist(getconfig("rec_streampath", NULL))) |
---|
1253 | { |
---|
1254 | // addmenulist(&mlist, "File Caching Playback (10MB / 120s)", NULL, NULL, 0, 0); |
---|
1255 | // addmenulist(&mlist, "File Caching Playback (20MB / 240s)", NULL, NULL, 0, 0); |
---|
1256 | // addmenulist(&mlist, "File Caching Playback (30MB / 360s)", NULL, NULL, 0, 0); |
---|
1257 | if(status.expertmodus >= 11 || file_exist("/mnt/swapextensions/etc/.codecpack") || file_exist("/var/swap/etc/.codecpack") || file_exist("/var/etc/.codecpack")) |
---|
1258 | { |
---|
1259 | addmenulist(&mlist, "Download Full File", NULL, NULL, 0, 0); |
---|
1260 | addmenulist(&mlist, "Download Full File (background)", NULL, NULL, 0, 0); |
---|
1261 | } |
---|
1262 | } |
---|
1263 | } |
---|
1264 | } |
---|
1265 | mbox = menulistbox(mlist, NULL, skintitle, NULL, NULL, 1, 0); |
---|
1266 | if(mbox != NULL) keyconf = mbox->name; |
---|
1267 | if(ostrcmp(keyconf, "Streaming Playback (default)") == 0) |
---|
1268 | { |
---|
1269 | addconfigtmp("playerbuffersize", "0"); |
---|
1270 | screenplay(tmpstr1, filename, 2, flag); |
---|
1271 | delconfigtmp("playerbuffersize"); |
---|
1272 | } |
---|
1273 | else if(ostrcmp(keyconf, "Streaming Playback Caching (0.5MB)") == 0) |
---|
1274 | { |
---|
1275 | addconfigtmp("playerbuffersize", "524288"); |
---|
1276 | screenplay(tmpstr1, filename, 2, flag); |
---|
1277 | delconfigtmp("playerbuffersize"); |
---|
1278 | } |
---|
1279 | else if(ostrcmp(keyconf, "Streaming Playback Caching (1MB)") == 0) |
---|
1280 | { |
---|
1281 | addconfigtmp("playerbuffersize", "1048576"); |
---|
1282 | screenplay(tmpstr1, filename, 2, flag); |
---|
1283 | delconfigtmp("playerbuffersize"); |
---|
1284 | } |
---|
1285 | else if(ostrcmp(keyconf, "Streaming Playback Caching (2MB)") == 0) |
---|
1286 | { |
---|
1287 | addconfigtmp("playerbuffersize", "2097152"); |
---|
1288 | screenplay(tmpstr1, filename, 2, flag); |
---|
1289 | delconfigtmp("playerbuffersize"); |
---|
1290 | } |
---|
1291 | else if(ostrcmp(keyconf, "Streaming Playback Caching (3MB)") == 0) |
---|
1292 | { |
---|
1293 | addconfigtmp("playerbuffersize", "3145728"); |
---|
1294 | screenplay(tmpstr1, filename, 2, flag); |
---|
1295 | delconfigtmp("playerbuffersize"); |
---|
1296 | } |
---|
1297 | else if(ostrcmp(keyconf, "Streaming Playback Caching (4MB)") == 0) |
---|
1298 | { |
---|
1299 | addconfigtmp("playerbuffersize", "4194304"); |
---|
1300 | screenplay(tmpstr1, filename, 2, flag); |
---|
1301 | delconfigtmp("playerbuffersize"); |
---|
1302 | } |
---|
1303 | else if(ostrcmp(keyconf, "Streaming Playback Caching (5MB)") == 0) |
---|
1304 | { |
---|
1305 | addconfigtmp("playerbuffersize", "5242880"); |
---|
1306 | screenplay(tmpstr1, filename, 2, flag); |
---|
1307 | delconfigtmp("playerbuffersize"); |
---|
1308 | } |
---|
1309 | else if(ostrcmp(keyconf, "Streaming Playback Caching (7.5MB)") == 0) |
---|
1310 | { |
---|
1311 | addconfigtmp("playerbuffersize", "7864320"); |
---|
1312 | screenplay(tmpstr1, filename, 2, flag); |
---|
1313 | delconfigtmp("playerbuffersize"); |
---|
1314 | } |
---|
1315 | else if(ostrcmp(keyconf, "Streaming Playback Caching (10MB)") == 0) |
---|
1316 | { |
---|
1317 | addconfigtmp("playerbuffersize", "10485760"); |
---|
1318 | screenplay(tmpstr1, filename, 2, flag); |
---|
1319 | delconfigtmp("playerbuffersize"); |
---|
1320 | } |
---|
1321 | else if(ostrcmp(keyconf, "File Caching Playback (10MB / 120s)") == 0) |
---|
1322 | { |
---|
1323 | cacheplay(tmpstr1, filename, 1); |
---|
1324 | } |
---|
1325 | else if(ostrcmp(keyconf, "File Caching Playback (20MB / 240s)") == 0) |
---|
1326 | { |
---|
1327 | cacheplay(tmpstr1, filename, 2); |
---|
1328 | } |
---|
1329 | else if(ostrcmp(keyconf, "File Caching Playback (30MB / 360s)") == 0) |
---|
1330 | { |
---|
1331 | cacheplay(tmpstr1, filename, 3); |
---|
1332 | } |
---|
1333 | else if(ostrcmp(keyconf, "Download Full File") == 0) |
---|
1334 | { |
---|
1335 | char* search = textinput("Filename", filename); |
---|
1336 | if(search != NULL) |
---|
1337 | { |
---|
1338 | char* tmpstr2 = tithekdownload(tmpstr1, search, NULL, 0, 1); |
---|
1339 | // drawscreen(grid, 0, 0); |
---|
1340 | free(tmpstr2); tmpstr2 = NULL; |
---|
1341 | |
---|
1342 | if(textbox(_("Message"), _("Start playback"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0) == 1) |
---|
1343 | { |
---|
1344 | tmpstr2 = ostrcat(getconfig("rec_streampath", NULL), "/", 0, 0); |
---|
1345 | tmpstr2 = ostrcat(tmpstr2, search, 1, 0); |
---|
1346 | screenplay(tmpstr2, filename, 2, flag); |
---|
1347 | free(tmpstr2); tmpstr2 = NULL; |
---|
1348 | } |
---|
1349 | } |
---|
1350 | free(search), search = NULL; |
---|
1351 | } |
---|
1352 | else if(ostrcmp(keyconf, "Download Full File (background)") == 0) |
---|
1353 | { |
---|
1354 | char* search = textinput("Filename", filename); |
---|
1355 | if(search != NULL) |
---|
1356 | backgrounddl(tmpstr1, search); |
---|
1357 | free(search), search = NULL; |
---|
1358 | } |
---|
1359 | |
---|
1360 | free(filename), filename = NULL; |
---|
1361 | freemenulist(mlist, 1); mlist = NULL; |
---|
1362 | } |
---|
1363 | else |
---|
1364 | textbox(_("Message"), _("Can't get Streamurl !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0); |
---|
1365 | |
---|
1366 | free(tmpstr1); tmpstr1 = NULL; |
---|
1367 | } |
---|
1368 | else |
---|
1369 | textbox(_("Message"), _("Registration needed, please contact Atemio !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1000, 200, 0, 0); |
---|
1370 | } |
---|
1371 | |
---|
1372 | void screentithekplay(char* titheklink, char* title, int first) |
---|
1373 | { |
---|
1374 | if(!file_exist("/mnt/swapextensions/player")) |
---|
1375 | mkdir("/mnt/swapextensions/player", 0777); |
---|
1376 | |
---|
1377 | char* disclaimer = NULL; |
---|
1378 | disclaimer = ostrcat(disclaimer, "/mnt/swapextensions/player/tithek_disclaimer_accepted", 1, 0); |
---|
1379 | |
---|
1380 | if(!file_exist(disclaimer)) |
---|
1381 | { |
---|
1382 | char* tmpstr = gethttp("atemio.dyndns.tv", "/mediathek/disclaimer.txt", 80, NULL, HTTPAUTH, 5000, NULL, 0); |
---|
1383 | if(textbox(_("TitanNit Tithek disclaimer"), _(tmpstr), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1100, 650, 0, 0) == 1) |
---|
1384 | { |
---|
1385 | writesys(disclaimer, tmpstr, 0); |
---|
1386 | free(tmpstr), tmpstr = NULL; |
---|
1387 | } |
---|
1388 | else |
---|
1389 | { |
---|
1390 | free(tmpstr), tmpstr = NULL; |
---|
1391 | free(disclaimer), disclaimer = NULL; |
---|
1392 | return; |
---|
1393 | } |
---|
1394 | } |
---|
1395 | free(disclaimer), disclaimer = NULL; |
---|
1396 | |
---|
1397 | int rcret = -1, oaktline = 1, oaktpage = -1, ogridcol = 0, pagecount = 0; |
---|
1398 | |
---|
1399 | writesysint("/proc/sys/vm/drop_caches", 3, 0); |
---|
1400 | |
---|
1401 | if(first == 1) |
---|
1402 | { |
---|
1403 | delallfiles("/tmp/tithek", NULL); |
---|
1404 | mkdir("/tmp/tithek", 777); |
---|
1405 | if(status.mcaktiv == 0) |
---|
1406 | { |
---|
1407 | rcret = servicestop(status.aktservice, 1, 1); |
---|
1408 | if(rcret == 1) return; |
---|
1409 | } |
---|
1410 | } |
---|
1411 | |
---|
1412 | struct skin* grid = getscreen("titheklist"); |
---|
1413 | struct skin* listbox = getscreennode(grid, "listbox"); |
---|
1414 | struct skin* countlabel = getscreennode(grid, "countlabel"); |
---|
1415 | struct skin* countpage = getscreennode(grid, "countpage"); |
---|
1416 | struct skin* load = getscreen("loading"); |
---|
1417 | struct skin* tmp = NULL; |
---|
1418 | char* tithekpic = NULL; |
---|
1419 | |
---|
1420 | drawscreen(load, 0, 0); |
---|
1421 | |
---|
1422 | if(titheklink == NULL) return; |
---|
1423 | |
---|
1424 | listbox->aktpage = -1; |
---|
1425 | listbox->aktline = 1; |
---|
1426 | listbox->gridcol = 0; |
---|
1427 | listbox->select = NULL; |
---|
1428 | |
---|
1429 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, first); |
---|
1430 | if(pagecount == 0) return; |
---|
1431 | |
---|
1432 | changetitle(grid, _(title)); |
---|
1433 | drawscreen(grid, 0, 0); |
---|
1434 | addscreenrc(grid, listbox); |
---|
1435 | |
---|
1436 | while(1) |
---|
1437 | { |
---|
1438 | changetitle(grid, _(title)); |
---|
1439 | changetext(countpage, NULL); |
---|
1440 | if(listbox->select != NULL && listbox->select->handle != NULL) |
---|
1441 | { |
---|
1442 | tmp = listbox->select; |
---|
1443 | while(tmp != NULL) |
---|
1444 | { |
---|
1445 | |
---|
1446 | if(tmp->pagecount != listbox->aktpage) break; |
---|
1447 | |
---|
1448 | char* tmpstr = ostrcat(_("Page"), NULL, 0, 0); |
---|
1449 | tmpstr = ostrcat(tmpstr, " ( ", 1, 0); |
---|
1450 | tmpstr = ostrcat(tmpstr, oitoa(tmp->pagecount), 1, 1); |
---|
1451 | tmpstr = ostrcat(tmpstr, " / ", 1, 0); |
---|
1452 | tmpstr = ostrcat(tmpstr, oitoa(pagecount), 1, 1); |
---|
1453 | tmpstr = ostrcat(tmpstr, " )", 1, 0); |
---|
1454 | changetext(countpage, tmpstr); |
---|
1455 | free(tmpstr); tmpstr = NULL; |
---|
1456 | |
---|
1457 | if(tmp->handle != NULL) |
---|
1458 | { |
---|
1459 | tithekpic = tithekdownload(((struct tithek*)tmp->handle)->pic, ((struct tithek*)tmp->handle)->localname, "aXBrLUdaRmg6RkhaVkJHaG56ZnZFaEZERlRHenVpZjU2NzZ6aGpHVFVHQk5Iam0=", 1, 0); |
---|
1460 | |
---|
1461 | /* not working with thread download |
---|
1462 | off64_t checkpic = getfilesize(tithekpic); |
---|
1463 | |
---|
1464 | if(checkpic < 1000) |
---|
1465 | { |
---|
1466 | free(tithekpic); tithekpic = NULL; |
---|
1467 | tithekpic = ostrcat("/var/usr/local/share/titan/plugins/tithek/default.jpg", NULL, 0, 0); |
---|
1468 | } |
---|
1469 | */ |
---|
1470 | |
---|
1471 | changepic(tmp, tithekpic); |
---|
1472 | free(tithekpic); tithekpic = NULL; |
---|
1473 | } |
---|
1474 | tmp = tmp->prev; |
---|
1475 | } |
---|
1476 | tmp = listbox->select; |
---|
1477 | if(tmp != NULL) tmp = tmp->next; |
---|
1478 | while(tmp != NULL) |
---|
1479 | { |
---|
1480 | if(tmp->pagecount != listbox->aktpage) break; |
---|
1481 | if(tmp->handle != NULL) |
---|
1482 | { |
---|
1483 | tithekpic = tithekdownload(((struct tithek*)tmp->handle)->pic, ((struct tithek*)tmp->handle)->localname, "aXBrLUdaRmg6RkhaVkJHaG56ZnZFaEZERlRHenVpZjU2NzZ6aGpHVFVHQk5Iam0=", 1, 0); |
---|
1484 | |
---|
1485 | /* not working with thread download |
---|
1486 | off64_t checkpic = getfilesize(tithekpic); |
---|
1487 | |
---|
1488 | if(checkpic < 1000) |
---|
1489 | { |
---|
1490 | free(tithekpic); tithekpic = NULL; |
---|
1491 | tithekpic = ostrcat("/var/usr/local/share/titan/plugins/tithek/default.jpg", NULL, 0, 0); |
---|
1492 | } |
---|
1493 | */ |
---|
1494 | |
---|
1495 | changepic(tmp, tithekpic); |
---|
1496 | free(tithekpic); tithekpic = NULL; |
---|
1497 | } |
---|
1498 | tmp = tmp->next; |
---|
1499 | } |
---|
1500 | } |
---|
1501 | |
---|
1502 | int count = getfilecount(TITHEKPATH); |
---|
1503 | if(count > 500) |
---|
1504 | delallfiles(TITHEKPATH, ".jpg"); |
---|
1505 | |
---|
1506 | drawscreen(grid, 0, 0); |
---|
1507 | waitrcstart: |
---|
1508 | rcret = waitrc(grid, 2000, 2); |
---|
1509 | |
---|
1510 | if(rcret == RCTIMEOUT) |
---|
1511 | { |
---|
1512 | if(tithekdownloadrun == 1) |
---|
1513 | { |
---|
1514 | tithekdownloadrun = 0; |
---|
1515 | drawscreen(grid, 0, 0); |
---|
1516 | } |
---|
1517 | goto waitrcstart; |
---|
1518 | } |
---|
1519 | |
---|
1520 | if(rcret == getrcconfigint("rcblue", NULL)) |
---|
1521 | { |
---|
1522 | tithekexit = 1; |
---|
1523 | break; |
---|
1524 | } |
---|
1525 | |
---|
1526 | if(rcret == getrcconfigint("rcexit", NULL)) break; |
---|
1527 | if(rcret == getrcconfigint("rcmenu", NULL)) |
---|
1528 | { |
---|
1529 | screentithek_settings(); |
---|
1530 | |
---|
1531 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, first); |
---|
1532 | if(pagecount == 0 || tithekexit == 1) break; |
---|
1533 | |
---|
1534 | listbox->aktpage = -1; |
---|
1535 | listbox->aktline = 1; |
---|
1536 | listbox->gridcol = 1; |
---|
1537 | addscreenrc(grid, listbox); |
---|
1538 | drawscreen(grid, 0, 0); |
---|
1539 | } |
---|
1540 | |
---|
1541 | if(rcret == getrcconfigint("rcred", NULL)) |
---|
1542 | { |
---|
1543 | if(listbox->select != NULL && listbox->select->handle != NULL) |
---|
1544 | { |
---|
1545 | |
---|
1546 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->title, NULL, 0, 0); |
---|
1547 | debug(99, "tmpstr: %s", tmpstr); |
---|
1548 | tmpstr = string_replace("-1 (de)", "", tmpstr, 1); |
---|
1549 | tmpstr = string_replace("-1 (en)", "", tmpstr, 1); |
---|
1550 | tmpstr = string_replace("-1 (\?\?)", "", tmpstr, 1); |
---|
1551 | tmpstr = string_replace("-2 (de)", "", tmpstr, 1); |
---|
1552 | tmpstr = string_replace("-2 (en)", "", tmpstr, 1); |
---|
1553 | tmpstr = string_replace("-2 (\?\?)", "", tmpstr, 1); |
---|
1554 | tmpstr = string_replace("-3 (de)", "", tmpstr, 1); |
---|
1555 | tmpstr = string_replace("-3 (en)", "", tmpstr, 1); |
---|
1556 | tmpstr = string_replace("-3 (\?\?)", "", tmpstr, 1); |
---|
1557 | tmpstr = string_replace(" (de)", "", tmpstr, 1); |
---|
1558 | tmpstr = string_replace(" (en)", "", tmpstr, 1); |
---|
1559 | tmpstr = string_replace(" (\?\?)", "", tmpstr, 1); |
---|
1560 | tmpstr = string_replace_all("_", " ", tmpstr, 1); |
---|
1561 | tmpstr = string_replace_all("-", " ", tmpstr, 1); |
---|
1562 | tmpstr = string_replace_all(".", " ", tmpstr, 1); |
---|
1563 | debug(99, "tmpstr: %s", tmpstr); |
---|
1564 | |
---|
1565 | int check = playrcred(tmpstr, NULL, 1, 0, 99); |
---|
1566 | if(check == 2) |
---|
1567 | { |
---|
1568 | if(kinox_search(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, "KinoX - Search", tmpstr, 0) == 0) |
---|
1569 | { |
---|
1570 | oaktpage = listbox->aktpage; |
---|
1571 | oaktline = listbox->aktline; |
---|
1572 | ogridcol = listbox->gridcol; |
---|
1573 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
1574 | char* tmpstr1 = ostrcat("KinoX - Search", " - ", 0, 0); |
---|
1575 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
1576 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
1577 | free(tmpstr); tmpstr = NULL; |
---|
1578 | free(tmpstr2); tmpstr2 = NULL; |
---|
1579 | |
---|
1580 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); |
---|
1581 | if(pagecount == 0 || tithekexit == 1) break; |
---|
1582 | |
---|
1583 | listbox->aktpage = oaktpage; |
---|
1584 | listbox->aktline = oaktline; |
---|
1585 | listbox->gridcol = ogridcol; |
---|
1586 | addscreenrc(grid, listbox); |
---|
1587 | } |
---|
1588 | } |
---|
1589 | else if(check == 3) |
---|
1590 | { |
---|
1591 | if(solarmovie_search(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, "SolarMovies - Movie - Search", tmpstr, 0) == 0) |
---|
1592 | { |
---|
1593 | oaktpage = listbox->aktpage; |
---|
1594 | oaktline = listbox->aktline; |
---|
1595 | ogridcol = listbox->gridcol; |
---|
1596 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
1597 | char* tmpstr1 = ostrcat("SolarMovies - Movie - Search", " - ", 0, 0); |
---|
1598 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
1599 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
1600 | free(tmpstr); tmpstr = NULL; |
---|
1601 | free(tmpstr2); tmpstr2 = NULL; |
---|
1602 | |
---|
1603 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); |
---|
1604 | if(pagecount == 0 || tithekexit == 1) break; |
---|
1605 | |
---|
1606 | listbox->aktpage = oaktpage; |
---|
1607 | listbox->aktline = oaktline; |
---|
1608 | listbox->gridcol = ogridcol; |
---|
1609 | addscreenrc(grid, listbox); |
---|
1610 | } |
---|
1611 | } |
---|
1612 | else if(check == 4) |
---|
1613 | { |
---|
1614 | if(solarmovie_search(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, "SolarMovies - Tv - Search", tmpstr, 1) == 0) |
---|
1615 | { |
---|
1616 | oaktpage = listbox->aktpage; |
---|
1617 | oaktline = listbox->aktline; |
---|
1618 | ogridcol = listbox->gridcol; |
---|
1619 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
1620 | char* tmpstr1 = ostrcat("SolarMovies - Tv - Search", " - ", 0, 0); |
---|
1621 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
1622 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
1623 | free(tmpstr); tmpstr = NULL; |
---|
1624 | free(tmpstr2); tmpstr2 = NULL; |
---|
1625 | |
---|
1626 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); |
---|
1627 | if(pagecount == 0 || tithekexit == 1) break; |
---|
1628 | |
---|
1629 | listbox->aktpage = oaktpage; |
---|
1630 | listbox->aktline = oaktline; |
---|
1631 | listbox->gridcol = ogridcol; |
---|
1632 | addscreenrc(grid, listbox); |
---|
1633 | } |
---|
1634 | } |
---|
1635 | else if(check == 5) |
---|
1636 | { |
---|
1637 | if(youtube_search(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, "Youtube - Search", tmpstr) == 0) |
---|
1638 | { |
---|
1639 | oaktpage = listbox->aktpage; |
---|
1640 | oaktline = listbox->aktline; |
---|
1641 | ogridcol = listbox->gridcol; |
---|
1642 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
1643 | char* tmpstr1 = ostrcat("Youtube - Search", " - ", 0, 0); |
---|
1644 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
1645 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
1646 | free(tmpstr); tmpstr = NULL; |
---|
1647 | free(tmpstr2); tmpstr2 = NULL; |
---|
1648 | |
---|
1649 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); |
---|
1650 | if(pagecount == 0 || tithekexit == 1) break; |
---|
1651 | |
---|
1652 | listbox->aktpage = oaktpage; |
---|
1653 | listbox->aktline = oaktline; |
---|
1654 | listbox->gridcol = ogridcol; |
---|
1655 | addscreenrc(grid, listbox); |
---|
1656 | } |
---|
1657 | } |
---|
1658 | else if(check == 7) |
---|
1659 | { |
---|
1660 | if(movie4k_search(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, "KinoX - Search", tmpstr, 0) == 0) |
---|
1661 | { |
---|
1662 | oaktpage = listbox->aktpage; |
---|
1663 | oaktline = listbox->aktline; |
---|
1664 | ogridcol = listbox->gridcol; |
---|
1665 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
1666 | char* tmpstr1 = ostrcat("Movie4k - Search", " - ", 0, 0); |
---|
1667 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
1668 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
1669 | free(tmpstr); tmpstr = NULL; |
---|
1670 | free(tmpstr2); tmpstr2 = NULL; |
---|
1671 | |
---|
1672 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); |
---|
1673 | if(pagecount == 0 || tithekexit == 1) break; |
---|
1674 | |
---|
1675 | listbox->aktpage = oaktpage; |
---|
1676 | listbox->aktline = oaktline; |
---|
1677 | listbox->gridcol = ogridcol; |
---|
1678 | addscreenrc(grid, listbox); |
---|
1679 | } |
---|
1680 | } |
---|
1681 | else if((((struct tithek*)listbox->select->handle)->flag == 13)) |
---|
1682 | { |
---|
1683 | if(myvideo_search(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, "MyVideo - Search", tmpstr, 0) == 0) |
---|
1684 | { |
---|
1685 | oaktpage = listbox->aktpage; |
---|
1686 | oaktline = listbox->aktline; |
---|
1687 | ogridcol = listbox->gridcol; |
---|
1688 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
1689 | char* tmpstr1 = ostrcat("MyVideo - Search", " - ", 0, 0); |
---|
1690 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
1691 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
1692 | free(tmpstr); tmpstr = NULL; |
---|
1693 | free(tmpstr2); tmpstr2 = NULL; |
---|
1694 | |
---|
1695 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); |
---|
1696 | if(pagecount == 0 || tithekexit == 1) break; |
---|
1697 | |
---|
1698 | listbox->aktpage = oaktpage; |
---|
1699 | listbox->aktline = oaktline; |
---|
1700 | listbox->gridcol = ogridcol; |
---|
1701 | addscreenrc(grid, listbox); |
---|
1702 | } |
---|
1703 | } |
---|
1704 | |
---|
1705 | free(tmpstr), tmpstr = NULL; |
---|
1706 | } |
---|
1707 | } |
---|
1708 | else if(rcret == getrcconfigint("rcok", NULL)) |
---|
1709 | { |
---|
1710 | if(listbox->select != NULL && listbox->select->handle != NULL) |
---|
1711 | { |
---|
1712 | clearscreen(grid); |
---|
1713 | |
---|
1714 | if((((struct tithek*)listbox->select->handle)->flag == 2) || (((struct tithek*)listbox->select->handle)->flag == 4) || (((struct tithek*)listbox->select->handle)->flag == 5) || (((struct tithek*)listbox->select->handle)->flag == 6) || (((struct tithek*)listbox->select->handle)->flag == 7) || (((struct tithek*)listbox->select->handle)->flag == 8) || (((struct tithek*)listbox->select->handle)->flag == 12) || (((struct tithek*)listbox->select->handle)->flag == 14) || (((struct tithek*)listbox->select->handle)->flag == 15) || (((struct tithek*)listbox->select->handle)->flag == 16) || (((struct tithek*)listbox->select->handle)->flag == 17) || (((struct tithek*)listbox->select->handle)->flag == 18) || (((struct tithek*)listbox->select->handle)->flag == 19) || (((struct tithek*)listbox->select->handle)->flag == 20) || (((struct tithek*)listbox->select->handle)->flag == 24) || (((struct tithek*)listbox->select->handle)->flag == 25) || (((struct tithek*)listbox->select->handle)->flag == 26) || (((struct tithek*)listbox->select->handle)->flag == 27) || (((struct tithek*)listbox->select->handle)->flag == 38) || (((struct tithek*)listbox->select->handle)->flag == 42) || (((struct tithek*)listbox->select->handle)->flag == 45) || (((struct tithek*)listbox->select->handle)->flag == 46) || (((struct tithek*)listbox->select->handle)->flag == 50) || (((struct tithek*)listbox->select->handle)->flag == 41) || (((struct tithek*)listbox->select->handle)->flag == 43)) |
---|
1715 | { |
---|
1716 | submenu(listbox, load, title); |
---|
1717 | drawscreen(grid, 0, 0); |
---|
1718 | } |
---|
1719 | else if((((struct tithek*)listbox->select->handle)->flag == 9) || (((struct tithek*)listbox->select->handle)->flag == 10) || (((struct tithek*)listbox->select->handle)->flag == 11)) |
---|
1720 | { |
---|
1721 | if(youtube_search(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->title, NULL) == 0) |
---|
1722 | { |
---|
1723 | oaktpage = listbox->aktpage; |
---|
1724 | oaktline = listbox->aktline; |
---|
1725 | ogridcol = listbox->gridcol; |
---|
1726 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
1727 | char* tmpstr1 = ostrcat(((struct tithek*)listbox->select->handle)->menutitle, " - ", 0, 0); |
---|
1728 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
1729 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
1730 | free(tmpstr); tmpstr = NULL; |
---|
1731 | free(tmpstr2); tmpstr2 = NULL; |
---|
1732 | |
---|
1733 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); |
---|
1734 | if(pagecount == 0 || tithekexit == 1) break; |
---|
1735 | |
---|
1736 | listbox->aktpage = oaktpage; |
---|
1737 | listbox->aktline = oaktline; |
---|
1738 | listbox->gridcol = ogridcol; |
---|
1739 | addscreenrc(grid, listbox); |
---|
1740 | } |
---|
1741 | } |
---|
1742 | else if(((struct tithek*)listbox->select->handle)->flag == 13) |
---|
1743 | { |
---|
1744 | if(myvideo_search(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->title, NULL, 0) == 0) |
---|
1745 | { |
---|
1746 | oaktpage = listbox->aktpage; |
---|
1747 | oaktline = listbox->aktline; |
---|
1748 | ogridcol = listbox->gridcol; |
---|
1749 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
1750 | char* tmpstr1 = ostrcat(((struct tithek*)listbox->select->handle)->menutitle, " - ", 0, 0); |
---|
1751 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
1752 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
1753 | free(tmpstr); tmpstr = NULL; |
---|
1754 | free(tmpstr2); tmpstr2 = NULL; |
---|
1755 | |
---|
1756 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); |
---|
1757 | if(pagecount == 0 || tithekexit == 1) break; |
---|
1758 | |
---|
1759 | listbox->aktpage = oaktpage; |
---|
1760 | listbox->aktline = oaktline; |
---|
1761 | listbox->gridcol = ogridcol; |
---|
1762 | addscreenrc(grid, listbox); |
---|
1763 | } |
---|
1764 | } |
---|
1765 | else if(((struct tithek*)listbox->select->handle)->flag == 44) |
---|
1766 | { |
---|
1767 | if(myvideo_search(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->title, NULL, 1) == 0) |
---|
1768 | { |
---|
1769 | oaktpage = listbox->aktpage; |
---|
1770 | oaktline = listbox->aktline; |
---|
1771 | ogridcol = listbox->gridcol; |
---|
1772 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
1773 | char* tmpstr1 = ostrcat(((struct tithek*)listbox->select->handle)->menutitle, " - ", 0, 0); |
---|
1774 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
1775 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
1776 | free(tmpstr); tmpstr = NULL; |
---|
1777 | free(tmpstr2); tmpstr2 = NULL; |
---|
1778 | |
---|
1779 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); |
---|
1780 | if(pagecount == 0 || tithekexit == 1) break; |
---|
1781 | |
---|
1782 | listbox->aktpage = oaktpage; |
---|
1783 | listbox->aktline = oaktline; |
---|
1784 | listbox->gridcol = ogridcol; |
---|
1785 | addscreenrc(grid, listbox); |
---|
1786 | } |
---|
1787 | } |
---|
1788 | else if((((struct tithek*)listbox->select->handle)->flag == 21)) |
---|
1789 | { |
---|
1790 | if(kinox_search(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->title, NULL, 0) == 0) |
---|
1791 | { |
---|
1792 | oaktpage = listbox->aktpage; |
---|
1793 | oaktline = listbox->aktline; |
---|
1794 | ogridcol = listbox->gridcol; |
---|
1795 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
1796 | char* tmpstr1 = ostrcat(((struct tithek*)listbox->select->handle)->menutitle, " - ", 0, 0); |
---|
1797 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
1798 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
1799 | free(tmpstr); tmpstr = NULL; |
---|
1800 | free(tmpstr2); tmpstr2 = NULL; |
---|
1801 | |
---|
1802 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); |
---|
1803 | if(pagecount == 0 || tithekexit == 1) break; |
---|
1804 | |
---|
1805 | listbox->aktpage = oaktpage; |
---|
1806 | listbox->aktline = oaktline; |
---|
1807 | listbox->gridcol = ogridcol; |
---|
1808 | addscreenrc(grid, listbox); |
---|
1809 | } |
---|
1810 | } |
---|
1811 | else if((((struct tithek*)listbox->select->handle)->flag == 33)) |
---|
1812 | { |
---|
1813 | if(movie4k_search(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->title, NULL, 0) == 0) |
---|
1814 | { |
---|
1815 | oaktpage = listbox->aktpage; |
---|
1816 | oaktline = listbox->aktline; |
---|
1817 | ogridcol = listbox->gridcol; |
---|
1818 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
1819 | char* tmpstr1 = ostrcat(((struct tithek*)listbox->select->handle)->menutitle, " - ", 0, 0); |
---|
1820 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
1821 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
1822 | free(tmpstr); tmpstr = NULL; |
---|
1823 | free(tmpstr2); tmpstr2 = NULL; |
---|
1824 | |
---|
1825 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); |
---|
1826 | if(pagecount == 0 || tithekexit == 1) break; |
---|
1827 | |
---|
1828 | listbox->aktpage = oaktpage; |
---|
1829 | listbox->aktline = oaktline; |
---|
1830 | listbox->gridcol = ogridcol; |
---|
1831 | addscreenrc(grid, listbox); |
---|
1832 | } |
---|
1833 | } |
---|
1834 | else if(((struct tithek*)listbox->select->handle)->flag == 29) |
---|
1835 | { |
---|
1836 | if(solarmovie_search(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->title, NULL, 0) == 0) |
---|
1837 | { |
---|
1838 | oaktpage = listbox->aktpage; |
---|
1839 | oaktline = listbox->aktline; |
---|
1840 | ogridcol = listbox->gridcol; |
---|
1841 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
1842 | char* tmpstr1 = ostrcat(((struct tithek*)listbox->select->handle)->menutitle, " - ", 0, 0); |
---|
1843 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
1844 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
1845 | free(tmpstr); tmpstr = NULL; |
---|
1846 | free(tmpstr2); tmpstr2 = NULL; |
---|
1847 | |
---|
1848 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); |
---|
1849 | if(pagecount == 0 || tithekexit == 1) break; |
---|
1850 | |
---|
1851 | listbox->aktpage = oaktpage; |
---|
1852 | listbox->aktline = oaktline; |
---|
1853 | listbox->gridcol = ogridcol; |
---|
1854 | addscreenrc(grid, listbox); |
---|
1855 | } |
---|
1856 | } |
---|
1857 | else if(((struct tithek*)listbox->select->handle)->flag == 30) |
---|
1858 | { |
---|
1859 | if(solarmovie_search(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->title, NULL, 1) == 0) |
---|
1860 | { |
---|
1861 | oaktpage = listbox->aktpage; |
---|
1862 | oaktline = listbox->aktline; |
---|
1863 | ogridcol = listbox->gridcol; |
---|
1864 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
1865 | char* tmpstr1 = ostrcat(((struct tithek*)listbox->select->handle)->menutitle, " - ", 0, 0); |
---|
1866 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
1867 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
1868 | free(tmpstr); tmpstr = NULL; |
---|
1869 | free(tmpstr2); tmpstr2 = NULL; |
---|
1870 | |
---|
1871 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); |
---|
1872 | if(pagecount == 0 || tithekexit == 1) break; |
---|
1873 | |
---|
1874 | listbox->aktpage = oaktpage; |
---|
1875 | listbox->aktline = oaktline; |
---|
1876 | listbox->gridcol = ogridcol; |
---|
1877 | addscreenrc(grid, listbox); |
---|
1878 | } |
---|
1879 | } |
---|
1880 | else if((((struct tithek*)listbox->select->handle)->flag == 31)) |
---|
1881 | { |
---|
1882 | if(kinox_search_cast(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->title, NULL) == 0) |
---|
1883 | { |
---|
1884 | oaktpage = listbox->aktpage; |
---|
1885 | oaktline = listbox->aktline; |
---|
1886 | ogridcol = listbox->gridcol; |
---|
1887 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
1888 | char* tmpstr1 = ostrcat(((struct tithek*)listbox->select->handle)->menutitle, " - ", 0, 0); |
---|
1889 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
1890 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
1891 | free(tmpstr); tmpstr = NULL; |
---|
1892 | free(tmpstr2); tmpstr2 = NULL; |
---|
1893 | |
---|
1894 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); |
---|
1895 | if(pagecount == 0 || tithekexit == 1) break; |
---|
1896 | |
---|
1897 | listbox->aktpage = oaktpage; |
---|
1898 | listbox->aktline = oaktline; |
---|
1899 | listbox->gridcol = ogridcol; |
---|
1900 | addscreenrc(grid, listbox); |
---|
1901 | } |
---|
1902 | } |
---|
1903 | else if((((struct tithek*)listbox->select->handle)->flag == 32)) |
---|
1904 | { |
---|
1905 | if(kinox_search(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->title, NULL, 1) == 0) |
---|
1906 | { |
---|
1907 | oaktpage = listbox->aktpage; |
---|
1908 | oaktline = listbox->aktline; |
---|
1909 | ogridcol = listbox->gridcol; |
---|
1910 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
1911 | char* tmpstr1 = ostrcat(((struct tithek*)listbox->select->handle)->menutitle, " - ", 0, 0); |
---|
1912 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
1913 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
1914 | free(tmpstr); tmpstr = NULL; |
---|
1915 | free(tmpstr2); tmpstr2 = NULL; |
---|
1916 | |
---|
1917 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); |
---|
1918 | if(pagecount == 0 || tithekexit == 1) break; |
---|
1919 | |
---|
1920 | listbox->aktpage = oaktpage; |
---|
1921 | listbox->aktline = oaktline; |
---|
1922 | listbox->gridcol = ogridcol; |
---|
1923 | addscreenrc(grid, listbox); |
---|
1924 | } |
---|
1925 | } |
---|
1926 | else if((((struct tithek*)listbox->select->handle)->flag == 33)) |
---|
1927 | { |
---|
1928 | if(movie4k_search(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->title, NULL, 1) == 0) |
---|
1929 | { |
---|
1930 | oaktpage = listbox->aktpage; |
---|
1931 | oaktline = listbox->aktline; |
---|
1932 | ogridcol = listbox->gridcol; |
---|
1933 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
1934 | char* tmpstr1 = ostrcat(((struct tithek*)listbox->select->handle)->menutitle, " - ", 0, 0); |
---|
1935 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
1936 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
1937 | free(tmpstr); tmpstr = NULL; |
---|
1938 | free(tmpstr2); tmpstr2 = NULL; |
---|
1939 | |
---|
1940 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 3); |
---|
1941 | if(pagecount == 0 || tithekexit == 1) break; |
---|
1942 | |
---|
1943 | listbox->aktpage = oaktpage; |
---|
1944 | listbox->aktline = oaktline; |
---|
1945 | listbox->gridcol = ogridcol; |
---|
1946 | addscreenrc(grid, listbox); |
---|
1947 | } |
---|
1948 | } |
---|
1949 | else if((((struct tithek*)listbox->select->handle)->flag == 34) || (((struct tithek*)listbox->select->handle)->flag == 35)) |
---|
1950 | { |
---|
1951 | if(movie4k_hoster(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->title) == 0) |
---|
1952 | { |
---|
1953 | oaktpage = listbox->aktpage; |
---|
1954 | oaktline = listbox->aktline; |
---|
1955 | ogridcol = listbox->gridcol; |
---|
1956 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
1957 | char* tmpstr1 = ostrcat(((struct tithek*)listbox->select->handle)->menutitle, " - ", 0, 0); |
---|
1958 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
1959 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
1960 | free(tmpstr); tmpstr = NULL; |
---|
1961 | free(tmpstr2); tmpstr2 = NULL; |
---|
1962 | |
---|
1963 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); |
---|
1964 | if(pagecount == 0 || tithekexit == 1) break; |
---|
1965 | |
---|
1966 | listbox->aktpage = oaktpage; |
---|
1967 | listbox->aktline = oaktline; |
---|
1968 | listbox->gridcol = ogridcol; |
---|
1969 | addscreenrc(grid, listbox); |
---|
1970 | } |
---|
1971 | } |
---|
1972 | else if((((struct tithek*)listbox->select->handle)->flag == 22)) |
---|
1973 | { |
---|
1974 | if(kinox_hoster(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->title) == 0) |
---|
1975 | { |
---|
1976 | oaktpage = listbox->aktpage; |
---|
1977 | oaktline = listbox->aktline; |
---|
1978 | ogridcol = listbox->gridcol; |
---|
1979 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
1980 | char* tmpstr1 = ostrcat(((struct tithek*)listbox->select->handle)->menutitle, " - ", 0, 0); |
---|
1981 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
1982 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
1983 | free(tmpstr); tmpstr = NULL; |
---|
1984 | free(tmpstr2); tmpstr2 = NULL; |
---|
1985 | |
---|
1986 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 3); |
---|
1987 | if(pagecount == 0 || tithekexit == 1) break; |
---|
1988 | |
---|
1989 | listbox->aktpage = oaktpage; |
---|
1990 | listbox->aktline = oaktline; |
---|
1991 | listbox->gridcol = ogridcol; |
---|
1992 | addscreenrc(grid, listbox); |
---|
1993 | } |
---|
1994 | } |
---|
1995 | else if((((struct tithek*)listbox->select->handle)->flag == 28)) |
---|
1996 | { |
---|
1997 | if(solarmovie_hoster(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->title) == 0) |
---|
1998 | { |
---|
1999 | oaktpage = listbox->aktpage; |
---|
2000 | oaktline = listbox->aktline; |
---|
2001 | ogridcol = listbox->gridcol; |
---|
2002 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
2003 | char* tmpstr1 = ostrcat(((struct tithek*)listbox->select->handle)->menutitle, " - ", 0, 0); |
---|
2004 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
2005 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
2006 | free(tmpstr); tmpstr = NULL; |
---|
2007 | free(tmpstr2); tmpstr2 = NULL; |
---|
2008 | |
---|
2009 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 3); |
---|
2010 | if(pagecount == 0 || tithekexit == 1) break; |
---|
2011 | |
---|
2012 | listbox->aktpage = oaktpage; |
---|
2013 | listbox->aktline = oaktline; |
---|
2014 | listbox->gridcol = ogridcol; |
---|
2015 | addscreenrc(grid, listbox); |
---|
2016 | } |
---|
2017 | } |
---|
2018 | else if((((struct tithek*)listbox->select->handle)->flag == 23)) |
---|
2019 | { |
---|
2020 | if(kinox_hoster_series(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->title) == 0) |
---|
2021 | { |
---|
2022 | oaktpage = listbox->aktpage; |
---|
2023 | oaktline = listbox->aktline; |
---|
2024 | ogridcol = listbox->gridcol; |
---|
2025 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
2026 | char* tmpstr1 = ostrcat(((struct tithek*)listbox->select->handle)->menutitle, " - ", 0, 0); |
---|
2027 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
2028 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
2029 | free(tmpstr); tmpstr = NULL; |
---|
2030 | free(tmpstr2); tmpstr2 = NULL; |
---|
2031 | |
---|
2032 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); |
---|
2033 | if(pagecount == 0 || tithekexit == 1) break; |
---|
2034 | |
---|
2035 | listbox->aktpage = oaktpage; |
---|
2036 | listbox->aktline = oaktline; |
---|
2037 | listbox->gridcol = ogridcol; |
---|
2038 | addscreenrc(grid, listbox); |
---|
2039 | } |
---|
2040 | } |
---|
2041 | else if((((struct tithek*)listbox->select->handle)->flag == 36) || (((struct tithek*)listbox->select->handle)->flag == 37)) |
---|
2042 | { |
---|
2043 | if(movie4k_series(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->title) == 0) |
---|
2044 | { |
---|
2045 | oaktpage = listbox->aktpage; |
---|
2046 | oaktline = listbox->aktline; |
---|
2047 | ogridcol = listbox->gridcol; |
---|
2048 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
2049 | char* tmpstr1 = ostrcat(((struct tithek*)listbox->select->handle)->menutitle, " - ", 0, 0); |
---|
2050 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
2051 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
2052 | free(tmpstr); tmpstr = NULL; |
---|
2053 | free(tmpstr2); tmpstr2 = NULL; |
---|
2054 | |
---|
2055 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); |
---|
2056 | if(pagecount == 0 || tithekexit == 1) break; |
---|
2057 | |
---|
2058 | listbox->aktpage = oaktpage; |
---|
2059 | listbox->aktline = oaktline; |
---|
2060 | listbox->gridcol = ogridcol; |
---|
2061 | addscreenrc(grid, listbox); |
---|
2062 | } |
---|
2063 | } |
---|
2064 | else if((((struct tithek*)listbox->select->handle)->flag == 39)) |
---|
2065 | { |
---|
2066 | if(movie4k_series_listed(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->title) == 0) |
---|
2067 | { |
---|
2068 | oaktpage = listbox->aktpage; |
---|
2069 | oaktline = listbox->aktline; |
---|
2070 | ogridcol = listbox->gridcol; |
---|
2071 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
2072 | char* tmpstr1 = ostrcat(((struct tithek*)listbox->select->handle)->menutitle, " - ", 0, 0); |
---|
2073 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
2074 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
2075 | free(tmpstr); tmpstr = NULL; |
---|
2076 | free(tmpstr2); tmpstr2 = NULL; |
---|
2077 | |
---|
2078 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); |
---|
2079 | if(pagecount == 0 || tithekexit == 1) break; |
---|
2080 | |
---|
2081 | listbox->aktpage = oaktpage; |
---|
2082 | listbox->aktline = oaktline; |
---|
2083 | listbox->gridcol = ogridcol; |
---|
2084 | addscreenrc(grid, listbox); |
---|
2085 | } |
---|
2086 | } |
---|
2087 | else if((((struct tithek*)listbox->select->handle)->flag == 40)) |
---|
2088 | { |
---|
2089 | if(movie4k_hoster_series(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->title) == 0) |
---|
2090 | { |
---|
2091 | oaktpage = listbox->aktpage; |
---|
2092 | oaktline = listbox->aktline; |
---|
2093 | ogridcol = listbox->gridcol; |
---|
2094 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
2095 | char* tmpstr1 = ostrcat(((struct tithek*)listbox->select->handle)->menutitle, " - ", 0, 0); |
---|
2096 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
2097 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
2098 | free(tmpstr); tmpstr = NULL; |
---|
2099 | free(tmpstr2); tmpstr2 = NULL; |
---|
2100 | |
---|
2101 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); |
---|
2102 | if(pagecount == 0 || tithekexit == 1) break; |
---|
2103 | |
---|
2104 | listbox->aktpage = oaktpage; |
---|
2105 | listbox->aktline = oaktline; |
---|
2106 | listbox->gridcol = ogridcol; |
---|
2107 | addscreenrc(grid, listbox); |
---|
2108 | } |
---|
2109 | } |
---|
2110 | else if((((struct tithek*)listbox->select->handle)->flag == 66)) |
---|
2111 | { |
---|
2112 | textbox(_("Message"), _("The hoster is not yet supported !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 5, 0); |
---|
2113 | continue; |
---|
2114 | } |
---|
2115 | else if((((struct tithek*)listbox->select->handle)->flag == 3)) |
---|
2116 | { |
---|
2117 | int pincheck = 0; |
---|
2118 | if(((struct tithek*)listbox->select->handle)->flag == 1000) |
---|
2119 | pincheck = screenpincheck(0, NULL); |
---|
2120 | if(pincheck == 0) |
---|
2121 | { |
---|
2122 | oaktpage = listbox->aktpage; |
---|
2123 | oaktline = listbox->aktline; |
---|
2124 | ogridcol = listbox->gridcol; |
---|
2125 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
2126 | char* tmpstr1 = ostrcat(((struct tithek*)listbox->select->handle)->menutitle, " - ", 0, 0); |
---|
2127 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
2128 | screentithekplay(tmpstr, tmpstr2, 3); |
---|
2129 | free(tmpstr); tmpstr = NULL; |
---|
2130 | free(tmpstr2); tmpstr2 = NULL; |
---|
2131 | |
---|
2132 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); |
---|
2133 | if(pagecount == 0 || tithekexit == 1) break; |
---|
2134 | |
---|
2135 | listbox->aktpage = oaktpage; |
---|
2136 | listbox->aktline = oaktline; |
---|
2137 | listbox->gridcol = ogridcol; |
---|
2138 | addscreenrc(grid, listbox); |
---|
2139 | } |
---|
2140 | } |
---|
2141 | else |
---|
2142 | { |
---|
2143 | int pincheck = 0; |
---|
2144 | if(((struct tithek*)listbox->select->handle)->flag == 1000) |
---|
2145 | pincheck = screenpincheck(0, NULL); |
---|
2146 | if(pincheck == 0) |
---|
2147 | { |
---|
2148 | oaktpage = listbox->aktpage; |
---|
2149 | oaktline = listbox->aktline; |
---|
2150 | ogridcol = listbox->gridcol; |
---|
2151 | char* tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); |
---|
2152 | char* tmpstr1 = ostrcat(((struct tithek*)listbox->select->handle)->menutitle, " - ", 0, 0); |
---|
2153 | char* tmpstr2 = ostrcat(tmpstr1, ((struct tithek*)listbox->select->handle)->title, 1, 0); |
---|
2154 | screentithekplay(tmpstr, tmpstr2, 0); |
---|
2155 | free(tmpstr); tmpstr = NULL; |
---|
2156 | free(tmpstr2); tmpstr2 = NULL; |
---|
2157 | |
---|
2158 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); |
---|
2159 | if(pagecount == 0 || tithekexit == 1) break; |
---|
2160 | |
---|
2161 | listbox->aktpage = oaktpage; |
---|
2162 | listbox->aktline = oaktline; |
---|
2163 | listbox->gridcol = ogridcol; |
---|
2164 | addscreenrc(grid, listbox); |
---|
2165 | } |
---|
2166 | } |
---|
2167 | drawscreen(grid, 0, 0); |
---|
2168 | } |
---|
2169 | } |
---|
2170 | else if(rcret == getrcconfigint("rcyellow", NULL) && ostrcmp(title, "TiThek - Favoriten") == 0) |
---|
2171 | { |
---|
2172 | if(listbox->select != NULL && listbox->select->handle != NULL) |
---|
2173 | { |
---|
2174 | if(textbox(_("Message"), _("Remove this Favorite ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 5, 0) == 1) |
---|
2175 | { |
---|
2176 | removefav(((struct tithek*)listbox->select->handle)->title, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->pic, ((struct tithek*)listbox->select->handle)->localname, ((struct tithek*)listbox->select->handle)->menutitle, ((struct tithek*)listbox->select->handle)->flag); |
---|
2177 | pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); |
---|
2178 | if(pagecount == 0) return; |
---|
2179 | |
---|
2180 | drawscreen(grid, 0, 0); |
---|
2181 | } |
---|
2182 | } |
---|
2183 | } |
---|
2184 | else if(rcret == getrcconfigint("rcgreen", NULL) && ostrcmp(title, "TiThek - Favoriten") != 0) |
---|
2185 | { |
---|
2186 | if(listbox->select != NULL && listbox->select->handle != NULL) |
---|
2187 | { |
---|
2188 | if(textbox(_("Message"), _("Add this link as Favorite ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 5, 0) == 1) |
---|
2189 | { |
---|
2190 | addfav(((struct tithek*)listbox->select->handle)->title, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->pic, ((struct tithek*)listbox->select->handle)->localname, ((struct tithek*)listbox->select->handle)->menutitle, ((struct tithek*)listbox->select->handle)->flag); |
---|
2191 | } |
---|
2192 | } |
---|
2193 | } |
---|
2194 | } |
---|
2195 | |
---|
2196 | delmarkedscreennodes(grid, 1); |
---|
2197 | delownerrc(grid); |
---|
2198 | clearscreen(grid); |
---|
2199 | |
---|
2200 | if(first == 1) |
---|
2201 | { |
---|
2202 | freetithek(); |
---|
2203 | delallfiles("/tmp/tithek", ".list"); |
---|
2204 | if(status.mcaktiv == 0) |
---|
2205 | servicecheckret(servicestart(status.lastservice->channel, NULL, NULL, 0), 0); |
---|
2206 | } |
---|
2207 | } |
---|
2208 | |
---|
2209 | #endif |
---|