source: titan/plugins/tithek/kinox.h @ 24251

Last change on this file since 24251 was 24251, checked in by obi, 10 years ago

[tithek] update

File size: 33.1 KB
Line 
1#ifndef KINOX_H
2#define KINOX_H
3
4// flag 1 = putlocker/sockshare
5// flag 2 = filenuke
6
7char* kinox(char* link)
8{
9        debug(99, "link: %s", link);
10
11        char* id = NULL, *hname = NULL, *streamurl = NULL, *url = NULL;
12
13        int count = 0;
14        struct splitstr* ret1 = NULL;
15        ret1 = strsplit(link, ";", &count);
16        if(ret1 != NULL && count >= 3)
17        {                       
18                url = ostrcat(ret1[0].part, NULL, 0, 0);
19                debug(99, "url: %s", url);
20
21                id = ostrcat(ret1[1].part, NULL, 0, 0);
22                debug(99, "id: %s", id);
23
24                hname = ostrcat(ret1[2].part, NULL, 0, 0);
25                debug(99, "hname: %s", hname);
26               
27                if(ostrcmp(hname, "Sockshare.com") == 0)
28                        streamurl = putlocker("Sockshare.com", id, url);
29                else if(ostrcmp(hname, "Putlocker.com") == 0)
30                        streamurl = putlocker("Sockshare.com", id, url);
31                else if(ostrcmp(hname, "FileNuke.com") == 0)
32                        streamurl = filenuke("FileNuke.com", id, url);
33                else if(ostrcmp(hname, "StreamCloud.eu") == 0)
34                        streamurl = streamcloud("StreamCloud.eu", id, url);
35                else if(ostrcmp(hname, "VidStream.in") == 0)
36                        streamurl = vidstream("VidStream.in", id, url);
37                else if(ostrcmp(hname, "FlashX.tv") == 0)
38                        streamurl = flashx("FlashX.tv", id, url);
39                else if(ostrcmp(hname, "XvidStage.com") == 0)
40                        streamurl = xvidstage("XvidStage.com", id, url);
41                else if(ostrcmp(hname, "NowVideo.eu") == 0)
42                        streamurl = nowvideo("NowVideo.eu", id, url);
43                                       
44                debug(99, "streamurl1: %s", streamurl);
45
46                streamurl = string_replace_all("amp;", "", streamurl, 1);
47                debug(99, "streamurl2: %s", streamurl);
48        }
49        free(ret1), ret1 = NULL;
50
51        free(id), id = NULL;
52        free(hname), hname = NULL;
53        free(url), url = NULL;
54        return streamurl;
55}
56
57int kinox_search(struct skin* grid, struct skin* listbox, struct skin* countlabel, struct skin* load, char* link, char* title, char* searchstr, int flag)
58{
59        int ret = 1;
60        int debuglevel = getconfigint("debuglevel", NULL);
61
62        if(listbox == NULL || listbox->select == NULL || listbox->select->handle == NULL)
63                return ret;
64
65        char* search = NULL;
66        if(flag == 0)
67        {
68                if(searchstr == NULL)
69                        search = textinputhist("Search", " ", "searchhist");
70                else
71                        search = textinputhist("Search", searchstr, "searchhist");
72        }
73        else
74                search = ostrcat(link, NULL, 0, 0);
75
76        if(search != NULL)
77        {
78                drawscreen(load, 0, 0);
79                search = stringreplacechar(search, ' ', '+');
80                char* tmpstr = NULL;
81                char* tmpstr1 = NULL;
82                char* line = NULL;
83                char* pic = NULL;
84                char* title = NULL;     
85                char* lang = NULL;
86                char* langck = NULL;
87                char* from = NULL;
88                char* url = NULL;
89                char* ip = NULL;
90                char* path = NULL;
91                char* menu = NULL;
92
93                ip = ostrcat("kinox.to", NULL, 0, 0);
94                if(flag == 0)
95                        path = ostrcat("Search.html?q=", search, 0, 0);
96                else
97                        path = string_replace_all("http://kinox.to/", "", search, 0);
98               
99                tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0);
100                tmpstr = string_resub("<div id=\"beep\" class=\"beep\"></div>", "</table>", tmpstr, 0);
101
102                titheklog(debuglevel, "/tmp/kinox1_tmpstr", NULL, tmpstr);
103               
104                int count = 0;
105                int incount = 0;
106                int i = 0;
107                struct splitstr* ret1 = NULL;
108                ret1 = strsplit(tmpstr, "\n", &count);
109
110                if(ret1 != NULL)
111                {
112                        int max = count;
113                        for(i = 0; i < max; i++)
114                        {
115                                if(oregex(".*src=\"/gr/sys/lng/(.*)\" alt=\"language\"></td>.*", ret1[i].part) != NULL)
116                                {
117                                        free(langck), langck = NULL;
118                                        langck = oregex(".*src=\"/gr/sys/lng/(.*)\" alt=\"language\"></td>.*", ret1[i].part);
119                                }
120                               
121                                if(oregex(".*<td class=\"Title\"><a href=\"(.*)\" onclick=.*", ret1[i].part) != NULL)
122                                {
123                                        int rcret = waitrc(NULL, 10, 0);
124                                        if(rcret == getrcconfigint("rcexit", NULL)) break;
125                                        free(path), path = NULL;
126                                        path = oregex(".*<td class=\"Title\"><a href=\"(.*)\" onclick=.*", ret1[i].part);
127
128                                        if(ostrstr(langck, "1.png") != NULL)
129                                                lang = ostrcat(lang, " (de)", 1, 0);
130                                        else if(ostrstr(langck, "2.png") != NULL)
131                                                lang = ostrcat(lang, " (en)", 1, 0);
132                                        else
133                                                lang = ostrcat(lang, " (\?\?)", 1, 0);
134                                                                                                                                       
135                                        tmpstr1 = gethttp("kinox.to", path, 80, NULL, NULL, 10000, NULL, 0);
136
137                                        from = ostrcat("<div class=\"Grahpics\"><a href=\"", path, 0, 0);
138                                        from = ostrcat(from, "\"><img src=\"", 1, 0);
139
140                                        pic = string_resub(from, "\" alt=\"", tmpstr1, 0);
141                                       
142                                        if(pic == NULL)
143                                                pic = ostrcat("dummy", NULL, 0, 0);
144
145                                        title = ostrcat(path, NULL, 0, 0);
146                                        title = string_replace_all("/Stream/", "", title, 1);
147                                        title = string_replace_all(".html", "", title, 1);
148                                        title = stringreplacechar(title, '_', ' ');
149                                        title = ostrcat(title , lang, 1, 0);
150
151                                        url = ostrcat("http://kinox.to", path, 0, 0);
152
153                                        debug(99, "---------------------------");
154                                        debug(99, "langck: %s", langck);
155                                        debug(99, "pic: %s", pic);
156                                        debug(99, "title: %s", title);
157                                        debug(99, "url: %s", url);                                     
158                                        debug(99, "---------------------------");
159
160                                        if(url != NULL)
161                                        {
162                                                incount += 1;
163                                                line = ostrcat(line, title, 1, 0);
164                                                line = ostrcat(line, "#", 1, 0);
165                                                line = ostrcat(line, url, 1, 0);
166                                                line = ostrcat(line, "#", 1, 0);
167                                                line = ostrcat(line, pic, 1, 0);
168                                                line = ostrcat(line, "#kinox_search_", 1, 0);
169                                                line = ostrcat(line, oitoa(incount + time(NULL)), 1, 1);
170                                                line = ostrcat(line, ".jpg#KinoX - Search#22\n", 1, 0);
171                                        }
172                                        free(url), url = NULL;
173                                        free(path), path = NULL;
174                                        free(title), title = NULL;
175                                        free(pic), pic = NULL;         
176                                        free(from), from = NULL;
177                                        free(tmpstr1), tmpstr1 = NULL;
178                                        free(lang), lang = NULL;
179                                        free(langck), langck = NULL;   
180                                }
181                        }
182                        free(ret1), ret1 = NULL;
183                        if(line != NULL)
184                        {
185                                menu = ostrcat("/tmp/tithek/kinox.search.list", NULL, 0, 0);
186                                writesys(menu, line, 0);
187                                struct tithek* tnode = (struct tithek*)listbox->select->handle;
188                                createtithek(tnode, tnode->title,  menu, tnode->pic, tnode->localname, tnode->menutitle, tnode->flag);
189                                ret = 0;
190                        }
191
192                }
193                free(tmpstr), tmpstr = NULL;
194                free(ip), ip = NULL;
195        }
196        free(search), search = NULL;
197        return ret;
198}
199
200int kinox_hoster(struct skin* grid, struct skin* listbox, struct skin* countlabel, struct skin* load, char* link, char* title)
201{
202        debug(99, "link: %s", link);
203        int debuglevel = getconfigint("debuglevel", NULL);
204        int ret = 1, series = 0;
205        char* ip = NULL, *pos = NULL, *path = NULL, *tmpstr = NULL, *tmpstr1 = NULL, *tmpstr2 = NULL, *tmpstr3 = NULL, *tmpstr4 = NULL, *tmpstr5 = NULL, *line = NULL, *url = NULL, *url2 = NULL, *url3 = NULL, *url4 = NULL, *pathnew = NULL;
206
207        if(listbox == NULL || listbox->select == NULL || listbox->select->handle == NULL)
208                return ret;
209
210        ip = string_replace("http://", "", (char*)link, 0);
211
212        if(ip != NULL)
213                pos = strchr(ip, '/');
214        if(pos != NULL)
215        {
216                pos[0] = '\0';
217                path = pos + 1;
218        }
219
220        tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0);
221        titheklog(debuglevel, "/tmp/kinox2_tmpstr", NULL, tmpstr);
222       
223        if(tmpstr != NULL)
224        {
225                drawscreen(load, 0, 0);
226                if(ostrstr(tmpstr, "SeriesID") != NULL)
227                {
228                        char* pos1 = NULL;
229                        char* from = NULL;
230                        char* folgen = NULL;
231                        int i;
232
233                        series = 1;
234       
235                        for(i = 1; i < 30; i++)
236                        {
237                                from = ostrcat(from, "<option value=\"", 1, 0);
238                                from = ostrcat(from, oitoa(i), 1, 0);
239                                from = ostrcat(from, "\" rel=", 1, 0);
240                       
241                                pos1 = ostrstr(tmpstr, from);
242                                folgen = getxmlentry(ostrstr(tmpstr, from), "rel=");
243                                printf("Season %d folgen: %s\n",i , folgen);   
244
245                                if(folgen != NULL)
246                                {
247                                        int count = 0;
248                                        int incount = 0;
249                                        int j;
250                                        struct splitstr* ret1 = NULL;
251                                        ret1 = strsplit(folgen, ",", &count);
252                                               
253                                        if(ret1 != NULL && count > 0)
254                                        {
255                                                int max = count + 1;
256                                                for(j = 1; j < max; j++)
257                                                {                                                       
258                                                        incount += 1;
259                                                        line = ostrcat(line, _("Season"), 1, 0);
260                                                        line = ostrcat(line, " ", 1, 0);
261                                                        line = ostrcat(line, oitoa(i), 1, 0);
262                                                        line = ostrcat(line, " ", 1, 0);
263                                                        line = ostrcat(line, _("Episode"), 1, 0);
264                                                        line = ostrcat(line, " ", 1, 0);
265                                                        line = ostrcat(line, oitoa(j), 1, 0);                                   
266                                                        line = ostrcat(line, "#", 1, 0);
267                                                        line = ostrcat(line, link, 1, 0);
268                                                        line = ostrcat(line, ";", 1, 0);
269                                                        line = ostrcat(line, oitoa(i), 1, 0);
270                                                        line = ostrcat(line, ";", 1, 0);
271                                                        line = ostrcat(line, oitoa(j), 1, 0);
272                                                        line = ostrcat(line, "#", 1, 0);
273                                                        line = ostrcat(line, "http://atemio.dyndns.tv/mediathek/menu/s", 1, 0);
274                                                        line = ostrcat(line, oitoa(i), 1, 0);
275                                                        line = ostrcat(line, "e", 1, 0);
276                                                        line = ostrcat(line, oitoa(j), 1, 0);
277                                                        line = ostrcat(line, ".jpg", 1, 0);                                                                                                                             
278                                                        line = ostrcat(line, "#kinox_search_", 1, 0);
279                                                        line = ostrcat(line, oitoa(i), 1, 0);
280                                                        line = ostrcat(line, "e", 1, 0);
281                                                        line = ostrcat(line, oitoa(j), 1, 0);
282                                                        line = ostrcat(line, ".jpg#KinoX - ", 1, 0);
283                                                        line = ostrcat(line, title, 1, 0);
284                                                        line = ostrcat(line, "#23\n", 1, 0);
285                                                }
286                                        }
287                                        free(ret1), ret1 = NULL;
288                                }                               
289                                free(from), from = NULL;
290                                free(folgen), folgen = NULL;
291                        }
292                }
293                else
294                {
295                        tmpstr = string_resub("<ul id=\"HosterList\" class=\"Sortable\">", "</ul>", tmpstr, 0);
296                        titheklog(debuglevel, "/tmp/kinox3_tmpstr", NULL, tmpstr);
297       
298                        int type = 14;
299                        int count = 0;
300                        int incount = 0;
301                        int i;
302                        struct splitstr* ret1 = NULL;
303                        ret1 = strsplit(tmpstr, "\n", &count);
304       
305                        char* hname = NULL;
306                        char* hnr = NULL;
307                        char* hlink = NULL;
308                       
309                        if(ret1 != NULL && count > 0)
310                        {
311                                int max = count;
312                                for(i = 0; i < max; i++)
313                                {
314                                        hnr = string_resub("<li id=\"Hoster_", "\"", ret1[i].part, 0);
315                                        hlink = string_resub("rel=\"", "\">", ret1[i].part, 0);
316                                        hlink = string_replace_all("amp;", "", hlink, 1);
317       
318                                        hname = string_resub("<div class=\"Named\">", "</div>", ret1[i].part, 0);
319                                        pathnew = ostrcat("/aGET/Mirror/", hlink, 0, 0);
320
321                                        titheklog(debuglevel, "/tmp/kinox4_pathnew1", hname, pathnew);
322                                       
323                                        tmpstr1 = gethttp("kinox.to", pathnew, 80, NULL, NULL, 10000, NULL, 0);
324                                        free(pathnew), pathnew = NULL;
325
326                                        titheklog(debuglevel, "/tmp/kinox5_tmpstr1", hname, tmpstr1);
327
328                                        tmpstr1 = string_replace_all("\\", "", tmpstr1, 1);
329                                        tmpstr1 = string_resub("<a href=\"", "\"", tmpstr1, 0);
330       
331                                        url = ostrcat(tmpstr1, NULL, 0, 0);
332////////////////
333                                        free(pathnew), pathnew = NULL;
334                                        pathnew = ostrcat("/aGET/Mirror/", hlink, 0, 0);
335                                        pathnew = ostrcat(pathnew, "&Part=2", 1, 0);
336
337                                        titheklog(debuglevel, "/tmp/kinox6_pathnew2", hname, pathnew);
338                                       
339                                        tmpstr3 = gethttp("kinox.to", pathnew, 80, NULL, NULL, 10000, NULL, 0);
340                                        free(pathnew), pathnew = NULL;
341
342                                        titheklog(debuglevel, "/tmp/kinox7_tmpstr3", hname, tmpstr3);
343
344                                        tmpstr3 = string_replace_all("\\", "", tmpstr3, 1);
345                                        tmpstr3 = string_resub("<a href=\"", "\"", tmpstr3, 0);
346                                       
347                                        url2 = ostrcat(tmpstr3, NULL, 0, 0);
348////////////////
349                                        free(pathnew), pathnew = NULL;
350                                        pathnew = ostrcat("/aGET/Mirror/", hlink, 0, 0);
351                                        pathnew = ostrcat(pathnew, "&Part=3", 1, 0);
352
353                                        titheklog(debuglevel, "/tmp/kinox6_pathnew3", hname, pathnew);
354                                       
355                                        tmpstr4 = gethttp("kinox.to", pathnew, 80, NULL, NULL, 10000, NULL, 0);
356                                        free(pathnew), pathnew = NULL;
357
358                                        titheklog(debuglevel, "/tmp/kinox7_tmpstr4", hname, tmpstr4);
359
360                                        tmpstr4 = string_replace_all("\\", "", tmpstr4, 1);
361                                        tmpstr4 = string_resub("<a href=\"", "\"", tmpstr4, 0);
362                                       
363                                        url3 = ostrcat(tmpstr4, NULL, 0, 0);
364////////////////
365                                        free(pathnew), pathnew = NULL;
366                                        pathnew = ostrcat("/aGET/Mirror/", hlink, 0, 0);
367                                        pathnew = ostrcat(pathnew, "&Part=4", 1, 0);
368
369                                        titheklog(debuglevel, "/tmp/kinox6_pathnew4", hname, pathnew);
370                                       
371                                        tmpstr5 = gethttp("kinox.to", pathnew, 80, NULL, NULL, 10000, NULL, 0);
372                                        free(pathnew), pathnew = NULL;
373
374                                        titheklog(debuglevel, "/tmp/kinox7_tmpstr5", hname, tmpstr5);
375
376                                        tmpstr5 = string_replace_all("\\", "", tmpstr5, 1);
377                                        tmpstr5 = string_resub("<a href=\"", "\"", tmpstr5, 0);
378                                       
379                                        url4 = ostrcat(tmpstr5, NULL, 0, 0);
380////////////////
381                                        type = 14;
382                       
383                                        int count2 = 0;
384                                        struct splitstr* ret2 = NULL;
385                                        ret2 = strsplit(tmpstr1, "/", &count2);
386                       
387                                        if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Sockshare.com") == 0)
388                                                tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
389                                        else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Putlocker.com") == 0)
390                                                tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
391                                        else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "FileNuke.com") == 0)
392                                                tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
393                                        else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "StreamCloud.eu") == 0)
394                                                tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
395                                        else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "VidStream.in") == 0)
396                                                tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
397                                        else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "FlashX.tv") == 0)
398                                                tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
399                                        else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "PrimeShare.tv") == 0)
400                                                tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
401                                        else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "XvidStage.com") == 0)
402                                                tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
403                                        else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Vidxden.com (DivX)") == 0)
404                                                tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
405                                        else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "NowVideo.eu") == 0)
406                                                tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
407                                        else
408                                        {
409                                                tmpstr2 = ostrcat("unknown", NULL, 0, 0);
410                                                hname = ostrcat(hname, " (coming soon)", 1, 0);
411                                                type = 66;
412                                        }
413                                               
414                                        free(ret2), ret2 = NULL;
415
416                                        debug(99, "-------------------------------");
417                                        if(ostrcmp(url, url2) != 0)
418                                        {
419                                                debug(99, "hname: %s (Part1) url: %s id: %s", hname, url, tmpstr2);
420                                        }
421                                        else
422                                        {
423                                                debug(99, "hname: %s url: %s id: %s", hname, url, tmpstr2);
424                                        }
425                                       
426                                        incount += 1;
427                                        line = ostrcat(line, hname, 1, 0);
428                                        if(ostrcmp(url, url2) != 0)
429                                                line = ostrcat(line, " (Part1)", 1, 0);                                 
430                                        line = ostrcat(line, "#", 1, 0);
431                                        line = ostrcat(line, url, 1, 0);
432                                        line = ostrcat(line, ";", 1, 0);
433                                        line = ostrcat(line, tmpstr2, 1, 0);
434                                        line = ostrcat(line, ";", 1, 0);                               
435                                        line = ostrcat(line, hname, 1, 0);
436                                        line = ostrcat(line, "#", 1, 0);
437                                        line = ostrcat(line, "http://atemio.dyndns.tv/mediathek/menu/", 1, 0);
438                                        line = ostrcat(line, hname, 1, 0);
439                                        line = ostrcat(line, ".jpg#kinox_", 1, 0);
440                                        line = ostrcat(line, hname, 1, 0);
441                                        line = ostrcat(line, ".jpg#KinoX - ", 1, 0);
442                                        line = ostrcat(line, title, 1, 0);
443                                        line = ostrcat(line, "#", 1, 0);
444                                        line = ostrcat(line, oitoa(type), 1, 0);
445                                        line = ostrcat(line, "\n", 1, 0);
446
447                                        if(ostrcmp(url, url2) != 0)
448                                        {
449                                                free(tmpstr2), tmpstr2 = NULL;
450                                                free(hname), hname = NULL;
451                                                hname = string_resub("<div class=\"Named\">", "</div>", ret1[i].part, 0);
452                                                type = 14;
453                                                int count2 = 0;
454                                                struct splitstr* ret2 = NULL;
455                                                ret2 = strsplit(tmpstr3, "/", &count2);
456                               
457                                                if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Sockshare.com") == 0)
458                                                        tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
459                                                else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Putlocker.com") == 0)
460                                                        tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
461                                                else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "FileNuke.com") == 0)
462                                                        tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
463                                                else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "StreamCloud.eu") == 0)
464                                                        tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
465                                                else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "VidStream.in") == 0)
466                                                        tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
467                                                else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "FlashX.tv") == 0)
468                                                        tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
469                                                else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "PrimeShare.tv") == 0)
470                                                        tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
471                                                else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "XvidStage.com") == 0)
472                                                        tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
473                                                else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Vidxden.com (DivX)") == 0)
474                                                        tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
475                                                else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "NowVideo.eu") == 0)
476                                                        tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
477                                                else
478                                                {
479                                                        tmpstr2 = ostrcat("unknown", NULL, 0, 0);
480                                                        hname = ostrcat(hname, " (coming soon)", 1, 0);
481                                                        type = 66;
482                                                }
483                                                       
484                                                free(ret2), ret2 = NULL;
485
486                                                       
487                                                debug(99, "-------------------------------");
488                                                debug(99, "hname: %s (Part2) url: %s id: %s", hname, url2, tmpstr2);
489                                                                                       
490                                                incount += 1;
491                                                line = ostrcat(line, hname, 1, 0);
492                                                line = ostrcat(line, " (Part2)", 1, 0);                                 
493                                                line = ostrcat(line, "#", 1, 0);
494                                                line = ostrcat(line, url2, 1, 0);
495                                                line = ostrcat(line, ";", 1, 0);
496                                                line = ostrcat(line, tmpstr2, 1, 0);
497                                                line = ostrcat(line, ";", 1, 0);                               
498                                                line = ostrcat(line, hname, 1, 0);
499                                                line = ostrcat(line, "#", 1, 0);
500                                                line = ostrcat(line, "http://atemio.dyndns.tv/mediathek/menu/", 1, 0);
501                                                line = ostrcat(line, hname, 1, 0);
502                                                line = ostrcat(line, ".jpg#kinox_", 1, 0);
503                                                line = ostrcat(line, hname, 1, 0);
504                                                line = ostrcat(line, ".jpg#KinoX - ", 1, 0);
505                                                line = ostrcat(line, title, 1, 0);
506                                                line = ostrcat(line, "#", 1, 0);
507                                                line = ostrcat(line, oitoa(type), 1, 0);
508                                                line = ostrcat(line, "\n", 1, 0);
509                                                free(tmpstr2), tmpstr2 = NULL;
510                                        }
511
512                                        if(ostrcmp(url, url3) != 0 && ostrcmp(url2, url3) != 0)
513                                        {
514                                                free(tmpstr2), tmpstr2 = NULL;
515                                                free(hname), hname = NULL;
516                                                hname = string_resub("<div class=\"Named\">", "</div>", ret1[i].part, 0);
517                                                type = 14;
518                                                int count2 = 0;
519                                                struct splitstr* ret2 = NULL;
520                                                ret2 = strsplit(tmpstr4, "/", &count2);
521                               
522                                                if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Sockshare.com") == 0)
523                                                        tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
524                                                else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Putlocker.com") == 0)
525                                                        tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
526                                                else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "FileNuke.com") == 0)
527                                                        tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
528                                                else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "StreamCloud.eu") == 0)
529                                                        tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
530                                                else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "VidStream.in") == 0)
531                                                        tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
532                                                else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "FlashX.tv") == 0)
533                                                        tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
534                                                else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "PrimeShare.tv") == 0)
535                                                        tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
536                                                else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "XvidStage.com") == 0)
537                                                        tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
538                                                else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Vidxden.com (DivX)") == 0)
539                                                        tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
540                                                else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "NowVideo.eu") == 0)
541                                                        tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
542                                                else
543                                                {
544                                                        tmpstr2 = ostrcat("unknown", NULL, 0, 0);
545                                                        hname = ostrcat(hname, " (coming soon)", 1, 0);
546                                                        type = 66;
547                                                }
548                                                       
549                                                free(ret2), ret2 = NULL;
550
551                                                       
552
553                                                debug(99, "-------------------------------");
554                                                debug(99, "hname: %s (Part3) url: %s id: %s", hname, url3, tmpstr2);
555                                                                                       
556                                                incount += 1;
557                                                line = ostrcat(line, hname, 1, 0);
558                                                line = ostrcat(line, " (Part3)", 1, 0);                                 
559                                                line = ostrcat(line, "#", 1, 0);
560                                                line = ostrcat(line, url3, 1, 0);
561                                                line = ostrcat(line, ";", 1, 0);
562                                                line = ostrcat(line, tmpstr2, 1, 0);
563                                                line = ostrcat(line, ";", 1, 0);                               
564                                                line = ostrcat(line, hname, 1, 0);
565                                                line = ostrcat(line, "#", 1, 0);
566                                                line = ostrcat(line, "http://atemio.dyndns.tv/mediathek/menu/", 1, 0);
567                                                line = ostrcat(line, hname, 1, 0);
568                                                line = ostrcat(line, ".jpg#kinox_", 1, 0);
569                                                line = ostrcat(line, hname, 1, 0);
570                                                line = ostrcat(line, ".jpg#KinoX - ", 1, 0);
571                                                line = ostrcat(line, title, 1, 0);
572                                                line = ostrcat(line, "#", 1, 0);
573                                                line = ostrcat(line, oitoa(type), 1, 0);
574                                                line = ostrcat(line, "\n", 1, 0);
575                                                free(tmpstr2), tmpstr2 = NULL;
576                                        }
577
578                                        if(ostrcmp(url, url4) != 0 && ostrcmp(url2, url4) != 0 && ostrcmp(url3, url4) != 0)
579                                        {
580                                                free(tmpstr2), tmpstr2 = NULL;
581                                                free(hname), hname = NULL;
582                                                hname = string_resub("<div class=\"Named\">", "</div>", ret1[i].part, 0);
583                                                type = 14;
584                                                int count2 = 0;
585                                                struct splitstr* ret2 = NULL;
586                                                ret2 = strsplit(tmpstr5, "/", &count2);
587                               
588                                                if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Sockshare.com") == 0)
589                                                        tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
590                                                else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Putlocker.com") == 0)
591                                                        tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
592                                                else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "FileNuke.com") == 0)
593                                                        tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
594                                                else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "StreamCloud.eu") == 0)
595                                                        tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
596                                                else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "VidStream.in") == 0)
597                                                        tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
598                                                else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "FlashX.tv") == 0)
599                                                        tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
600                                                else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "PrimeShare.tv") == 0)
601                                                        tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
602                                                else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "XvidStage.com") == 0)
603                                                        tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
604                                                else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Vidxden.com (DivX)") == 0)
605                                                        tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
606                                                else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "NowVideo.eu") == 0)
607                                                        tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
608                                                else
609                                                {
610                                                        tmpstr2 = ostrcat("unknown", NULL, 0, 0);
611                                                        hname = ostrcat(hname, " (coming soon)", 1, 0);
612                                                        type = 66;
613                                                }
614                                                       
615                                                free(ret2), ret2 = NULL;
616                                                       
617
618                                                debug(99, "-------------------------------");
619                                                debug(99, "hname: %s (Part4) url: %s id: %s", hname, url4, tmpstr2);
620                                                                                       
621                                                incount += 1;
622                                                line = ostrcat(line, hname, 1, 0);
623                                                line = ostrcat(line, " (Part4)", 1, 0);                                 
624                                                line = ostrcat(line, "#", 1, 0);
625                                                line = ostrcat(line, url4, 1, 0);
626                                                line = ostrcat(line, ";", 1, 0);
627                                                line = ostrcat(line, tmpstr2, 1, 0);
628                                                line = ostrcat(line, ";", 1, 0);                               
629                                                line = ostrcat(line, hname, 1, 0);
630                                                line = ostrcat(line, "#", 1, 0);
631                                                line = ostrcat(line, "http://atemio.dyndns.tv/mediathek/menu/", 1, 0);
632                                                line = ostrcat(line, hname, 1, 0);
633                                                line = ostrcat(line, ".jpg#kinox_", 1, 0);
634                                                line = ostrcat(line, hname, 1, 0);
635                                                line = ostrcat(line, ".jpg#KinoX - ", 1, 0);
636                                                line = ostrcat(line, title, 1, 0);
637                                                line = ostrcat(line, "#", 1, 0);
638                                                line = ostrcat(line, oitoa(type), 1, 0);
639                                                line = ostrcat(line, "\n", 1, 0);
640                                                free(tmpstr2), tmpstr2 = NULL;
641                                        }
642                                       
643                                        free(tmpstr1), tmpstr1 = NULL;
644                                        free(tmpstr2), tmpstr2 = NULL;
645                                        free(tmpstr3), tmpstr3 = NULL;
646                                        free(tmpstr4), tmpstr4 = NULL;
647                                        free(tmpstr5), tmpstr5 = NULL;
648                                        free(hname), hname = NULL;
649                                        free(hnr), hnr = NULL;
650                                        free(hlink), hlink = NULL;                                                                             
651                                        free(url), url = NULL;
652                                        free(url2), url2 = NULL;
653                                        free(url3), url3 = NULL;
654                                        free(url4), url4 = NULL;
655                                        free(pathnew), pathnew = NULL;
656                                }
657                        }
658                        free(ret1), ret1 = NULL;
659                }
660        }
661        free(tmpstr), tmpstr = NULL;   
662
663        if(line != NULL)
664        {
665                if(series == 0)
666                        tmpstr = ostrcat("/tmp/tithek/kinox.hoster.list", NULL, 0, 0);
667                else
668                        tmpstr = ostrcat("/tmp/tithek/kinox.hoster.ser.list", NULL, 0, 0);
669                writesys(tmpstr, line, 0);
670
671                titheklog(debuglevel, "/tmp/kinox8_line", NULL, line);
672                                       
673                struct tithek* tnode = (struct tithek*)listbox->select->handle;
674                createtithek(tnode, tnode->title,  tmpstr, tnode->pic, tnode->localname, tnode->menutitle, tnode->flag);
675                ret = 0;
676        }
677
678        return ret;
679}
680
681int kinox_hoster_series(struct skin* grid, struct skin* listbox, struct skin* countlabel, struct skin* load, char* link, char* title)
682{
683        debug(99, "link: %s", link);
684        int debuglevel = getconfigint("debuglevel", NULL);
685        int ret = 1;
686        char* ip = NULL, *pathnew = NULL, *seriesid = NULL, *searchname = NULL, *url = NULL, *session = NULL, *episode = NULL, *pos = NULL, *path = NULL, *tmpstr = NULL, *tmpstr1 = NULL, *tmpstr2 = NULL, *line = NULL;               
687
688        if(listbox == NULL || listbox->select == NULL || listbox->select->handle == NULL)
689                return ret;
690
691        int count0 = 0;
692        struct splitstr* ret0 = NULL;
693        ret0 = strsplit(link, ";", &count0);
694        if(ret0 != NULL && count0 >= 3)
695        {
696                url = ostrcat(url, ret0[0].part, 1, 0);
697                debug(99, "url: %s", url);
698
699                session = ostrcat(session, ret0[1].part, 1, 0);
700                debug(99, "Season: %s", session);
701
702                episode = ostrcat(episode, ret0[2].part, 1, 0);
703                debug(99, "episode: %s", episode);
704
705                searchname = ostrcat(searchname, ret0[0].part, 1, 0);
706                searchname = string_replace("http://kinox.to//Stream/", "", searchname, 0);
707                searchname = string_replace("http://kinox.to/Stream/", "", searchname, 0);
708                searchname = string_replace(".html", "", searchname, 0);
709                debug(99, "searchname: %s", searchname);
710        }
711        free(ret0), ret0 = NULL;
712
713        ip = string_replace("http://", "", url, 0);
714
715        if(ip != NULL)
716                pos = strchr(ip, '/');
717        if(pos != NULL)
718        {
719                pos[0] = '\0';
720                path = pos + 1;
721        }
722
723        tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0);
724
725        if(tmpstr != NULL)
726        {
727                drawscreen(load, 0, 0);
728               
729                seriesid = string_resub("SeriesID=", "\"", tmpstr, 0);
730                debug(99, "seriesid: %s", seriesid);
731                       
732                pathnew = ostrcat("/aGET/MirrorByEpisode/&?Addr=", searchname, 0, 0);
733                pathnew = ostrcat(pathnew, "&SeriesID=", 1, 0);
734                pathnew = ostrcat(pathnew, seriesid, 1, 0);
735                pathnew = ostrcat(pathnew, "&Season=", 1, 0);
736                pathnew = ostrcat(pathnew, session, 1, 0);
737                pathnew = ostrcat(pathnew, "&Episode=", 1, 0);
738                pathnew = ostrcat(pathnew, episode, 1, 0);
739                debug(99, "pathnew: %s", pathnew);
740       
741                free(tmpstr), tmpstr = NULL;
742                tmpstr = gethttp("kinox.to", pathnew, 80, NULL, NULL, 10000, NULL, 0);
743                free(pathnew), pathnew = NULL;
744       
745                if(tmpstr != NULL)
746                {
747                        tmpstr = string_resub("<ul id=\"HosterList\" class=\"Sortable\">", "</ul>", tmpstr, 0);
748               
749                        int type = 14;
750                        int count = 0;
751                        int incount = 0;
752                        int i;
753                        struct splitstr* ret1 = NULL;
754                        ret1 = strsplit(tmpstr, "\n", &count);
755               
756                        char* hname = NULL;
757                        char* hnr = NULL;
758                        char* hlink = NULL;
759                       
760                        if(ret1 != NULL && count > 0)
761                        {
762                                int max = count;
763                                for(i = 0; i < max; i++)
764                                {
765                                        hnr = string_resub("<li id=\"Hoster_", "\"", ret1[i].part, 0);
766                                        hlink = string_resub("rel=\"", "\">", ret1[i].part, 0);
767                                        hlink = string_replace_all("amp;", "", hlink, 1);
768                                        hname = string_resub("<div class=\"Named\">", "</div>", ret1[i].part, 0);
769
770                                        hlink = string_replace("http://kinox.to//Stream/", "", hlink, 1);                                       
771                                        hlink = string_replace("http://kinox.to/Stream/", "", hlink, 1);
772                                                                               
773                                        pathnew = ostrcat("/aGET/Mirror/", hlink, 0, 0);
774                                        debug(99, "pathnew: %s", pathnew);
775       
776                                        tmpstr1 = gethttp("kinox.to", pathnew, 80, NULL, NULL, 10000, NULL, 0);
777                                        tmpstr1 = string_replace_all("\\", "", tmpstr1, 1);
778                                        tmpstr1 = string_resub("<a href=\"", "\"", tmpstr1, 0);
779       
780                                        url = ostrcat(tmpstr1, NULL, 0, 0);
781
782                                        type = 14;
783                                        int count2 = 0;
784                                        struct splitstr* ret2 = NULL;
785                                        ret2 = strsplit(tmpstr1, "/", &count2);
786                       
787                                        if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Sockshare.com") == 0)
788                                                tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
789                                        else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Putlocker.com") == 0)
790                                                tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
791                                        else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "FileNuke.com") == 0)
792                                                tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
793                                        else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "StreamCloud.eu") == 0)
794                                                tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
795                                        else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "VidStream.in") == 0)
796                                                tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
797                                        else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "FlashX.tv") == 0)
798                                                tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
799                                        else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "PrimeShare.tv") == 0)
800                                                tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
801                                        else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "XvidStage.com") == 0)
802                                                tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
803                                        else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Vidxden.com (DivX)") == 0)
804                                                tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
805                                        else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "NowVideo.eu") == 0)
806                                                tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
807                                        else
808                                        {
809                                                tmpstr2 = ostrcat("unknown", NULL, 0, 0);
810                                                hname = ostrcat(hname, " (coming soon)", 1, 0);
811                                                type = 66;
812                                        }
813                                               
814                                        free(ret2), ret2 = NULL;
815                                               
816                                        debug(99, "-------------------------------");
817                                        debug(99, "hname: %s url: %s id: %s", hname, url, tmpstr2);
818                                                                                                                                                       
819                                        incount += 1;
820                                        line = ostrcat(line, hname, 1, 0);
821                                        line = ostrcat(line, "#", 1, 0);
822                                        line = ostrcat(line, url, 1, 0);
823                                        line = ostrcat(line, ";", 1, 0);
824                                        line = ostrcat(line, tmpstr2, 1, 0);
825                                        line = ostrcat(line, ";", 1, 0);                               
826                                        line = ostrcat(line, hname, 1, 0);
827                                        line = ostrcat(line, "#", 1, 0);
828                                        line = ostrcat(line, "http://atemio.dyndns.tv/mediathek/menu/", 1, 0);
829                                        line = ostrcat(line, hname, 1, 0);
830                                        line = ostrcat(line, ".jpg#kinox_", 1, 0);
831                                        line = ostrcat(line, hname, 1, 0);
832                                        line = ostrcat(line, ".jpg#KinoX - ", 1, 0);
833                                        line = ostrcat(line, title, 1, 0);
834                                        line = ostrcat(line, "#", 1, 0);
835                                        line = ostrcat(line, oitoa(type), 1, 0);
836                                        line = ostrcat(line, "\n", 1, 0);
837
838                                        free(tmpstr1), tmpstr1 = NULL;                                                 
839                                        free(tmpstr2), tmpstr2 = NULL;                                 
840                                        free(hname), hname = NULL;
841                                        free(hnr), hnr = NULL;
842                                        free(hlink), hlink = NULL;                                                                             
843                                        free(url), url = NULL; 
844                                        free(pathnew), pathnew = NULL;
845                                }
846                        }
847                        free(ret1), ret1 = NULL;
848                }
849        }
850
851        free(tmpstr), tmpstr = NULL;   
852        if(line != NULL)
853        {
854                tmpstr = ostrcat("/tmp/tithek/kinox.hoster.series.list", NULL, 0, 0);
855                writesys(tmpstr, line, 0);
856
857                titheklog(debuglevel, "/tmp/kinox9_line", NULL, line);
858
859                struct tithek* tnode = (struct tithek*)listbox->select->handle;
860                createtithek(tnode, tnode->title,  tmpstr, tnode->pic, tnode->localname, tnode->menutitle, tnode->flag);
861                ret = 0;
862        }
863
864        return ret;
865}
866
867int kinox_search_cast(struct skin* grid, struct skin* listbox, struct skin* countlabel, struct skin* load, char* link, char* title, char* searchstr)
868{
869        int ret = 1;
870
871        if(listbox == NULL || listbox->select == NULL || listbox->select->handle == NULL)
872                return ret;
873
874        char* search = NULL;
875        if(searchstr == NULL)
876                search = textinputhist("Search", " ", "searchhist");
877        else
878                search = textinputhist("Search", searchstr, "searchhist");
879       
880        if(search != NULL)
881        {
882                drawscreen(load, 0, 0);
883                search = stringreplacechar(search, ' ', '+');
884
885                char* tmpstr = NULL;
886                char* tmpstr1 = NULL;
887                char* ip = NULL;
888                char* path = NULL;
889
890                char* line = NULL;
891                char* menu = NULL;
892
893                ip = ostrcat("www.imdb.com", NULL, 0, 0);
894                path = ostrcat("find?q=", search, 0, 0);
895                path = ostrcat(path, "&s=nm", 1, 0);
896
897                tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0);
898                writesys("/var/usr/local/share/titan/plugins/tithek/kinox_cast_tmpstr", tmpstr, 0);
899                tmpstr = string_replace_all("<td class=\"primary_photo\"> <a href=\"/name/", "\nfound=\"", tmpstr, 1);
900                writesys("/var/usr/local/share/titan/plugins/tithek/kinox_cast_tmpstr2", tmpstr, 0);
901
902                tmpstr1 = string_resub("<table class=\"findList\">", "</div>", tmpstr, 0);
903                writesys("/var/usr/local/share/titan/plugins/tithek/kinox_cast_tmpstr3", tmpstr1, 0);
904                                free(tmpstr), tmpstr = NULL;
905
906                int count = 0;
907                int incount = 0;
908                int i;
909                struct splitstr* ret1 = NULL;
910                ret1 = strsplit(tmpstr1, "\n", &count);
911       
912                char* url = NULL;
913                char* pic = NULL;
914                char* name = NULL;
915               
916                if(ret1 != NULL && count > 0)
917                {
918                        int max = count;
919                        for(i = 0; i < max; i++)
920                        {
921                                url = string_resub("found=\"", "/", ret1[i].part, 0);
922                                pic = string_resub("<img src=\"", "\"", ret1[i].part, 0);
923
924                                tmpstr = string_resub("found=\"", "<small>", ret1[i].part, 0);
925//                              name = oregex(".*<a href=\"/name/nm.*\ >(.*)</a>", tmpstr);
926                                name = oregex(".*<a href=\"/name/nm.* >(.*)</a>", tmpstr);
927
928                                debug(99, "(%d/%d) name: %s url: %s pic: %s\n",i, count, name, url, pic);
929                                debug(99, "-------------------------------");
930                                                                       
931                                pic = string_replace_all(",", "%2C", pic, 1);
932
933                                if(url != NULL)
934                                {
935                                        incount += 1;
936                                        line = ostrcat(line, name, 1, 0);
937                                        line = ostrcat(line, "#http://kinox.to/People/", 1, 0);
938                                        line = ostrcat(line, url, 1, 0);
939                                        line = ostrcat(line, "#", 1, 0);
940                                        line = ostrcat(line, pic, 1, 0);
941                                        line = ostrcat(line, "#kinox_search_", 1, 0);
942                                        line = ostrcat(line, oitoa(incount + time(NULL)), 1, 1);
943                                        line = ostrcat(line, ".jpg#KinoX - Cast Search#32\n", 1, 0);
944                                }
945                               
946                                free(url), url = NULL;
947                                free(pic), pic = NULL;
948                                free(name), name = NULL;                               
949                                free(tmpstr), tmpstr = NULL;
950                        }
951
952                        free(ret1), ret1 = NULL;
953                        if(line != NULL)
954                        {
955                                menu = ostrcat("/tmp/tithek/kinox.search.cast.list", NULL, 0, 0);
956                                writesys(menu, line, 0);
957                                struct tithek* tnode = (struct tithek*)listbox->select->handle;
958                                createtithek(tnode, tnode->title,  menu, tnode->pic, tnode->localname, tnode->menutitle, tnode->flag);
959                                ret = 0;
960                        }
961
962                }
963                free(tmpstr), tmpstr = NULL;
964                free(ip), ip = NULL;
965        }
966        free(search), search = NULL;
967        return ret;
968}
969
970#endif
Note: See TracBrowser for help on using the repository browser.