Browse Source

fix tmbd http -> https
fix plex music rating key

causefx 8 years ago
parent
commit
217624f9ff
2 changed files with 2 additions and 2 deletions
  1. 1 1
      api/functions/homepage-connect-functions.php
  2. 1 1
      js/functions.js

+ 1 - 1
api/functions/homepage-connect-functions.php

@@ -303,7 +303,7 @@ function resolvePlexItem($item) {
             $plexItem['thumb'] = (string)$item['thumb'];
             $plexItem['key'] = (string)$item['ratingKey'] . "-list";
 			$plexItem['nowPlayingThumb'] = ($item['parentThumb']) ? (string)$item['parentThumb'] :  (string)$item['art'];
-            $plexItem['nowPlayingKey'] = (string)$item['ratingKey'] . "-np";
+            $plexItem['nowPlayingKey'] = (string)$item['parentRatingKey'] . "-np";
             $plexItem['nowPlayingTitle'] = (string)$item['grandparentTitle'].' - '.(string)$item['title'];
             $plexItem['nowPlayingBottom'] = (string)$item['parentTitle'];
             $plexItem['metadataKey'] = isset($item['grandparentRatingKey']) ? (string)$item['grandparentRatingKey'] : (string)$item['parentRatingKey'];

+ 1 - 1
js/functions.js

@@ -2372,7 +2372,7 @@ function buildMetadata(array, source){
 		var hasGenre = (typeof v.metadata.genres !== 'string') ? true : false;
 		if(hasActor){
 			$.each(v.metadata.actors, function(i,v) {
-				actors += '<div class="item lazyload recent-poster" data-src="'+v.thumb+'" alt="'+v.name+'" ><span class="elip recent-title p-5">'+v.name+'<br><small class="font-light">'+v.role+'</small></span></div>';
+				actors += '<div class="item lazyload recent-poster" data-src="'+(v.thumb.replace("http://", "https://"))+'" alt="'+v.name+'" ><span class="elip recent-title p-5">'+v.name+'<br><small class="font-light">'+v.role+'</small></span></div>';
 			});
 		}
 		if(hasGenre){