Changeset 40856
- Timestamp:
- 08/27/17 17:39:35 (6 years ago)
- Location:
- titan/plugins/tithek
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/plugins/tithek/tithek.h
r40852 r40856 758 758 } 759 759 760 int createtithekplay(char* titheklink, struct skin* grid, struct skin* listbox, struct skin* countlabel, int flag)760 int createtithekplay(char* titheklink, struct skin* grid, struct skin* listbox, struct skin* countlabel, char* title, int flag) 761 761 { 762 762 int gridbr = 0, posx = 0, count = 0, sumcount = 0, count1 = 0, pagecount = 0, skip = 0; … … 764 764 struct skin* tmp = NULL; 765 765 char* tithekfile = NULL; 766 char* tmpstr = NULL ;766 char* tmpstr = NULL, *tmpstr1 = NULL, *tmpstr2 = NULL; 767 767 768 768 if(!ostrncmp("http://", titheklink, 7)) … … 943 943 tmp->hspace = 10; 944 944 tmp->posx = posx; 945 if(python == 0 && (flag == 22 || flag == 23)) 945 946 printf("flag=%d\n", titheknode->flag); 947 printf("title=%s\n", titheknode->title); 948 printf("menutitle=%s\n", titheknode->menutitle); 949 printf("skin title=%s\n", title); 950 printf("titheklink=%s\n", titheklink); 951 952 if(title != NULL) 953 tmpstr1 = ostrcat(title, " - ", 0, 0); 954 else 955 tmpstr1 = ostrcat(titheknode->menutitle, " - ", 0, 0); 956 957 tmpstr2 = ostrcat(tmpstr1, titheknode->title, 0, 0); 958 959 printf("tmpstr2=%s\n", tmpstr2); 960 free(tmpstr1), tmpstr1 = NULL; 961 free(tmpstr2), tmpstr2 = NULL; 962 963 char* title2 = ostrcat(titheknode->title, NULL, 0, 0); 964 char* filename = createfilename(tmpstr2, title2); 965 // char* filename = createfilename(tmpstr2, titheknode->title); 966 free(title2), title2 = NULL; 967 debug(99, "filename: %s", filename); 968 free(filename), filename = NULL; 969 970 971 if(python == 0 && titheknode->flag == 14) 946 972 tmp->fontcol = 0xff0000; 947 else if(python == 1 && (flag == 22 || flag == 23)) 948 tmp->fontcol = 0x00ff00; 973 else if(python == 1 && titheknode->flag == 14) 974 tmp->fontcol = 0xffffff; 975 //tmp->fontcol = 0x00ff00; 949 976 else 950 977 tmp->fontcol = 0xffffff; 951 952 978 //tmp->fontcol = 0x0000ff; 953 979 … … 979 1005 tmpstr = oitoa(sumcount); 980 1006 981 char*tmpstr1 = ostrcat(_("found"), NULL, 0, 0);1007 tmpstr1 = ostrcat(_("found"), NULL, 0, 0); 982 1008 tmpstr1 = ostrcat(tmpstr1, " ", 1, 0); 983 1009 tmpstr1 = ostrcat(tmpstr1, tmpstr, 1, 0); … … 1228 1254 { 1229 1255 struct tithek* tnode = (struct tithek*)listbox->select->handle; 1230 createtithek(tnode, tnode->title, savefile, tnode->pic, tnode->localname, tnode->menutitle, tnode->flag); 1256 createtithek(tnode, tnode->title, savefile, tnode->pic, tnode->localname, 1257 tnode->menutitle, tnode->flag); 1231 1258 ret = 0; 1232 1259 } … … 1581 1608 else if(tmpstr1 != NULL) 1582 1609 { 1583 char* filename = ostrcat(title, "_", 0, 0); 1584 1585 tmpstr2 = ostrcat(_("Tithek - Mainmenu - Favoriten"), " - ", 0, 0); 1586 filename = string_replace_all(tmpstr2, "", filename, 1); 1587 free(tmpstr2); tmpstr2 = NULL; 1588 1589 tmpstr2 = ostrcat(_("Tithek - Mainmenu"), " - ", 0, 0); 1590 filename = string_replace_all(tmpstr2, "", filename, 1); 1591 free(tmpstr2); tmpstr2 = NULL; 1592 1593 filename = string_replace_all("Tips und Tricks - ", "", filename, 1); 1594 filename = string_replace_all("Internet TV - ", "", filename, 1); 1595 filename = string_replace_all("Internet Radio - ", "", filename, 1); 1596 filename = string_replace_all("ARD - ", "", filename, 1); 1597 filename = string_replace_all("ZDF - ", "", filename, 1); 1598 filename = string_replace_all("FilmOn - ", "", filename, 1); 1599 filename = string_replace_all("MyVideo - ", "", filename, 1); 1600 filename = string_replace_all("Netzkino - ", "", filename, 1); 1601 filename = string_replace_all("KinoX - ", "", filename, 1); 1602 filename = string_replace_all("Movie4k - ", "", filename, 1); 1603 filename = string_replace_all("Movie2k - ", "", filename, 1); 1604 1605 filename = string_replace_all("Beeg ", "", filename, 1); 1606 filename = string_replace_all("Burning Series ", "", filename, 1); 1607 filename = string_replace_all("CricFree ", "", filename, 1); 1608 filename = string_replace_all("Giga ", "", filename, 1); 1609 filename = string_replace_all("KKiste ", "", filename, 1); 1610 filename = string_replace_all("NBA-On-Demand ", "", filename, 1); 1611 filename = string_replace_all("StreamLive ", "", filename, 1); 1612 filename = string_replace_all("TheSolarMovie ", "", filename, 1); 1613 filename = string_replace_all("Youtube ", "", filename, 1); 1614 1615 tmpstr2 = ostrcat(_("Category"), " - ", 0, 0); 1616 filename = string_replace_all(tmpstr2, "", filename, 1); 1617 free(tmpstr2); tmpstr2 = NULL; 1618 1619 tmpstr2 = ostrcat(_("Search (local)"), " - ", 0, 0); 1620 filename = string_replace_all(tmpstr2, "", filename, 1); 1621 free(tmpstr2); tmpstr2 = NULL; 1622 1623 tmpstr2 = ostrcat(_("Search (20)"), " - ", 0, 0); 1624 filename = string_replace_all(tmpstr2, "", filename, 1); 1625 free(tmpstr2); tmpstr2 = NULL; 1626 1627 tmpstr2 = ostrcat(_("Search Cast"), " - ", 0, 0); 1628 filename = string_replace_all(tmpstr2, "", filename, 1); 1629 free(tmpstr2); tmpstr2 = NULL; 1630 1631 tmpstr2 = ostrcat(_("Search"), " - ", 0, 0); 1632 filename = string_replace_all(tmpstr2, "", filename, 1); 1633 free(tmpstr2); tmpstr2 = NULL; 1634 1635 tmpstr2 = ostrcat(_("All Sorted"), " - ", 0, 0); 1636 filename = string_replace_all(tmpstr2, "", filename, 1); 1637 free(tmpstr2); tmpstr2 = NULL; 1638 1639 tmpstr2 = ostrcat(_("A-Z"), " - ", 0, 0); 1640 filename = string_replace_all(tmpstr2, "", filename, 1); 1641 free(tmpstr2); tmpstr2 = NULL; 1642 1643 filename = string_replace_all("(Flash - Shell script) - ", "", filename, 1); 1644 filename = string_replace_all("Genres - ", "", filename, 1); 1645 filename = string_replace_all("All Series - ", "", filename, 1); 1646 filename = string_replace_all("Channels - ", "", filename, 1); 1647 filename = string_replace_all("Kinofilme - ", "", filename, 1); 1648 filename = string_replace_all("Neue Filme - ", "", filename, 1); 1649 filename = string_replace_all("Movies (Year) - ", "", filename, 1); 1650 filename = string_replace_all("Movies (Genre) - ", "", filename, 1); 1651 filename = string_replace_all("Series - ", "", filename, 1); 1652 1653 filename = ostrcat(filename, ((struct tithek*)listbox->select->handle)->title, 1, 0); 1654 filename = ostrcat(filename, ".mp4", 1, 0); 1655 filename = string_replace_all(" ", ".", filename, 1); 1656 filename = string_replace_all("-", "_", filename, 1); 1657 filename = string_replace_all("._.", "_", filename, 1); 1658 filename = string_replace_all(".._", "_", filename, 1); 1610 char* title2 = ostrcat(((struct tithek*)listbox->select->handle)->title, NULL, 0, 0); 1611 char* filename = createfilename(title, title2); 1612 // char* filename = createfilename(title, ((struct tithek*)listbox->select->handle)->title); 1613 free(title2), title2 = NULL; 1659 1614 debug(99, "filename: %s", filename); 1660 1615 … … 1713 1668 } 1714 1669 1715 if( file_exist(getconfig("rec_streampath", NULL)) && (file_exist("/mnt/swapextensions/etc/.codecpack") || file_exist("/var/swap/etc/.codecpack") || file_exist("/var/etc/.codecpack")))1670 if(python == 1 && file_exist(getconfig("rec_streampath", NULL)) && (file_exist("/mnt/swapextensions/etc/.codecpack") || file_exist("/var/swap/etc/.codecpack") || file_exist("/var/etc/.codecpack"))) 1716 1671 addmenulist(&mlist, "Download via Youtube_DL (background)", _("Download Full File (youtube_dl)"), NULL, 0, 0); 1717 1672 } … … 1828 1783 free(tmpstr1); tmpstr1 = NULL; 1829 1784 } 1830 1831 1785 void screentithekplay(char* titheklink, char* title, int first) 1832 1786 { … … 1906 1860 listbox->select = NULL; 1907 1861 1908 pagecount = createtithekplay(titheklink, grid, listbox, countlabel, first);1862 pagecount = createtithekplay(titheklink, grid, listbox, countlabel, title, first); 1909 1863 if(pagecount == 0) return; 1910 1864 … … 2009 1963 screentithek_settings(); 2010 1964 2011 pagecount = createtithekplay(titheklink, grid, listbox, countlabel, first); 1965 // pagecount = createtithekplay(titheklink, grid, listbox, countlabel, first); 1966 pagecount = createtithekplay(titheklink, grid, listbox, countlabel, title, first); 1967 2012 1968 if(pagecount == 0 || tithekexit == 1) break; 2013 1969 … … 2080 2036 free(search), search = NULL; 2081 2037 2082 pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0);2038 pagecount = createtithekplay(titheklink, grid, listbox, countlabel, title, 0); 2083 2039 if(pagecount == 0) return; 2084 2040 } … … 2240 2196 free(search), search = NULL; 2241 2197 2242 pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0);2198 pagecount = createtithekplay(titheklink, grid, listbox, countlabel, title , 0); 2243 2199 if(pagecount == 0) return; 2244 2200 } … … 2534 2490 pincheck = screenpincheck(0, NULL); 2535 2491 if(pincheck == 0) 2536 if(screenlistbox(grid, listbox, countlabel, title, titheklink, &pagecount, &tithekexit, &oaktpage, &oaktline, &ogridcol, 3, 0) == 0) break; 2492 // if(screenlistbox(grid, listbox, countlabel, title, titheklink, &pagecount, &tithekexit, &oaktpage, &oaktline, &ogridcol, 0, 3) == 0) break; 2493 if(screenlistbox(grid, listbox, countlabel, title, titheklink, &pagecount, &tithekexit, &oaktpage, &oaktline, &ogridcol, 0, ((struct tithek*)listbox->select->handle)->flag) == 0) break; 2537 2494 } 2538 2495 else … … 2542 2499 pincheck = screenpincheck(0, NULL); 2543 2500 if(pincheck == 0) 2544 if(screenlistbox(grid, listbox, countlabel, title, titheklink, &pagecount, &tithekexit, &oaktpage, &oaktline, &ogridcol, 0, 3) == 0) break; 2501 // if(screenlistbox(grid, listbox, countlabel, title, titheklink, &pagecount, &tithekexit, &oaktpage, &oaktline, &ogridcol, 0, 3) == 0) break; 2502 if(screenlistbox(grid, listbox, countlabel, title, titheklink, &pagecount, &tithekexit, &oaktpage, &oaktline, &ogridcol, 0, ((struct tithek*)listbox->select->handle)->flag) == 0) break; 2545 2503 } 2546 2504 // new osd musst disable this … … 2565 2523 { 2566 2524 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); 2567 pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0);2525 pagecount = createtithekplay(titheklink, grid, listbox, countlabel, title, 0); 2568 2526 if(pagecount == 0) return; 2569 2527 … … 2593 2551 { 2594 2552 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); 2595 pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0);2553 pagecount = createtithekplay(titheklink, grid, listbox, countlabel, title, 0); 2596 2554 if(pagecount == 0) return; 2597 2555 -
titan/plugins/tithek/tithek_global.h
r40836 r40856 556 556 free(tmpstr2); tmpstr2 = NULL; 557 557 558 *pagecount = createtithekplay(titheklink, grid, listbox, countlabel, cflag);558 *pagecount = createtithekplay(titheklink, grid, listbox, countlabel, tmpstr1, cflag); 559 559 // if(pagecount == 0 || tithekexit == 1) break; 560 560 if(*pagecount == 0 || *tithekexit == 1) return 0; … … 566 566 567 567 return 1; 568 } 569 570 //char* createfilename(char* title, struct skin* listbox) 571 char* createfilename(char* title, char* title2) 572 { 573 char* filename = NULL; 574 char* tmpstr2 = NULL; 575 576 filename = ostrcat(title, "_", 0, 0); 577 578 tmpstr2 = ostrcat(_("Tithek - Mainmenu - Favoriten"), " - ", 0, 0); 579 filename = string_replace_all(tmpstr2, "", filename, 1); 580 free(tmpstr2); tmpstr2 = NULL; 581 582 tmpstr2 = ostrcat(_("Tithek - Mainmenu"), " - ", 0, 0); 583 filename = string_replace_all(tmpstr2, "", filename, 1); 584 free(tmpstr2); tmpstr2 = NULL; 585 586 filename = string_replace_all("Tips und Tricks - ", "", filename, 1); 587 filename = string_replace_all("Internet TV - ", "", filename, 1); 588 filename = string_replace_all("Internet Radio - ", "", filename, 1); 589 filename = string_replace_all("ARD - ", "", filename, 1); 590 filename = string_replace_all("ZDF - ", "", filename, 1); 591 filename = string_replace_all("FilmOn - ", "", filename, 1); 592 filename = string_replace_all("MyVideo - ", "", filename, 1); 593 filename = string_replace_all("Netzkino - ", "", filename, 1); 594 filename = string_replace_all("KinoX - ", "", filename, 1); 595 filename = string_replace_all("Movie4k - ", "", filename, 1); 596 filename = string_replace_all("Movie2k - ", "", filename, 1); 597 598 filename = string_replace_all("Beeg ", "", filename, 1); 599 filename = string_replace_all("Burning Series ", "", filename, 1); 600 filename = string_replace_all("CricFree ", "", filename, 1); 601 filename = string_replace_all("Giga ", "", filename, 1); 602 filename = string_replace_all("KKiste ", "", filename, 1); 603 filename = string_replace_all("NBA-On-Demand ", "", filename, 1); 604 filename = string_replace_all("StreamLive ", "", filename, 1); 605 filename = string_replace_all("TheSolarMovie ", "", filename, 1); 606 filename = string_replace_all("Youtube ", "", filename, 1); 607 608 tmpstr2 = ostrcat(_("Category"), " - ", 0, 0); 609 filename = string_replace_all(tmpstr2, "", filename, 1); 610 free(tmpstr2); tmpstr2 = NULL; 611 612 tmpstr2 = ostrcat(_("Search (local)"), " - ", 0, 0); 613 filename = string_replace_all(tmpstr2, "", filename, 1); 614 free(tmpstr2); tmpstr2 = NULL; 615 616 tmpstr2 = ostrcat(_("Search (20)"), " - ", 0, 0); 617 filename = string_replace_all(tmpstr2, "", filename, 1); 618 free(tmpstr2); tmpstr2 = NULL; 619 620 tmpstr2 = ostrcat(_("Search Cast"), " - ", 0, 0); 621 filename = string_replace_all(tmpstr2, "", filename, 1); 622 free(tmpstr2); tmpstr2 = NULL; 623 624 tmpstr2 = ostrcat(_("Search"), " - ", 0, 0); 625 filename = string_replace_all(tmpstr2, "", filename, 1); 626 free(tmpstr2); tmpstr2 = NULL; 627 628 tmpstr2 = ostrcat(_("All Sorted"), " - ", 0, 0); 629 filename = string_replace_all(tmpstr2, "", filename, 1); 630 free(tmpstr2); tmpstr2 = NULL; 631 632 tmpstr2 = ostrcat(_("A-Z"), " - ", 0, 0); 633 filename = string_replace_all(tmpstr2, "", filename, 1); 634 free(tmpstr2); tmpstr2 = NULL; 635 636 filename = string_replace_all("(Flash - Shell script) - ", "", filename, 1); 637 filename = string_replace_all("Genres - ", "", filename, 1); 638 filename = string_replace_all("All Series - ", "", filename, 1); 639 filename = string_replace_all("Channels - ", "", filename, 1); 640 filename = string_replace_all("Kinofilme - ", "", filename, 1); 641 filename = string_replace_all("Neue Filme - ", "", filename, 1); 642 filename = string_replace_all("Movies (Year) - ", "", filename, 1); 643 filename = string_replace_all("Movies (Genre) - ", "", filename, 1); 644 filename = string_replace_all("Series - ", "", filename, 1); 645 646 // filename = ostrcat(filename, ((struct tithek*)listbox->select->handle)->title, 1, 0); 647 filename = ostrcat(filename, title2, 1, 0); 648 649 filename = ostrcat(filename, ".mp4", 1, 0); 650 filename = string_replace_all(" ", ".", filename, 1); 651 filename = string_replace_all("-", "_", filename, 1); 652 filename = string_replace_all("._.", "_", filename, 1); 653 filename = string_replace_all(".._", "_", filename, 1); 654 655 return filename; 568 656 } 569 657 -
titan/plugins/tithek/tithek_header.h
r39020 r40856 2 2 #define TITHEK_HEADER_H 3 3 4 //char* createfilename(char* title, struct skin* listbox); 5 char* createfilename(char* title, char* title2); 4 6 char* jsunpack(char* input); 5 7 char* gethttps(char* url, char* localfile, char* data, char* user, char* pass, char* referer, int flag);
Note: See TracChangeset
for help on using the changeset viewer.