mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2026-01-06 14:47:54 -05:00
feat(usersettings): add separate setting for streaming region (#993)
* feat: add separate setting for streaming region Currently, the "Currently Streaming On" information is based on the Discover Region setting. This PR adds a new setting to specify which region should be used to display the streaming region. re #890 * fix: add missing newline * fix: rename migration function
This commit is contained in:
@@ -222,15 +222,15 @@ const TvDetails = ({ tv }: TvDetailsProps) => {
|
||||
});
|
||||
}
|
||||
|
||||
const region = user?.settings?.region
|
||||
? user.settings.region
|
||||
: settings.currentSettings.region
|
||||
? settings.currentSettings.region
|
||||
const discoverRegion = user?.settings?.discoverRegion
|
||||
? user.settings.discoverRegion
|
||||
: settings.currentSettings.discoverRegion
|
||||
? settings.currentSettings.discoverRegion
|
||||
: 'US';
|
||||
const seriesAttributes: React.ReactNode[] = [];
|
||||
|
||||
const contentRating = data.contentRatings.results.find(
|
||||
(r) => r.iso_3166_1 === region
|
||||
(r) => r.iso_3166_1 === discoverRegion
|
||||
)?.rating;
|
||||
if (contentRating) {
|
||||
seriesAttributes.push(
|
||||
@@ -312,9 +312,15 @@ const TvDetails = ({ tv }: TvDetailsProps) => {
|
||||
(showHasSpecials ? seasonCount + 1 : seasonCount) <=
|
||||
getAllRequestedSeasons(true).length;
|
||||
|
||||
const streamingRegion = user?.settings?.streamingRegion
|
||||
? user.settings.streamingRegion
|
||||
: settings.currentSettings.streamingRegion
|
||||
? settings.currentSettings.streamingRegion
|
||||
: 'US';
|
||||
const streamingProviders =
|
||||
data?.watchProviders?.find((provider) => provider.iso_3166_1 === region)
|
||||
?.flatrate ?? [];
|
||||
data?.watchProviders?.find(
|
||||
(provider) => provider.iso_3166_1 === streamingRegion
|
||||
)?.flatrate ?? [];
|
||||
|
||||
function getAvalaibleMediaServerName() {
|
||||
if (settings.currentSettings.mediaServerType === MediaServerType.EMBY) {
|
||||
|
||||
Reference in New Issue
Block a user