Changeset 18660 for titan/plugins/imdb/imdb.h
- Timestamp:
- 11/19/12 18:41:31 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/plugins/imdb/imdb.h
r18528 r18660 41 41 42 42 start: 43 debug(133, "title: %s",title); 43 44 tmpsearch = ostrcat("find?s=tt;q=", NULL, 0, 0); 44 45 if(flag == 0) 45 46 tmpsearch = ostrcat(tmpsearch, title, 1, 0); 46 47 else 47 tmpsearch = ostrcat( tmpsearch, "/title/tt", 1, 0);48 tmpsearch = ostrcat("/title/tt", title, 0, 0); 48 49 tmpsearch = stringreplacechar(tmpsearch, ' ', '+'); 49 50 … … 96 97 tmpstr = string_resub("<p><b>Titel", "</td></tr></table> </p>", tmpstr, 0); 97 98 free(tmp); tmp = NULL; 99 // writesys("/var/usr/local/share/titan/plugins/imdb/tmpstr", tmpstr, 0); 98 100 99 101 while(ostrstr(tmpstr, "</td><td valign=\"top\"><a href=\"/title/") != NULL) … … 101 103 tmpstr = string_replace("</td><td valign=\"top\"><a href=\"/title/", "\n\n", tmpstr, 1); 102 104 } 105 // writesys("/var/usr/local/share/titan/plugins/imdb/tmpstr1", tmpstr, 0); 103 106 104 107 struct menulist* mlist = NULL, *mbox = NULL; … … 113 116 for(i = 0; i < max; i++) 114 117 { 115 tmpstr1 = string_resub("link=/title", "</a>", (&ret[i])->part, 0); 118 // tmpstr1 = string_resub("link=/title", "</a>", (&ret[i])->part, 0); 119 tmpstr1 = string_resub("link=/title", "</td>", (&ret[i])->part, 0); 120 debug(133, "tmpstr1(%d): %s\n", i, tmpstr1); 121 tmpstr1 = string_replace("</a>", "", tmpstr1, 1); 122 debug(133, "tmpstr1(%d): %s\n", i, tmpstr1); 123 124 char* x = oregex("/tt([0-9]{7})", tmpstr1); 125 char* y = oregex(";\">(.*)", tmpstr1); 126 if(ostrstr(y, "<img src") == NULL && x != NULL && y != NULL) 127 { 128 debug(133, "x(%d): %s\n", i, x); 129 debug(133, "y(%d): %s\n", i, y); 130 string_striptags(x); 131 string_striptags(y); 132 string_strip_whitechars(x); 133 string_strip_whitechars(y); 134 debug(133, "x(%d): %s\n", i, x); 135 debug(133, "y(%d): %s\n", i, y); 136 y = string_decode(y, 1); 137 x = string_decode(x, 1); 138 debug(133, "x(%d): %s\n", i, x); 139 debug(133, "y(%d): %s\n", i, y); 140 141 addmenulist(&mlist, y, x, NULL, 0, 0); 142 } 143 free(x), x = NULL; 144 free(y), y = NULL; 145 /* 146 current not working 116 147 struct regex* x = regexstruct("/tt([0-9]{7})", tmpstr1); 117 148 struct regex* y = regexstruct(";\">(.*)", tmpstr1); 118 149 if(x != NULL && y != NULL) 119 150 { 151 debug(133, "x->match2(%d): %s\n", i, x->match2); 152 debug(133, "y->match2(%d): %s\n", i, y->match2); 120 153 x->match2 = string_decode(x->match2, 1); 121 154 y->match2 = string_decode(y->match2, 1); … … 126 159 freeregexstruct(x); x = NULL; 127 160 freeregexstruct(y); y = NULL; 128 161 */ 129 162 free(tmpstr1),tmpstr1 = NULL; 130 163 } … … 417 450 void screenimdb(char* title) 418 451 { 452 debug(133, "title: %s",title); 419 453 int rcret = 0; 420 454 struct skin* imdbskin = getscreen("imdb"); … … 431 465 char* search = NULL; 432 466 433 setfbtransparent(255);467 // setfbtransparent(255); 434 468 status.hangtime = 99999; 435 469 436 470 if(title == NULL) title = getepgakttitle(NULL); 471 debug(133, "title: %s",title); 437 472 438 473 drawscreen(load, 0, 0); … … 464 499 if(rcret == getrcconfigint("rcred", NULL)) 465 500 { 466 search = textinput("Search", NULL);467 if(search != NULL)468 {469 freeimdb(&node, 0); node = NULL;470 drawscreen(load, 0, 0);471 node = getimdb(&node, search, 0, 0, 0);472 clearscreen(load);473 free(search); search = NULL;474 goto start;475 }476 drawscreen(imdbskin, 0, 0);477 continue;501 search = textinput("Search", NULL); 502 if(search != NULL) 503 { 504 freeimdb(&node, 0); node = NULL; 505 drawscreen(load, 0, 0); 506 node = getimdb(&node, search, 0, 0, 0); 507 clearscreen(load); 508 free(search); search = NULL; 509 goto start; 510 } 511 drawscreen(imdbskin, 0, 0); 512 continue; 478 513 } 479 514 } 480 515 481 516 freeimdb(&node, 0); node = NULL; 482 setosdtransparent(getskinconfigint("osdtransparent", NULL));517 // setosdtransparent(getskinconfigint("osdtransparent", NULL)); 483 518 status.hangtime = getconfigint("hangtime", NULL); 484 519 clearscreen(imdbskin);
Note: See TracChangeset
for help on using the changeset viewer.