1 | #ifndef SOLARMOVIE_H |
---|
2 | #define SOLARMOVIE_H |
---|
3 | |
---|
4 | // flag 1 = putlocker/sockshare |
---|
5 | // flag 2 = filenuke |
---|
6 | |
---|
7 | char* solarmovie(char* link) |
---|
8 | { |
---|
9 | debug(99, "link11111111111: %s", link); |
---|
10 | char* tmpstr = NULL, *tmpstr1 = NULL, *tmpstr2 = NULL, *path = NULL, *url = NULL, *streamurl = NULL, *id = NULL, *hname = NULL; |
---|
11 | // char* cmd = NULL; |
---|
12 | |
---|
13 | if(link == NULL) return NULL; |
---|
14 | |
---|
15 | int count = 0; |
---|
16 | struct splitstr* ret1 = NULL; |
---|
17 | ret1 = strsplit(link, ";", &count); |
---|
18 | if(ret1 != NULL && count >= 3) |
---|
19 | { |
---|
20 | unlink("/tmp/tithek/get"); |
---|
21 | unlink("/tmp/tithek/get_zcat"); |
---|
22 | unlink("/tmp/tithek/get_zcat1"); |
---|
23 | |
---|
24 | path = ostrcat(ret1[0].part, NULL, 0, 0); |
---|
25 | debug(99, "path: %s", path); |
---|
26 | |
---|
27 | id = ostrcat(ret1[1].part, NULL, 0, 0); |
---|
28 | debug(99, "id: %s", id); |
---|
29 | |
---|
30 | hname = ostrcat(ret1[2].part, NULL, 0, 0); |
---|
31 | debug(99, "hname: %s", hname); |
---|
32 | |
---|
33 | char* send = ostrcat("GET /link/play/", NULL, 0, 0); |
---|
34 | send = ostrcat(send, id, 1, 0); |
---|
35 | send = ostrcat(send, " HTTP/1.1\r\nHost: www.solarmovie.so\r\nUser-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.99 Safari/535.1\r\nConnection: close\r\nAccept-Encoding: gzip\r\n\r\n", 1, 0); |
---|
36 | debug(99, "send: %s", send); |
---|
37 | unlink("/tmp/tithek/get1"); |
---|
38 | tmpstr = gethttpreal("www.solarmovie.so", path, 80, NULL, NULL, NULL, 0, send, NULL, 5000, 0); |
---|
39 | debug(99, "tmpstr: %s", tmpstr); |
---|
40 | free(send); send = NULL; |
---|
41 | |
---|
42 | if(tmpstr != NULL) |
---|
43 | { |
---|
44 | string_strip_whitechars(tmpstr); |
---|
45 | if(ostrstr(tmpstr, "<div class=\"thirdPartyEmbContainer\">") != NULL) |
---|
46 | { |
---|
47 | tmpstr1 = string_resub("<div class=\"thirdPartyEmbContainer\">", "</div>", tmpstr, 0); |
---|
48 | stringreplacechar(tmpstr1, '\n', ' '); |
---|
49 | url = string_resub("<center><iframe src=\"", "\"", tmpstr1, 0); |
---|
50 | if(url == NULL || ostrncmp("http://", url, 7) == 1) |
---|
51 | url = oregex(".*src=\"(http://.*)&width.*", tmpstr1); |
---|
52 | } |
---|
53 | else |
---|
54 | { |
---|
55 | url = oregex(".*<iframe name=\"service_frame\" class=\"service_frame\" src=\"(http://.*)\".*", tmpstr); |
---|
56 | url = oregex("(http://.*)\".*", url); |
---|
57 | url = string_replace_all("embed", "file", url, 1); |
---|
58 | } |
---|
59 | |
---|
60 | tmpstr1 = ostrcat(url, NULL, 0, 0); |
---|
61 | |
---|
62 | int count2 = 0; |
---|
63 | struct splitstr* ret2 = NULL; |
---|
64 | ret2 = strsplit(tmpstr1, "/", &count2); |
---|
65 | // ret2 = strsplit(tmpstr1, "= & / \"", &count2); |
---|
66 | |
---|
67 | if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "sockshare.com") == 0) |
---|
68 | streamurl = putlocker("Sockshare.com", ret2[3].part, url); |
---|
69 | else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "putlocker.com") == 0) |
---|
70 | streamurl = putlocker("Putlocker.com", ret2[3].part, url); |
---|
71 | else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "filenuke.com") == 0) |
---|
72 | streamurl = filenuke("FileNuke.com", ret2[2].part, url); |
---|
73 | else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "streamcloud.eu") == 0) |
---|
74 | streamurl = streamcloud("StreamCloud.eu", ret2[2].part, url); |
---|
75 | else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "streamcloud.eu") == 0) |
---|
76 | streamurl = streamcloud("StreamCloud.eu", ret2[2].part, url); |
---|
77 | else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "vidstream.in") == 0) |
---|
78 | streamurl = vidstream("VidStream.in", ret2[2].part, url); |
---|
79 | else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "flashx.tv") == 0) |
---|
80 | streamurl = flashx("FlashX.tv", ret2[3].part, url); |
---|
81 | else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "xvidstage.com") == 0) |
---|
82 | streamurl = xvidstage("XvidStage.com", ret2[2].part, url); |
---|
83 | else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "nowvideo.eu") == 0) |
---|
84 | { |
---|
85 | tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0); |
---|
86 | tmpstr2 = string_replace("embed.php?v=", "", tmpstr2, 1); |
---|
87 | streamurl = nowvideo("NowVideo.eu", tmpstr2, url); |
---|
88 | } |
---|
89 | else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "nowvideo.eu") == 0) |
---|
90 | { |
---|
91 | tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0); |
---|
92 | tmpstr2 = string_replace("embed.php?v=", "", tmpstr2, 1); |
---|
93 | debug(99, "tmpstr2: %s", tmpstr2, url); |
---|
94 | streamurl = nowvideo("NowVideo.eu", tmpstr2, url); |
---|
95 | } |
---|
96 | else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "nowvideo.sx") == 0) |
---|
97 | { |
---|
98 | tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0); |
---|
99 | tmpstr2 = string_replace("embed.php?v=", "", tmpstr2, 1); |
---|
100 | streamurl = nowvideo("NowVideo.sx", tmpstr2, url); |
---|
101 | } |
---|
102 | else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "nowvideo.sx") == 0) |
---|
103 | { |
---|
104 | tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0); |
---|
105 | tmpstr2 = string_replace("embed.php?v=", "", tmpstr2, 1); |
---|
106 | debug(99, "tmpstr2: %s", tmpstr2, url); |
---|
107 | streamurl = nowvideo("NowVideo.sx", tmpstr2, url); |
---|
108 | } |
---|
109 | else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "movshare.net") == 0) |
---|
110 | { |
---|
111 | tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0); |
---|
112 | tmpstr2 = string_replace("embed.php?v=", "", tmpstr2, 1); |
---|
113 | streamurl = movshare("MovShare.net", tmpstr2, url); |
---|
114 | } |
---|
115 | else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "movshare.net") == 0) |
---|
116 | { |
---|
117 | tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0); |
---|
118 | tmpstr2 = string_replace("embed.php?v=", "", tmpstr2, 1); |
---|
119 | debug(99, "tmpstr2: %s", tmpstr2, url); |
---|
120 | streamurl = movshare("MovShare.net", tmpstr2, url); |
---|
121 | } |
---|
122 | |
---|
123 | free(ret2), ret2 = NULL; |
---|
124 | } |
---|
125 | } |
---|
126 | free(ret1), ret1 = NULL; |
---|
127 | |
---|
128 | free(url), url = NULL; |
---|
129 | free(tmpstr), tmpstr = NULL; |
---|
130 | free(tmpstr1), tmpstr1 = NULL; |
---|
131 | free(tmpstr2), tmpstr2 = NULL; |
---|
132 | free(path), path = NULL; |
---|
133 | free(hname), hname = NULL; |
---|
134 | free(id), id = NULL; |
---|
135 | |
---|
136 | return streamurl; |
---|
137 | } |
---|
138 | |
---|
139 | int solarmovie_search(struct skin* grid, struct skin* listbox, struct skin* countlabel, struct skin* load, char* link, char* title, char* searchstr, int flag) |
---|
140 | { |
---|
141 | int debuglevel = getconfigint("debuglevel", NULL); |
---|
142 | int ret = 1; |
---|
143 | int incount = 0; |
---|
144 | |
---|
145 | if(listbox == NULL || listbox->select == NULL || listbox->select->handle == NULL) |
---|
146 | return ret; |
---|
147 | |
---|
148 | char* search = NULL; |
---|
149 | if(searchstr == NULL) |
---|
150 | search = textinputhist("Search", " ", "searchhist"); |
---|
151 | else |
---|
152 | search = textinputhist("Search", searchstr, "searchhist"); |
---|
153 | |
---|
154 | if(search != NULL) |
---|
155 | { |
---|
156 | drawscreen(load, 0, 0); |
---|
157 | char* tmpstr = NULL; |
---|
158 | char* tmpstr1 = NULL; |
---|
159 | char* line = NULL; |
---|
160 | char* pic = NULL; |
---|
161 | char* title = NULL; |
---|
162 | char* url = NULL; |
---|
163 | char* ip = NULL; |
---|
164 | char* path = NULL; |
---|
165 | char* menu = NULL; |
---|
166 | char* file = NULL; |
---|
167 | char* file1 = NULL; |
---|
168 | search = strstrip(search); |
---|
169 | search = stringreplacechar(search, ' ', '+'); |
---|
170 | debug(99, "search: %s", search); |
---|
171 | |
---|
172 | ip = ostrcat("www.solarmovie.so", NULL, 0, 0); |
---|
173 | if(flag == 0) |
---|
174 | path = ostrcat("movie/search/", search, 0, 0); |
---|
175 | else |
---|
176 | path = ostrcat("tv/search/", search, 0, 0); |
---|
177 | |
---|
178 | tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0); |
---|
179 | titheklog(debuglevel, "/tmp/solarmovie_tmpstr", NULL, tmpstr); |
---|
180 | |
---|
181 | while(ostrstr(tmpstr, "<div class=\"typicalGrey coverGroup\">") != NULL) |
---|
182 | { |
---|
183 | int rcret = waitrc(NULL, 10, 0); |
---|
184 | if(rcret == getrcconfigint("rcexit", NULL)) break; |
---|
185 | |
---|
186 | incount += 1; |
---|
187 | if(debuglevel == 99) |
---|
188 | { |
---|
189 | file = ostrcat("/tmp/solarmovie_tmpstr", oitoa(incount), 0, 1); |
---|
190 | writesys(file, tmpstr, 0); |
---|
191 | } |
---|
192 | |
---|
193 | tmpstr1 = string_resub("<div class=\"typicalGrey coverGroup\">", "</div>", tmpstr, 0); |
---|
194 | |
---|
195 | if(debuglevel == 99) |
---|
196 | { |
---|
197 | file1 = ostrcat("/tmp/solarmovie_tmpstr_resub", oitoa(incount), 0, 1); |
---|
198 | writesys(file1, tmpstr1, 0); |
---|
199 | } |
---|
200 | |
---|
201 | path = string_resub("href=\"", "\"", tmpstr1, 0); |
---|
202 | pic = string_resub("<img src=\"", "\"", tmpstr1, 0); |
---|
203 | title = string_resub("<a title=\"", "\"", tmpstr1, 0); |
---|
204 | |
---|
205 | url = ostrcat("http://www.solarmovie.so", path, 0, 0); |
---|
206 | |
---|
207 | debug(99, "---------------------------"); |
---|
208 | debug(99, "pic: %s", pic); |
---|
209 | debug(99, "title: %s", title); |
---|
210 | debug(99, "url: %s", url); |
---|
211 | debug(99, "---------------------------"); |
---|
212 | |
---|
213 | if(url != NULL) |
---|
214 | { |
---|
215 | line = ostrcat(line, title, 1, 0); |
---|
216 | line = ostrcat(line, "#", 1, 0); |
---|
217 | line = ostrcat(line, url, 1, 0); |
---|
218 | line = ostrcat(line, "#", 1, 0); |
---|
219 | line = ostrcat(line, pic, 1, 0); |
---|
220 | line = ostrcat(line, "#solarmovie_search_", 1, 0); |
---|
221 | line = ostrcat(line, oitoa(incount + time(NULL)), 1, 0); |
---|
222 | line = ostrcat(line, ".jpg#SolarMovie - Search#28\n", 1, 0); |
---|
223 | } |
---|
224 | free(url), url = NULL; |
---|
225 | free(path), path = NULL; |
---|
226 | free(title), title = NULL; |
---|
227 | free(pic), pic = NULL; |
---|
228 | free(file), file = NULL; |
---|
229 | free(file1), file1 = NULL; |
---|
230 | |
---|
231 | tmpstr = string_replace("typicalGrey coverGroup", "", tmpstr, 1); |
---|
232 | free(tmpstr1), tmpstr1 = NULL; |
---|
233 | } |
---|
234 | |
---|
235 | if(line != NULL) |
---|
236 | { |
---|
237 | menu = ostrcat("/tmp/tithek/solarmovie.search.list", NULL, 0, 0); |
---|
238 | writesys(menu, line, 0); |
---|
239 | struct tithek* tnode = (struct tithek*)listbox->select->handle; |
---|
240 | createtithek(tnode, tnode->title, menu, tnode->pic, tnode->localname, tnode->menutitle, tnode->flag); |
---|
241 | ret = 0; |
---|
242 | } |
---|
243 | |
---|
244 | free(tmpstr), tmpstr = NULL; |
---|
245 | free(ip), ip = NULL; |
---|
246 | } |
---|
247 | free(search), search = NULL; |
---|
248 | return ret; |
---|
249 | } |
---|
250 | |
---|
251 | int solarmovie_hoster(struct skin* grid, struct skin* listbox, struct skin* countlabel, struct skin* load, char* link, char* title) |
---|
252 | { |
---|
253 | debug(99, "link: %s", link); |
---|
254 | int debuglevel = getconfigint("debuglevel", NULL); |
---|
255 | int ret = 1, series = 0; |
---|
256 | char* ip = NULL, *pos = NULL, *path = NULL, *etitle = NULL, *episode = NULL, *session = NULL, *update = NULL, *quality = NULL, *id = NULL, *line = NULL, *hname = NULL, *tmpstr = NULL, *cmd = NULL, *url = NULL, *tmpstr1 = NULL, *tmphost = NULL, *tmphname = NULL; |
---|
257 | |
---|
258 | unlink("/tmp/tithek/get"); |
---|
259 | unlink("/tmp/tithek/get_zcat"); |
---|
260 | unlink("/tmp/tithek/get_zcat1"); |
---|
261 | |
---|
262 | if(listbox == NULL || listbox->select == NULL || listbox->select->handle == NULL) |
---|
263 | return ret; |
---|
264 | |
---|
265 | ip = string_replace("http://", "", (char*)link, 0); |
---|
266 | |
---|
267 | if(ip != NULL) |
---|
268 | pos = strchr(ip, '/'); |
---|
269 | if(pos != NULL) |
---|
270 | { |
---|
271 | pos[0] = '\0'; |
---|
272 | path = pos + 1; |
---|
273 | } |
---|
274 | |
---|
275 | tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0); |
---|
276 | |
---|
277 | if(tmpstr == NULL) |
---|
278 | { |
---|
279 | textbox(_("Message"), _("This file doesn't exist, or has been removed") , _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1200, 200, 0, 0); |
---|
280 | goto end; |
---|
281 | } |
---|
282 | // if(debuglevel == 99) system("cp -a /tmp/tithek/get /tmp/solarmovie1_tmpstr_get"); |
---|
283 | |
---|
284 | // tmpstr = command("cat /tmp/tithek/get"); |
---|
285 | if(ostrstr(tmpstr, "<!DOCTYPE") == NULL) |
---|
286 | { |
---|
287 | cmd = ostrcat(cmd, "cat /tmp/tithek/get | zcat", 1, 0); |
---|
288 | debug(99, "cmd: %s", cmd); |
---|
289 | free(tmpstr), tmpstr = NULL; |
---|
290 | tmpstr = command(cmd); |
---|
291 | |
---|
292 | writesys("/tmp/tithek/get_zcat", tmpstr, 0); |
---|
293 | free(cmd), cmd = NULL; |
---|
294 | } |
---|
295 | // else |
---|
296 | // system("cp -a /tmp/tithek/get /tmp/tithek/get_zcat"); |
---|
297 | |
---|
298 | // titheklog(debuglevel, "/tmp/solarmovie2_tmpstr_zcat", NULL, tmpstr); |
---|
299 | |
---|
300 | drawscreen(load, 0, 0); |
---|
301 | if(ostrstr(link, "/tv/") != NULL && ostrstr(link, "/season-") == NULL && ostrstr(link, "/episode-") == NULL) |
---|
302 | series = 1; |
---|
303 | else |
---|
304 | series = 0; |
---|
305 | |
---|
306 | if(series == 0) |
---|
307 | { |
---|
308 | series = 0; |
---|
309 | if(tmpstr != NULL) |
---|
310 | { |
---|
311 | // free(tmpstr), tmpstr = NULL; |
---|
312 | // tmpstr = command("cat /tmp/tithek/get_zcat"); |
---|
313 | char* tmpcat = string_resub("<tbody>", "</tbody>", tmpstr, 0); |
---|
314 | |
---|
315 | char* ptmpcat = ostrstr(tmpcat, "<td class=\"qualit"); |
---|
316 | int i = 0, incount = 0; |
---|
317 | while(ptmpcat != NULL) |
---|
318 | { |
---|
319 | i++; |
---|
320 | tmpstr1 = ostrcat(tmpstr1, string_resub("<td class=\"qualit", "<div class=\"linkDetails\">", ptmpcat, 0), 1, 1); |
---|
321 | ptmpcat += 5; |
---|
322 | ptmpcat = ostrstr(ptmpcat, "<td class=\"qualit"); |
---|
323 | |
---|
324 | if(ptmpcat != NULL) |
---|
325 | { |
---|
326 | id = oregex(".*/link/show/(.*)/\">.*", tmpstr1); |
---|
327 | quality = string_resub("yCell\">", "</td>", tmpstr1, 0); |
---|
328 | update = string_resub("oddCell\">", "</td>", tmpstr1, 0); |
---|
329 | string_remove_whitechars(quality); |
---|
330 | strstrip(quality); |
---|
331 | tmphname = oregex(".*/\">(.*)</a>.*", tmpstr1); |
---|
332 | string_remove_whitechars(tmphname); |
---|
333 | strstrip(tmphname); |
---|
334 | |
---|
335 | tmphost = ostrcat("www.solarmovie.so", NULL, 0, 0); |
---|
336 | url = ostrcat("/link/play/", id, 0, 0); |
---|
337 | |
---|
338 | int type = 43; |
---|
339 | if(ostrcmp(tmphname, "sockshare.com") == 0) |
---|
340 | hname = ostrcat("Sockshare.com", NULL, 0, 0); |
---|
341 | else if(ostrcmp(tmphname, "putlocker.com") == 0) |
---|
342 | hname = ostrcat("Putlocker.com", NULL, 0, 0); |
---|
343 | else if(ostrcmp(tmphname, "filenuke.com") == 0) |
---|
344 | hname = ostrcat("FileNuke.com", NULL, 0, 0); |
---|
345 | else if(ostrcmp(tmphname, "streamcloud.eu") == 0) |
---|
346 | hname = ostrcat("StreamCloud.eu", NULL, 0, 0); |
---|
347 | else if(ostrcmp(tmphname, "streamcloud") == 0) |
---|
348 | hname = ostrcat("StreamCloud.eu", NULL, 0, 0); |
---|
349 | else if(ostrcmp(tmphname, "vidstream.in") == 0) |
---|
350 | hname = ostrcat("VidStream.in", NULL, 0, 0); |
---|
351 | else if(ostrcmp(tmphname, "flashx.tv") == 0) |
---|
352 | hname = ostrcat("FlashX.tv", NULL, 0, 0); |
---|
353 | else if(ostrcmp(tmphname, "primeshare.tv") == 0) |
---|
354 | hname = ostrcat("PrimeShare.tv", NULL, 0, 0); |
---|
355 | else if(ostrcmp(tmphname, "xvidstage.com") == 0) |
---|
356 | hname = ostrcat("XvidStage.com", NULL, 0, 0); |
---|
357 | else if(ostrcmp(tmphname, "vidxden.com") == 0) |
---|
358 | hname = ostrcat("vidxden.com", NULL, 0, 0); |
---|
359 | else if(ostrcmp(tmphname, "nowvideo.eu") == 0) |
---|
360 | hname = ostrcat("NowVideo.eu", NULL, 0, 0); |
---|
361 | else if(ostrcmp(tmphname, "nowvideo.sx") == 0) |
---|
362 | hname = ostrcat("NowVideo.sx", NULL, 0, 0); |
---|
363 | else if(ostrcmp(tmphname, "movshare.net") == 0) |
---|
364 | hname = ostrcat("MovShare.net", NULL, 0, 0); |
---|
365 | else |
---|
366 | { |
---|
367 | hname = ostrcat(tmphname, " (coming soon)", 0, 0); |
---|
368 | type = 66; |
---|
369 | } |
---|
370 | |
---|
371 | debug(99, "hname: %s url: %s id: %s", hname, url, id); |
---|
372 | |
---|
373 | incount += 1; |
---|
374 | line = ostrcat(line, hname, 1, 0); |
---|
375 | line = ostrcat(line, "#", 1, 0); |
---|
376 | line = ostrcat(line, url, 1, 0); |
---|
377 | line = ostrcat(line, ";", 1, 0); |
---|
378 | line = ostrcat(line, id, 1, 0); |
---|
379 | line = ostrcat(line, ";", 1, 0); |
---|
380 | line = ostrcat(line, tmphname, 1, 0); |
---|
381 | line = ostrcat(line, "#", 1, 0); |
---|
382 | line = ostrcat(line, "http://atemio.dyndns.tv/mediathek/menu/", 1, 0); |
---|
383 | line = ostrcat(line, hname, 1, 0); |
---|
384 | line = ostrcat(line, ".jpg#solarmovie_", 1, 0); |
---|
385 | line = ostrcat(line, hname, 1, 0); |
---|
386 | line = ostrcat(line, ".jpg#Solarmovie - ", 1, 0); |
---|
387 | line = ostrcat(line, title, 1, 0); |
---|
388 | line = ostrcat(line, "#", 1, 0); |
---|
389 | line = ostrcat(line, oitoa(type), 1, 0); |
---|
390 | line = ostrcat(line, "\n", 1, 0); |
---|
391 | free(hname), hname = NULL; |
---|
392 | |
---|
393 | free(tmphname), tmphname = NULL; |
---|
394 | free(id), id = NULL; |
---|
395 | } |
---|
396 | } |
---|
397 | free(tmpcat); tmpcat = NULL; |
---|
398 | } |
---|
399 | } |
---|
400 | else |
---|
401 | { |
---|
402 | series = 1; |
---|
403 | if(tmpstr != NULL) |
---|
404 | { |
---|
405 | writesys("/tmp/tithek/get_zcat", tmpstr, 0); |
---|
406 | |
---|
407 | free(tmpstr), tmpstr = NULL; |
---|
408 | tmpstr = command("cat /tmp/tithek/get_zcat | grep episode- | grep -v Episode | grep -v 'linkCount typicalGrey'"); |
---|
409 | writesys("/var/usr/local/share/titan/plugins/tithek/solarmovie8_tmpstr", tmpstr, 0); |
---|
410 | |
---|
411 | int count = 0; |
---|
412 | struct splitstr* ret1 = NULL; |
---|
413 | ret1 = strsplit(tmpstr, "\n", &count); |
---|
414 | int max = count; |
---|
415 | int i = 0, incount = 0; |
---|
416 | for(i = 0; i < max; i++) |
---|
417 | { |
---|
418 | //<a href="/tv/avatar-the-last-airbender-2005/season-3/episode-2/">The Headband</a> |
---|
419 | session = oregex(".*/season-([0-9]{1,2})/episode-.*", ret1[i].part); |
---|
420 | episode = oregex(".*/episode-([0-9]{1,2})/.*", ret1[i].part); |
---|
421 | etitle = oregex(".*>(.*)<.*", ret1[i].part); |
---|
422 | url = string_resub("\"", "\"", ret1[i].part, 0); |
---|
423 | |
---|
424 | incount += 1; |
---|
425 | line = ostrcat(line, _("Season"), 1, 0); |
---|
426 | line = ostrcat(line, " ", 1, 0); |
---|
427 | line = ostrcat(line, session, 1, 0); |
---|
428 | line = ostrcat(line, " ", 1, 0); |
---|
429 | line = ostrcat(line, _("Episode"), 1, 0); |
---|
430 | line = ostrcat(line, " ", 1, 0); |
---|
431 | line = ostrcat(line, episode, 1, 0); |
---|
432 | |
---|
433 | // line = ostrcat(line, "(s", 1, 0); |
---|
434 | // line = ostrcat(line, session, 1, 0); |
---|
435 | // line = ostrcat(line, "e", 1, 0); |
---|
436 | // line = ostrcat(line, episode, 1, 0); |
---|
437 | // line = ostrcat(line, ") ", 1, 0); |
---|
438 | // line = ostrcat(line, etitle, 1, 0); |
---|
439 | |
---|
440 | line = ostrcat(line, "#http://www.solarmovie.so", 1, 0); |
---|
441 | line = ostrcat(line, url, 1, 0); |
---|
442 | // line = ostrcat(line, ";", 1, 0); |
---|
443 | // line = ostrcat(line, session, 1, 0); |
---|
444 | // line = ostrcat(line, ";", 1, 0); |
---|
445 | // line = ostrcat(line, episode, 1, 0); |
---|
446 | line = ostrcat(line, "#", 1, 0); |
---|
447 | line = ostrcat(line, "http://atemio.dyndns.tv/mediathek/menu/s", 1, 0); |
---|
448 | line = ostrcat(line, session, 1, 0); |
---|
449 | line = ostrcat(line, "e", 1, 0); |
---|
450 | line = ostrcat(line, episode, 1, 0); |
---|
451 | line = ostrcat(line, ".jpg", 1, 0); |
---|
452 | line = ostrcat(line, "#s", 1, 0); |
---|
453 | line = ostrcat(line, session, 1, 0); |
---|
454 | line = ostrcat(line, "e", 1, 0); |
---|
455 | line = ostrcat(line, episode, 1, 0); |
---|
456 | line = ostrcat(line, ".jpg#Solarmovie - ", 1, 0); |
---|
457 | line = ostrcat(line, title, 1, 0); |
---|
458 | line = ostrcat(line, "#28\n", 1, 0); |
---|
459 | free(session), session = NULL; |
---|
460 | free(episode), episode = NULL; |
---|
461 | free(url), url = NULL; |
---|
462 | free(etitle), etitle = NULL; |
---|
463 | } |
---|
464 | } |
---|
465 | } |
---|
466 | free(tmpstr), tmpstr = NULL; |
---|
467 | |
---|
468 | if(line != NULL) |
---|
469 | { |
---|
470 | if(series == 0) |
---|
471 | tmpstr = ostrcat("/tmp/tithek/solarmovie.hoster.list", NULL, 0, 0); |
---|
472 | else |
---|
473 | tmpstr = ostrcat("/tmp/tithek/solarmovie.hoster.ser.list", NULL, 0, 0); |
---|
474 | writesys(tmpstr, line, 0); |
---|
475 | |
---|
476 | titheklog(debuglevel, "/tmp/solarmovie8_line", NULL, line); |
---|
477 | |
---|
478 | struct tithek* tnode = (struct tithek*)listbox->select->handle; |
---|
479 | createtithek(tnode, tnode->title, tmpstr, tnode->pic, tnode->localname, tnode->menutitle, tnode->flag); |
---|
480 | ret = 0; |
---|
481 | } |
---|
482 | end: |
---|
483 | free(ip), ip = NULL; |
---|
484 | |
---|
485 | return ret; |
---|
486 | } |
---|
487 | #endif |
---|