Skip to content

Commit

Permalink
bugfix for some on-demand images not downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Petersen committed Sep 23, 2021
1 parent 82677e2 commit 0e2616a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions classes/mediaservers/plex.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ class Plex {
break;
case "movie":
// cache movie poster
let movieFileName = md.updatedAt + ".jpg";
let movieFileName = md.ratingKey + ".jpg";
medCard.genre = md.Genre;
let moviePlexPrefix = "http://";
if (this.https) moviePlexPrefix = "https://";
Expand All @@ -288,7 +288,7 @@ class Plex {
//download poster
// check art exists
if (md.art !== undefined && hasArt == "true") {
movieFileName = md.updatedAt + "-art.jpg";
movieFileName = md.ratingKey + "-art.jpg";
if (this.https) moviePlexPrefix = "https://";
movieUrl =
moviePlexPrefix +
Expand All @@ -310,7 +310,7 @@ class Plex {
}
else{
// download mp3 file to local server
fileName = md.updatedAt + ".mp3";
fileName = md.ratingKey + ".mp3";
prefix = "http://";
if (this.https) prefix = "https://";
url =
Expand Down Expand Up @@ -615,7 +615,7 @@ class Plex {
case "movie":
// cache movie poster
// console.log(md);
let movieFileName = md.updatedAt + ".jpg";
let movieFileName = md.ratingKey + ".jpg";
let moviePlexPrefix = "http://";
if (this.https) moviePlexPrefix = "https://";
let movieUrl =
Expand All @@ -632,7 +632,7 @@ class Plex {
//download poster
// check art exists
if (md.art !== undefined && hasArt == "true") {
movieFileName = md.updatedAt + "-art.jpg";
movieFileName = md.ratingKey + "-art.jpg";
if (this.https) moviePlexPrefix = "https://";
movieUrl =
moviePlexPrefix +
Expand All @@ -657,7 +657,7 @@ class Plex {
}
else{
// download mp3 file to local server
themeFile = md.updatedAt + ".mp3";
themeFile = md.ratingKey + ".mp3";
let prefix = "http://";
if (this.https) prefix = "https://";
let url =
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.14.1",
"version": "1.14.2",
"description": "A digital display for your media",
"main": "index.js",
"bin": "index.js",
Expand Down

0 comments on commit 0e2616a

Please sign in to comment.