mirror of
https://github.com/streamyfin/streamyfin.git
synced 2025-08-20 18:37:18 +02:00
Merge branch 'pr/235'
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user