Browse Source

image fix maybe

causefx 8 years ago
parent
commit
c480ee894c
3 changed files with 8 additions and 5 deletions
  1. 4 3
      api/functions/organizr-functions.php
  2. 1 1
      js/custom.js
  3. 3 1
      js/functions.js

+ 4 - 3
api/functions/organizr-functions.php

@@ -736,13 +736,14 @@ function getImage() {
         // Serve from the cache if it is younger than $cachetime
         if (file_exists($cachefile) && time() - $cachetime < filemtime($cachefile) && $refresh == false) {
             header("Content-type: image/jpeg");
-            @readfile($cachefile);
+            //@readfile($cachefile);
+            echo @curl('get',$cachefile)['content'];
             exit;
         }
 		ob_start(); // Start the output buffer
         header('Content-type: image/jpeg');
-		@readfile($image_src);
-		//echo @curl_get($image_src);
+		//@readfile($image_src);
+		echo @curl('get',$image_src)['content'];
         // Cache the output to a file
         $fp = fopen($cachefile, 'wb');
         fwrite($fp, ob_get_contents());

+ 1 - 1
js/custom.js

@@ -90,7 +90,7 @@ function pageLoad(){
         }
     });
     $(function () {
-        $('#owl-demo2').owlCarousel({
+        $('.recent-items').owlCarousel({
     	    margin:0,
     	    nav:false,
     		autoplay:false,

+ 3 - 1
js/functions.js

@@ -1906,6 +1906,7 @@ function buildPlexStream(array){
 		    <!-- /.cards-->
 		</div>
 	</div>
+	<div class="clearfix"></div>
 	`;
 }
 function buildPlexRecent(array){
@@ -1916,9 +1917,10 @@ function buildPlexRecent(array){
             <div class="panel panel-default">
                 <div class="panel-heading" lang="en">Recently Added to Plex</div>
                 <div class="panel-wrapper p-b-10 collapse in">
-                    <div id="owl-demo2" class="owl-carousel owl-theme">
+                    <div class="owl-carousel owl-theme recent-items">
 						`+buildPlexRecentItem(array.content)+`
                     </div>
+					<div id="recent-hidden" class="hide"></div>
                 </div>
             </div>
         </div>