Merge branch 'pr/235'

This commit is contained in:
Fredrik Burmester
2024-12-01 17:48:13 +01:00
2 changed files with 7 additions and 1 deletions

View File

@@ -72,6 +72,7 @@
"react-native-bottom-tabs": "^0.4.0",
"react-native-circular-progress": "^1.4.1",
"react-native-compressor": "^1.9.0",
"react-native-device-info": "^14.0.1",
"react-native-edge-to-edge": "^1.1.1",
"react-native-gesture-handler": "~2.16.1",
"react-native-get-random-values": "^1.11.0",

View File

@@ -18,6 +18,7 @@ import React, {
} from "react";
import { Platform } from "react-native";
import uuid from "react-native-uuid";
import { getDeviceName } from "react-native-device-info";
interface Server {
address: string;
@@ -49,11 +50,15 @@ export const JellyfinProvider: React.FC<{ children: ReactNode }> = ({
useEffect(() => {
(async () => {
const id = getOrSetDeviceId();
const deviceName = await getDeviceName();
setJellyfin(
() =>
new Jellyfin({
clientInfo: { name: "Streamyfin", version: "0.21.0" },
deviceInfo: { name: Platform.OS === "ios" ? "iOS" : "Android", id },
deviceInfo: {
name: deviceName,
id,
},
})
);
setDeviceId(id);