Skip to content

Commit

Permalink
fixed issues with wrong ot no track poster
Browse files Browse the repository at this point in the history
  • Loading branch information
petersem committed Aug 31, 2024
1 parent 7d442fc commit fc1ba78
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
16 changes: 13 additions & 3 deletions classes/mediaservers/plex.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,25 @@ class Plex {
medCard.DBID = result[2];

// download poster image to local server
fileName = result[3] + ".jpg";
let guid = md.key.split("/")[3];
fileName = guid + result[3] + ".jpg";
prefix = "http://";
if (this.https) prefix = "https://";
let thumb = "";

thumb = guid;
if(md.parentThumb){
thumb = md.parentThumb;
}
else{
thumb = md.grandparentThumb;
}
url =
prefix +
this.plexIP +
":" +
this.plexPort +
md.parentThumb +
thumb +
"?X-Plex-Token=" +
this.plexToken;
await core.CacheImage(url, fileName);
Expand All @@ -123,7 +133,7 @@ class Plex {
// download artist art image to local server
// check art exists
if (md.grandparentArt !== undefined && hasArt == "true") {
fileName = result[3] + "-art.jpg";
fileName = guid + result[3] + "-art.jpg";
prefix = "http://";
if (this.https) prefix = "https://";
url =
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ async function loadRadarrComingSoon() {
// Temporarily do the radarr trailer call

//let mt = new movieTrailers()
// rtCards = await mt.AssembleRadarrTrailers(csrCards,"xxx")
// rtCards = await mt.AssembleRadarrTrailers(csrCards,"xx")

return csrCards;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "posterr",
"version": "1.17.11",
"version": "1.17.12",
"description": "A digital display for your media",
"main": "index.js",
"bin": "index.js",
Expand Down

0 comments on commit fc1ba78

Please sign in to comment.