Changeset 40856


Ignore:
Timestamp:
08/27/17 17:39:35 (7 years ago)
Author:
obi
Message:

update tithek

Location:
titan/plugins/tithek
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • titan/plugins/tithek/tithek.h

    r40852 r40856  
    758758}
    759759
    760 int createtithekplay(char* titheklink, struct skin* grid, struct skin* listbox, struct skin* countlabel, int flag)
     760int createtithekplay(char* titheklink, struct skin* grid, struct skin* listbox, struct skin* countlabel, char* title, int flag)
    761761{
    762762        int gridbr = 0, posx = 0, count = 0, sumcount = 0, count1 = 0, pagecount = 0, skip = 0;
     
    764764        struct skin* tmp = NULL;
    765765        char* tithekfile = NULL;
    766         char* tmpstr = NULL;
     766        char* tmpstr = NULL, *tmpstr1 = NULL, *tmpstr2 = NULL;
    767767
    768768        if(!ostrncmp("http://", titheklink, 7))
     
    943943                        tmp->hspace = 10;
    944944                        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)
    946972                                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;
    949976                        else
    950977                                tmp->fontcol = 0xffffff;
    951 
    952978                        //tmp->fontcol = 0x0000ff;
    953979
     
    9791005        tmpstr = oitoa(sumcount);
    9801006
    981         char* tmpstr1 = ostrcat(_("found"), NULL, 0, 0);
     1007        tmpstr1 = ostrcat(_("found"), NULL, 0, 0);
    9821008        tmpstr1 = ostrcat(tmpstr1, " ", 1, 0);
    9831009        tmpstr1 = ostrcat(tmpstr1, tmpstr, 1, 0);
     
    12281254        {
    12291255                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,
     1257tnode->menutitle, tnode->flag);
    12311258                ret = 0;
    12321259        }
     
    15811608        else if(tmpstr1 != NULL)
    15821609        {
    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;
    16591614                debug(99, "filename: %s", filename);
    16601615
     
    17131668                                }
    17141669
    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")))
    17161671                                        addmenulist(&mlist, "Download via Youtube_DL (background)", _("Download Full File (youtube_dl)"), NULL, 0, 0);
    17171672                        }
     
    18281783        free(tmpstr1); tmpstr1 = NULL;
    18291784}
    1830 
    18311785void screentithekplay(char* titheklink, char* title, int first)
    18321786{
     
    19061860        listbox->select = NULL;
    19071861
    1908         pagecount = createtithekplay(titheklink, grid, listbox, countlabel, first);
     1862        pagecount = createtithekplay(titheklink, grid, listbox, countlabel, title, first);
    19091863        if(pagecount == 0) return;
    19101864
     
    20091963                        screentithek_settings();
    20101964
    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
    20121968                        if(pagecount == 0 || tithekexit == 1) break;
    20131969
     
    20802036                                        free(search), search = NULL;
    20812037
    2082                                         pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0);
     2038                                        pagecount = createtithekplay(titheklink, grid, listbox, countlabel, title, 0);
    20832039                                        if(pagecount == 0) return;
    20842040                                }
     
    22402196                                        free(search), search = NULL;
    22412197
    2242                                         pagecount = createtithekplay(titheklink, grid, listbox, countlabel, 0);
     2198                                        pagecount = createtithekplay(titheklink, grid, listbox, countlabel, title , 0);
    22432199                                        if(pagecount == 0) return;
    22442200                                }
     
    25342490                                                pincheck = screenpincheck(0, NULL);
    25352491                                        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;
    25372494                                }
    25382495                                else
     
    25422499                                                pincheck = screenpincheck(0, NULL);
    25432500                                        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;
    25452503                                }
    25462504// new osd musst disable this
     
    25652523                                {
    25662524                                        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);
    25682526                                        if(pagecount == 0) return;
    25692527
     
    25932551                                {
    25942552                                        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);
    25962554                                        if(pagecount == 0) return;
    25972555
  • titan/plugins/tithek/tithek_global.h

    r40836 r40856  
    556556        free(tmpstr2); tmpstr2 = NULL;
    557557
    558         *pagecount = createtithekplay(titheklink, grid, listbox, countlabel, cflag);
     558        *pagecount = createtithekplay(titheklink, grid, listbox, countlabel, tmpstr1, cflag);
    559559//      if(pagecount == 0 || tithekexit == 1) break;
    560560        if(*pagecount == 0 || *tithekexit == 1) return 0;
     
    566566
    567567        return 1;
     568}
     569
     570//char* createfilename(char* title, struct skin* listbox)
     571char* 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;
    568656}
    569657
  • titan/plugins/tithek/tithek_header.h

    r39020 r40856  
    22#define TITHEK_HEADER_H
    33
     4//char* createfilename(char* title, struct skin* listbox);
     5char* createfilename(char* title, char* title2);
    46char* jsunpack(char* input);
    57char* 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.