mirror of
https://github.com/streamyfin/streamyfin.git
synced 2025-08-20 18:37:18 +02:00
fix: rename auto rotate to follow device orientation
This commit is contained in:
@@ -279,7 +279,7 @@ function Layout() {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// If the user has auto rotate enabled, unlock the orientation
|
// If the user has auto rotate enabled, unlock the orientation
|
||||||
if (Platform.isTV) return;
|
if (Platform.isTV) return;
|
||||||
if (settings.autoRotate === true) {
|
if (settings.followDeviceOrientation === true) {
|
||||||
ScreenOrientation.unlockAsync();
|
ScreenOrientation.unlockAsync();
|
||||||
} else {
|
} else {
|
||||||
// If the user has auto rotate disabled, lock the orientation to portrait
|
// If the user has auto rotate disabled, lock the orientation to portrait
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ export const OtherSettings: React.FC = () => {
|
|||||||
|
|
||||||
const disabled = useMemo(
|
const disabled = useMemo(
|
||||||
() =>
|
() =>
|
||||||
pluginSettings?.autoRotate?.locked === true &&
|
pluginSettings?.followDeviceOrientation?.locked === true &&
|
||||||
pluginSettings?.defaultVideoOrientation?.locked === true &&
|
pluginSettings?.defaultVideoOrientation?.locked === true &&
|
||||||
pluginSettings?.safeAreaInControlsEnabled?.locked === true &&
|
pluginSettings?.safeAreaInControlsEnabled?.locked === true &&
|
||||||
pluginSettings?.showCustomMenuLinks?.locked === true &&
|
pluginSettings?.showCustomMenuLinks?.locked === true &&
|
||||||
@@ -76,32 +76,47 @@ export const OtherSettings: React.FC = () => {
|
|||||||
ScreenOrientation.OrientationLock.LANDSCAPE_RIGHT,
|
ScreenOrientation.OrientationLock.LANDSCAPE_RIGHT,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const orientationTranslations = useMemo(
|
||||||
|
() => ({
|
||||||
|
[ScreenOrientation.OrientationLock.DEFAULT]: "home.settings.other.orientations.DEFAULT",
|
||||||
|
[ScreenOrientation.OrientationLock.PORTRAIT_UP]: "home.settings.other.orientations.PORTRAIT_UP",
|
||||||
|
[ScreenOrientation.OrientationLock.LANDSCAPE_LEFT]: "home.settings.other.orientations.LANDSCAPE_LEFT",
|
||||||
|
[ScreenOrientation.OrientationLock.LANDSCAPE_RIGHT]: "home.settings.other.orientations.LANDSCAPE_RIGHT",
|
||||||
|
}),
|
||||||
|
[]
|
||||||
|
);
|
||||||
|
|
||||||
if (!settings) return null;
|
if (!settings) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DisabledSetting disabled={disabled}>
|
<DisabledSetting disabled={disabled}>
|
||||||
<ListGroup title={t("home.settings.other.other_title")} className="">
|
<ListGroup title={t("home.settings.other.other_title")} className="">
|
||||||
<ListItem title={t("home.settings.other.auto_rotate")} disabled={pluginSettings?.autoRotate?.locked}>
|
<ListItem
|
||||||
|
title={t("home.settings.other.follow_device_orientation")}
|
||||||
|
disabled={pluginSettings?.followDeviceOrientation?.locked}
|
||||||
|
>
|
||||||
<Switch
|
<Switch
|
||||||
value={settings.autoRotate}
|
value={settings.followDeviceOrientation}
|
||||||
disabled={pluginSettings?.autoRotate?.locked}
|
disabled={pluginSettings?.followDeviceOrientation?.locked}
|
||||||
onValueChange={(value) => updateSettings({ autoRotate: value })}
|
onValueChange={(value) => updateSettings({ followDeviceOrientation: value })}
|
||||||
/>
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
|
|
||||||
<ListItem
|
<ListItem
|
||||||
title={t("home.settings.other.video_orientation")}
|
title={t("home.settings.other.video_orientation")}
|
||||||
disabled={pluginSettings?.defaultVideoOrientation?.locked || settings.autoRotate}
|
disabled={pluginSettings?.defaultVideoOrientation?.locked || settings.followDeviceOrientation}
|
||||||
>
|
>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
data={orientations}
|
data={orientations}
|
||||||
disabled={pluginSettings?.defaultVideoOrientation?.locked || settings.autoRotate}
|
disabled={pluginSettings?.defaultVideoOrientation?.locked || settings.followDeviceOrientation}
|
||||||
keyExtractor={String}
|
keyExtractor={String}
|
||||||
titleExtractor={(item) => ScreenOrientationEnum[item]}
|
titleExtractor={(item) => t(ScreenOrientationEnum[item])}
|
||||||
title={
|
title={
|
||||||
<TouchableOpacity className="flex flex-row items-center justify-between py-3 pl-3">
|
<TouchableOpacity className="flex flex-row items-center justify-between py-3 pl-3">
|
||||||
<Text className="mr-1 text-[#8E8D91]">
|
<Text className="mr-1 text-[#8E8D91]">
|
||||||
{t(ScreenOrientationEnum[settings.defaultVideoOrientation])}
|
{t(
|
||||||
|
orientationTranslations[settings.defaultVideoOrientation as keyof typeof orientationTranslations]
|
||||||
|
) || "Unknown Orientation"}
|
||||||
</Text>
|
</Text>
|
||||||
<Ionicons name="chevron-expand-sharp" size={18} color="#5A5960" />
|
<Ionicons name="chevron-expand-sharp" size={18} color="#5A5960" />
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|||||||
@@ -9,21 +9,17 @@ export const useOrientationSettings = () => {
|
|||||||
const [settings] = useSettings();
|
const [settings] = useSettings();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (settings?.autoRotate) {
|
if (settings?.followDeviceOrientation) {
|
||||||
ScreenOrientation.lockAsync(
|
ScreenOrientation.lockAsync(ScreenOrientation.OrientationLock.LANDSCAPE_RIGHT);
|
||||||
ScreenOrientation.OrientationLock.LANDSCAPE_RIGHT
|
|
||||||
);
|
|
||||||
} else if (settings?.defaultVideoOrientation) {
|
} else if (settings?.defaultVideoOrientation) {
|
||||||
ScreenOrientation.lockAsync(settings.defaultVideoOrientation);
|
ScreenOrientation.lockAsync(settings.defaultVideoOrientation);
|
||||||
}
|
}
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
if (settings?.autoRotate) {
|
if (settings?.followDeviceOrientation) {
|
||||||
ScreenOrientation.unlockAsync();
|
ScreenOrientation.unlockAsync();
|
||||||
} else {
|
} else {
|
||||||
ScreenOrientation.lockAsync(
|
ScreenOrientation.lockAsync(ScreenOrientation.OrientationLock.PORTRAIT_UP);
|
||||||
ScreenOrientation.OrientationLock.PORTRAIT_UP
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}, [settings]);
|
}, [settings]);
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
},
|
},
|
||||||
"other": {
|
"other": {
|
||||||
"other_title": "Sonstiges",
|
"other_title": "Sonstiges",
|
||||||
"auto_rotate": "Automatische Drehung",
|
"follow_device_orientation": "Automatische Drehung",
|
||||||
"video_orientation": "Videoausrichtung",
|
"video_orientation": "Videoausrichtung",
|
||||||
"orientation": "Ausrichtung",
|
"orientation": "Ausrichtung",
|
||||||
"orientations": {
|
"orientations": {
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
},
|
},
|
||||||
"other": {
|
"other": {
|
||||||
"other_title": "Other",
|
"other_title": "Other",
|
||||||
"auto_rotate": "Auto rotate",
|
"follow_device_orientation": "Follow device orientation",
|
||||||
"video_orientation": "Video orientation",
|
"video_orientation": "Video orientation",
|
||||||
"orientation": "Orientation",
|
"orientation": "Orientation",
|
||||||
"orientations": {
|
"orientations": {
|
||||||
@@ -138,7 +138,7 @@
|
|||||||
"hide_libraries": "Hide Libraries",
|
"hide_libraries": "Hide Libraries",
|
||||||
"select_liraries_you_want_to_hide": "Select the libraries you want to hide from the Library tab and home page sections.",
|
"select_liraries_you_want_to_hide": "Select the libraries you want to hide from the Library tab and home page sections.",
|
||||||
"disable_haptic_feedback": "Disable Haptic Feedback",
|
"disable_haptic_feedback": "Disable Haptic Feedback",
|
||||||
"default_quality": "Default quality",
|
"default_quality": "Default quality"
|
||||||
},
|
},
|
||||||
"downloads": {
|
"downloads": {
|
||||||
"downloads_title": "Downloads",
|
"downloads_title": "Downloads",
|
||||||
@@ -222,7 +222,7 @@
|
|||||||
"connected": "Connected",
|
"connected": "Connected",
|
||||||
"could_not_connect": "Could not connect",
|
"could_not_connect": "Could not connect",
|
||||||
"invalid_url": "Invalid URL"
|
"invalid_url": "Invalid URL"
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
"sessions": {
|
"sessions": {
|
||||||
"title": "Sessions",
|
"title": "Sessions",
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
},
|
},
|
||||||
"other": {
|
"other": {
|
||||||
"other_title": "Otros",
|
"other_title": "Otros",
|
||||||
"auto_rotate": "Rotación automática",
|
"follow_device_orientation": "Rotación automática",
|
||||||
"video_orientation": "Orientación de vídeo",
|
"video_orientation": "Orientación de vídeo",
|
||||||
"orientation": "Orientación",
|
"orientation": "Orientación",
|
||||||
"orientations": {
|
"orientations": {
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
},
|
},
|
||||||
"other": {
|
"other": {
|
||||||
"other_title": "Autres",
|
"other_title": "Autres",
|
||||||
"auto_rotate": "Rotation automatique",
|
"follow_device_orientation": "Rotation automatique",
|
||||||
"video_orientation": "Orientation vidéo",
|
"video_orientation": "Orientation vidéo",
|
||||||
"orientation": "Orientation",
|
"orientation": "Orientation",
|
||||||
"orientations": {
|
"orientations": {
|
||||||
@@ -139,7 +139,6 @@
|
|||||||
"select_liraries_you_want_to_hide": "Sélectionnez les bibliothèques que vous souhaitez masquer dans l’onglet Bibliothèque et les sections de la page d’accueil.",
|
"select_liraries_you_want_to_hide": "Sélectionnez les bibliothèques que vous souhaitez masquer dans l’onglet Bibliothèque et les sections de la page d’accueil.",
|
||||||
"disable_haptic_feedback": "Désactiver le retour haptique",
|
"disable_haptic_feedback": "Désactiver le retour haptique",
|
||||||
"default_quality": "Qualité par défaut"
|
"default_quality": "Qualité par défaut"
|
||||||
|
|
||||||
},
|
},
|
||||||
"downloads": {
|
"downloads": {
|
||||||
"downloads_title": "Téléchargements",
|
"downloads_title": "Téléchargements",
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
},
|
},
|
||||||
"other": {
|
"other": {
|
||||||
"other_title": "Altro",
|
"other_title": "Altro",
|
||||||
"auto_rotate": "Rotazione automatica",
|
"follow_device_orientation": "Rotazione automatica",
|
||||||
"video_orientation": "Orientamento del video",
|
"video_orientation": "Orientamento del video",
|
||||||
"orientation": "Orientamento",
|
"orientation": "Orientamento",
|
||||||
"orientations": {
|
"orientations": {
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
},
|
},
|
||||||
"other": {
|
"other": {
|
||||||
"other_title": "その他",
|
"other_title": "その他",
|
||||||
"auto_rotate": "画面の自動回転",
|
"follow_device_orientation": "画面の自動回転",
|
||||||
"video_orientation": "動画の向き",
|
"video_orientation": "動画の向き",
|
||||||
"orientation": "向き",
|
"orientation": "向き",
|
||||||
"orientations": {
|
"orientations": {
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
},
|
},
|
||||||
"other": {
|
"other": {
|
||||||
"other_title": "Andere",
|
"other_title": "Andere",
|
||||||
"auto_rotate": "Automatisch draaien",
|
"follow_device_orientation": "Automatisch draaien",
|
||||||
"video_orientation": "Video oriëntatie",
|
"video_orientation": "Video oriëntatie",
|
||||||
"orientation": "Oriëntatie",
|
"orientation": "Oriëntatie",
|
||||||
"orientations": {
|
"orientations": {
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
},
|
},
|
||||||
"other": {
|
"other": {
|
||||||
"other_title": "Diğer",
|
"other_title": "Diğer",
|
||||||
"auto_rotate": "Otomatik Döndürme",
|
"follow_device_orientation": "Otomatik Döndürme",
|
||||||
"video_orientation": "Video Yönü",
|
"video_orientation": "Video Yönü",
|
||||||
"orientation": "Yön",
|
"orientation": "Yön",
|
||||||
"orientations": {
|
"orientations": {
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
},
|
},
|
||||||
"other": {
|
"other": {
|
||||||
"other_title": "其他",
|
"other_title": "其他",
|
||||||
"auto_rotate": "自动旋转",
|
"follow_device_orientation": "自动旋转",
|
||||||
"video_orientation": "视频方向",
|
"video_orientation": "视频方向",
|
||||||
"orientation": "方向",
|
"orientation": "方向",
|
||||||
"orientations": {
|
"orientations": {
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
},
|
},
|
||||||
"other": {
|
"other": {
|
||||||
"other_title": "其他",
|
"other_title": "其他",
|
||||||
"auto_rotate": "自動旋轉",
|
"follow_device_orientation": "自動旋轉",
|
||||||
"video_orientation": "影片方向",
|
"video_orientation": "影片方向",
|
||||||
"orientation": "方向",
|
"orientation": "方向",
|
||||||
"orientations": {
|
"orientations": {
|
||||||
|
|||||||
@@ -26,30 +26,17 @@ export type DownloadOption = {
|
|||||||
value: DownloadQuality;
|
value: DownloadQuality;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ScreenOrientationEnum: Record<
|
export const ScreenOrientationEnum: Record<ScreenOrientation.OrientationLock, string> = {
|
||||||
ScreenOrientation.OrientationLock,
|
[ScreenOrientation.OrientationLock.DEFAULT]: "home.settings.other.orientations.DEFAULT",
|
||||||
string
|
[ScreenOrientation.OrientationLock.ALL]: "home.settings.other.orientations.ALL",
|
||||||
> = {
|
[ScreenOrientation.OrientationLock.PORTRAIT]: "home.settings.other.orientations.PORTRAIT",
|
||||||
[ScreenOrientation.OrientationLock.DEFAULT]:
|
[ScreenOrientation.OrientationLock.PORTRAIT_UP]: "home.settings.other.orientations.PORTRAIT_UP",
|
||||||
"home.settings.other.orientations.DEFAULT",
|
[ScreenOrientation.OrientationLock.PORTRAIT_DOWN]: "home.settings.other.orientations.PORTRAIT_DOWN",
|
||||||
[ScreenOrientation.OrientationLock.ALL]:
|
[ScreenOrientation.OrientationLock.LANDSCAPE]: "home.settings.other.orientations.LANDSCAPE",
|
||||||
"home.settings.other.orientations.ALL",
|
[ScreenOrientation.OrientationLock.LANDSCAPE_LEFT]: "home.settings.other.orientations.LANDSCAPE_LEFT",
|
||||||
[ScreenOrientation.OrientationLock.PORTRAIT]:
|
[ScreenOrientation.OrientationLock.LANDSCAPE_RIGHT]: "home.settings.other.orientations.LANDSCAPE_RIGHT",
|
||||||
"home.settings.other.orientations.PORTRAIT",
|
[ScreenOrientation.OrientationLock.OTHER]: "home.settings.other.orientations.OTHER",
|
||||||
[ScreenOrientation.OrientationLock.PORTRAIT_UP]:
|
[ScreenOrientation.OrientationLock.UNKNOWN]: "home.settings.other.orientations.UNKNOWN",
|
||||||
"home.settings.other.orientations.PORTRAIT_UP",
|
|
||||||
[ScreenOrientation.OrientationLock.PORTRAIT_DOWN]:
|
|
||||||
"home.settings.other.orientations.PORTRAIT_DOWN",
|
|
||||||
[ScreenOrientation.OrientationLock.LANDSCAPE]:
|
|
||||||
"home.settings.other.orientations.LANDSCAPE",
|
|
||||||
[ScreenOrientation.OrientationLock.LANDSCAPE_LEFT]:
|
|
||||||
"home.settings.other.orientations.LANDSCAPE_LEFT",
|
|
||||||
[ScreenOrientation.OrientationLock.LANDSCAPE_RIGHT]:
|
|
||||||
"home.settings.other.orientations.LANDSCAPE_RIGHT",
|
|
||||||
[ScreenOrientation.OrientationLock.OTHER]:
|
|
||||||
"home.settings.other.orientations.OTHER",
|
|
||||||
[ScreenOrientation.OrientationLock.UNKNOWN]:
|
|
||||||
"home.settings.other.orientations.UNKNOWN",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DownloadOptions: DownloadOption[] = [
|
export const DownloadOptions: DownloadOption[] = [
|
||||||
@@ -116,12 +103,12 @@ export type HomeSectionNextUpResolver = {
|
|||||||
export enum VideoPlayer {
|
export enum VideoPlayer {
|
||||||
// NATIVE, //todo: changes will make this a lot more easier to implement if we want. delete if not wanted
|
// NATIVE, //todo: changes will make this a lot more easier to implement if we want. delete if not wanted
|
||||||
VLC_3,
|
VLC_3,
|
||||||
VLC_4
|
VLC_4,
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Settings = {
|
export type Settings = {
|
||||||
home?: Home | null;
|
home?: Home | null;
|
||||||
autoRotate?: boolean;
|
followDeviceOrientation?: boolean;
|
||||||
forceLandscapeInVideoPlayer?: boolean;
|
forceLandscapeInVideoPlayer?: boolean;
|
||||||
deviceProfile?: "Expo" | "Native" | "Old";
|
deviceProfile?: "Expo" | "Native" | "Old";
|
||||||
mediaListCollectionIds?: string[];
|
mediaListCollectionIds?: string[];
|
||||||
@@ -170,7 +157,7 @@ export type StreamyfinPluginConfig = {
|
|||||||
|
|
||||||
const defaultValues: Settings = {
|
const defaultValues: Settings = {
|
||||||
home: null,
|
home: null,
|
||||||
autoRotate: true,
|
followDeviceOrientation: true,
|
||||||
forceLandscapeInVideoPlayer: false,
|
forceLandscapeInVideoPlayer: false,
|
||||||
deviceProfile: "Expo",
|
deviceProfile: "Expo",
|
||||||
mediaListCollectionIds: [],
|
mediaListCollectionIds: [],
|
||||||
@@ -214,8 +201,7 @@ const defaultValues: Settings = {
|
|||||||
const loadSettings = (): Partial<Settings> => {
|
const loadSettings = (): Partial<Settings> => {
|
||||||
try {
|
try {
|
||||||
const jsonValue = storage.getString("settings");
|
const jsonValue = storage.getString("settings");
|
||||||
const loadedValues: Partial<Settings> =
|
const loadedValues: Partial<Settings> = jsonValue != null ? JSON.parse(jsonValue) : {};
|
||||||
jsonValue != null ? JSON.parse(jsonValue) : {};
|
|
||||||
|
|
||||||
return loadedValues;
|
return loadedValues;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -237,9 +223,7 @@ const saveSettings = (settings: Settings) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const settingsAtom = atom<Partial<Settings> | null>(null);
|
export const settingsAtom = atom<Partial<Settings> | null>(null);
|
||||||
export const pluginSettingsAtom = atom(
|
export const pluginSettingsAtom = atom(storage.get<PluginLockableSettings>(STREAMYFIN_PLUGIN_SETTINGS));
|
||||||
storage.get<PluginLockableSettings>(STREAMYFIN_PLUGIN_SETTINGS)
|
|
||||||
);
|
|
||||||
|
|
||||||
export const useSettings = () => {
|
export const useSettings = () => {
|
||||||
const [api] = useAtom(apiAtom);
|
const [api] = useAtom(apiAtom);
|
||||||
@@ -275,12 +259,13 @@ export const useSettings = () => {
|
|||||||
}, [api]);
|
}, [api]);
|
||||||
|
|
||||||
const updateSettings = (update: Partial<Settings>) => {
|
const updateSettings = (update: Partial<Settings>) => {
|
||||||
if (settings) {
|
if (!_settings) return;
|
||||||
const newSettings = { ..._settings, ...update };
|
const hasChanges = Object.entries(update).some(([key, value]) => _settings[key as keyof Settings] !== value);
|
||||||
|
|
||||||
|
if (hasChanges) {
|
||||||
|
// Merge default settings, current settings, and updates to ensure all required properties exist
|
||||||
|
const newSettings = { ...defaultValues, ..._settings, ...update } as Settings;
|
||||||
setSettings(newSettings);
|
setSettings(newSettings);
|
||||||
|
|
||||||
// @ts-expect-error
|
|
||||||
saveSettings(newSettings);
|
saveSettings(newSettings);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -290,18 +275,13 @@ export const useSettings = () => {
|
|||||||
// use user settings first and fallback on admin setting if required.
|
// use user settings first and fallback on admin setting if required.
|
||||||
const settings: Settings = useMemo(() => {
|
const settings: Settings = useMemo(() => {
|
||||||
let unlockedPluginDefaults = {} as Settings;
|
let unlockedPluginDefaults = {} as Settings;
|
||||||
const overrideSettings = Object.entries(pluginSettings || {}).reduce(
|
const overrideSettings = Object.entries(pluginSettings || {}).reduce((acc, [key, setting]) => {
|
||||||
(acc, [key, setting]) => {
|
|
||||||
if (setting) {
|
if (setting) {
|
||||||
const { value, locked } = setting;
|
const { value, locked } = setting;
|
||||||
|
|
||||||
// Make sure we override default settings with plugin settings when they are not locked.
|
// Make sure we override default settings with plugin settings when they are not locked.
|
||||||
// Admin decided what users defaults should be and grants them the ability to change them too.
|
// Admin decided what users defaults should be and grants them the ability to change them too.
|
||||||
if (
|
if (locked === false && value && _settings?.[key as keyof Settings] !== value) {
|
||||||
locked === false &&
|
|
||||||
value &&
|
|
||||||
_settings?.[key as keyof Settings] !== value
|
|
||||||
) {
|
|
||||||
unlockedPluginDefaults = Object.assign(unlockedPluginDefaults, {
|
unlockedPluginDefaults = Object.assign(unlockedPluginDefaults, {
|
||||||
[key as keyof Settings]: value,
|
[key as keyof Settings]: value,
|
||||||
});
|
});
|
||||||
@@ -312,9 +292,7 @@ export const useSettings = () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
return acc;
|
return acc;
|
||||||
},
|
}, {} as Settings);
|
||||||
{} as Settings
|
|
||||||
);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...defaultValues,
|
...defaultValues,
|
||||||
@@ -323,11 +301,5 @@ export const useSettings = () => {
|
|||||||
};
|
};
|
||||||
}, [_settings, pluginSettings]);
|
}, [_settings, pluginSettings]);
|
||||||
|
|
||||||
return [
|
return [settings, updateSettings, pluginSettings, setPluginSettings, refreshStreamyfinPluginSettings] as const;
|
||||||
settings,
|
|
||||||
updateSettings,
|
|
||||||
pluginSettings,
|
|
||||||
setPluginSettings,
|
|
||||||
refreshStreamyfinPluginSettings,
|
|
||||||
] as const;
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user