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

Last change on this file since 19533 was 19533, checked in by obi, 11 years ago

add tithek workaround

File size: 17.8 KB
Line 
1#ifndef KINOX_H
2#define KINOX_H
3
4// flag 1 = putlocker/sockshare
5// flag 2 = filenuke
6
7char* kinox(char* link, char* url, char* name, int flag)
8{
9        debug(99, "link(%d): %s", flag, link);
10        char* video_id = NULL, *source = NULL, *streamurl = NULL;
11
12        if(flag == 1 || flag == 2 || flag == 3)
13        {
14                int count = 0;
15                struct splitstr* ret1 = NULL;
16                ret1 = strsplit(link, ";", &count);
17                if(ret1 != NULL && count >= 3)
18                {                       
19                        video_id = ostrcat(video_id, ret1[1].part, 1, 0);
20                        debug(99, "video_id: %s", video_id);
21
22                        source = ostrcat(source, ret1[2].part, 1, 0);
23                        debug(99, "source: %s", source);
24
25                        if(flag == 1)
26                                streamurl = putlocker(source, video_id);
27                        else if(flag == 2)
28                                streamurl = filenuke(source, video_id);
29                        else if(flag == 3)
30                                streamurl = streamcloud(source, video_id);
31
32                        debug(99, "streamurl1: %s", streamurl);
33
34                        streamurl = string_replace_all("amp;", "", streamurl, 1);
35                        debug(99, "streamurl2: %s", streamurl);
36                }
37                free(ret1), ret1 = NULL;
38        }
39        free(video_id), video_id = NULL;
40        free(source), source = NULL;
41
42        return streamurl;
43}
44
45int kinox_search(struct skin* grid, struct skin* listbox, struct skin* countlabel, struct skin* load, char* link, char* title)
46{
47        int ret = 1;
48
49        if(listbox == NULL || listbox->select == NULL || listbox->select->handle == NULL)
50                return ret;
51
52        char* search = textinputhist("Search", " ", "searchhist");
53        if(search != NULL)
54        {
55                drawscreen(load, 0, 0);
56                search = stringreplacechar(search, ' ', '+');
57                char* tmpstr = NULL;
58                char* tmpstr1 = NULL;
59                char* line = NULL;
60                char* pic = NULL;
61                char* title = NULL;     
62                char* lang = NULL;
63                char* langck = NULL;
64                char* from = NULL;
65                char* url = NULL;
66                char* ip = NULL;
67                char* path = NULL;
68                char* menu = NULL;
69
70                ip = ostrcat("kinox.to", NULL, 0, 0);
71                path = ostrcat("Search.html?q=", search, 0, 0);
72       
73                tmpstr = gethttp(ip, path, 80, NULL, NULL, NULL, 0);
74                tmpstr = string_resub("<div id=\"beep\" class=\"beep\"></div>", "</table>", tmpstr, 0);
75
76                int count = 0;
77                int incount = 0;
78                int i = 0;
79                struct splitstr* ret1 = NULL;
80                ret1 = strsplit(tmpstr, "\n", &count);
81
82                if(ret1 != NULL)
83                {
84                        int max = count;
85                        for(i = 0; i < max; i++)
86                        {
87                                if(oregex(".*src=\"/gr/sys/lng/(.*)\" alt=\"language\"></td>.*", ret1[i].part) != NULL)
88                                {
89                                        free(langck), langck = NULL;
90                                        langck = oregex(".*src=\"/gr/sys/lng/(.*)\" alt=\"language\"></td>.*", ret1[i].part);
91                                }
92                               
93                                if(oregex(".*<td class=\"Title\"><a href=\"(.*)\" onclick=.*", ret1[i].part) != NULL)
94                                {
95                                        free(path), path = NULL;
96                                        path = oregex(".*<td class=\"Title\"><a href=\"(.*)\" onclick=.*", ret1[i].part);
97
98                                        if(ostrstr(langck, "1.png") != NULL)
99                                                lang = ostrcat(lang, " (de)", 1, 0);
100                                        else if(ostrstr(langck, "2.png") != NULL)
101                                                lang = ostrcat(lang, " (en)", 1, 0);
102                                        else
103                                                lang = ostrcat(lang, " (\?\?)", 1, 0);
104                                                                                                                                       
105                                        tmpstr1 = gethttp("kinox.to", path, 80, NULL, NULL, NULL, 0);
106
107                                        from = ostrcat("<div class=\"Grahpics\"><a href=\"", path, 0, 0);
108                                        from = ostrcat(from, "\"><img src=\"", 1, 0);
109
110                                        pic = string_resub(from, "\" alt=\"", tmpstr1, 0);
111                                       
112                                        if(pic == NULL)
113                                                pic = ostrcat("dummy", NULL, 0, 0);
114
115                                        title = ostrcat(path, NULL, 0, 0);
116                                        title = string_replace_all("/Stream/", "", title, 1);
117                                        title = string_replace_all(".html", "", title, 1);
118                                        title = stringreplacechar(title, '_', ' ');
119                                        title = ostrcat(title , lang, 1, 0);
120
121                                        url = ostrcat("http://kinox.to", path, 0, 0);
122
123                                        debug(99, "---------------------------");
124                                        debug(99, "langck: %s", langck);
125                                        debug(99, "pic: %s", pic);
126                                        debug(99, "title: %s", title);
127                                        debug(99, "url: %s", url);                                     
128                                        debug(99, "---------------------------");
129
130                                        if(url != NULL)
131                                        {
132                                                incount += 1;
133                                                line = ostrcat(line, title, 1, 0);
134                                                line = ostrcat(line, "#", 1, 0);
135                                                line = ostrcat(line, url, 1, 0);
136                                                line = ostrcat(line, "#", 1, 0);
137                                                line = ostrcat(line, pic, 1, 0);
138                                                line = ostrcat(line, "#kinox_search_", 1, 0);
139                                                line = ostrcat(line, oitoa(incount + time(NULL)), 1, 0);
140                                                line = ostrcat(line, ".jpg#KinoX - Search#22\n", 1, 0);
141                                        }
142                                        free(url), url = NULL;
143                                        free(path), path = NULL;
144                                        free(title), title = NULL;
145                                        free(pic), pic = NULL;         
146                                        free(from), from = NULL;
147                                        free(tmpstr1), tmpstr1 = NULL;
148                                        free(lang), lang = NULL;
149                                        free(langck), langck = NULL;   
150                                }
151                        }
152                        free(ret1), ret1 = NULL;
153                        if(line != NULL)
154                        {
155                                menu = ostrcat("/tmp/tithek/kinox.search.list", NULL, 0, 0);
156                                writesys(menu, line, 0);
157                                free(((struct tithek*)listbox->select->handle)->link);
158                                ((struct tithek*)listbox->select->handle)->link = menu;
159                                ret = 0;
160                        }
161
162                }
163                free(tmpstr), tmpstr = NULL;
164                free(ip), ip = NULL;
165        }
166        free(search), search = NULL;
167        return ret;
168}
169
170int kinox_hoster(struct skin* grid, struct skin* listbox, struct skin* countlabel, struct skin* load, char* link, char* title)
171{
172        debug(99, "link: %s", link);
173        int ret = 1, series = 0;
174        char* ip = NULL, *pos = NULL, *path = NULL, *tmpstr = NULL, *tmpstr1 = NULL, *tmpstr2 = NULL, *line = NULL, *url = NULL, *pathnew = NULL;
175
176        if(listbox == NULL || listbox->select == NULL || listbox->select->handle == NULL)
177                return ret;
178
179        ip = string_replace("http://", "", (char*)link, 0);
180
181        if(ip != NULL)
182                pos = strchr(ip, '/');
183        if(pos != NULL)
184        {
185                pos[0] = '\0';
186                path = pos + 1;
187        }
188
189        tmpstr = gethttp(ip, path, 80, NULL, NULL, NULL, 0);
190       
191        if(tmpstr != NULL)
192        {
193                drawscreen(load, 0, 0);
194                if(ostrstr(tmpstr, "SeriesID") != NULL)
195                {
196                        char* pos1 = NULL;
197                        char* from = NULL;
198                        char* folgen = NULL;
199                        int i;
200
201                        series = 1;
202               
203                        for(i = 1; i < 30; i++)
204                        {
205                                from = ostrcat(from, "<option value=\"", 1, 0);
206                                from = ostrcat(from, oitoa(i), 1, 0);
207                                from = ostrcat(from, "\" rel=", 1, 0);
208                       
209                                pos1 = ostrstr(tmpstr, from);
210                                folgen = getxmlentry(ostrstr(tmpstr, from), "rel=");
211                                printf("session %d folgen: %s\n",i , folgen);   
212               
213       
214                                if(folgen != NULL)
215                                {
216                                        int count = 0;
217                                        int incount = 0;
218                                        int j;
219                                        struct splitstr* ret1 = NULL;
220                                        ret1 = strsplit(folgen, ",", &count);
221                                               
222                                        if(ret1 != NULL && count > 0)
223                                        {
224                                                int max = count + 1;
225                                                for(j = 1; j < max; j++)
226                                                {                                                       
227                                                        incount += 1;
228                                                        line = ostrcat(line, _("Session"), 1, 0);
229                                                        line = ostrcat(line, " ", 1, 0);
230                                                        line = ostrcat(line, oitoa(i), 1, 0);
231                                                        line = ostrcat(line, " ", 1, 0);
232                                                        line = ostrcat(line, _("Episode"), 1, 0);
233                                                        line = ostrcat(line, " ", 1, 0);
234                                                        line = ostrcat(line, oitoa(j), 1, 0);                                   
235                                                        line = ostrcat(line, "#", 1, 0);
236                                                        line = ostrcat(line, link, 1, 0);
237                                                        line = ostrcat(line, ";", 1, 0);
238                                                        line = ostrcat(line, oitoa(i), 1, 0);
239                                                        line = ostrcat(line, ";", 1, 0);
240                                                        line = ostrcat(line, oitoa(j), 1, 0);
241                                                        line = ostrcat(line, "#", 1, 0);
242                                                        line = ostrcat(line, "http://atemio.dyndns.tv/mediathek/menu/s", 1, 0);
243                                                        line = ostrcat(line, oitoa(i), 1, 0);
244                                                        line = ostrcat(line, "e", 1, 0);
245                                                        line = ostrcat(line, oitoa(j), 1, 0);
246                                                        line = ostrcat(line, ".jpg", 1, 0);                                                                                                                             
247                                                        line = ostrcat(line, "#kinox_search_", 1, 0);
248                                                        line = ostrcat(line, oitoa(i), 1, 0);
249                                                        line = ostrcat(line, "e", 1, 0);
250                                                        line = ostrcat(line, oitoa(j), 1, 0);
251                                                        line = ostrcat(line, ".jpg#KinoX - ", 1, 0);
252                                                        line = ostrcat(line, title, 1, 0);
253                                                        line = ostrcat(line, "#23\n", 1, 0);
254                                                }
255                                        }
256                                        free(ret1), ret1 = NULL;
257                                }                               
258                                free(from), from = NULL;
259                                free(folgen), folgen = NULL;
260                        }
261                }
262                else
263                {
264                        tmpstr = string_resub("<ul id=\"HosterList\" class=\"Sortable\">", "</ul>", tmpstr, 0);
265       
266                        int count = 0;
267                        int incount = 0;
268                        int i;
269                        struct splitstr* ret1 = NULL;
270                        ret1 = strsplit(tmpstr, "\n", &count);
271       
272                        char* hname = NULL;
273                        char* hnr = NULL;
274                        char* hlink = NULL;
275                       
276                        if(ret1 != NULL && count > 0)
277                        {
278                                int max = count;
279                                for(i = 0; i < max; i++)
280                                {
281                                        hnr = string_resub("<li id=\"Hoster_", "\"", ret1[i].part, 0);
282                                        hlink = string_resub("rel=\"", "\">", ret1[i].part, 0);
283                                        hlink = string_replace_all("amp;", "", hlink, 1);
284       
285                                        hname = string_resub("<div class=\"Named\">", "</div>", ret1[i].part, 0);
286                                        pathnew = ostrcat("/aGET/Mirror/", hlink, 0, 0);
287       
288                                        tmpstr1 = gethttp("kinox.to", pathnew, 80, NULL, NULL, NULL, 0);
289                                        free(pathnew), pathnew = NULL;
290       
291                                        tmpstr1 = string_replace_all("\\", "", tmpstr1, 1);
292                                        tmpstr1 = string_resub("<a href=\"", "\"", tmpstr1, 0);
293       
294                                        url = ostrcat(tmpstr1, NULL, 0, 0);
295                                        int type = 0;
296                                        int count2 = 0;
297                                        struct splitstr* ret2 = NULL;
298                                        ret2 = strsplit(tmpstr1, "/", &count2);
299       
300                                        if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Sockshare.com") == 0)
301                                        {
302                                                tmpstr2 = ret2[3].part;
303                                                type = 14;
304                                        }
305                                        else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Putlocker.com") == 0)
306                                        {
307                                                tmpstr2 = ret2[3].part;
308                                                type = 14;
309                                        }
310                                        else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "FileNuke.com") == 0)
311                                        {
312                                                tmpstr2 = ret2[2].part;
313                                                type = 15;
314                                        }
315                                        else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "StreamCloud.eu") == 0)
316                                        {
317                                                tmpstr2 = ret2[2].part;
318                                                type = 20;
319                                        }
320                                        else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "VidStream.in") == 0)
321                                        {
322                                                tmpstr2 = ret2[3].part;
323                                        }
324                                        else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "FlashX.tv") == 0)
325                                        {
326                                                tmpstr2 = ret2[3].part;
327                                        }
328                                        else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "PrimeShare.tv") == 0)
329                                        {
330                                                tmpstr2 = ret2[3].part;
331                                        }                               
332                                        else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "XvidStage.com") == 0)
333                                        {
334                                                tmpstr2 = ret2[3].part;
335                                        }
336                                        else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Vidxden.com (DivX)") == 0)
337                                        {
338                                                tmpstr2 = ret2[3].part;
339                                        }                               
340                                        else if(ret2 != NULL && count2 > 2)
341                                        {
342                                                tmpstr2 = ret2[2].part;
343                                                hname = ostrcat(hname, " (coming soon)", 1, 0);
344                                                type = 66;
345                                        }
346                                        else
347                                        {
348                                                tmpstr2 = ostrcat("unknown", NULL, 0, 0);
349                                                hname = ostrcat(hname, " (coming soon)", 1, 0);
350                                                type = 66;
351                                        }
352                                               
353                                        free(ret2), ret2 = NULL;
354                                        debug(99, "hname: %s", hname);
355                                        debug(99, "url: %s", url);
356                                        debug(99, "id: %s", tmpstr2);
357                                        debug(99, "hname: %s", hname);
358                                                                               
359                                        incount += 1;
360                                        line = ostrcat(line, hname, 1, 0);
361                                        line = ostrcat(line, "#", 1, 0);
362                                        line = ostrcat(line, url, 1, 0);
363                                        line = ostrcat(line, ";", 1, 0);
364                                        line = ostrcat(line, tmpstr2, 1, 0);
365                                        line = ostrcat(line, ";", 1, 0);                               
366                                        line = ostrcat(line, hname, 1, 0);
367                                        line = ostrcat(line, "#", 1, 0);
368                                        line = ostrcat(line, "http://atemio.dyndns.tv/mediathek/menu/", 1, 0);
369                                        line = ostrcat(line, hname, 1, 0);
370                                        line = ostrcat(line, ".jpg#kinox_", 1, 0);
371                                        line = ostrcat(line, hname, 1, 0);
372                                        line = ostrcat(line, ".jpg#KinoX - ", 1, 0);
373                                        line = ostrcat(line, title, 1, 0);
374                                        line = ostrcat(line, "#", 1, 0);
375                                        line = ostrcat(line, oitoa(type), 1, 0);
376                                        line = ostrcat(line, "\n", 1, 0);
377               
378                                        free(hname), hname = NULL;
379                                        free(hnr), hnr = NULL;
380                                        free(hlink), hlink = NULL;                                                                             
381                                        free(url), url = NULL;
382                                        free(pathnew), pathnew = NULL;
383                                }
384                        }
385                        free(ret1), ret1 = NULL;
386                }
387        }
388        free(tmpstr), tmpstr = NULL;   
389
390        if(line != NULL)
391        {
392                if(series == 0)
393                        tmpstr = ostrcat("/tmp/tithek/kinox.hoster.list", NULL, 0, 0);
394                else
395                        tmpstr = ostrcat("/tmp/tithek/kinox.hoster.ser.list", NULL, 0, 0);
396                writesys(tmpstr, line, 0);
397// *** glibc detected *** titan: free(): invalid pointer: 0x00a3bccd ***
398//              free(((struct tithek*)listbox->select->handle)->link);
399                ((struct tithek*)listbox->select->handle)->link = tmpstr;
400                ret = 0;
401        }
402
403        return ret;
404}
405
406int kinox_hoster_series(struct skin* grid, struct skin* listbox, struct skin* countlabel, struct skin* load, char* link, char* title)
407{
408        debug(99, "link: %s", link);
409        int ret = 1;
410        char* ip = NULL, *pathnew = NULL, *seriesid = NULL, *searchname = NULL, *url = NULL, *session = NULL, *episode = NULL, *pos = NULL, *path = NULL, *tmpstr = NULL, *tmpstr1 = NULL, *tmpstr2 = NULL, *line = NULL;               
411
412        if(listbox == NULL || listbox->select == NULL || listbox->select->handle == NULL)
413                return ret;
414
415        int count0 = 0;
416        struct splitstr* ret0 = NULL;
417        ret0 = strsplit(link, ";", &count0);
418        if(ret0 != NULL && count0 >= 3)
419        {
420                url = ostrcat(url, ret0[0].part, 1, 0);
421                debug(99, "url: %s", url);
422
423                session = ostrcat(session, ret0[1].part, 1, 0);
424                debug(99, "session: %s", session);
425
426                episode = ostrcat(episode, ret0[2].part, 1, 0);
427                debug(99, "episode: %s", episode);
428
429                searchname = ostrcat(searchname, ret0[0].part, 1, 0);
430                searchname = string_replace("http://kinox.to//Stream/", "", searchname, 0);
431                searchname = string_replace("http://kinox.to/Stream/", "", searchname, 0);
432                searchname = string_replace(".html", "", searchname, 0);
433                debug(99, "searchname: %s", searchname);
434        }
435        free(ret0), ret0 = NULL;
436
437        ip = string_replace("http://", "", url, 0);
438
439        if(ip != NULL)
440                pos = strchr(ip, '/');
441        if(pos != NULL)
442        {
443                pos[0] = '\0';
444                path = pos + 1;
445        }
446
447        tmpstr = gethttp(ip, path, 80, NULL, NULL, NULL, 0);
448
449        if(tmpstr != NULL)
450        {
451                drawscreen(load, 0, 0);
452               
453                seriesid = string_resub("SeriesID=", "\"", tmpstr, 0);
454                debug(99, "seriesid: %s", seriesid);
455                       
456                pathnew = ostrcat("/aGET/MirrorByEpisode/&?Addr=", searchname, 0, 0);
457                pathnew = ostrcat(pathnew, "&SeriesID=", 1, 0);
458                pathnew = ostrcat(pathnew, seriesid, 1, 0);
459                pathnew = ostrcat(pathnew, "&Season=", 1, 0);
460                pathnew = ostrcat(pathnew, session, 1, 0);
461                pathnew = ostrcat(pathnew, "&Episode=", 1, 0);
462                pathnew = ostrcat(pathnew, episode, 1, 0);
463                debug(99, "pathnew: %s", pathnew);
464       
465                free(tmpstr), tmpstr = NULL;
466                tmpstr = gethttp("kinox.to", pathnew, 80, NULL, NULL, NULL, 0);
467                free(pathnew), pathnew = NULL;
468       
469                if(tmpstr != NULL)
470                {
471                        tmpstr = string_resub("<ul id=\"HosterList\" class=\"Sortable\">", "</ul>", tmpstr, 0);
472               
473                        int count = 0;
474                        int incount = 0;
475                        int i;
476                        struct splitstr* ret1 = NULL;
477                        ret1 = strsplit(tmpstr, "\n", &count);
478               
479                        char* hname = NULL;
480                        char* hnr = NULL;
481                        char* hlink = NULL;
482                       
483                        if(ret1 != NULL && count > 0)
484                        {
485                                int max = count;
486                                for(i = 0; i < max; i++)
487                                {
488                                        hnr = string_resub("<li id=\"Hoster_", "\"", ret1[i].part, 0);
489                                        hlink = string_resub("rel=\"", "\">", ret1[i].part, 0);
490                                        hlink = string_replace_all("amp;", "", hlink, 1);
491                                        hname = string_resub("<div class=\"Named\">", "</div>", ret1[i].part, 0);
492
493                                        hlink = string_replace("http://kinox.to//Stream/", "", hlink, 1);                                       
494                                        hlink = string_replace("http://kinox.to/Stream/", "", hlink, 1);
495                                                                               
496                                        pathnew = ostrcat("/aGET/Mirror/", hlink, 0, 0);
497                                        debug(99, "pathnew: %s", pathnew);
498       
499                                        tmpstr1 = gethttp("kinox.to", pathnew, 80, NULL, NULL, NULL, 0);
500                                        tmpstr1 = string_replace_all("\\", "", tmpstr1, 1);
501                                        tmpstr1 = string_resub("<a href=\"", "\"", tmpstr1, 0);
502       
503                                        url = ostrcat(tmpstr1, NULL, 0, 0);
504                                        int type = 0;
505                                        int count2 = 0;
506                                        struct splitstr* ret2 = NULL;
507                                        ret2 = strsplit(tmpstr1, "/", &count2);
508               
509                                        if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Sockshare.com") == 0)
510                                        {
511                                                tmpstr2 = ret2[3].part;
512                                                type = 14;
513                                        }
514                                        else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Putlocker.com") == 0)
515                                        {
516                                                tmpstr2 = ret2[3].part;
517                                                type = 14;
518                                        }
519                                        else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "FileNuke.com") == 0)
520                                        {
521                                                tmpstr2 = ret2[2].part;
522                                                type = 15;
523                                        }
524                                        else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "StreamCloud.eu") == 0)
525                                        {
526                                                tmpstr2 = ret2[2].part;
527                                                type = 20;
528                                        }
529                                        else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "VidStream.in") == 0)
530                                        {
531                                                tmpstr2 = ret2[3].part;
532                                        }
533                                        else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "FlashX.tv") == 0)
534                                        {
535                                                tmpstr2 = ret2[3].part;
536                                        }
537                                        else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "PrimeShare.tv") == 0)
538                                        {
539                                                tmpstr2 = ret2[3].part;
540                                        }                               
541                                        else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "XvidStage.com") == 0)
542                                        {
543                                                tmpstr2 = ret2[3].part;
544                                        }
545                                        else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Vidxden.com (DivX)") == 0)
546                                        {
547                                                tmpstr2 = ret2[3].part;
548                                        }                               
549                                        else if(ret2 != NULL && count2 > 2)
550                                        {
551                                                tmpstr2 = ret2[2].part;
552                                                hname = ostrcat(hname, " (coming soon)", 1, 0);
553                                                type = 66;
554                                        }
555                                        else
556                                        {
557                                                tmpstr2 = ostrcat("unknown", NULL, 0, 0);
558                                                hname = ostrcat(hname, " (coming soon)", 1, 0);
559                                                type = 66;
560                                        }
561                                       
562                                        free(ret2), ret2 = NULL;
563                                        debug(99, "hname: %s", hname);
564                                        debug(99, "url: %s", url);
565                                        debug(99, "id: %s", tmpstr2);
566                                        debug(99, "hname: %s", hname);
567                                                                                                                                                       
568                                        incount += 1;
569                                        line = ostrcat(line, hname, 1, 0);
570                                        line = ostrcat(line, "#", 1, 0);
571                                        line = ostrcat(line, url, 1, 0);
572                                        line = ostrcat(line, ";", 1, 0);
573                                        line = ostrcat(line, tmpstr2, 1, 0);
574                                        line = ostrcat(line, ";", 1, 0);                               
575                                        line = ostrcat(line, hname, 1, 0);
576                                        line = ostrcat(line, "#", 1, 0);
577                                        line = ostrcat(line, "http://atemio.dyndns.tv/mediathek/menu/", 1, 0);
578                                        line = ostrcat(line, hname, 1, 0);
579                                        line = ostrcat(line, ".jpg#kinox_", 1, 0);
580                                        line = ostrcat(line, hname, 1, 0);
581                                        line = ostrcat(line, ".jpg#KinoX - ", 1, 0);
582                                        line = ostrcat(line, title, 1, 0);
583                                        line = ostrcat(line, "#", 1, 0);
584                                        line = ostrcat(line, oitoa(type), 1, 0);
585                                        line = ostrcat(line, "\n", 1, 0);
586               
587                                        free(hname), hname = NULL;
588                                        free(hnr), hnr = NULL;
589                                        free(hlink), hlink = NULL;                                                                             
590                                        free(url), url = NULL; 
591                                        free(pathnew), pathnew = NULL;
592                                }
593                        }
594                        free(ret1), ret1 = NULL;
595                }
596        }
597
598        free(tmpstr), tmpstr = NULL;   
599        if(line != NULL)
600        {
601                tmpstr = ostrcat("/tmp/tithek/kinox.hoster.series.list", NULL, 0, 0);
602                writesys(tmpstr, line, 0);
603// *** glibc detected *** titan: free(): invalid pointer: 0x00a3bccd ***
604//              free(((struct tithek*)listbox->select->handle)->link);
605                ((struct tithek*)listbox->select->handle)->link = tmpstr;
606                ret = 0;
607        }
608
609        return ret;
610}
611
612#endif
Note: See TracBrowser for help on using the repository browser.