Sign up here and you can log into the forum!

** updated 01/06/2013** Plugin: Trailers 2.8

The WDTVExt plugin depot. Plugins/libraries/code only

Re: ** updated 10/30/12** Plugin: Trailers 2.7   

Postby KAD » Wed Jan 02, 2013 2:16 pm

yeah, so I need to do a little bit of debugging as to why the loading page is staying on, it should turn off

as for the search page issue
I will add a configuration entry to specify either the search button or the stop button
so those using media library can choose to use the stop button
those using media mark can use the search button
those using media mark and media library are out of luck, we're running out of button's on this tiny remote
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: ** updated 10/30/12** Plugin: Trailers 2.7   

Postby KAD » Thu Jan 03, 2013 9:32 pm

well plugin is broken

finally got my device hooked back up, and besides the simple changes and little debugging planned
I found imdb has made yet another change to there website

I've made the necessary changes to get the to the following example output
Code: Select all
<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" type="text/css" href="http://i.media-imdb.com/images/SFc38115626995b37cfa0a6e2ae98fe2d7/css/min/imdb-video-player.css" >
</head>
<body id="imdb-player">
        <div style="display: none">
            <img src="/video/imdb/vi1681366553/metrics?state=present">
        </div>

    <!-- setting a script tag with unknown type allows it to be ignored by js parser -->
    <script class="imdb-player-data" type="text/imdb-video-player-json">
    {
        "playerType" : "single",
        "videoPlayerObject" : {"video":{"provider":"video","width":"854","cdn":"cf","slate":"http://ia.media-imdb.com/images/M/MV5BMTQwNzI4MDUzN15BMl5BanBnXkFtZTcwNjE4MDIwNw@@._V1_.jpg","height":"480","callback":"/video/imdb/vi1681366553/metrics_720p","url":"http://video-http.media-imdb.com/MV5BMjI2NDU2NzgxMF5BMTFeQW1wNF5BbWU3MDAwODAyMDc@.mp4?Expires=1357302721&Signature=Q2C~rliGOgfpj1h~XURvwzW4qVkjPC~l7IcJjM2xyDBKBwIgqdZfc0XksnOIkmOeMXZM-a4I6xd1SUIr20u9g6h57XGs6aB41bdSgRluz2o5vK6IHzJ~B6WGBhhvvStwRTefLhQgTOeodEYzE68jHargaPYVl6VXbomleAXKCLg_&Key-Pair-Id=APKAILW5I44IHKUN2DYA&hint=flv","viconst":"vi1681366553","id":null,"label":"720p"}},
        "rhsObject" : {"wl_btn_listener_options":{"hasWatchlist":false,"confirmAccount":false,"doLogin":true},"xsrf":{"xsrfFieldname":"49e6c","xsrfToken":"81d2"},"tconst":"tt1232829","title_display":"21 Jump Street (2012)","poster":{"width":"122","tconst":"tt1232829","image_url":"http://ia.media-imdb.com/images/M/MV5BMTc3NzQ3OTg3NF5BMl5BanBnXkFtZTcwMjk5OTcxNw@@._V1._SX122_CR0,0,122,176_.jpg","height":"176"}},        "titleObject" : {"tconst":"tt1232829","share":{"email":"?subject=Watch%20this%20video%20from%2021%20Jump%20Street%20on%20IMDb&body=http://www.imdb.com/rg/s/4/title/tt1232829/%23lb-vi1681366553","twitter":{"width":"815","url":"http://twitter.com/home?status=21%20Jump%20Street%20-%20http%3A%2F%2Fwww.imdb.com%2Frg%2Fs%2F1%2Ftitle%2Ftt1232829%2F%23lb-vi1681366553","description":"Share on Twitter","height":"436"},"facebook":{"width":"626","url":"http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.imdb.com%2Frg%2Fs%2F3%2Ftitle%2Ftt1232829%2F%23lb-vi1681366553","description":"Share on Facebook","height":"436"},"comments":{"url":"/video/imdb/vi1681366553/?stop=1#discuss"}},"title":{"listtotal":null,"listindex":null,"context":"imdb","viconst":"vi1681366553","title":"No. 1","duration":"2:33"},"token":"tdtBobjnL9EJkD_2BMb6vsWKuNfl0I_2FuLR9RwpTyEPjx8_3D","encoding":{"240p":"Standard","720p":" <img src=\"http://i.media-imdb.com/images/SFfaea74d6edd360e2dc74f4381d593d35/css2/app/video/images/hd_icon_white.png\" width=\"18\" />","selected":"720p","480p":"480p"}},
        "adObject" : {"plugins":{"/images/ova/ova-jw.min.js":{"ads":{"skipAd":{"enabled":false},"schedule":[{"position":"pre-roll","server":{"forceImpressionServing":true,"dart_params":"imdb2.consumer.video/imdbvideo;sz=3x3;dcmt=text/xml;ct=com;id=tt1232829;ml=R;g=co;tt=f;mh=R;g=cr;g=ac;id=vi1681366553;m=R;b=t250a;vct=sh;g=brc;b=skyyact;g=baa;vct=tr;k=t;k=c;coo=usa;b=skyyco;b=pchoice;bpx=1;ab=e;ka=0;[PLAYLISTINDEX];[PLAYERTYPE];[PLAYLISTID];[PASEGMENTS];ord=[CLIENT_SIDE_ORD]"}}]},"autoPlay":true,"autoPlayOnExternalLoad":true,"debug":{"levels":"fatal"},"canFireEventAPICalls":true}},"listindex":null}
    }
    </script>
    <script src="http://i.media-imdb.com/images/SF539be3987208630802e712857c51a6c9/js/jquery.js" ></script><script src="http://i.media-imdb.com/images/SF445483c4f0a966b62895f5a28ba98bbd/js/jwplayer/5.9/jwplayer.js" ></script><script src="http://i.media-imdb.com/images/SF66d41ec7090bbdde87e09a309dea6661/js/swfobject/1.5.js" ></script><script src="http://i.media-imdb.com/images/SFb762c590afd141254ab36f8212ac0f29/js/jquery/ui-current-custom.js" ></script><script src="http://i.media-imdb.com/images/SF979bdfd0fbb3f24d05d47bf9fcea6aab/js/cc/flash_detect.js" ></script><script src="http://i.media-imdb.com/images/SF91abb9e671b7ba783cea7c22bdc1274f/js/cc/video/imdb-video-player.js" ></script>
</body>
</html>



and I'm currently stuck, previously I was using a regex which mad_ady provided to extract the real url
this page is substantially different
anybody know how to craft a regex to grab anything

after "url":"
beggining with http
and before the next occurance of ","

and yes, I'd assume, we'll need to escape all of the quotes

or the alternative I can think of
does anybody know how to extract the entire embedded json from this html
once extract, I could walk through, just like the other json responses
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: ** updated 10/30/12** Plugin: Trailers 2.7   

Postby mad_ady » Thu Jan 03, 2013 11:59 pm

To extract the json object i would try the following regex:
Code: Select all
/<script class="imdb-player-data" type="text\/imdb-video-player-json">(.*?)<\/script>/mS
User avatar
mad_ady
Developer
 
Posts: 4522
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: ** updated 10/30/12** Plugin: Trailers 2.7   

Postby KAD » Fri Jan 04, 2013 9:49 am

I'll give it a shot tonight, appreciate it :D
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: ** updated 10/30/12** Plugin: Trailers 2.7   

Postby KAD » Sat Jan 05, 2013 10:20 am

mad_ady wrote:To extract the json object i would try the following regex:
Code: Select all
/<script class="imdb-player-data" type="text\/imdb-video-player-json">(.*?)<\/script>/mS


well, that did not work

in js it appears the ending S is an invalid character, or at least syntax highlighting, shows that, and WD will not load the plugin if I include that flag
also I found some conflicting info regarding the m flag for multi-line

from what I can gather, it seems older js engines do not support the m flag for multiline
since we don't even have json parse in the wdext js engine, I'm guessing it's not supported
WD will load the plugin with the m flag, but does not work produce the needed results

so I made quite a few failed attempts at modifying that regex, but I'm quite the novice at regex

edit: not the prettiest solution, but this works

Code: Select all
StreamHTML.match(/<script class="imdb-player-data" type="text\/imdb-video-player-json"[^>]*?>([\s\S]*)\}/);
      var Json = ( RegExp.$1 + "}");
      var Json2 = eval("(" + Json + ")");
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: ** updated 01/06/2013** Plugin: Trailers 2.8   

Postby KAD » Sun Jan 06, 2013 12:18 pm

bump :)
see first post
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: ** updated 01/06/2013** Plugin: Trailers 2.8   

Postby gluck » Wed Jan 09, 2013 6:17 am

Thanks KAD for the update !!
It works like a charm with the "stop" button !
:D
gluck
n00b
 
Posts: 9
Joined: Tue Mar 27, 2012 2:22 pm

Re: ** updated 01/06/2013** Plugin: Trailers 2.8   

Postby dieselpower » Tue Jan 15, 2013 12:03 pm

Perfect work! Thanks KAD for update... works fine again :D
dieselpower
n00b
 
Posts: 7
Joined: Sun Mar 04, 2012 11:30 am

Re: ** updated 01/06/2013** Plugin: Trailers 2.8   

Postby KAD » Mon Nov 25, 2013 11:37 pm

now available in svn
download using WDTVext onscreen menu
configure with WEC
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: ** updated 01/06/2013** Plugin: Trailers 2.8   

Postby Dodot » Sat Nov 22, 2014 7:14 am

Seems broken :(
When I press search, a "Trailer" screen opens and closes immediately.
Dodot
n00b
 
Posts: 1
Joined: Sat Nov 22, 2014 7:13 am

PreviousNext

Return to WDTVExt plugins

Who is online

Users browsing this forum: No registered users and 2 guests