Skip to content

Commit

Permalink
fix to suppress radarr content without release date
Browse files Browse the repository at this point in the history
  • Loading branch information
petersem committed Sep 3, 2024
1 parent fc1ba78 commit 10bda0b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion classes/arr/radarr.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,18 @@ class Radarr {
if (raw != null) {
// move through results and populate media cards
await raw.data.reduce(async (memo, md) => {
let noReleaseDate = false;
await memo;
const medCard = new mediaCard();
let releaseDate;
if(!await util.isEmpty(md.digitalRelease)){
let digitalRelease = new Date(md.digitalRelease);
releaseDate = digitalRelease.toISOString().split("T")[0];
noReleaseDate = true;
}
else {
releaseDate = "No digital release date";
noReleaseDate = false;
}
medCard.tagLine =
md.title + " (" + releaseDate + ")";
Expand Down Expand Up @@ -197,7 +200,7 @@ class Radarr {
// }

// add media card to array, only if not released yet (caters to old movies being released digitally)
if (md.hasFile == false && md.status != "released"){ //&& !await util.isEmpty(md.digitalRelease) ) {
if (md.hasFile == false && md.status != "released" && noReleaseDate != false){ //&& !await util.isEmpty(md.digitalRelease) ) {
csrCards.push(medCard);
}

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.12",
"version": "1.17.13",
"description": "A digital display for your media",
"main": "index.js",
"bin": "index.js",
Expand Down

0 comments on commit 10bda0b

Please sign in to comment.