Changeset 39009
- Timestamp:
- 09/25/16 11:49:02 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/plugins/tithek/tithek.h
r38439 r39009 22 22 //flag 7 - nowtv local serach //rtlnow 23 23 //flag 8 - nowtv search //voxnow 24 //flag 9 - youtube suche 10 24 //flag 9 - youtube suche 10 25 25 //flag 10 - youtube suche 25 26 26 //flag 11 - youtube suche 50 … … 49 49 //flag 34 - movie4k hoster de 50 50 //flag 35 - movie4k hoster other 51 //flag 36 - movie4k series de > open seasons and list episode flag=39 > hoster listed flag=34 51 //flag 36 - movie4k series de > open seasons and list episode flag=39 > hoster listed flag=34 52 52 //flag 37 - movie4k series other > open seasons and list episode flag=39 > hoster listed flag=34 53 53 //flag 38 - mlehd … … 162 162 char* pic; 163 163 char* localname; 164 char* menutitle; 164 char* menutitle; 165 165 int flag; 166 166 struct tithek* prev; … … 233 233 234 234 if(flag != NULL) node->flag = atoi(flag); 235 235 236 236 sos = getconfigint("sos", NULL); 237 237 hid = getconfigint("tithek_hid_xxx", NULL); … … 251 251 { 252 252 cmd = ostrcat(cmd, "www.thesolarmovie.me", 1, 0); 253 253 254 254 for(i = 0; i < 3; i++) 255 255 { … … 266 266 { 267 267 cmd = ostrcat(cmd, "www.movie4k.to", 1, 0); 268 268 269 269 for(i = 0; i < 3; i++) 270 270 { … … 277 277 278 278 tithekmovie4k = 0; 279 } 279 } 280 280 else if(tithekmlehd == 1 && node->flag == 9998 && sos == 0) 281 281 { 282 282 cmd = ostrcat(cmd, "www.mle-hd.se", 1, 0); 283 283 284 284 for(i = 0; i < 3; i++) 285 285 { … … 296 296 { 297 297 cmd = ostrcat(cmd, "kinox.me", 1, 0); 298 298 299 299 for(i = 0; i < 3; i++) 300 300 { … … 317 317 free(tmp); tmp = NULL; 318 318 free(cmd), cmd = NULL; 319 319 320 320 return 0; 321 321 } … … 378 378 struct tithek* tnode = NULL; 379 379 char* tmpstr = NULL; 380 380 381 381 pay = getconfigint("tithek_pay", NULL); 382 382 … … 386 386 localname = stringreplacechar(localname, '#', ' '); 387 387 menutitle = stringreplacechar(menutitle, '#', ' '); 388 388 389 389 tmpstr = ostrcat(tmpstr, title, 1, 0); 390 390 tmpstr = ostrcat(tmpstr, "#", 1, 0); … … 442 442 } 443 443 else 444 file = ostrcat(filename, NULL, 0, 0); 444 file = ostrcat(filename, NULL, 0, 0); 445 445 446 446 fd = fopen(file, "r"); … … 614 614 { 615 615 ip = string_replace("http://", "", (char*)link, 0); 616 616 617 617 // tithek security 618 618 ip = string_replace_all("imageshack.us/md/up/grd/", "atemio.dyndns.tv/", ip, 1); 619 619 620 620 ip = string_replace_all("kinox.to", "kinox.me", ip, 1); 621 621 //ip = string_replace_all("movie4k.to", "movie4k.me", ip, 1); 622 622 623 623 if(ip != NULL) 624 624 pos = strchr(ip, '/'); … … 628 628 path = pos + 1; 629 629 } 630 630 631 631 if(ostrstr(ip, ":") != NULL) 632 632 { … … 701 701 gethttps(link, localfile, NULL, NULL, NULL, NULL, 0); 702 702 else 703 gethttp(ip, path, port, localfile, pw, timeout, NULL, 0); 703 gethttp(ip, path, port, localfile, pw, timeout, NULL, 0); 704 704 } 705 705 } … … 707 707 else 708 708 { 709 709 710 710 if(localfile != NULL && file_exist(localfile)) 711 711 ret = textbox(_("Message"), _("File exist, overwrite?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0); … … 746 746 int linecount = readtithek(tithekfile); 747 747 // if(linecount == 0) return 1; 748 748 749 749 struct tithek* titheknode = tithek; 750 750 … … 769 769 pcount = 6; 770 770 } 771 771 772 772 if(linecount > 8) 773 773 { … … 791 791 pcount = 20; 792 792 } 793 793 794 794 if(linecount > 25) 795 795 { … … 803 803 } 804 804 } 805 805 806 806 if((getconfigint("tithek_cover", NULL) == 1 && flag == 0) || (getconfigint("tithek_view", NULL) == 1 && flag != 0)) 807 807 { … … 896 896 tmp->picheight = picheight; 897 897 tmp->picwidth = picwidth; 898 898 899 899 tmp->fontsize = fontsize; 900 900 tmp->height = height; … … 918 918 gridbr = 0; 919 919 } 920 920 921 921 if(count1 >= pcount) 922 922 { … … 945 945 if(localfile == 0) 946 946 unlink(tithekfile); 947 947 948 948 free(tithekfile); tithekfile = NULL; 949 949 return pagecount; … … 967 967 input = ostrcat(input, "#", 1, 0); 968 968 input = ostrcat(input, oitoa(flag), 1, 1); 969 969 970 970 tmpstr = readfiletomem(getconfig("tithek_fav", NULL), 0); 971 971 972 972 ret = strsplit(tmpstr, "\n", &count); 973 973 … … 1055 1055 else 1056 1056 savefile = ostrcat(getconfig("tithek_fav", NULL), NULL, 0, 0); 1057 1057 1058 1058 input = ostrcat(input, title, 1, 0); 1059 1059 input = ostrcat(input, "#", 1, 0); … … 1069 1069 // tithek security 1070 1070 input = string_replace_all("http://atemio.dyndns.tv/", "http://imageshack.us/md/up/grd/", input, 1); 1071 1071 1072 1072 tmpstr1 = ostrcat(tmpstr1, input, 1, 0); 1073 1073 tmpstr1 = ostrcat(tmpstr1, "\n", 1, 0); … … 1161 1161 struct skin* proztext = getscreennode(load, "proztext"); 1162 1162 1163 drawscreen(load, 0, 0); 1163 drawscreen(load, 0, 0); 1164 1164 int port = 80, count = 0, mcount = 0; 1165 1165 off64_t size = 0, msize = 0; … … 1192 1192 debug(99, "local: %s", file); 1193 1193 debug(99, "---------------------------------------"); 1194 1195 1194 1195 1196 1196 struct download* dnode = NULL; 1197 1197 dnode = calloc(1, sizeof(struct download)); … … 1200 1200 err("no mem"); 1201 1201 return; 1202 } 1202 } 1203 1203 dnode->host = host; 1204 1204 dnode->page = path; … … 1209 1209 dnode->ret = -1; 1210 1210 dnode->timeout = 30000; 1211 1211 1212 1212 addtimer(&gethttpstruct, START, 1000, 1, (void*)dnode, NULL, NULL); 1213 1213 … … 1219 1219 else if(flag == 2) 1220 1220 { 1221 mcount = 240; 1221 mcount = 240; 1222 1222 msize = 20971520; 1223 1223 } 1224 1224 else if(flag == 3) 1225 1225 { 1226 mcount = 360; 1226 mcount = 360; 1227 1227 msize = 31457280; 1228 1228 } 1229 1229 1230 1230 while(count < mcount || size >= msize) 1231 1231 { … … 1241 1241 int proz2 = count * 100 / mcount; 1242 1242 debug(99, "time (%dprozent)", proz2); 1243 1243 1244 1244 if(proz1 > proz2) 1245 1245 proz = proz1; … … 1253 1253 if(count >= mcount) 1254 1254 break; 1255 1255 1256 1256 tmpstr = ostrcat(_("please wait..."), " (", 0, 0); 1257 1257 tmpstr = ostrcat(tmpstr, oitoa(proz), 1, 1); … … 1270 1270 tmpstr = ostrcat(tmpstr, "\n\n", 1, 0); 1271 1271 tmpstr = ostrcat(tmpstr, file, 1, 0); 1272 1272 1273 1273 if(textbox(_("Message"), tmpstr, _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0) == 1) 1274 1274 { … … 1311 1311 debug(99, "local: %s", file); 1312 1312 debug(99, "---------------------------------------"); 1313 1313 1314 1314 if(ostrstr(path, "|User-Agent=") != NULL) 1315 1315 { … … 1333 1333 if(ret == 1) 1334 1334 textbox(_("Message"), _("Can't start download.\nPlease try later."), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0); 1335 1335 1336 1336 free(tmpstr), tmpstr = NULL; 1337 1337 free(file), file = NULL; 1338 1338 free(host), host = NULL; 1339 1339 } 1340 1340 1341 1341 void submenu(struct skin* listbox, struct skin* load, char* title) 1342 1342 { 1343 1343 int flag = 0; 1344 char* tmpstr = NULL, *tmpstr1 = NULL, *tmpstr2 = NULL; 1344 char* tmpstr = NULL, *tmpstr1 = NULL, *tmpstr2 = NULL; 1345 1345 drawscreen(load, 0, 0); 1346 1346 tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); … … 1359 1359 { 1360 1360 if(tmpstr != NULL) tmpstr1 = youtube_hoster(tmpstr); 1361 } 1361 } 1362 1362 else if(((struct tithek*)listbox->select->handle)->flag == 5) 1363 1363 { … … 1457 1457 printf("change streamurl to: %s\n", tmpstr1); 1458 1458 } 1459 1459 1460 1460 if(tmpstr1 != NULL) 1461 1461 { 1462 char* filename = ostrcat(title, "_", 0, 0); 1463 1464 tmpstr2 = ostrcat(_("Tithek - Mainmenu - Favoriten"), " - ", 0, 0); 1462 char* filename = ostrcat(title, "_", 0, 0); 1463 1464 tmpstr2 = ostrcat(_("Tithek - Mainmenu - Favoriten"), " - ", 0, 0); 1465 1465 filename = string_replace_all(tmpstr2, "", filename, 1); 1466 1466 free(tmpstr2); tmpstr2 = NULL; 1467 1468 tmpstr2 = ostrcat(_("Tithek - Mainmenu"), " - ", 0, 0); 1467 1468 tmpstr2 = ostrcat(_("Tithek - Mainmenu"), " - ", 0, 0); 1469 1469 filename = string_replace_all(tmpstr2, "", filename, 1); 1470 1470 free(tmpstr2); tmpstr2 = NULL; … … 1482 1482 filename = string_replace_all("Movie2k - ", "", filename, 1); 1483 1483 1484 filename = string_replace_all("Beeg -", "", filename, 1);1485 filename = string_replace_all("Burning Series -", "", filename, 1);1486 filename = string_replace_all("CricFree -", "", filename, 1);1487 filename = string_replace_all("Giga -", "", filename, 1);1488 filename = string_replace_all("KKiste -", "", filename, 1);1489 filename = string_replace_all("NBA-On-Demand -", "", filename, 1);1490 filename = string_replace_all("StreamLive -", "", filename, 1);1491 filename = string_replace_all("TheSolarMovie -", "", filename, 1);1492 filename = string_replace_all("Youtube -", "", filename, 1);1493 1494 tmpstr2 = ostrcat(_("Category"), " - ", 0, 0); 1484 filename = string_replace_all("Beeg ", "", filename, 1); 1485 filename = string_replace_all("Burning Series ", "", filename, 1); 1486 filename = string_replace_all("CricFree ", "", filename, 1); 1487 filename = string_replace_all("Giga ", "", filename, 1); 1488 filename = string_replace_all("KKiste ", "", filename, 1); 1489 filename = string_replace_all("NBA-On-Demand ", "", filename, 1); 1490 filename = string_replace_all("StreamLive ", "", filename, 1); 1491 filename = string_replace_all("TheSolarMovie ", "", filename, 1); 1492 filename = string_replace_all("Youtube ", "", filename, 1); 1493 1494 tmpstr2 = ostrcat(_("Category"), " - ", 0, 0); 1495 1495 filename = string_replace_all(tmpstr2, "", filename, 1); 1496 1496 free(tmpstr2); tmpstr2 = NULL; 1497 1497 1498 tmpstr2 = ostrcat(_("Search (local)"), " - ", 0, 0); 1498 tmpstr2 = ostrcat(_("Search (local)"), " - ", 0, 0); 1499 1499 filename = string_replace_all(tmpstr2, "", filename, 1); 1500 1500 free(tmpstr2); tmpstr2 = NULL; 1501 1501 1502 tmpstr2 = ostrcat(_("Search (20)"), " - ", 0, 0); 1502 tmpstr2 = ostrcat(_("Search (20)"), " - ", 0, 0); 1503 1503 filename = string_replace_all(tmpstr2, "", filename, 1); 1504 1504 free(tmpstr2); tmpstr2 = NULL; 1505 1505 1506 tmpstr2 = ostrcat(_("Search Cast"), " - ", 0, 0); 1506 tmpstr2 = ostrcat(_("Search Cast"), " - ", 0, 0); 1507 1507 filename = string_replace_all(tmpstr2, "", filename, 1); 1508 1508 free(tmpstr2); tmpstr2 = NULL; 1509 1509 1510 tmpstr2 = ostrcat(_("Search"), " - ", 0, 0); 1510 tmpstr2 = ostrcat(_("Search"), " - ", 0, 0); 1511 1511 filename = string_replace_all(tmpstr2, "", filename, 1); 1512 1512 free(tmpstr2); tmpstr2 = NULL; … … 1527 1527 filename = string_replace_all(".._", "_", filename, 1); 1528 1528 debug(99, "filename: %s", filename); 1529 1529 1530 1530 char* keyconf = NULL; 1531 1531 char* skintitle = _("Choice Playback"); … … 1558 1558 #endif 1559 1559 //#endif 1560 } 1560 } 1561 1561 else if(!ostrncmp("http://", tmpstr1, 7) || !ostrncmp("https://", tmpstr1, 8)) 1562 1562 { … … 1656 1656 char* search = textinput(_("Filename"), filename); 1657 1657 if(search != NULL) 1658 { 1658 { 1659 1659 char* tmpstr2 = tithekdownload(tmpstr1, search, NULL, 0, 1); 1660 1660 // drawscreen(grid, 0, 0); 1661 1661 free(tmpstr2); tmpstr2 = NULL; 1662 1662 1663 1663 if(textbox(_("Message"), _("Start playback"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0) == 1) 1664 1664 { … … 1678 1678 free(search), search = NULL; 1679 1679 } 1680 1680 1681 1681 free(filename), filename = NULL; 1682 1682 freemenulist(mlist, 1); mlist = NULL; … … 1684 1684 else 1685 1685 textbox(_("Message"), _("Can't get Streamurl !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 0, 0); 1686 1686 1687 1687 free(tmpstr1); tmpstr1 = NULL; 1688 1688 } … … 1692 1692 int savevol = 0; 1693 1693 if(!file_exist("/mnt/swapextensions/player")) 1694 mkdir("/mnt/swapextensions/player", 0777); 1694 mkdir("/mnt/swapextensions/player", 0777); 1695 1695 1696 1696 char* disclaimer = NULL; 1697 1697 disclaimer = ostrcat(disclaimer, "/mnt/swapextensions/player/tithek_disclaimer_accepted", 1, 0); 1698 1698 1699 1699 if(!file_exist(disclaimer)) 1700 1700 { … … 1702 1702 if(textbox(_("TitanNit Tithek disclaimer"), _(tmpstr), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1100, 650, 0, 0) == 1) 1703 1703 { 1704 writesys(disclaimer, tmpstr, 0); 1704 writesys(disclaimer, tmpstr, 0); 1705 1705 free(tmpstr), tmpstr = NULL; 1706 1706 } … … 1716 1716 int rcret = -1, oaktline = 1, oaktpage = -1, ogridcol = 0, pagecount = 0; 1717 1717 1718 writesysint("/proc/sys/vm/drop_caches", 3, 0); 1718 writesysint("/proc/sys/vm/drop_caches", 3, 0); 1719 1719 1720 1720 if(first == 1) 1721 { 1721 { 1722 1722 savevol = getvol(); 1723 1723 … … 1757 1757 1758 1758 drawscreen(load, 0, 0); 1759 1759 1760 1760 if(titheklink == NULL) return; 1761 1761 1762 1762 listbox->aktpage = -1; 1763 1763 listbox->aktline = 1; … … 1771 1771 drawscreen(grid, 0, 0); 1772 1772 addscreenrc(grid, listbox); 1773 1773 1774 1774 while(1) 1775 1775 { … … 1799 1799 /* not working with thread download 1800 1800 off64_t checkpic = getfilesize(tithekpic); 1801 1801 1802 1802 if(checkpic < 1000) 1803 1803 { … … 1806 1806 } 1807 1807 */ 1808 1808 1809 1809 changepic(tmp, tithekpic); 1810 1810 free(tithekpic); tithekpic = NULL; … … 1837 1837 } 1838 1838 } 1839 1839 1840 1840 int count = getfilecount(TITHEKPATH); 1841 1841 if(count > 500) … … 1911 1911 tmpstr = string_replace_all("_", " ", tmpstr, 1); 1912 1912 tmpstr = string_replace_all("-", " ", tmpstr, 1); 1913 tmpstr = string_replace_all(".", " ", tmpstr, 1); 1913 tmpstr = string_replace_all(".", " ", tmpstr, 1); 1914 1914 debug(99, "tmpstr: %s", tmpstr); 1915 1915 … … 2098 2098 } 2099 2099 free(search), search = NULL; 2100 2100 2101 2101 pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); 2102 2102 if(pagecount == 0) return; … … 2379 2379 textbox(_("Message"), _("The hoster is not yet supported !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 5, 0); 2380 2380 continue; 2381 } 2381 } 2382 2382 else if((((struct tithek*)listbox->select->handle)->flag == 112)) 2383 2383 { … … 2405 2405 // new osd musst disable this 2406 2406 drawscreen(grid, 0, 0); 2407 } 2407 } 2408 2408 } 2409 2409 // else if(rcret == getrcconfigint("rcyellow", NULL) && ostrcmp(title, _("Tithek - Mainmenu - Favoriten")) == 0) … … 2414 2414 if(textbox(_("Message"), _("Remove this Favorite ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 800, 200, 5, 0) == 1) 2415 2415 { 2416 removefav(((struct tithek*)listbox->select->handle)->title, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->pic, ((struct tithek*)listbox->select->handle)->localname, ((struct tithek*)listbox->select->handle)->menutitle, ((struct tithek*)listbox->select->handle)->flag); 2416 removefav(((struct tithek*)listbox->select->handle)->title, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->pic, ((struct tithek*)listbox->select->handle)->localname, ((struct tithek*)listbox->select->handle)->menutitle, ((struct tithek*)listbox->select->handle)->flag); 2417 2417 pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); 2418 2418 if(pagecount == 0) return; 2419 2419 2420 2420 // drawscreen(grid, 0, 0); 2421 2421 } … … 2430 2430 if(textbox(_("Message"), _("Add this link as Favorite ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 800, 200, 5, 0) == 1) 2431 2431 { 2432 addfav(((struct tithek*)listbox->select->handle)->title, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->pic, ((struct tithek*)listbox->select->handle)->localname, ((struct tithek*)listbox->select->handle)->menutitle, ((struct tithek*)listbox->select->handle)->flag); 2432 addfav(((struct tithek*)listbox->select->handle)->title, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->pic, ((struct tithek*)listbox->select->handle)->localname, ((struct tithek*)listbox->select->handle)->menutitle, ((struct tithek*)listbox->select->handle)->flag); 2433 2433 } 2434 2434 } … … 2442 2442 if(textbox(_("Message"), _("Edit this Favorite ?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 800, 200, 5, 0) == 1) 2443 2443 { 2444 editfav(((struct tithek*)listbox->select->handle)->title, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->pic, ((struct tithek*)listbox->select->handle)->localname, ((struct tithek*)listbox->select->handle)->menutitle, ((struct tithek*)listbox->select->handle)->flag); 2444 editfav(((struct tithek*)listbox->select->handle)->title, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->pic, ((struct tithek*)listbox->select->handle)->localname, ((struct tithek*)listbox->select->handle)->menutitle, ((struct tithek*)listbox->select->handle)->flag); 2445 2445 pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0); 2446 2446 if(pagecount == 0) return; 2447 2447 2448 2448 // drawscreen(grid, 0, 0); 2449 2449 } … … 2462 2462 b5->hidden = YES; 2463 2463 } 2464 2464 2465 2465 // new osd musst disable this 2466 2466 drawscreen(grid, 0, 0); 2467 2467 2468 2468 } 2469 2469
Note: See TracChangeset
for help on using the changeset viewer.