<commit_before>{% include "home/header.htm" %}





<div class="info" style="display: none;"> </div>
<p class="generic"> This file available in the following room(s): </p>
<div class="download">

<h2> <span id="fileTitle"> {{filen}}</span></h2>
{% for result in results %}
<dl> 
	<dt> <a href="#" class="singlefile"> {{result.name}} </a>
	</dt>	
	<dd><span><span class="s_t">{{result.block}}</span> | <span class="u_t">{{result.room}}</span> | Added on: <span class="d_t">{{result.date}}</span></span></dd>
</dl>
{% endfor %}

</div>





<br/><br/>
<p class="generic" style="font-size: 13px;" id="stats"> <a href="/addguide"> Share your awesome stuff. Add your files. </a> </p>

<script>

$(document).ready(function(){

	$.ajax( {url: './apifeed',
		 beforeSend: function(){ 
		 		console.log("Calling API");		 		
		    },
         data: { 
	         q : $("#fileTitle").text()
         } ,
         type: 'GET',
         cache: false,
        success: function(data){ 
        		console.log("Call Complete. Results: ");
	        	x = JSON.parse(data);
	        	if(x.status == "valid"){
	        		$(".info").slideDown();
	        		$(".info").html('Loading additional details...');
	        		if(x.type == "movie"){
	        			loadMovieDetails(x.id);
	        		}
	        		
	        	}

	 }//end of success
 });

});

function loadMovieDetails(id){
		actUrl = "https://api.themoviedb.org/3/movie/" + id + "?api_key=<KEY>&";
	$.ajax( {url: actUrl,
		 beforeSend: function(){ 
		 		console.log("Calling MovieDB API");		 		
		    },
         data: { 
	         
         } ,
         type: 'GET',
         cache: false,
        success: function(data){ 
        		console.log("Movie Call Complete. Results: ");
        		console.log(data);
	        	x = data;
	        	

	 }//end of success
 });
}

</script>


{% include "home/footer.htm" %}<commit_msg>The Details Box works for movies!<commit_after>{% include "home/header.htm" %}



<div class="info" id="indicator"> Trying to load more details... </div>

<div class="info" id="MovieInfo" style="display: none; height: 245px;"> 
	
	<img height="243" width="164" src="" id="moviePoster" style="float:left; ">
	<p style="margin-top: 10px; margin-left: 180px;">
	<strong> Title: </strong><span id="movieTitle"></span><br /><br />
	<strong> Release Date: </strong><span id="movieReleaseYear"> </span><br /><br />
	<strong> Overview: </strong><span id="movieOverview"> </span><br /><br />
	<a href="" id="movieIMDBLink" target="_blank"> IMDB Link </a>
	</p>
</div>

<p class="generic"> This file available in the following room(s): </p>
<div class="download">

<h2> <span id="fileTitle"> {{filen}}</span></h2>
{% for result in results %}
<dl> 
	<dt> <a style="padding-left: 10px;" href="#" class="singlefile"> {{result.name}} </a>
	</dt>	
	<dd><span><span class="s_t">{{result.block}}</span> | <span class="u_t">{{result.room}}</span> | Added on: <span class="d_t">{{result.date}}</span></span></dd>
</dl>
{% endfor %}

</div>





<br/><br/>
<p class="generic" style="font-size: 13px;" id="stats"> <a href="/addguide"> Share your awesome stuff. Add your files. </a> </p>

<script>

$(document).ready(function(){

	$.ajax( {url: './apifeed',
		 beforeSend: function(){ 
		 		console.log("Calling API");	
		 		//$("#indicator").slideDown();	 		
		    },
         data: { 
	         q : $("#fileTitle").text()
         } ,
         type: 'GET',
         cache: false,
        success: function(data){ 
        		console.log("Call Complete. Results: ");
	        	x = JSON.parse(data);
	        	if(x.status == "valid"){
	        		
	        		$("#indicator").html('Just a moment...');
	        		if(x.type == "movie"){
	        			loadMovieDetails(x.id);
	        		}	
	        	}
	        	else{
	        		$("#indicator").html("File doesn't seem to be a Movie or TV Show! (beta)");
	        		setTimeout(function(){ 
	        			$("#indicator").slideUp(); 
	        	}, 3000);
	        		
	        	}

	 }//end of success
 });

});

function loadMovieDetails(id){
		actUrl = "https://api.themoviedb.org/3/movie/" + id + "?api_key=<KEY>&";
	$.ajax( {url: actUrl,
		 beforeSend: function(){ 
		 		console.log("Calling MovieDB API");		 		
		    },
         data: { 
	         
         } ,
         type: 'GET',
         cache: false,
        success: function(data){ 
        		console.log("Movie Call Complete. Results: ");
        		console.log(data);
	        	x = data;
	        	$("#indicator").slideUp();
	        	$("#MovieInfo").slideDown();
	        	$("#movieTitle").text(x.title);
	        	$("#movieReleaseYear").text(x.release_date);
	        	$("#movieOverview").text(x.overview);
	        	imdblink = "http://www.imdb.com/title/" + x.imdb_id;
	        	$("#movieIMDBLink").attr("href", imdblink);


	        	loadPoster(x.id);

	 }//end of success
 });
}

function loadPoster (id) {
	actUrl = "https://api.themoviedb.org/3/movie/" + id + "/images?api_key=<KEY>"
	$.ajax( {url: actUrl,
		 beforeSend: function(){ 
		 		console.log("Calling Poster API");		 		
		    },
         data: { 
	         
         } ,
         type: 'GET',
         cache: false,
        success: function(data){ 
        		x = data;
        		width = "w" + String(x.posters[0].width);
        		srcUrl = "http://image.tmdb.org/t/p/" + width + x.posters[1].file_path;
        		$("#moviePoster").attr("src", srcUrl);
	 }//end of success
 });
}

</script>


{% include "home/footer.htm" %}
{'fraction_non_alphanumeric': 0.2115349180025797, 'fraction_numerical': 0.006080707573244887, 'mean_word_length': 2.346485819975339, 'pattern_counts': {'":': 0, '<': 99, '<?xml version=': 0, '>': 99, 'https://': 3, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '657855', 'n_tokens_mistral': 2061, 'n_tokens_neox': 1843, 'n_words': 384}