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

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

[tithek] update and add hoster movshare

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