mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2025-12-24 02:39:18 -05:00
* 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
18 lines
463 B
TypeScript
18 lines
463 B
TypeScript
import type { AllSettings } from '@server/lib/settings';
|
|
|
|
const migrateRegionSetting = (settings: any): AllSettings => {
|
|
const oldRegion = settings.main.region;
|
|
if (oldRegion) {
|
|
settings.main.discoverRegion = oldRegion;
|
|
settings.main.streamingRegion = oldRegion;
|
|
} else {
|
|
settings.main.discoverRegion = '';
|
|
settings.main.streamingRegion = 'US';
|
|
}
|
|
delete settings.main.region;
|
|
|
|
return settings;
|
|
};
|
|
|
|
export default migrateRegionSetting;
|