Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function(){
- var mytvdbid = $(this).attr('id');
- var resturl = "http://localhost:9090/api/tvdb/episode/"+mytvdbid+"/?season_number=2&ep_number=1";
- $('#tvnav ul li a').on('click', function(e){
- e.preventDefault();
- $.ajax({
- dataType: "json",
- url: resturl,
- username: "flexget",
- password: "pass",
- success: function(data){
- var title = data.episode_name;
- var poster = data.image;
- var cdiv = $('#imdbcontents');
- var thehtml = "<img src=\""+poster+"\" class=\"floatright\">";
- thehtml = thehtml + "<h2>"+title+"</h2>";
- thehtml = thehtml + "<p><a href=\""+url+"\" target=\"_blank\">View on IMDb →</p>";
- cdiv.html(thehtml);
- }
- });
- });
- });
Add Comment
Please, Sign In to add comment