Changeset 36970


Ignore:
Timestamp:
01/28/16 00:44:55 (7 years ago)
Author:
obi
Message:

tithek fix local parser serach

Location:
titan
Files:
3 edited

Legend:

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

    r36969 r36970  
    6464      }
    6565/^\}/ { if (table == "videos") {
    66            print title "#" SRC " " SRC " stream video/" id "#https://img.beeg.com/236x177/" id ".jpg#" PARSER "_" id ".jpg#" NAME "#0"
     66           print title "#" SRC " " SRC " stream video/" id "#https://img.beeg.com/236x177/" id ".jpg#" PARSER "_" id ".jpg#" NAME "#111"
    6767           title = ""
    6868           id = ""
     
    139139        }
    140140        if (video != "null") {
    141            print title "#https:" video "#https://img.beeg.com/236x177/" id ".jpg#" PARSER "_" id ".jpg#" NAME "#2"
     141#           print title "#https:" video "#https://img.beeg.com/236x177/" id ".jpg#" PARSER "_" id ".jpg#" NAME "#2"
     142           print "https:" video
    142143           }
    143144        title = ""
     
    225226      }
    226227' >/tmp/tithek/$PARSER.list
    227         echo "/tmp/tithek/$PARSER.list"
     228#       echo "/tmp/tithek/$PARSER.list"
     229        cat "/tmp/tithek/$PARSER.list"
    228230}
    229231
  • titan/plugins/tithek/tithek.h

    r36966 r36970  
    23262326                                else if((((struct tithek*)listbox->select->handle)->flag == 112))
    23272327                                {
     2328printf("check localparser_search: %s\n", link);
     2329
    23282330//                                      if(localparser_search(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->title) == 0)
    23292331//                                              if(screenlistbox(grid, listbox, countlabel, title, titheklink, &pagecount, &tithekexit, &oaktpage, &oaktline, &ogridcol, 0, 0) == 0) break;
  • titan/plugins/tithek/tithek_global.h

    r36966 r36970  
    8080        else if(ostrstr(tmplink, "zerocast") != NULL)
    8181                streamurl = zerocast(url, 0);
    82         else if(ostrstr(tmplink, "usachannels") != NULL)
    83                 streamurl = usachannels(url, 0);
     82        else if(ostrstr(tmplink, "beeg") != NULL)
     83                streamurl = beeg(url);
    8484        else
    8585                textbox(_("Message"), _("The hoster is not yet supported !"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 5, 0);
     
    702702        tmpstr = command(link);
    703703        tmpstr = string_newline(tmpstr);
    704        
     704
     705printf("tmpstr: %s\n", tmpstr);
    705706        streamurl = hoster(tmpstr);
     707        if(streamurl == NULL)
     708                streamurl = ostrcat(tmpstr, NULL, 0, 0);
     709printf("streamurl: %s\n", streamurl);   
     710
    706711        free(tmpstr), tmpstr = NULL;
    707712
     
    713718int localparser_search(struct skin* grid, struct skin* listbox, struct skin* countlabel, struct skin* load, char* link, char* title, char* searchstr, int flag)
    714719{
     720printf("localparser_search: %s\n", link);
     721
    715722        char* tmpstr = NULL, *tmpstr1 = NULL, *line = NULL, *menu = NULL, *search = NULL;
    716723        int ret = 1, count = 0, i = 0;
     
    731738                string_tolower(search);
    732739
    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                 }
     740                char* cmd = ostrcat(link, search, 0, 0);
     741                char* filename = command(cmd);
     742                filename = string_newline(filename);
     743                tmpstr = readfiletomem(filename, 1);
     744                free(cmd), cmd = NULL;
     745
     746                if(tmpstr != NULL)
     747                {
     748                        tmpstr = string_replace_all("http://atemio.dyndns.tv/", "http://imageshack.us/md/up/grd/", tmpstr, 1);
     749                        menu = ostrcat(filename, NULL, 0, 0);
     750//                      writesys(menu, tmpstr, 0);
     751                        struct tithek* tnode = (struct tithek*)listbox->select->handle;
     752                        createtithek(tnode, tnode->title, menu, tnode->pic, tnode->localname, tnode->menutitle, tnode->flag);
     753                        ret = 0;
     754                }
     755
     756                free(filename), filename = NULL;
    771757                free(tmpstr), tmpstr = NULL;
    772758        }
Note: See TracChangeset for help on using the changeset viewer.