Changeset 36966


Ignore:
Timestamp:
01/27/16 23:34:04 (7 years ago)
Author:
obi
Message:

update tithek

Location:
titan
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • titan/mediathek/localparser_secret/bs.sh

    r36961 r36966  
    185185                 j = index(substr($0, i), "</a>") - 1
    186186                 title = substr($0, i, j)
    187 #                 print title "#" SRC " " SRC " video " url "#http://atemio.dyndns.tv/mediathek/menu/default.jpg#default.jpg#" NAME "#0"
    188                  print SRC " " SRC " video " url
     187                 print title "#" SRC " " SRC " video " url "#http://atemio.dyndns.tv/mediathek/menu/default.jpg#default.jpg#" NAME "#111"
    189188              }
    190189              next
     
    220219                  title = substr($0, i, j)
    221220                 
    222 #                  print "Originalvideo#" url "#http://atemio.dyndns.tv/mediathek/menu/default.jpg#default.jpg#" NAME "#14"
    223                   print title "#" url "#http://atemio.dyndns.tv/mediathek/menu/" title ".jpg#" title ".jpg#" NAME "#14"
     221#                  print "Originalvideo#" url "#http://atemio.dyndns.tv/mediathek/menu/default.jpg#default.jpg#" NAME "#140"
     222#                  print title "#" url "#http://atemio.dyndns.tv/mediathek/menu/" title ".jpg#" title ".jpg#" NAME "#14"
     223                  print url
    224224               }
    225225               next
     
    231231
    232232' >/tmp/tithek/$PARSER.video.list
    233         cat "/tmp/tithek/$PARSER.video.list"
     233#       echo "/tmp/tithek/$PARSER.video.list"
     234        cat     "/tmp/tithek/$PARSER.video.list"
    234235}
    235236
  • titan/plugins/tithek/tithek.h

    r36961 r36966  
    445445
    446446//      if(cmpfilenameext(filename, ".sh") == 0)
    447         if(ostrstr(filename, ".sh ") != NULL && ostrstr(filename, ".sh init") == NULL && ostrstr(filename, ".sh video") == NULL)
     447        if(ostrstr(filename, ".sh ") != NULL && ostrstr(filename, ".sh init") == NULL)
    448448        {
    449449                printf("[tithek] cmd: %s\n", filename);
     
    454454                debug(10, "file: %s", file);
    455455        }
    456         else if(ostrstr(filename, ".sh video") != NULL)
    457         {
    458                 printf("[tithek] video..... cmd: %s\n", filename);
    459                 debug(10, "cmd: %s", filename);
    460                 file = command(filename);
    461                 file = string_newline(file);
    462                 printf("[tithek] file: %s\n", file);
    463                 debug(10, "file: %s", file);
    464         }
    465456        else
    466457                file = ostrcat(filename, NULL, 0, 0);   
     
    483474                        continue;
    484475
    485                 if(ostrstr(filename, ".sh hoster") != NULL)
    486                 {
    487                         printf("[tithek] hoster fileline: %s\n", fileline);
    488                         tmpstr = command(fileline);
    489                         printf("[tithek] hoster tmpstr: %s\n", tmpstr);
    490 
    491                         len = strlen(tmpstr) - 1;
    492                         if(tmpstr[len] == '\n')
    493                                 tmpstr[len] = '\0';
    494                         if(tmpstr[len - 1] == '\r')
    495                                 tmpstr[len - 1] = '\0';
    496                 }
    497                 else
    498                 {
    499                         len = strlen(fileline) - 1;
    500                         if(fileline[len] == '\n')
    501                                 fileline[len] = '\0';
    502                         if(fileline[len - 1] == '\r')
    503                                 fileline[len - 1] = '\0';
    504                 }
     476                len = strlen(fileline) - 1;
     477                if(fileline[len] == '\n')
     478                        fileline[len] = '\0';
     479                if(fileline[len - 1] == '\r')
     480                        fileline[len - 1] = '\0';
     481
    505482                linecount++;
    506483
    507484                if(last == NULL) last = tmplast;
    508                 if(ostrstr(filename, ".sh hoster") != NULL)
    509                         last = addtithek(tmpstr, len + 2, linecount, last, pay);
    510                 else
    511                         last = addtithek(fileline, len + 2, linecount, last, pay);
     485                last = addtithek(fileline, len + 2, linecount, last, pay);
    512486                if(last != NULL) tmplast = last;
    513487                free(tmpstr), tmpstr = NULL;
     
    13811355        tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0);
    13821356        tmpstr2 = ostrcat(((struct tithek*)listbox->select->handle)->title, NULL, 0, 0);
    1383                
     1357
    13841358        if(((struct tithek*)listbox->select->handle)->flag == 2)
    13851359        {
    13861360                if(tmpstr != NULL) tmpstr1 = ostrcat(tmpstr, NULL, 0, 0);
    1387         }                                               
     1361        }
    13881362        else if(((struct tithek*)listbox->select->handle)->flag == 3)
    13891363        {
     
    14741448        {
    14751449                if(tmpstr != NULL) tmpstr1 = nbaondemand(tmpstr);
     1450        }
     1451        else if(((struct tithek*)listbox->select->handle)->flag == 111)
     1452        {
     1453                if(tmpstr != NULL) tmpstr1 = localparser_hoster(tmpstr);
    14761454        }
    14771455
     
    20762054                                clearscreen(grid);
    20772055
    2078                                 if(((struct tithek*)listbox->select->handle)->flag == 2 || ((struct tithek*)listbox->select->handle)->flag == 3 || ((struct tithek*)listbox->select->handle)->flag == 4 || ((struct tithek*)listbox->select->handle)->flag == 5 || ((struct tithek*)listbox->select->handle)->flag == 6 || ((struct tithek*)listbox->select->handle)->flag == 12 || ((struct tithek*)listbox->select->handle)->flag == 14 || ((struct tithek*)listbox->select->handle)->flag == 15 || ((struct tithek*)listbox->select->handle)->flag == 20 || ((struct tithek*)listbox->select->handle)->flag == 38 || ((struct tithek*)listbox->select->handle)->flag == 42 || ((struct tithek*)listbox->select->handle)->flag == 45 || ((struct tithek*)listbox->select->handle)->flag == 46 || ((struct tithek*)listbox->select->handle)->flag == 64 || ((struct tithek*)listbox->select->handle)->flag == 50 || ((struct tithek*)listbox->select->handle)->flag == 41 || ((struct tithek*)listbox->select->handle)->flag == 43 || ((struct tithek*)listbox->select->handle)->flag == 75 || ((struct tithek*)listbox->select->handle)->flag == 91 || ((struct tithek*)listbox->select->handle)->flag == 92 || ((struct tithek*)listbox->select->handle)->flag == 93 || ((struct tithek*)listbox->select->handle)->flag == 94 || ((struct tithek*)listbox->select->handle)->flag == 98)
     2056                                if(((struct tithek*)listbox->select->handle)->flag == 2 || ((struct tithek*)listbox->select->handle)->flag == 3 || ((struct tithek*)listbox->select->handle)->flag == 4 || ((struct tithek*)listbox->select->handle)->flag == 5 || ((struct tithek*)listbox->select->handle)->flag == 6 || ((struct tithek*)listbox->select->handle)->flag == 12 || ((struct tithek*)listbox->select->handle)->flag == 14 || ((struct tithek*)listbox->select->handle)->flag == 15 || ((struct tithek*)listbox->select->handle)->flag == 20 || ((struct tithek*)listbox->select->handle)->flag == 38 || ((struct tithek*)listbox->select->handle)->flag == 42 || ((struct tithek*)listbox->select->handle)->flag == 45 || ((struct tithek*)listbox->select->handle)->flag == 46 || ((struct tithek*)listbox->select->handle)->flag == 64 || ((struct tithek*)listbox->select->handle)->flag == 50 || ((struct tithek*)listbox->select->handle)->flag == 41 || ((struct tithek*)listbox->select->handle)->flag == 43 || ((struct tithek*)listbox->select->handle)->flag == 75 || ((struct tithek*)listbox->select->handle)->flag == 91 || ((struct tithek*)listbox->select->handle)->flag == 92 || ((struct tithek*)listbox->select->handle)->flag == 93 || ((struct tithek*)listbox->select->handle)->flag == 94 || ((struct tithek*)listbox->select->handle)->flag == 98 || ((struct tithek*)listbox->select->handle)->flag == 111)
    20792057                                {
    20802058                                        submenu(listbox, load, title);
     
    23462324                                        continue;
    23472325                                }       
     2326                                else if((((struct tithek*)listbox->select->handle)->flag == 112))
     2327                                {
     2328//                                      if(localparser_search(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->title) == 0)
     2329//                                              if(screenlistbox(grid, listbox, countlabel, title, titheklink, &pagecount, &tithekexit, &oaktpage, &oaktline, &ogridcol, 0, 0) == 0) break;
     2330                                        if(localparser_search(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->title, NULL, 0) == 0)
     2331                                                if(screenlistbox(grid, listbox, countlabel, title, titheklink, &pagecount, &tithekexit, &oaktpage, &oaktline, &ogridcol, 0, 0) == 0) break;
     2332                                }
    23482333                                else if((((struct tithek*)listbox->select->handle)->flag == 3))
    23492334                                {
  • titan/plugins/tithek/tithek_global.h

    r36955 r36966  
    693693}
    694694
     695char* localparser_hoster(char* link)
     696{
     697        debug(99, "local_parser link: %s", link);
     698        int debuglevel = getconfigint("debuglevel", NULL);
     699        int ret = 1;
     700        char* tmpstr = NULL, *streamurl = NULL;
     701
     702        tmpstr = command(link);
     703        tmpstr = string_newline(tmpstr);
     704       
     705        streamurl = hoster(tmpstr);
     706        free(tmpstr), tmpstr = NULL;
     707
     708        return streamurl;
     709}
     710
     711
     712//int localparser_search(struct skin* grid, struct skin* listbox, struct skin* countlabel, struct skin* load, char* link, char* title)
     713int localparser_search(struct skin* grid, struct skin* listbox, struct skin* countlabel, struct skin* load, char* link, char* title, char* searchstr, int flag)
     714{
     715        char* tmpstr = NULL, *tmpstr1 = NULL, *line = NULL, *menu = NULL, *search = NULL;
     716        int ret = 1, count = 0, i = 0;
     717
     718        if(listbox == NULL || listbox->select == NULL || listbox->select->handle == NULL)
     719                return ret;
     720
     721        if(searchstr == NULL)
     722                search = textinputhist(_("Search"), " ", "searchhist");
     723        else
     724                search = textinputhist(_("Search"), searchstr, "searchhist");
     725
     726        if(search != NULL)
     727        {
     728                drawscreen(load, 0, 0);
     729
     730                strstrip(search);
     731                string_tolower(search);
     732
     733                tmpstr = gethttp("atemio.dyndns.tv", "/mediathek/youtube/streams/youtube.all-sorted.list", 80, NULL, HTTPAUTH, 5000, NULL, 0);
     734
     735                struct splitstr* ret1 = NULL;
     736                ret1 = strsplit(tmpstr, "\n", &count);
     737
     738                if(ret1 != NULL)
     739                {
     740                        int max = count;
     741                        for(i = 0; i < max; i++)
     742                        {
     743                       
     744                                tmpstr1 = ostrcat(ret1[i].part, NULL, 0, 0);
     745                                tmpstr1 = stringreplacecharonce(tmpstr1, '#', '\0');
     746                                string_tolower(tmpstr1);
     747
     748                                if(ostrstr(tmpstr1, search) != NULL)
     749                                {
     750                                        printf("found: %s\n", ret1[i].part);
     751                                        int rcret = waitrc(NULL, 10, 0);
     752                                        if(rcret == getrcconfigint("rcexit", NULL)) break;
     753
     754                                        line = ostrcat(line, ret1[i].part, 1, 0);
     755                                        line = ostrcat(line, "\n", 0, 0);
     756                                }
     757                                free(tmpstr1), tmpstr1 = NULL;                         
     758                        }
     759                        free(ret1), ret1 = NULL;
     760
     761                        if(line != NULL)
     762                        {
     763                                line = string_replace_all("http://atemio.dyndns.tv/", "http://imageshack.us/md/up/grd/", line, 1);
     764                                menu = ostrcat("/tmp/tithek/youtube.search.list", NULL, 0, 0);
     765                                writesys(menu, line, 0);
     766                                struct tithek* tnode = (struct tithek*)listbox->select->handle;
     767                                createtithek(tnode, tnode->title, menu, tnode->pic, tnode->localname, tnode->menutitle, tnode->flag);
     768                                ret = 0;
     769                        }
     770                }
     771                free(tmpstr), tmpstr = NULL;
     772        }
     773        free(search), search = NULL;
     774        return ret;
     775}
     776
    695777#endif
  • titan/plugins/tithek/tithek_header.h

    r36961 r36966  
    99void localscript_init(char* titheklink, char* tithekfile);
    1010int b64dec(char* dest, char* src);
     11char* localparser_hoster(char* link);
     12int localparser_search(struct skin* grid, struct skin* listbox, struct skin* countlabel, struct skin* load, char* link, char* title, char* searchstr, int flag);
    1113
    1214void titheklog(int debuglevel, char* name1, char* name2, char* name3, char* name4, char* content)
Note: See TracChangeset for help on using the changeset viewer.