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

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

[tithek] fix putlocker / sockshare

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, url);
55                else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Putlocker") == 0)
56                        streamurl = putlocker("Putlocker.com", ret2[3].part, url);
57                else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "Filenuke") == 0)
58                        streamurl = filenuke("FileNuke.com", ret2[2].part, url);
59                else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "Streamclou") == 0)
60                        streamurl = streamcloud("StreamCloud.eu", ret2[2].part, url);
61                else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "Streamcloud") == 0)
62                        streamurl = streamcloud("StreamCloud.eu", ret2[2].part, url);
63                else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "VidStream") == 0)
64                        streamurl = vidstream("VidStream.in", ret2[2].part, url);
65                else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Flashx") == 0)
66                        streamurl = flashx("FlashX.tv", ret2[3].part, url);
67                else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "Xvidstage") == 0)
68                        streamurl = xvidstage("XvidStage.com", ret2[2].part, url);
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, url);
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 debuglevel = getconfigint("debuglevel", NULL);
257        int ret = 1;
258        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;
259
260        if(listbox == NULL || listbox->select == NULL || listbox->select->handle == NULL)
261                return ret;
262
263        ip = string_replace("http://", "", (char*)link, 0);
264
265        if(ip != NULL)
266                pos = strchr(ip, '/');
267        if(pos != NULL)
268        {
269                pos[0] = '\0';
270                path = pos + 1;
271        }
272
273        tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0);
274        titheklog(debuglevel, "/tmp/movie4k2_tmpstr", NULL, tmpstr);
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                                                titheklog(debuglevel, logfile, tmphname, pathnew);
334                                                free(logfile), logfile= NULL;
335                                               
336                                                url = ostrcat(pathnew, NULL, 0, 0);
337                                        }
338                                        else
339                                        {
340                                                id = oregex(".*-online-film-(.*[0-9]{1,10}).html.*", path);                                                     
341                                                if(id == NULL)
342                                                        id = string_resub("watch-movie-", ".html", path, 0);
343                                                if(id == NULL)
344                                                        id = oregex(".*tvshows-(.*[0-9]{1,10})-.*", path);
345                                                if(id == NULL)
346                                                        id = oregex(".*movie.php?id=(.*[0-9]{1,10})&part=.*", tmpstr1);
347
348                                                tmphname = ostrcat(hnamein, NULL, 0, 0);
349                                        }       
350
351                                        int countj = 0;
352                                        if(ostrstr(tmpstr1, "&part=1") != NULL)
353                                                countj = 1;
354                                        if(ostrstr(tmpstr1, "&part=2") != NULL)
355                                                countj = 2;
356                                        if(ostrstr(tmpstr1, "&part=3") != NULL)
357                                                countj = 3;
358                                        if(ostrstr(tmpstr1, "&part=4") != NULL)
359                                                countj = 4;
360
361                                        if(id != NULL)
362                                        {
363                                                if(countj >= 1)
364                                                {       
365                                                        free(url), url = NULL;
366                                                        free(pathnew), pathnew = NULL;
367                                                        pathnew = ostrcat("movie.php?id=", id, 0, 0);
368                                                        pathnew = ostrcat(pathnew, "&part=1", 1, 0);
369                                                        url = ostrcat(pathnew, NULL, 0, 0);
370                                                }
371
372                                                if(countj >= 2)
373                                                {
374                                                        free(pathnew), pathnew = NULL;
375                                                        pathnew = ostrcat("movie.php?id=", id, 0, 0);
376                                                        pathnew = ostrcat(pathnew, "&part=2", 1, 0);
377                                                        url2 = ostrcat(pathnew, NULL, 0, 0);
378                                                }
379
380                                                if(countj >= 3)
381                                                {
382                                                        free(pathnew), pathnew = NULL;
383                                                        pathnew = ostrcat("movie.php?id=", id, 0, 0);
384                                                        pathnew = ostrcat(pathnew, "&part=3", 1, 0);
385                                                        url3 = ostrcat(pathnew, NULL, 0, 0);
386
387                                                }                                               
388
389                                                if(countj >= 4)
390                                                {
391                                                        free(pathnew), pathnew = NULL;
392                                                        pathnew = ostrcat("movie.php?id=", id, 0, 0);
393                                                        pathnew = ostrcat(pathnew, "&part=4", 1, 0);
394                                                        url4 = ostrcat(pathnew, NULL, 0, 0);
395                                                }
396                                        }
397
398                                        int type = 41;
399
400                                        if(ostrcmp(tmphname, "Sockshare") == 0)
401                                                hname = ostrcat("Sockshare.com", NULL, 0, 0);
402                                        else if(ostrcmp(tmphname, "Putlocker") == 0)
403                                                hname = ostrcat("Putlocker.com", NULL, 0, 0);
404                                        else if(ostrcmp(tmphname, "Filenuke") == 0)
405                                                hname = ostrcat("FileNuke.com", NULL, 0, 0);
406                                        else if(ostrcmp(tmphname, "Streamclou") == 0)
407                                                hname = ostrcat("StreamCloud.eu", NULL, 0, 0);
408                                        else if(ostrcmp(tmphname, "Streamcloud") == 0)
409                                                hname = ostrcat("StreamCloud.eu", NULL, 0, 0);
410                                        else if(ostrcmp(tmphname, "VidStream") == 0)
411                                                hname = ostrcat("VidStream.in", NULL, 0, 0);
412                                        else if(ostrcmp(tmphname, "Flashx") == 0)
413                                                hname = ostrcat("FlashX.tv", NULL, 0, 0);
414                                        else if(ostrcmp(tmphname, "PrimeShare") == 0)
415                                                hname = ostrcat("PrimeShare.tv", NULL, 0, 0);
416                                        else if(ostrcmp(tmphname, "Xvidstage") == 0)
417                                                hname = ostrcat("XvidStage.com", NULL, 0, 0);
418                                        else if(ostrcmp(tmphname, "Nowvideo") == 0)
419                                                hname = ostrcat("NowVideo.eu", NULL, 0, 0);
420                                        else if(ostrcmp(tmphname, "Nowvideo") == 0)
421                                                hname = ostrcat("NowVideo.eu", NULL, 0, 0);
422                                        else
423                                        {
424                                                hname = ostrcat(tmphname, " (coming soon)", 0, 0);
425                                                type = 66;
426                                        }
427                                               
428                                        if(ostrcmp(url, url2) != 0)
429                                        {
430                                                debug(99, "hname: %s (Part1) url: %s id: %s", hname, url, id);
431                                        }
432                                        else
433                                        {
434                                                debug(99, "hname: %s url: %s id: %s", hname, url, id);
435                                        }
436                                       
437                                        incount += 1;
438                                        line = ostrcat(line, hname, 1, 0);
439                                        if(url2 != NULL && ostrcmp(url, url2) != 0)
440                                                line = ostrcat(line, " (Part1)", 1, 0);                                 
441                                        line = ostrcat(line, "#", 1, 0);
442                                        line = ostrcat(line, url, 1, 0);
443                                        line = ostrcat(line, ";", 1, 0);
444                                        line = ostrcat(line, id, 1, 0);
445                                        line = ostrcat(line, ";", 1, 0);                               
446                                        line = ostrcat(line, tmphname, 1, 0);
447                                        line = ostrcat(line, "#", 1, 0);
448                                        line = ostrcat(line, "http://atemio.dyndns.tv/mediathek/menu/", 1, 0);
449                                        line = ostrcat(line, hname, 1, 0);
450                                        line = ostrcat(line, ".jpg#movie4k_", 1, 0);
451                                        line = ostrcat(line, hname, 1, 0);
452                                        line = ostrcat(line, ".jpg#Movie4k - ", 1, 0);
453                                        line = ostrcat(line, title, 1, 0);
454                                        line = ostrcat(line, "#", 1, 0);
455                                        line = ostrcat(line, oitoa(type), 1, 0);
456                                        line = ostrcat(line, "\n", 1, 0);
457                                        free(hname), hname = NULL;
458
459                                        if(url2 != NULL && ostrcmp(url, url2) != 0)
460                                        {                                               
461                                                int type = 41;
462       
463                                                if(ostrcmp(tmphname, "Sockshare") == 0)
464                                                        hname = ostrcat("Sockshare.com", NULL, 0, 0);
465                                                else if(ostrcmp(tmphname, "Putlocker") == 0)
466                                                        hname = ostrcat("Putlocker.com", NULL, 0, 0);
467                                                else if(ostrcmp(tmphname, "Filenuke") == 0)
468                                                        hname = ostrcat("FileNuke.com", NULL, 0, 0);
469                                                else if(ostrcmp(tmphname, "Streamclou") == 0)
470                                                        hname = ostrcat("StreamCloud.eu", NULL, 0, 0);
471                                                else if(ostrcmp(tmphname, "Streamcloud") == 0)
472                                                        hname = ostrcat("StreamCloud.eu", NULL, 0, 0);
473                                                else if(ostrcmp(tmphname, "VidStream") == 0)
474                                                        hname = ostrcat("VidStream.in", NULL, 0, 0);
475                                                else if(ostrcmp(tmphname, "Flashx") == 0)
476                                                        hname = ostrcat("FlashX.tv", NULL, 0, 0);
477                                                else if(ostrcmp(tmphname, "PrimeShare") == 0)
478                                                        hname = ostrcat("PrimeShare.tv", NULL, 0, 0);
479                                                else if(ostrcmp(tmphname, "Xvidstage") == 0)
480                                                        hname = ostrcat("XvidStage.com", NULL, 0, 0);
481                                                else if(ostrcmp(tmphname, "Nowvideo") == 0)
482                                                        hname = ostrcat("NowVideo.eu", NULL, 0, 0);
483                                                else if(ostrcmp(tmphname, "Nowvideo") == 0)
484                                                        hname = ostrcat("NowVideo.eu", NULL, 0, 0);
485                                                else
486                                                {
487                                                        hname = ostrcat(tmphname, " (coming soon)", 0, 0);
488                                                        type = 66;
489                                                }
490                                       
491                                                debug(99, "-------------------------------");
492                                                debug(99, "hname: %s (Part2) url: %s id: %s", hname, url2, id);
493                                                                                       
494                                                incount += 1;
495                                                line = ostrcat(line, hname, 1, 0);
496                                                line = ostrcat(line, " (Part2)", 1, 0);                                 
497                                                line = ostrcat(line, "#", 1, 0);
498                                                line = ostrcat(line, url2, 1, 0);
499                                                line = ostrcat(line, ";", 1, 0);
500                                                line = ostrcat(line, id, 1, 0);
501                                                line = ostrcat(line, ";", 1, 0);                               
502                                                line = ostrcat(line, tmphname, 1, 0);
503                                                line = ostrcat(line, "#", 1, 0);
504                                                line = ostrcat(line, "http://atemio.dyndns.tv/mediathek/menu/", 1, 0);
505                                                line = ostrcat(line, hname, 1, 0);
506                                                line = ostrcat(line, ".jpg#kinox_", 1, 0);
507                                                line = ostrcat(line, hname, 1, 0);
508                                                line = ostrcat(line, ".jpg#Movie4k - ", 1, 0);
509                                                line = ostrcat(line, title, 1, 0);
510                                                line = ostrcat(line, "#", 1, 0);
511                                                line = ostrcat(line, oitoa(type), 1, 0);
512                                                line = ostrcat(line, "\n", 1, 0);
513                                                free(hname), hname = NULL;
514                                        }
515                                        if(url3 != NULL && ostrcmp(url, url3) != 0)
516                                        {
517                                                int type = 41;
518       
519                                                if(ostrcmp(tmphname, "Sockshare") == 0)
520                                                        hname = ostrcat("Sockshare.com", NULL, 0, 0);
521                                                else if(ostrcmp(tmphname, "Putlocker") == 0)
522                                                        hname = ostrcat("Putlocker.com", NULL, 0, 0);
523                                                else if(ostrcmp(tmphname, "Filenuke") == 0)
524                                                        hname = ostrcat("FileNuke.com", NULL, 0, 0);
525                                                else if(ostrcmp(tmphname, "Streamclou") == 0)
526                                                        hname = ostrcat("StreamCloud.eu", NULL, 0, 0);
527                                                else if(ostrcmp(tmphname, "Streamcloud") == 0)
528                                                        hname = ostrcat("StreamCloud.eu", NULL, 0, 0);
529                                                else if(ostrcmp(tmphname, "VidStream") == 0)
530                                                        hname = ostrcat("VidStream.in", NULL, 0, 0);
531                                                else if(ostrcmp(tmphname, "Flashx") == 0)
532                                                        hname = ostrcat("FlashX.tv", NULL, 0, 0);
533                                                else if(ostrcmp(tmphname, "PrimeShare") == 0)
534                                                        hname = ostrcat("PrimeShare.tv", NULL, 0, 0);
535                                                else if(ostrcmp(tmphname, "Xvidstage") == 0)
536                                                        hname = ostrcat("XvidStage.com", NULL, 0, 0);
537                                                else if(ostrcmp(tmphname, "Nowvideo") == 0)
538                                                        hname = ostrcat("NowVideo.eu", NULL, 0, 0);
539                                                else if(ostrcmp(tmphname, "Nowvideo") == 0)
540                                                        hname = ostrcat("NowVideo.eu", NULL, 0, 0);
541                                                else
542                                                {
543                                                        hname = ostrcat(tmphname, " (coming soon)", 0, 0);
544                                                        type = 66;
545                                                }
546                                                                                                                               
547                                                debug(99, "-------------------------------");
548                                                debug(99, "hname: %s (Part3) url: %s id: %s", hname, url3, id);
549                                                                                       
550                                                incount += 1;
551                                                line = ostrcat(line, hname, 1, 0);
552                                                line = ostrcat(line, " (Part3)", 1, 0);                                 
553                                                line = ostrcat(line, "#", 1, 0);
554                                                line = ostrcat(line, url3, 1, 0);
555                                                line = ostrcat(line, ";", 1, 0);
556                                                line = ostrcat(line, id, 1, 0);
557                                                line = ostrcat(line, ";", 1, 0);                               
558                                                line = ostrcat(line, tmphname, 1, 0);
559                                                line = ostrcat(line, "#", 1, 0);
560                                                line = ostrcat(line, "http://atemio.dyndns.tv/mediathek/menu/", 1, 0);
561                                                line = ostrcat(line, hname, 1, 0);
562                                                line = ostrcat(line, ".jpg#movie4k_", 1, 0);
563                                                line = ostrcat(line, hname, 1, 0);
564                                                line = ostrcat(line, ".jpg#Movie4k - ", 1, 0);
565                                                line = ostrcat(line, title, 1, 0);
566                                                line = ostrcat(line, "#", 1, 0);
567                                                line = ostrcat(line, oitoa(type), 1, 0);
568                                                line = ostrcat(line, "\n", 1, 0);
569                                                free(hname), hname = NULL;
570                                        }
571                                        if(url4 != NULL && ostrcmp(url, url4) != 0)
572                                        {
573                                                int type = 41;
574       
575                                                if(ostrcmp(tmphname, "Sockshare") == 0)
576                                                        hname = ostrcat("Sockshare.com", NULL, 0, 0);
577                                                else if(ostrcmp(tmphname, "Putlocker") == 0)
578                                                        hname = ostrcat("Putlocker.com", NULL, 0, 0);
579                                                else if(ostrcmp(tmphname, "Filenuke") == 0)
580                                                        hname = ostrcat("FileNuke.com", NULL, 0, 0);
581                                                else if(ostrcmp(tmphname, "Streamclou") == 0)
582                                                        hname = ostrcat("StreamCloud.eu", NULL, 0, 0);
583                                                else if(ostrcmp(tmphname, "Streamcloud") == 0)
584                                                        hname = ostrcat("StreamCloud.eu", NULL, 0, 0);
585                                                else if(ostrcmp(tmphname, "VidStream") == 0)
586                                                        hname = ostrcat("VidStream.in", NULL, 0, 0);
587                                                else if(ostrcmp(tmphname, "Flashx") == 0)
588                                                        hname = ostrcat("FlashX.tv", NULL, 0, 0);
589                                                else if(ostrcmp(tmphname, "PrimeShare") == 0)
590                                                        hname = ostrcat("PrimeShare.tv", NULL, 0, 0);
591                                                else if(ostrcmp(tmphname, "Xvidstage") == 0)
592                                                        hname = ostrcat("XvidStage.com", NULL, 0, 0);
593                                                else if(ostrcmp(tmphname, "Nowvideo") == 0)
594                                                        hname = ostrcat("NowVideo.eu", NULL, 0, 0);
595                                                else if(ostrcmp(tmphname, "Nowvideo") == 0)
596                                                        hname = ostrcat("NowVideo.eu", NULL, 0, 0);
597                                                else
598                                                {
599                                                        hname = ostrcat(tmphname, " (coming soon)", 0, 0);
600                                                        type = 66;
601                                                }                                                                                               
602
603                                                debug(99, "-------------------------------");
604                                                debug(99, "hname: %s (Part3) url: %s id: %s", hname, url4, id);
605                                                                                       
606                                                incount += 1;
607                                                line = ostrcat(line, hname, 1, 0);
608                                                line = ostrcat(line, " (Part4)", 1, 0);                                 
609                                                line = ostrcat(line, "#", 1, 0);
610                                                line = ostrcat(line, url4, 1, 0);
611                                                line = ostrcat(line, ";", 1, 0);
612                                                line = ostrcat(line, id, 1, 0);
613                                                line = ostrcat(line, ";", 1, 0);                               
614                                                line = ostrcat(line, tmphname, 1, 0);
615                                                line = ostrcat(line, "#", 1, 0);
616                                                line = ostrcat(line, "http://atemio.dyndns.tv/mediathek/menu/", 1, 0);
617                                                line = ostrcat(line, hname, 1, 0);
618                                                line = ostrcat(line, ".jpg#movie4k_", 1, 0);
619                                                line = ostrcat(line, hname, 1, 0);
620                                                line = ostrcat(line, ".jpg#Movie4k - ", 1, 0);
621                                                line = ostrcat(line, title, 1, 0);
622                                                line = ostrcat(line, "#", 1, 0);
623                                                line = ostrcat(line, oitoa(type), 1, 0);
624                                                line = ostrcat(line, "\n", 1, 0);
625                                                free(hname), hname = NULL;
626                                        }
627                                        free(tmphname), tmphname = NULL;
628
629                                        if(nolinks != NULL)
630                                        {
631                                                printf("break\n");
632                                                break;
633                                        }
634
635                                }
636
637                                free(hname), hname = NULL;                                                                             
638                                free(url), url = NULL;
639                                free(url2), url2 = NULL;
640                                free(url3), url3 = NULL;
641                                free(url4), url4 = NULL;
642                                free(pathnew), pathnew = NULL;
643                                free(logfile), logfile = NULL;                                 
644                        }
645                }
646                free(ret1), ret1 = NULL;
647        }
648        free(tmpstr1), tmpstr1 = NULL;
649        free(tmpstr), tmpstr = NULL;   
650
651        if(line != NULL)
652        {
653                tmpstr = ostrcat("/tmp/tithek/movie4k.hoster.list", NULL, 0, 0);
654                writesys(tmpstr, line, 0);
655                                       
656                struct tithek* tnode = (struct tithek*)listbox->select->handle;
657                createtithek(tnode, tnode->title,  tmpstr, tnode->pic, tnode->localname, tnode->menutitle, tnode->flag);
658                ret = 0;
659        }
660
661        return ret;
662}
663
664int movie4k_hoster_series(struct skin* grid, struct skin* listbox, struct skin* countlabel, struct skin* load, char* link, char* title)
665{
666        debug(99, "link: %s", link);
667        int debuglevel = getconfigint("debuglevel", NULL);
668        int ret = 1, series = 0;
669        char* ip = NULL, *pos = NULL, *id = NULL, *tpath = NULL, *path = NULL, *tmpstr = NULL, *line = NULL, *episode = NULL;
670        char* from = NULL;
671        char* folgen = NULL;
672        char* folgentmp = NULL;
673
674        if(listbox == NULL || listbox->select == NULL || listbox->select->handle == NULL)
675                return ret;
676
677        ip = string_replace("http://", "", (char*)link, 0);
678
679        if(ip != NULL)
680                pos = strchr(ip, '/');
681        if(pos != NULL)
682        {
683                pos[0] = '\0';
684                path = pos + 1;
685        }
686/*
687        if(!ostrncmp("tvshows-", path, 8))
688        {
689                debug(99, "path: %s",path);
690                tpath = ostrcat(path, NULL, 0, 0);
691                id = oregex(".*tvshows-(.*[0-9]{1,10})-.*", path);
692                tpath = string_replace("tvshows-season-", "", tpath, 1);
693                tpath = string_replace(".html", "", tpath, 1);
694                tpath = ostrcat(tpath, "-online-serie-", 1, 0);
695                tpath = ostrcat(tpath, id, 1, 0);
696                tpath = ostrcat(tpath, ".html", 1, 0);
697                debug(99, "convertpath: %s",tpath);
698        }
699        else
700*/
701                tpath = ostrcat(path, NULL, 0, 0);
702
703        tmpstr = gethttp(ip, tpath, 80, NULL, NULL, 10000, NULL, 0);
704        free(tpath), tpath = NULL;
705        titheklog(debuglevel, "/tmp/movie4k2_tmpstr", NULL, tmpstr);
706
707        if(tmpstr != NULL)
708        {
709                drawscreen(load, 0, 0);
710
711                if(ostrstr(tmpstr, "episodeform") != NULL)
712                {
713                        int i;
714                        for(i = 1; i < 30; i++)
715                        {
716                                from = ostrcat(from, "<FORM name=\"episodeform", 1, 0);
717                                from = ostrcat(from, oitoa(i), 1, 0);
718                                from = ostrcat(from, "\">", 1, 0);
719                                folgen = string_resub(from, "</FORM>", tmpstr, 0);
720                                folgen = string_resub("<OPTION></OPTION>", "</SELECT>", folgen, 1);
721                                folgen = string_replace_all("><", ">\n<", folgen, 1);
722                                folgentmp = ostrcat(folgen, NULL, 0, 0);
723
724                                if(folgen != NULL)
725                                {
726                                        int count = 0;
727                                        int incount = 0;
728                                        int j;
729                                        struct splitstr* ret1 = NULL;
730                                        ret1 = strsplit(folgen, "\n", &count);
731                                               
732                                        if(ret1 != NULL && count > 0)
733                                        {
734                                                int max = count + 1;
735                                                for(j = 1; j < max; j++)
736                                                {
737                                                        link = string_resub("<OPTION value=\"", "\"", ret1[j-1].part, 0);
738                                                        id = oregex(".*tvshows-(.*[0-9]{1,10})-.*", link);
739                                                        episode = oregex(".*>Episode (.*[0-9]{1,10})</OPTION>.*", ret1[j-1].part);
740
741                                                        debug(99, "(S%d/E%s)(%d) link: %s id: %s", i, episode, j, link, id);
742                                                        link = string_replace("tvshows-", "", link, 1);
743                                                        link = string_replace(id, "", link, 1);
744                                                        link = string_replace("-", "", link, 1);
745                                                        link = string_replace(".html", "", link, 1);
746                                                        link = ostrcat(link, "-online-serie-", 1, 0);
747                                                        link = ostrcat(link, id, 1, 0);
748                                                        link = ostrcat(link, ".html", 1, 0);
749                                                        debug(99, "(S%d/E%d) convertlink: %s id: %s", i, j, link, id);
750
751                                                        incount += 1;
752                                                        line = ostrcat(line, _("Season"), 1, 0);
753                                                        line = ostrcat(line, " ", 1, 0);
754                                                        line = ostrcat(line, oitoa(i), 1, 0);
755                                                        line = ostrcat(line, " ", 1, 0);
756                                                        line = ostrcat(line, _("Episode"), 1, 0);
757                                                        line = ostrcat(line, " ", 1, 0);
758//                                                      line = ostrcat(line, oitoa(j), 1, 0);
759                                                        line = ostrcat(line, episode, 1, 0);                                   
760                                                        line = ostrcat(line, "#http://www.movie4k.to/", 1, 0);
761                                                        line = ostrcat(line, link, 1, 0);
762                                                        line = ostrcat(line, "#", 1, 0);
763                                                        line = ostrcat(line, "http://atemio.dyndns.tv/mediathek/menu/s", 1, 0);
764                                                        line = ostrcat(line, oitoa(i), 1, 0);
765                                                        line = ostrcat(line, "e", 1, 0);
766//                                                      line = ostrcat(line, oitoa(j), 1, 0);
767                                                        line = ostrcat(line, episode, 1, 0);
768                                                        line = ostrcat(line, ".jpg", 1, 0);                                                                                                                             
769                                                        line = ostrcat(line, "#movie4k_search_", 1, 0);
770                                                        line = ostrcat(line, oitoa(i), 1, 0);
771                                                        line = ostrcat(line, "e", 1, 0);
772//                                                      line = ostrcat(line, oitoa(j), 1, 0);
773                                                        line = ostrcat(line, episode, 1, 0);
774                                                        line = ostrcat(line, ".jpg#Movie4k - ", 1, 0);
775                                                        line = ostrcat(line, title, 1, 0);
776                                                        line = ostrcat(line, "#34\n", 1, 0);
777                                                        free(id), id = NULL;
778                                                        free(episode), episode = NULL;
779                                                }
780                                        }
781                                        free(ret1), ret1 = NULL;
782                                }                               
783                                free(from), from = NULL;
784                                free(folgen), folgen = NULL;
785                                free(folgentmp), folgentmp = NULL;
786                        }
787                }
788        }
789        free(tmpstr), tmpstr = NULL;   
790
791        if(line != NULL)
792        {
793                if(series == 0)
794                        tmpstr = ostrcat("/tmp/tithek/movie4k.hoster.list", NULL, 0, 0);
795                else
796                        tmpstr = ostrcat("/tmp/tithek/movie4k.hoster.ser.list", NULL, 0, 0);
797                writesys(tmpstr, line, 0);
798
799                titheklog(debuglevel, "/tmp/movie4k8_line", NULL, line);
800                                       
801                struct tithek* tnode = (struct tithek*)listbox->select->handle;
802                createtithek(tnode, tnode->title,  tmpstr, tnode->pic, tnode->localname, tnode->menutitle, tnode->flag);
803                ret = 0;
804        }
805        return ret;
806}
807
808int movie4k_series(struct skin* grid, struct skin* listbox, struct skin* countlabel, struct skin* load, char* link, char* title)
809{
810        debug(99, "link: %s", link);
811        int debuglevel = getconfigint("debuglevel", NULL);
812        int ret = 1;
813        char* ip = NULL, *pos = NULL, *tpath = NULL, *path = NULL, *tmpstr = NULL, *line = NULL;
814        char* from = NULL;
815        char* folgen = NULL;
816        char* folgentmp = NULL;
817        char* name = NULL;
818        char* lang = NULL;
819        char* season = NULL;
820
821        if(listbox == NULL || listbox->select == NULL || listbox->select->handle == NULL)
822                return ret;
823
824        ip = string_replace("http://", "", (char*)link, 0);
825
826        if(ip != NULL)
827                pos = strchr(ip, '/');
828        if(pos != NULL)
829        {
830                pos[0] = '\0';
831                path = pos + 1;
832        }
833
834        tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0);
835        free(tpath), tpath = NULL;
836        titheklog(debuglevel, "/tmp/movie4k2_tmpstr", NULL, tmpstr);
837
838        if(tmpstr != NULL)
839        {
840                drawscreen(load, 0, 0);
841
842                folgen = string_resub("<TABLE id=\"tablemoviesindex\">", "</TABLE>", tmpstr, 0);
843                folgen = string_replace_all("\n", "", folgen, 1);
844                folgen = string_replace_all("\t", "", folgen, 1);
845                string_strip_whitechars(folgen);
846                folgen = string_replace_all("</TD> </TR> <TR>", "</TD> </TR>\n<TR>", folgen, 1);
847
848                if(folgen != NULL)
849                {
850                        int count = 0;
851                        int j;
852                        struct splitstr* ret1 = NULL;
853                        ret1 = strsplit(folgen, "\n", &count);
854
855                        if(ret1 != NULL && count > 0)
856                        {
857                                int max = count;
858                                for(j = 0; j < max; j++)
859                                {
860                                        link = string_resub("<a href=\"", "\">", ret1[j].part, 0);
861
862                                        name = oregex(".*><a href=.*\">(.*)</a></TD>.*", ret1[j].part);
863
864                                        if(ostrstr(ret1[j].part, "us_ger_small.png") != NULL)
865                                                lang = ostrcat(" (de)", NULL, 0, 0);
866                                        else if(ostrstr(ret1[j].part, "us_flag_small.png") != NULL)
867                                                lang = ostrcat(" (en)", NULL, 0, 0);
868                                        else
869                                                lang = ostrcat(" (\?\?)", NULL, 0, 0);
870
871                                        season = oregex(".*Season:(.*[0-9]{1,3}).*", name);
872                                        season = strstrip(season);
873                                        debug(99, "(S%s) input: %s%s",season, name, lang);
874
875                                        line = ostrcat(line, _("Season"), 1, 0);
876                                        line = ostrcat(line, " ", 1, 0);
877                                        line = ostrcat(line, season, 1, 0);
878                                        line = ostrcat(line, " ", 1, 0);
879                                                                               
880                                        line = ostrcat(line, lang, 1, 0);       
881                                        line = ostrcat(line, "#http://www.movie4k.to/", 1, 0);
882                                        line = ostrcat(line, link, 1, 0);
883                                        line = ostrcat(line, "#", 1, 0);
884                                        line = ostrcat(line, "http://atemio.dyndns.tv/mediathek/menu/s", 1, 0);
885                                        line = ostrcat(line, season, 1, 0);
886                                        line = ostrcat(line, ".jpg", 1, 0);
887                                        line = ostrcat(line, "#s", 1, 0);
888                                        line = ostrcat(line, season, 1, 0);
889                                        line = ostrcat(line, ".jpg", 1, 0);
890                                        line = ostrcat(line, "#Movie4k - ", 1, 0);
891                                        line = ostrcat(line, title, 1, 0);
892                                        line = ostrcat(line, "#39\n", 1, 0);
893                                        free(name), name = NULL;
894                                        free(lang), lang = NULL;
895                                        free(season), season = NULL;
896                                }
897                        }
898                        free(ret1), ret1 = NULL;
899                }                               
900                free(from), from = NULL;
901                free(folgen), folgen = NULL;
902                free(folgentmp), folgentmp = NULL;             
903        }
904        free(tmpstr), tmpstr = NULL;   
905
906        if(line != NULL)
907        {
908                tmpstr = ostrcat("/tmp/tithek/movie4k.series.list", NULL, 0, 0);
909                writesys(tmpstr, line, 0);
910
911                titheklog(debuglevel, "/tmp/movie4k8_line", NULL, line);
912                                       
913                struct tithek* tnode = (struct tithek*)listbox->select->handle;
914                createtithek(tnode, tnode->title,  tmpstr, tnode->pic, tnode->localname, tnode->menutitle, tnode->flag);
915                ret = 0;
916        }
917        return ret;
918}
919
920int movie4k_series_listed(struct skin* grid, struct skin* listbox, struct skin* countlabel, struct skin* load, char* link, char* title)
921{
922        debug(99, "link: %s", link);
923        int debuglevel = getconfigint("debuglevel", NULL);
924        int ret = 1;
925        char* ip = NULL, *pos = NULL, *tpath = NULL, *path = NULL, *tmpstr = NULL, *line = NULL;
926        char* from = NULL;
927        char* folgen = NULL;
928        char* folgentmp = NULL;
929        char* name = NULL;
930        char* lang = NULL;
931        char* season = NULL;
932        char* episode = NULL;
933
934        if(listbox == NULL || listbox->select == NULL || listbox->select->handle == NULL)
935                return ret;
936
937        ip = string_replace("http://", "", (char*)link, 0);
938
939        if(ip != NULL)
940                pos = strchr(ip, '/');
941        if(pos != NULL)
942        {
943                pos[0] = '\0';
944                path = pos + 1;
945        }
946
947        tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0);
948        free(tpath), tpath = NULL;
949        titheklog(debuglevel, "/tmp/movie4k2_tmpstr", NULL, tmpstr);
950
951        if(tmpstr != NULL)
952        {
953                drawscreen(load, 0, 0);
954
955                folgen = string_resub("<TABLE id=\"tablemoviesindex\">", "</TABLE>", tmpstr, 0);
956                folgen = string_replace_all("\n", "", folgen, 1);
957                folgen = string_replace_all("\t", "", folgen, 1);
958                string_strip_whitechars(folgen);
959                folgen = string_replace_all("</TD> </TR> <TR>", "</TD> </TR>\n<TR>", folgen, 1);
960
961                if(folgen != NULL)
962                {
963                        int count = 0;
964                        int j;
965                        struct splitstr* ret1 = NULL;
966                        ret1 = strsplit(folgen, "\n", &count);
967
968                        if(ret1 != NULL && count > 0)
969                        {
970                                int max = count;
971                                for(j = 0; j < max; j++)
972                                {
973                                        link = string_resub("<a href=\"", "\">", ret1[j].part, 0);
974                                        name = oregex(".*><a href=.*\">(.*)</a></TD>.*", ret1[j].part);
975
976                                        if(ostrstr(ret1[j].part, "us_ger_small.png") != NULL)
977                                                lang = ostrcat(" (de)", NULL, 0, 0);
978                                        else if(ostrstr(ret1[j].part, "us_flag_small.png") != NULL)
979                                                lang = ostrcat(" (en)", NULL, 0, 0);
980                                        else
981                                                lang = ostrcat(" (\?\?)", NULL, 0, 0);
982
983                                        season = oregex(".*Season:(.*),.*", name);
984                                        season = strstrip(season);
985                                        episode = oregex(".*Episode:(.*[0-9]{1,3}).*", name);
986                                        episode = strstrip(episode);
987                                        debug(99, "(S%s/E%s) input: %s%s",season, episode, name, lang);
988
989                                        line = ostrcat(line, _("Season"), 1, 0);
990                                        line = ostrcat(line, " ", 1, 0);
991                                        line = ostrcat(line, season, 1, 0);
992                                        line = ostrcat(line, " ", 1, 0);
993                                        line = ostrcat(line, _("Episode"), 1, 0);
994                                        line = ostrcat(line, " ", 1, 0);                               
995                                        line = ostrcat(line, episode, 1, 0);
996                                        line = ostrcat(line, " ", 1, 0);
997                                        line = ostrcat(line, lang, 1, 0);       
998                                        line = ostrcat(line, "#http://www.movie4k.to/", 1, 0);
999                                        line = ostrcat(line, link, 1, 0);
1000                                        line = ostrcat(line, "#", 1, 0);
1001                                        line = ostrcat(line, "http://atemio.dyndns.tv/mediathek/menu/s", 1, 0);
1002                                        line = ostrcat(line, season, 1, 0);
1003                                        line = ostrcat(line, "e", 1, 0);
1004                                        line = ostrcat(line, episode, 1, 0);
1005                                        line = ostrcat(line, ".jpg", 1, 0);
1006                                        line = ostrcat(line, "#s", 1, 0);
1007                                        line = ostrcat(line, season, 1, 0);
1008                                        line = ostrcat(line, "e", 1, 0);
1009                                        line = ostrcat(line, episode, 1, 0);
1010                                        line = ostrcat(line, ".jpg", 1, 0);
1011                                        line = ostrcat(line, "#Movie4k - ", 1, 0);
1012                                        line = ostrcat(line, title, 1, 0);
1013                                        line = ostrcat(line, "#34\n", 1, 0);
1014                                        free(name), name = NULL;
1015                                        free(lang), lang = NULL;
1016                                        free(season), season = NULL;
1017                                        free(episode), episode = NULL;
1018                                }
1019                        }
1020                        free(ret1), ret1 = NULL;
1021                }                               
1022                free(from), from = NULL;
1023                free(folgen), folgen = NULL;
1024                free(folgentmp), folgentmp = NULL;             
1025        }
1026        free(tmpstr), tmpstr = NULL;   
1027
1028        if(line != NULL)
1029        {
1030                tmpstr = ostrcat("/tmp/tithek/movie4k.series.listed.list", NULL, 0, 0);
1031                writesys(tmpstr, line, 0);
1032
1033                titheklog(debuglevel, "/tmp/movie4k8_line", NULL, line);
1034                                       
1035                struct tithek* tnode = (struct tithek*)listbox->select->handle;
1036                createtithek(tnode, tnode->title,  tmpstr, tnode->pic, tnode->localname, tnode->menutitle, tnode->flag);
1037                ret = 0;
1038        }
1039        return ret;
1040}
1041
1042
1043#endif
Note: See TracBrowser for help on using the repository browser.