3 && ostrcmp(hname, "Sockshare.com") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Putlocker.com") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "FileNuke.com") == 0)
tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "StreamCloud.eu") == 0)
tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "VidStream.in") == 0)
tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "FlashX.tv") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "PrimeShare.tv") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "XvidStage.com") == 0)
tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Vidxden.com (DivX)") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "NowVideo.eu") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "NowVideo.sx") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 4 && ostrcmp(hname, "MovShare.net") == 0)
tmpstr2 = ostrcat(ret2[4].part, NULL, 0, 0);
else
{
tmpstr2 = ostrcat("unknown", NULL, 0, 0);
hname = ostrcat(hname, " (coming soon)", 1, 0);
type = 66;
}
free(ret2), ret2 = NULL;
debug(99, "-------------------------------");
if(ostrcmp(url, url2) != 0)
{
debug(99, "hname: %s (Part1) url: %s id: %s", hname, url, tmpstr2);
}
else
{
debug(99, "hname: %s url: %s id: %s", hname, url, tmpstr2);
}
incount += 1;
line = ostrcat(line, hname, 1, 0);
if(ostrcmp(url, url2) != 0)
line = ostrcat(line, " (Part1)", 1, 0);
line = ostrcat(line, "#", 1, 0);
line = ostrcat(line, url, 1, 0);
line = ostrcat(line, ";", 1, 0);
line = ostrcat(line, tmpstr2, 1, 0);
line = ostrcat(line, ";", 1, 0);
line = ostrcat(line, hname, 1, 0);
line = ostrcat(line, "#", 1, 0);
line = ostrcat(line, "http://atemio.dyndns.tv/mediathek/menu/", 1, 0);
line = ostrcat(line, hname, 1, 0);
line = ostrcat(line, ".jpg#kinox_", 1, 0);
line = ostrcat(line, hname, 1, 0);
line = ostrcat(line, ".jpg#KinoX - ", 1, 0);
line = ostrcat(line, title, 1, 0);
line = ostrcat(line, "#", 1, 0);
line = ostrcat(line, oitoa(type), 1, 0);
line = ostrcat(line, "\n", 1, 0);
if(ostrcmp(url, url2) != 0)
{
free(tmpstr2), tmpstr2 = NULL;
free(hname), hname = NULL;
hname = string_resub("", "
", ret1[i].part, 0);
type = 14;
int count2 = 0;
struct splitstr* ret2 = NULL;
ret2 = strsplit(tmpstr3, "/", &count2);
if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Sockshare.com") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Putlocker.com") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "FileNuke.com") == 0)
tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "StreamCloud.eu") == 0)
tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "VidStream.in") == 0)
tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "FlashX.tv") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "PrimeShare.tv") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "XvidStage.com") == 0)
tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Vidxden.com (DivX)") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "NowVideo.eu") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "NowVideo.sx") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 4 && ostrcmp(hname, "MovShare.net") == 0)
tmpstr2 = ostrcat(ret2[4].part, NULL, 0, 0);
else
{
tmpstr2 = ostrcat("unknown", NULL, 0, 0);
hname = ostrcat(hname, " (coming soon)", 1, 0);
type = 66;
}
free(ret2), ret2 = NULL;
debug(99, "-------------------------------");
debug(99, "hname: %s (Part2) url: %s id: %s", hname, url2, tmpstr2);
incount += 1;
line = ostrcat(line, hname, 1, 0);
line = ostrcat(line, " (Part2)", 1, 0);
line = ostrcat(line, "#", 1, 0);
line = ostrcat(line, url2, 1, 0);
line = ostrcat(line, ";", 1, 0);
line = ostrcat(line, tmpstr2, 1, 0);
line = ostrcat(line, ";", 1, 0);
line = ostrcat(line, hname, 1, 0);
line = ostrcat(line, "#", 1, 0);
line = ostrcat(line, "http://atemio.dyndns.tv/mediathek/menu/", 1, 0);
line = ostrcat(line, hname, 1, 0);
line = ostrcat(line, ".jpg#kinox_", 1, 0);
line = ostrcat(line, hname, 1, 0);
line = ostrcat(line, ".jpg#KinoX - ", 1, 0);
line = ostrcat(line, title, 1, 0);
line = ostrcat(line, "#", 1, 0);
line = ostrcat(line, oitoa(type), 1, 0);
line = ostrcat(line, "\n", 1, 0);
free(tmpstr2), tmpstr2 = NULL;
}
if(ostrcmp(url, url3) != 0 && ostrcmp(url2, url3) != 0)
{
free(tmpstr2), tmpstr2 = NULL;
free(hname), hname = NULL;
hname = string_resub("", "
", ret1[i].part, 0);
type = 14;
int count2 = 0;
struct splitstr* ret2 = NULL;
ret2 = strsplit(tmpstr4, "/", &count2);
if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Sockshare.com") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Putlocker.com") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "FileNuke.com") == 0)
tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "StreamCloud.eu") == 0)
tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "VidStream.in") == 0)
tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "FlashX.tv") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "PrimeShare.tv") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "XvidStage.com") == 0)
tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Vidxden.com (DivX)") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "NowVideo.eu") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "NowVideo.sx") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 4 && ostrcmp(hname, "MovShare.net") == 0)
tmpstr2 = ostrcat(ret2[4].part, NULL, 0, 0);
else
{
tmpstr2 = ostrcat("unknown", NULL, 0, 0);
hname = ostrcat(hname, " (coming soon)", 1, 0);
type = 66;
}
free(ret2), ret2 = NULL;
debug(99, "-------------------------------");
debug(99, "hname: %s (Part3) url: %s id: %s", hname, url3, tmpstr2);
incount += 1;
line = ostrcat(line, hname, 1, 0);
line = ostrcat(line, " (Part3)", 1, 0);
line = ostrcat(line, "#", 1, 0);
line = ostrcat(line, url3, 1, 0);
line = ostrcat(line, ";", 1, 0);
line = ostrcat(line, tmpstr2, 1, 0);
line = ostrcat(line, ";", 1, 0);
line = ostrcat(line, hname, 1, 0);
line = ostrcat(line, "#", 1, 0);
line = ostrcat(line, "http://atemio.dyndns.tv/mediathek/menu/", 1, 0);
line = ostrcat(line, hname, 1, 0);
line = ostrcat(line, ".jpg#kinox_", 1, 0);
line = ostrcat(line, hname, 1, 0);
line = ostrcat(line, ".jpg#KinoX - ", 1, 0);
line = ostrcat(line, title, 1, 0);
line = ostrcat(line, "#", 1, 0);
line = ostrcat(line, oitoa(type), 1, 0);
line = ostrcat(line, "\n", 1, 0);
free(tmpstr2), tmpstr2 = NULL;
}
if(ostrcmp(url, url4) != 0 && ostrcmp(url2, url4) != 0 && ostrcmp(url3, url4) != 0)
{
free(tmpstr2), tmpstr2 = NULL;
free(hname), hname = NULL;
hname = string_resub("", "
", ret1[i].part, 0);
type = 14;
int count2 = 0;
struct splitstr* ret2 = NULL;
ret2 = strsplit(tmpstr5, "/", &count2);
if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Sockshare.com") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Putlocker.com") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "FileNuke.com") == 0)
tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "StreamCloud.eu") == 0)
tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "VidStream.in") == 0)
tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "FlashX.tv") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "PrimeShare.tv") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "XvidStage.com") == 0)
tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Vidxden.com (DivX)") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "NowVideo.eu") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "NowVideo.sx") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 4 && ostrcmp(hname, "MovShare.net") == 0)
tmpstr2 = ostrcat(ret2[4].part, NULL, 0, 0);
else
{
tmpstr2 = ostrcat("unknown", NULL, 0, 0);
hname = ostrcat(hname, " (coming soon)", 1, 0);
type = 66;
}
free(ret2), ret2 = NULL;
debug(99, "-------------------------------");
debug(99, "hname: %s (Part4) url: %s id: %s", hname, url4, tmpstr2);
incount += 1;
line = ostrcat(line, hname, 1, 0);
line = ostrcat(line, " (Part4)", 1, 0);
line = ostrcat(line, "#", 1, 0);
line = ostrcat(line, url4, 1, 0);
line = ostrcat(line, ";", 1, 0);
line = ostrcat(line, tmpstr2, 1, 0);
line = ostrcat(line, ";", 1, 0);
line = ostrcat(line, hname, 1, 0);
line = ostrcat(line, "#", 1, 0);
line = ostrcat(line, "http://atemio.dyndns.tv/mediathek/menu/", 1, 0);
line = ostrcat(line, hname, 1, 0);
line = ostrcat(line, ".jpg#kinox_", 1, 0);
line = ostrcat(line, hname, 1, 0);
line = ostrcat(line, ".jpg#KinoX - ", 1, 0);
line = ostrcat(line, title, 1, 0);
line = ostrcat(line, "#", 1, 0);
line = ostrcat(line, oitoa(type), 1, 0);
line = ostrcat(line, "\n", 1, 0);
free(tmpstr2), tmpstr2 = NULL;
}
free(tmpstr1), tmpstr1 = NULL;
free(tmpstr2), tmpstr2 = NULL;
free(tmpstr3), tmpstr3 = NULL;
free(tmpstr4), tmpstr4 = NULL;
free(tmpstr5), tmpstr5 = NULL;
free(hname), hname = NULL;
free(hnr), hnr = NULL;
free(hlink), hlink = NULL;
free(url), url = NULL;
free(url2), url2 = NULL;
free(url3), url3 = NULL;
free(url4), url4 = NULL;
free(pathnew), pathnew = NULL;
}
}
free(ret1), ret1 = NULL;
}
}
free(tmpstr), tmpstr = NULL;
if(line != NULL)
{
if(series == 0)
tmpstr = ostrcat("/tmp/tithek/kinox.hoster.list", NULL, 0, 0);
else
tmpstr = ostrcat("/tmp/tithek/kinox.hoster.ser.list", NULL, 0, 0);
writesys(tmpstr, line, 0);
titheklog(debuglevel, "/tmp/kinox8_line", NULL, line);
struct tithek* tnode = (struct tithek*)listbox->select->handle;
createtithek(tnode, tnode->title, tmpstr, tnode->pic, tnode->localname, tnode->menutitle, tnode->flag);
ret = 0;
}
return ret;
}
int kinox_hoster_series(struct skin* grid, struct skin* listbox, struct skin* countlabel, struct skin* load, char* link, char* title)
{
debug(99, "link: %s", link);
int debuglevel = getconfigint("debuglevel", NULL);
int ret = 1;
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;
if(listbox == NULL || listbox->select == NULL || listbox->select->handle == NULL)
return ret;
int count0 = 0;
struct splitstr* ret0 = NULL;
ret0 = strsplit(link, ";", &count0);
if(ret0 != NULL && count0 >= 3)
{
url = ostrcat(url, ret0[0].part, 1, 0);
debug(99, "url: %s", url);
session = ostrcat(session, ret0[1].part, 1, 0);
debug(99, "Season: %s", session);
episode = ostrcat(episode, ret0[2].part, 1, 0);
debug(99, "episode: %s", episode);
searchname = ostrcat(searchname, ret0[0].part, 1, 0);
searchname = string_replace("http://kinox.to//Stream/", "", searchname, 0);
searchname = string_replace("http://kinox.to/Stream/", "", searchname, 0);
searchname = string_replace(".html", "", searchname, 0);
debug(99, "searchname: %s", searchname);
}
free(ret0), ret0 = NULL;
ip = string_replace("http://", "", url, 0);
if(ip != NULL)
pos = strchr(ip, '/');
if(pos != NULL)
{
pos[0] = '\0';
path = pos + 1;
}
tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0);
if(tmpstr != NULL)
{
drawscreen(load, 0, 0);
seriesid = string_resub("SeriesID=", "\"", tmpstr, 0);
debug(99, "seriesid: %s", seriesid);
pathnew = ostrcat("/aGET/MirrorByEpisode/&?Addr=", searchname, 0, 0);
pathnew = ostrcat(pathnew, "&SeriesID=", 1, 0);
pathnew = ostrcat(pathnew, seriesid, 1, 0);
pathnew = ostrcat(pathnew, "&Season=", 1, 0);
pathnew = ostrcat(pathnew, session, 1, 0);
pathnew = ostrcat(pathnew, "&Episode=", 1, 0);
pathnew = ostrcat(pathnew, episode, 1, 0);
debug(99, "pathnew: %s", pathnew);
free(tmpstr), tmpstr = NULL;
tmpstr = gethttp("kinox.to", pathnew, 80, NULL, NULL, 10000, NULL, 0);
free(pathnew), pathnew = NULL;
if(tmpstr != NULL)
{
tmpstr = string_resub("", tmpstr, 0);
int type = 14;
int count = 0;
int incount = 0;
int i;
struct splitstr* ret1 = NULL;
ret1 = strsplit(tmpstr, "\n", &count);
char* hname = NULL;
char* hnr = NULL;
char* hlink = NULL;
if(ret1 != NULL && count > 0)
{
int max = count;
for(i = 0; i < max; i++)
{
hnr = string_resub("", ret1[i].part, 0);
hlink = string_replace_all("amp;", "", hlink, 1);
hname = string_resub("", "
", ret1[i].part, 0);
hlink = string_replace("http://kinox.to//Stream/", "", hlink, 1);
hlink = string_replace("http://kinox.to/Stream/", "", hlink, 1);
pathnew = ostrcat("/aGET/Mirror/", hlink, 0, 0);
debug(99, "pathnew: %s", pathnew);
tmpstr1 = gethttp("kinox.to", pathnew, 80, NULL, NULL, 10000, NULL, 0);
tmpstr1 = string_replace_all("\\", "", tmpstr1, 1);
tmpstr1 = string_resub(" 3 && ostrcmp(hname, "Sockshare.com") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Putlocker.com") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "FileNuke.com") == 0)
tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "StreamCloud.eu") == 0)
tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "VidStream.in") == 0)
tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "FlashX.tv") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "PrimeShare.tv") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 2 && ostrcmp(hname, "XvidStage.com") == 0)
tmpstr2 = ostrcat(ret2[2].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "Vidxden.com (DivX)") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "NowVideo.eu") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 3 && ostrcmp(hname, "NowVideo.sx") == 0)
tmpstr2 = ostrcat(ret2[3].part, NULL, 0, 0);
else if(ret2 != NULL && count2 > 4 && ostrcmp(hname, "MovShare.net") == 0)
tmpstr2 = ostrcat(ret2[4].part, NULL, 0, 0);
else
{
tmpstr2 = ostrcat("unknown", NULL, 0, 0);
hname = ostrcat(hname, " (coming soon)", 1, 0);
type = 66;
}
free(ret2), ret2 = NULL;
debug(99, "-------------------------------");
debug(99, "hname: %s url: %s id: %s", hname, url, tmpstr2);
incount += 1;
line = ostrcat(line, hname, 1, 0);
line = ostrcat(line, "#", 1, 0);
line = ostrcat(line, url, 1, 0);
line = ostrcat(line, ";", 1, 0);
line = ostrcat(line, tmpstr2, 1, 0);
line = ostrcat(line, ";", 1, 0);
line = ostrcat(line, hname, 1, 0);
line = ostrcat(line, "#", 1, 0);
line = ostrcat(line, "http://atemio.dyndns.tv/mediathek/menu/", 1, 0);
line = ostrcat(line, hname, 1, 0);
line = ostrcat(line, ".jpg#kinox_", 1, 0);
line = ostrcat(line, hname, 1, 0);
line = ostrcat(line, ".jpg#KinoX - ", 1, 0);
line = ostrcat(line, title, 1, 0);
line = ostrcat(line, "#", 1, 0);
line = ostrcat(line, oitoa(type), 1, 0);
line = ostrcat(line, "\n", 1, 0);
free(tmpstr1), tmpstr1 = NULL;
free(tmpstr2), tmpstr2 = NULL;
free(hname), hname = NULL;
free(hnr), hnr = NULL;
free(hlink), hlink = NULL;
free(url), url = NULL;
free(pathnew), pathnew = NULL;
}
}
free(ret1), ret1 = NULL;
}
}
free(tmpstr), tmpstr = NULL;
if(line != NULL)
{
tmpstr = ostrcat("/tmp/tithek/kinox.hoster.series.list", NULL, 0, 0);
writesys(tmpstr, line, 0);
titheklog(debuglevel, "/tmp/kinox9_line", NULL, line);
struct tithek* tnode = (struct tithek*)listbox->select->handle;
createtithek(tnode, tnode->title, tmpstr, tnode->pic, tnode->localname, tnode->menutitle, tnode->flag);
ret = 0;
}
return ret;
}
int kinox_search_cast(struct skin* grid, struct skin* listbox, struct skin* countlabel, struct skin* load, char* link, char* title, char* searchstr)
{
int ret = 1;
if(listbox == NULL || listbox->select == NULL || listbox->select->handle == NULL)
return ret;
char* search = NULL;
if(searchstr == NULL)
search = textinputhist("Search", " ", "searchhist");
else
search = textinputhist("Search", searchstr, "searchhist");
if(search != NULL)
{
drawscreen(load, 0, 0);
search = strstrip(search);
search = stringreplacechar(search, ' ', '+');
debug(99, "search: %s", search);
char* tmpstr = NULL;
char* tmpstr1 = NULL;
char* ip = NULL;
char* path = NULL;
char* line = NULL;
char* menu = NULL;
ip = ostrcat("www.imdb.com", NULL, 0, 0);
path = ostrcat("find?q=", search, 0, 0);
path = ostrcat(path, "&s=nm", 1, 0);
tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0);
writesys("/var/usr/local/share/titan/plugins/tithek/kinox_cast_tmpstr", tmpstr, 0);
tmpstr = string_replace_all(" ", "", tmpstr, 0);
writesys("/var/usr/local/share/titan/plugins/tithek/kinox_cast_tmpstr3", tmpstr1, 0);
free(tmpstr), tmpstr = NULL;
int count = 0;
int incount = 0;
int i;
struct splitstr* ret1 = NULL;
ret1 = strsplit(tmpstr1, "\n", &count);
char* url = NULL;
char* pic = NULL;
char* name = NULL;
if(ret1 != NULL && count > 0)
{
int max = count;
for(i = 0; i < max; i++)
{
url = string_resub("found=\"", "/", ret1[i].part, 0);
pic = string_resub("", ret1[i].part, 0);
// name = oregex(".*(.*)", tmpstr);
name = oregex(".*(.*)", tmpstr);
debug(99, "(%d/%d) name: %s url: %s pic: %s\n",i, count, name, url, pic);
debug(99, "-------------------------------");
pic = string_replace_all(",", "%2C", pic, 1);
if(url != NULL)
{
incount += 1;
line = ostrcat(line, name, 1, 0);
line = ostrcat(line, "#http://kinox.to/People/", 1, 0);
line = ostrcat(line, url, 1, 0);
line = ostrcat(line, "#", 1, 0);
line = ostrcat(line, pic, 1, 0);
line = ostrcat(line, "#kinox_search_", 1, 0);
line = ostrcat(line, oitoa(incount + time(NULL)), 1, 1);
line = ostrcat(line, ".jpg#KinoX - Cast Search#32\n", 1, 0);
}
free(url), url = NULL;
free(pic), pic = NULL;
free(name), name = NULL;
free(tmpstr), tmpstr = NULL;
}
free(ret1), ret1 = NULL;
if(line != NULL)
{
menu = ostrcat("/tmp/tithek/kinox.search.cast.list", NULL, 0, 0);
writesys(menu, line, 0);
struct tithek* tnode = (struct tithek*)listbox->select->handle;
createtithek(tnode, tnode->title, menu, tnode->pic, tnode->localname, tnode->menutitle, tnode->flag);
ret = 0;
}
}
free(tmpstr), tmpstr = NULL;
free(ip), ip = NULL;
}
free(search), search = NULL;
return ret;
}
#endif |