Changeset 36966
- Timestamp:
- 01/27/16 23:34:04 (7 years ago)
- Location:
- titan
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/mediathek/localparser_secret/bs.sh
r36961 r36966 185 185 j = index(substr($0, i), "</a>") - 1 186 186 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" 189 188 } 190 189 next … … 220 219 title = substr($0, i, j) 221 220 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 224 224 } 225 225 next … … 231 231 232 232 ' >/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" 234 235 } 235 236 -
titan/plugins/tithek/tithek.h
r36961 r36966 445 445 446 446 // 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) 448 448 { 449 449 printf("[tithek] cmd: %s\n", filename); … … 454 454 debug(10, "file: %s", file); 455 455 } 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 }465 456 else 466 457 file = ostrcat(filename, NULL, 0, 0); … … 483 474 continue; 484 475 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 505 482 linecount++; 506 483 507 484 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); 512 486 if(last != NULL) tmplast = last; 513 487 free(tmpstr), tmpstr = NULL; … … 1381 1355 tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0); 1382 1356 tmpstr2 = ostrcat(((struct tithek*)listbox->select->handle)->title, NULL, 0, 0); 1383 1357 1384 1358 if(((struct tithek*)listbox->select->handle)->flag == 2) 1385 1359 { 1386 1360 if(tmpstr != NULL) tmpstr1 = ostrcat(tmpstr, NULL, 0, 0); 1387 } 1361 } 1388 1362 else if(((struct tithek*)listbox->select->handle)->flag == 3) 1389 1363 { … … 1474 1448 { 1475 1449 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); 1476 1454 } 1477 1455 … … 2076 2054 clearscreen(grid); 2077 2055 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) 2079 2057 { 2080 2058 submenu(listbox, load, title); … … 2346 2324 continue; 2347 2325 } 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 } 2348 2333 else if((((struct tithek*)listbox->select->handle)->flag == 3)) 2349 2334 { -
titan/plugins/tithek/tithek_global.h
r36955 r36966 693 693 } 694 694 695 char* 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) 713 int 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 695 777 #endif -
titan/plugins/tithek/tithek_header.h
r36961 r36966 9 9 void localscript_init(char* titheklink, char* tithekfile); 10 10 int b64dec(char* dest, char* src); 11 char* localparser_hoster(char* link); 12 int localparser_search(struct skin* grid, struct skin* listbox, struct skin* countlabel, struct skin* load, char* link, char* title, char* searchstr, int flag); 11 13 12 14 void titheklog(int debuglevel, char* name1, char* name2, char* name3, char* name4, char* content)
Note: See TracChangeset
for help on using the changeset viewer.