Changeset 34121
- Timestamp:
- 04/23/15 10:50:21 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/plugins/tithek/myvideo.h
r29555 r34121 217 217 { 218 218 int ret = 1; 219 int debuglevel = getconfigint("debuglevel", NULL); 219 220 220 221 if(listbox == NULL || listbox->select == NULL || listbox->select->handle == NULL) … … 248 249 path = ostrcat("Top_100/Top_100_Single_Charts", NULL, 0, 0); 249 250 250 char* tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0); 251 tmpstr = string_replace_all("<", "\n", tmpstr, 1); 252 tmpstr = string_replace_all(">", "\n", tmpstr, 1); 253 251 char* tmpstr = NULL; 252 char* tmpstr1 = NULL; 253 tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0); 254 titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek/myvideo1_search_tmpstr", NULL, NULL, NULL, tmpstr); 255 256 if(flag == 0) 257 { 258 tmpstr = string_replace_all("<", "\n", tmpstr, 1); 259 tmpstr = string_replace_all(">", "\n", tmpstr, 1); 260 titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek/myvideo2_search_tmpstr_replace", NULL, NULL, NULL, tmpstr); 261 } 262 else 263 { 264 tmpstr1 = string_resub("MV.contentLists.chartlist = {", "</script>", tmpstr, 0); 265 titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek/myvideo2_search_tmpstr1_resub", NULL, NULL, NULL, tmpstr1); 266 free(tmpstr), tmpstr = NULL; 267 tmpstr = ostrcat(tmpstr1, NULL, 0, 0); 268 free(tmpstr1), tmpstr1 = NULL; 269 } 270 254 271 int count = 0; 255 272 int incount = 0; … … 262 279 int max = count; 263 280 for(i = 0; i < max; i++) 264 { 281 { 282 debug(99, "1111ret1[i].part=%s", ret1[i].part); 283 265 284 if(ostrstr(ret1[i].part, "img id='i") != NULL) 266 285 { … … 276 295 debug(99, "id: %s", id); 277 296 debug(99, "---------------------------"); 278 279 if(id != NULL) 280 { 281 incount += 1; 282 line = ostrcat(line, title, 1, 0); 297 } 298 else if(ostrstr(ret1[i].part, "{\"id\":") != NULL) 299 { 300 debug(99, "---------------------------"); 301 debug(99, "ret1[i].part: %s", ret1[i].part); 302 int rcret = waitrc(NULL, 10, 0); 303 if(rcret == getrcconfigint("rcexit", NULL)) break; 304 // pic = oregex(".*{\"id\":(.*),\".*", ret1[i].part); 305 // id = oregex(".*{\"id\":(.*),\".*", ret1[i].part); 306 // title = oregex(".*alt='(.*)' onmouseover=.*", ret1[i].part); 307 308 id = string_resub("{\"id\":", ",\"", ret1[i].part, 0); 309 pic = string_resub("\"thumbnail\":\"", "\",", ret1[i].part, 0); 310 title = string_resub("\"title\":\"", "\",", ret1[i].part, 0); 311 pic = string_replace_all("\\", "", pic, 1); 312 313 debug(99, "title: %s", title); 314 debug(99, "pic: %s", pic); 315 debug(99, "id: %s", id); 316 debug(99, "---------------------------"); 317 } 318 if(id != NULL) 319 { 320 incount += 1; 321 line = ostrcat(line, title, 1, 0); 283 322 // line = ostrcat(line, "#http://www.myvideo.de/dynamic/get_player_video_xml.php?flash_playertype=SER&ID=", 1, 0); 284 323 // de fix 285 286 324 line = ostrcat(line, "#http://www.myvideo.de/dynamic/get_player_video_xml.php?domain=www.myvideo.de&flash_playertype=D&ds=1&autorun=yes&ID=", 1, 0); 325 line = ostrcat(line, id, 1, 0); 287 326 // line = ostrcat(line, "&_countlimit=4&autorun=yes;pageUrl=http://www.myvideo.de/watch/", 1, 0); 288 327 // de fix 289 line = ostrcat(line, "&_countlimit=4;pageUrl=http://www.myvideo.de/watch/", 1, 0); 290 line = ostrcat(line, id, 1, 0); 291 line = ostrcat(line, "/;playpath=flv:movie24/a0/", 1, 0); 292 line = ostrcat(line, id, 1, 0); 293 line = ostrcat(line, ";", 1, 0); 294 line = ostrcat(line, id, 1, 0); 295 line = ostrcat(line, "#", 1, 0); 296 line = ostrcat(line, pic, 1, 0); 297 line = ostrcat(line, "#myvideo_search_", 1, 0); 298 line = ostrcat(line, oitoa(incount + time(NULL)), 1, 0); 299 line = ostrcat(line, ".jpg#MyVideo - Search#12\n", 1, 0); 300 free(ip), ip = NULL; 301 free(path), path = NULL; 302 free(title), title = NULL; 303 } 304 328 line = ostrcat(line, "&_countlimit=4;pageUrl=http://www.myvideo.de/watch/", 1, 0); 329 line = ostrcat(line, id, 1, 0); 330 line = ostrcat(line, "/;playpath=flv:movie24/a0/", 1, 0); 331 line = ostrcat(line, id, 1, 0); 332 line = ostrcat(line, ";", 1, 0); 333 line = ostrcat(line, id, 1, 0); 334 line = ostrcat(line, "#", 1, 0); 335 line = ostrcat(line, pic, 1, 0); 336 line = ostrcat(line, "#myvideo_search_", 1, 0); 337 line = ostrcat(line, oitoa(incount + time(NULL)), 1, 0); 338 line = ostrcat(line, ".jpg#MyVideo - Search#12\n", 1, 0); 339 free(ip), ip = NULL; 340 free(path), path = NULL; 341 free(title), title = NULL; 305 342 } 343 free(title), title = NULL; 344 free(pic), pic = NULL; 345 free(id), id = NULL; 306 346 } 307 347 free(ret1), ret1 = NULL;
Note: See TracChangeset
for help on using the changeset viewer.