source: titan/plugins/tithek/movie4k.h @ 23699

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

optimize solarmovie hoster

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