From 0ad069cc61864311b53cb328c3901f0ccbcdefac Mon Sep 17 00:00:00 2001 From: Aiden Vigue Date: Thu, 18 Feb 2021 15:14:21 -0500 Subject: [PATCH 1/3] prevent some backdrops from showing on homepage prevents backdrops from items with an OfficialRating > TV-MA from showing on homepage. --- src/scripts/autoBackdrops.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scripts/autoBackdrops.js b/src/scripts/autoBackdrops.js index ccddf326a4..e2c1e2264a 100644 --- a/src/scripts/autoBackdrops.js +++ b/src/scripts/autoBackdrops.js @@ -26,7 +26,8 @@ function getBackdropItemIds(apiClient, userId, types, parentId) { IncludeItemTypes: types, ImageTypes: 'Backdrop', ParentId: parentId, - EnableTotalRecordCount: false + EnableTotalRecordCount: false, + MaxOfficialRating: parentId === '' ? 'TV-MA' : '' }; return apiClient.getItems(apiClient.getCurrentUserId(), options).then(function (result) { const images = result.Items.map(function (i) { From b41ffe61efa080f17e5c51061ad837cd30954c68 Mon Sep 17 00:00:00 2001 From: Aiden Vigue Date: Thu, 18 Feb 2021 20:38:37 +0000 Subject: [PATCH 2/3] fix ternary statement --- src/scripts/autoBackdrops.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/autoBackdrops.js b/src/scripts/autoBackdrops.js index e2c1e2264a..a02333e67f 100644 --- a/src/scripts/autoBackdrops.js +++ b/src/scripts/autoBackdrops.js @@ -27,7 +27,7 @@ function getBackdropItemIds(apiClient, userId, types, parentId) { ImageTypes: 'Backdrop', ParentId: parentId, EnableTotalRecordCount: false, - MaxOfficialRating: parentId === '' ? 'TV-MA' : '' + MaxOfficialRating: parentId ? '' : 'TV-MA' }; return apiClient.getItems(apiClient.getCurrentUserId(), options).then(function (result) { const images = result.Items.map(function (i) { From ea075c2c2285d3e3d1795be974b17674c595c5df Mon Sep 17 00:00:00 2001 From: aiden Date: Mon, 22 Mar 2021 22:02:32 -0400 Subject: [PATCH 3/3] pg-13 max --- src/scripts/autoBackdrops.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/autoBackdrops.js b/src/scripts/autoBackdrops.js index a02333e67f..7f4486e30c 100644 --- a/src/scripts/autoBackdrops.js +++ b/src/scripts/autoBackdrops.js @@ -27,7 +27,7 @@ function getBackdropItemIds(apiClient, userId, types, parentId) { ImageTypes: 'Backdrop', ParentId: parentId, EnableTotalRecordCount: false, - MaxOfficialRating: parentId ? '' : 'TV-MA' + MaxOfficialRating: parentId ? '' : 'PG-13' }; return apiClient.getItems(apiClient.getCurrentUserId(), options).then(function (result) { const images = result.Items.map(function (i) {