Add support for minimum item count for Studio discovery sections and replaced Showtime with Paramount+ with Showtime in browse by studios section

This commit is contained in:
HighImKevin
2026-10-05 18:15:10 -04:00
parent 08a25e948a
commit ceeb46bb3c
4 changed files with 14 additions and 2 deletions
+2
View File
@@ -2686,6 +2686,8 @@
infiniteScroll: false,
minGenreMovieCount: 50,
minGenreSeriesCount: 10,
minStudioMovieCount: 50,
minStudioSeriesCount: 10,
defaultItemLimit: 16,
defaultSortOrder: "Random",
defaultCardFormat: "Poster",
+6 -1
View File
@@ -856,8 +856,13 @@
}
if (discoveryType === 'Studio') {
const settings = getDiscoverySettings();
const minCount = itemType === 'Series'
? (settings.minStudioSeriesCount ?? settings.minStudioMovieCount ?? 25)
: (settings.minStudioMovieCount ?? 25);
const countField = itemType === 'Series' ? 'SeriesCount' : 'MovieCount';
const dedupe = getStudioDedupeSet(config);
const eligible = pool.filter((s) => s?.Id && !dedupe.has(s.Id));
const eligible = pool.filter((s) => s?.Id && !dedupe.has(s.Id) && (s[countField] || 0) > minCount);
if (!eligible.length) return null;
const selected = eligible[Math.floor(Math.random() * eligible.length)];
dedupe.add(selected.Id);