Merge branch 'main' of https://github.com/prayag17/JellyPlayer
This commit is contained in:
4 files changed
+4
-26
No files matched your search
@@ -45,7 +45,6 @@
|
|||||||
"tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log#v1",
|
"tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log#v1",
|
||||||
"tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store",
|
"tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store",
|
||||||
"typescript": "^5.3.3",
|
"typescript": "^5.3.3",
|
||||||
"uuid": "^9.0.1",
|
|
||||||
"vite-plugin-svgr": "^4.2.0",
|
"vite-plugin-svgr": "^4.2.0",
|
||||||
"wavesurfer.js": "^7.6.1",
|
"wavesurfer.js": "^7.6.1",
|
||||||
"zustand": "^4.4.7"
|
"zustand": "^4.4.7"
|
||||||
@@ -53,7 +52,6 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "^1.5.0",
|
"@biomejs/biome": "^1.5.0",
|
||||||
"@tauri-apps/cli": "^1.5.9",
|
"@tauri-apps/cli": "^1.5.9",
|
||||||
"@types/uuid": "^9.0.7",
|
|
||||||
"@vitejs/plugin-react": "^4.2.1",
|
"@vitejs/plugin-react": "^4.2.1",
|
||||||
"eslint": "^8.56.0",
|
"eslint": "^8.56.0",
|
||||||
"eslint-plugin-react": "^7.33.2",
|
"eslint-plugin-react": "^7.33.2",
|
||||||
|
|||||||
Generated
-15
@@ -104,9 +104,6 @@ dependencies:
|
|||||||
typescript:
|
typescript:
|
||||||
specifier: ^5.3.3
|
specifier: ^5.3.3
|
||||||
version: 5.3.3
|
version: 5.3.3
|
||||||
uuid:
|
|
||||||
specifier: ^9.0.1
|
|
||||||
version: 9.0.1
|
|
||||||
vite-plugin-svgr:
|
vite-plugin-svgr:
|
||||||
specifier: ^4.2.0
|
specifier: ^4.2.0
|
||||||
version: 4.2.0(typescript@5.3.3)(vite@5.0.11)
|
version: 4.2.0(typescript@5.3.3)(vite@5.0.11)
|
||||||
@@ -124,9 +121,6 @@ devDependencies:
|
|||||||
'@tauri-apps/cli':
|
'@tauri-apps/cli':
|
||||||
specifier: ^1.5.9
|
specifier: ^1.5.9
|
||||||
version: 1.5.9
|
version: 1.5.9
|
||||||
'@types/uuid':
|
|
||||||
specifier: ^9.0.7
|
|
||||||
version: 9.0.7
|
|
||||||
'@vitejs/plugin-react':
|
'@vitejs/plugin-react':
|
||||||
specifier: ^4.2.1
|
specifier: ^4.2.1
|
||||||
version: 4.2.1(vite@5.0.11)
|
version: 4.2.1(vite@5.0.11)
|
||||||
@@ -1609,10 +1603,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==}
|
resolution: {integrity: sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@types/uuid@9.0.7:
|
|
||||||
resolution: {integrity: sha512-WUtIVRUZ9i5dYXefDEAI7sh9/O7jGvHg7Df/5O/gtH3Yabe5odI3UWopVR1qbPXQtvOxWu3mM4XxlYeZtMWF4g==}
|
|
||||||
dev: true
|
|
||||||
|
|
||||||
/@ungap/structured-clone@1.2.0:
|
/@ungap/structured-clone@1.2.0:
|
||||||
resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==}
|
resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==}
|
||||||
|
|
||||||
@@ -4192,11 +4182,6 @@ packages:
|
|||||||
react: 18.2.0
|
react: 18.2.0
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/uuid@9.0.1:
|
|
||||||
resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==}
|
|
||||||
hasBin: true
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/vfile-message@4.0.2:
|
/vfile-message@4.0.2:
|
||||||
resolution: {integrity: sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==}
|
resolution: {integrity: sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==}
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { RecommendedServerInfo } from "@jellyfin/sdk";
|
import { RecommendedServerInfo } from "@jellyfin/sdk";
|
||||||
import { Store } from "tauri-plugin-store-api";
|
import { Store } from "tauri-plugin-store-api";
|
||||||
import { v4 as uuidv4 } from "uuid";
|
|
||||||
|
|
||||||
interface ServerInfo extends RecommendedServerInfo {
|
interface ServerInfo extends RecommendedServerInfo {
|
||||||
id: string;
|
id: string;
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { version as appVer } from "../../../package.json";
|
|||||||
// Initial custom axios client to use tauri's http module
|
// Initial custom axios client to use tauri's http module
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import axiosTauriApiAdapter from "axios-tauri-api-adapter";
|
import axiosTauriApiAdapter from "axios-tauri-api-adapter";
|
||||||
import { v4 as uuidv4 } from "uuid";
|
|
||||||
|
|
||||||
export const axiosClient = axios.create({
|
export const axiosClient = axios.create({
|
||||||
adapter: axiosTauriApiAdapter,
|
adapter: axiosTauriApiAdapter,
|
||||||
@@ -15,13 +14,10 @@ export const axiosClient = axios.create({
|
|||||||
timeout: 60000,
|
timeout: 60000,
|
||||||
});
|
});
|
||||||
|
|
||||||
let deviceId = localStorage.getItem("deviceId");
|
const deviceId = localStorage.getItem("deviceId") || crypto.randomUUID();
|
||||||
|
|
||||||
if (!deviceId) {
|
if (!localStorage.getItem("deviceId")) {
|
||||||
const randomId = uuidv4();
|
localStorage.setItem("deviceId", deviceId);
|
||||||
localStorage.setItem("deviceId", randomId);
|
|
||||||
|
|
||||||
deviceId = randomId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const jellyfin = new Jellyfin({
|
const jellyfin = new Jellyfin({
|
||||||
@@ -31,7 +27,7 @@ const jellyfin = new Jellyfin({
|
|||||||
},
|
},
|
||||||
deviceInfo: {
|
deviceInfo: {
|
||||||
name: "JellyPlayer",
|
name: "JellyPlayer",
|
||||||
id: deviceId!,
|
id: deviceId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user