feat(plex): redesign settings flow and gate local library integration
cx
This commit is contained in:
1 parent
9d77dc2a57
commit
0c62e43a56
6 files changed
+660
-243
No files matched your search
@@ -1042,12 +1042,15 @@
|
|||||||
|
|
||||||
// If not found in loaded albums, we need to fetch album list first
|
// If not found in loaded albums, we need to fetch album list first
|
||||||
if (!album) {
|
if (!album) {
|
||||||
|
const includePlex = isPlexLibraryEnabled();
|
||||||
const [localAlbums, plexAlbumsRaw] = await Promise.all([
|
const [localAlbums, plexAlbumsRaw] = await Promise.all([
|
||||||
invoke<LocalAlbum[]>('library_get_albums', {
|
invoke<LocalAlbum[]>('library_get_albums', {
|
||||||
includeHidden: false,
|
includeHidden: false,
|
||||||
excludeNetworkFolders: shouldExcludeNetworkFolders()
|
excludeNetworkFolders: shouldExcludeNetworkFolders()
|
||||||
}),
|
}),
|
||||||
invoke<PlexCachedAlbum[]>('plex_cache_get_albums').catch(() => [])
|
includePlex
|
||||||
|
? invoke<PlexCachedAlbum[]>('plex_cache_get_albums').catch(() => [])
|
||||||
|
: Promise.resolve([])
|
||||||
]);
|
]);
|
||||||
const allAlbums = [...localAlbums, ...plexAlbumsRaw.map(mapPlexAlbum)];
|
const allAlbums = [...localAlbums, ...plexAlbumsRaw.map(mapPlexAlbum)];
|
||||||
albums = allAlbums;
|
albums = allAlbums;
|
||||||
@@ -1108,6 +1111,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isPlexLibraryEnabled(): boolean {
|
||||||
|
return getUserItem('qbz-plex-enabled') === 'true';
|
||||||
|
}
|
||||||
|
|
||||||
function buildPlexArtworkUrl(path: string): string {
|
function buildPlexArtworkUrl(path: string): string {
|
||||||
const baseUrl = getUserItem('qbz-plex-poc-base-url') || '';
|
const baseUrl = getUserItem('qbz-plex-poc-base-url') || '';
|
||||||
const token = getUserItem('qbz-plex-poc-token') || '';
|
const token = getUserItem('qbz-plex-poc-token') || '';
|
||||||
@@ -1269,17 +1276,21 @@
|
|||||||
console.log('[LocalLibrary] Calling library_get_albums with excludeNetwork:', excludeNetwork);
|
console.log('[LocalLibrary] Calling library_get_albums with excludeNetwork:', excludeNetwork);
|
||||||
|
|
||||||
const fetchStart = performance.now();
|
const fetchStart = performance.now();
|
||||||
|
const includePlex = isPlexLibraryEnabled();
|
||||||
const [albumsResult, statsResult, plexAlbumsRaw] = await Promise.all([
|
const [albumsResult, statsResult, plexAlbumsRaw] = await Promise.all([
|
||||||
invoke<LocalAlbum[]>('library_get_albums', {
|
invoke<LocalAlbum[]>('library_get_albums', {
|
||||||
includeHidden: false,
|
includeHidden: false,
|
||||||
excludeNetworkFolders: excludeNetwork
|
excludeNetworkFolders: excludeNetwork
|
||||||
}),
|
}),
|
||||||
invoke<LibraryStats>('library_get_stats'),
|
invoke<LibraryStats>('library_get_stats'),
|
||||||
invoke<PlexCachedAlbum[]>('plex_cache_get_albums').catch(() => [])
|
includePlex
|
||||||
|
? invoke<PlexCachedAlbum[]>('plex_cache_get_albums').catch(() => [])
|
||||||
|
: Promise.resolve([])
|
||||||
]);
|
]);
|
||||||
const fetchMs = performance.now() - fetchStart;
|
const fetchMs = performance.now() - fetchStart;
|
||||||
let workingPlexAlbumsRaw = plexAlbumsRaw;
|
let workingPlexAlbumsRaw = plexAlbumsRaw;
|
||||||
const shouldAttemptRepair =
|
const shouldAttemptRepair =
|
||||||
|
includePlex &&
|
||||||
!plexRepairAttempted &&
|
!plexRepairAttempted &&
|
||||||
(isLikelyLegacyPlexCache(workingPlexAlbumsRaw) || workingPlexAlbumsRaw.length <= 1);
|
(isLikelyLegacyPlexCache(workingPlexAlbumsRaw) || workingPlexAlbumsRaw.length <= 1);
|
||||||
if (shouldAttemptRepair) {
|
if (shouldAttemptRepair) {
|
||||||
@@ -1382,11 +1393,14 @@
|
|||||||
loading = true;
|
loading = true;
|
||||||
try {
|
try {
|
||||||
console.log('[LocalLibrary] Calling library_get_artists + plex_cache_get_albums');
|
console.log('[LocalLibrary] Calling library_get_artists + plex_cache_get_albums');
|
||||||
|
const includePlex = isPlexLibraryEnabled();
|
||||||
const [localArtists, plexAlbumsRaw] = await Promise.all([
|
const [localArtists, plexAlbumsRaw] = await Promise.all([
|
||||||
invoke<LocalArtist[]>('library_get_artists', {
|
invoke<LocalArtist[]>('library_get_artists', {
|
||||||
excludeNetworkFolders: shouldExcludeNetworkFolders()
|
excludeNetworkFolders: shouldExcludeNetworkFolders()
|
||||||
}),
|
}),
|
||||||
invoke<PlexCachedAlbum[]>('plex_cache_get_albums').catch(() => [])
|
includePlex
|
||||||
|
? invoke<PlexCachedAlbum[]>('plex_cache_get_albums').catch(() => [])
|
||||||
|
: Promise.resolve([])
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const plexArtistMap = new Map<string, { albumCount: number; trackCount: number }>();
|
const plexArtistMap = new Map<string, { albumCount: number; trackCount: number }>();
|
||||||
@@ -1441,15 +1455,18 @@
|
|||||||
loading = true;
|
loading = true;
|
||||||
try {
|
try {
|
||||||
console.log('[LocalLibrary] Calling library_search + plex_cache_search_tracks');
|
console.log('[LocalLibrary] Calling library_search + plex_cache_search_tracks');
|
||||||
|
const includePlex = isPlexLibraryEnabled();
|
||||||
const [localTracks, plexTracksRaw] = await Promise.all([
|
const [localTracks, plexTracksRaw] = await Promise.all([
|
||||||
invoke<LocalTrack[]>('library_search', {
|
invoke<LocalTrack[]>('library_search', {
|
||||||
query,
|
query,
|
||||||
limit: 0, // 0 = no limit, virtualization handles any list size
|
limit: 0, // 0 = no limit, virtualization handles any list size
|
||||||
excludeNetworkFolders: shouldExcludeNetworkFolders()
|
excludeNetworkFolders: shouldExcludeNetworkFolders()
|
||||||
}),
|
}),
|
||||||
invoke<PlexCachedTrack[]>('plex_cache_search_tracks', {
|
includePlex
|
||||||
query
|
? invoke<PlexCachedTrack[]>('plex_cache_search_tracks', {
|
||||||
}).catch(() => [])
|
query
|
||||||
|
}).catch(() => [])
|
||||||
|
: Promise.resolve([])
|
||||||
]);
|
]);
|
||||||
const mappedPlexTracks = plexTracksRaw.map(mapPlexTrack);
|
const mappedPlexTracks = plexTracksRaw.map(mapPlexTrack);
|
||||||
tracks = [...localTracks, ...mappedPlexTracks];
|
tracks = [...localTracks, ...mappedPlexTracks];
|
||||||
@@ -1933,6 +1950,9 @@
|
|||||||
async function fetchAlbumTracks(album: LocalAlbum): Promise<LocalTrack[]> {
|
async function fetchAlbumTracks(album: LocalAlbum): Promise<LocalTrack[]> {
|
||||||
try {
|
try {
|
||||||
if (album.source === 'plex') {
|
if (album.source === 'plex') {
|
||||||
|
if (!isPlexLibraryEnabled()) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
const plexTracks = await invoke<PlexCachedTrack[]>('plex_cache_get_album_tracks', {
|
const plexTracks = await invoke<PlexCachedTrack[]>('plex_cache_get_album_tracks', {
|
||||||
albumKey: album.id
|
albumKey: album.id
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
import { getCurrentWebview } from '@tauri-apps/api/webview';
|
import { getCurrentWebview } from '@tauri-apps/api/webview';
|
||||||
import { writeText as copyToClipboard } from '@tauri-apps/plugin-clipboard-manager';
|
import { writeText as copyToClipboard } from '@tauri-apps/plugin-clipboard-manager';
|
||||||
import { ask } from '@tauri-apps/plugin-dialog';
|
import { ask } from '@tauri-apps/plugin-dialog';
|
||||||
import { ArrowLeft, ChevronRight, ChevronDown, ChevronUp, Loader2, Sun, Moon, SunMoon, HelpCircle, Ban } from 'lucide-svelte';
|
import { ArrowLeft, ChevronRight, ChevronDown, ChevronUp, Loader2, Sun, Moon, SunMoon, HelpCircle, Ban, Copy } from 'lucide-svelte';
|
||||||
import Toggle from '../Toggle.svelte';
|
import Toggle from '../Toggle.svelte';
|
||||||
import Dropdown from '../Dropdown.svelte';
|
import Dropdown from '../Dropdown.svelte';
|
||||||
import DeviceDropdown from '../DeviceDropdown.svelte';
|
import DeviceDropdown from '../DeviceDropdown.svelte';
|
||||||
@@ -740,12 +740,18 @@
|
|||||||
let remoteControlCollapsed = $state(true);
|
let remoteControlCollapsed = $state(true);
|
||||||
|
|
||||||
// Plex LAN POC state
|
// Plex LAN POC state
|
||||||
|
let plexEnabled = $state(getUserItem('qbz-plex-enabled') === 'true');
|
||||||
|
let plexConnectCollapsed = $state(getUserItem('qbz-plex-connect-collapsed') !== 'false');
|
||||||
|
let plexManualTokenMode = $state(false);
|
||||||
|
let plexServerUrl = $state('http://127.0.0.1');
|
||||||
|
let plexServerPort = $state('32400');
|
||||||
let plexBaseUrl = $state(getUserItem('qbz-plex-poc-base-url') || 'http://127.0.0.1:32400');
|
let plexBaseUrl = $state(getUserItem('qbz-plex-poc-base-url') || 'http://127.0.0.1:32400');
|
||||||
let plexToken = $state(getUserItem('qbz-plex-poc-token') || '');
|
let plexToken = $state(getUserItem('qbz-plex-poc-token') || '');
|
||||||
let plexMetadataWriteEnabled = $state(getUserItem('qbz-plex-poc-metadata-write-enabled') === 'true');
|
let plexMetadataWriteEnabled = $state(getUserItem('qbz-plex-poc-metadata-write-enabled') === 'true');
|
||||||
let plexSections = $state<PlexMusicSection[]>([]);
|
let plexSections = $state<PlexMusicSection[]>([]);
|
||||||
let plexTracks = $state<PlexTrack[]>([]);
|
let plexTracks = $state<PlexTrack[]>([]);
|
||||||
let plexSelectedSectionKey = $state('');
|
let plexSectionTrackCounts = $state<Record<string, number>>({});
|
||||||
|
let plexSelectedSectionKeys = $state<string[]>([]);
|
||||||
let plexStatusKey = $state('settings.integrations.plexStatusIdle');
|
let plexStatusKey = $state('settings.integrations.plexStatusIdle');
|
||||||
let plexStatusValues = $state<Record<string, string | number>>({});
|
let plexStatusValues = $state<Record<string, string | number>>({});
|
||||||
let plexBusy = $state(false);
|
let plexBusy = $state(false);
|
||||||
@@ -757,6 +763,9 @@
|
|||||||
let plexAuthClientId = $state(getUserItem('qbz-plex-poc-client-id') || '');
|
let plexAuthClientId = $state(getUserItem('qbz-plex-poc-client-id') || '');
|
||||||
let plexAuthPollTimer: ReturnType<typeof setInterval> | null = null;
|
let plexAuthPollTimer: ReturnType<typeof setInterval> | null = null;
|
||||||
|
|
||||||
|
const PLEX_ENABLED_KEY = 'qbz-plex-enabled';
|
||||||
|
const PLEX_CONNECT_COLLAPSED_KEY = 'qbz-plex-connect-collapsed';
|
||||||
|
const PLEX_CACHE_SELECTED_SECTIONS_KEY = 'qbz-plex-poc-selected-sections';
|
||||||
const PLEX_CACHE_SELECTED_SECTION_KEY = 'qbz-plex-poc-selected-section';
|
const PLEX_CACHE_SELECTED_SECTION_KEY = 'qbz-plex-poc-selected-section';
|
||||||
const PLEX_CACHE_SERVER_ID_KEY = 'qbz-plex-poc-machine-id';
|
const PLEX_CACHE_SERVER_ID_KEY = 'qbz-plex-poc-machine-id';
|
||||||
const PLEX_CLIENT_ID_KEY = 'qbz-plex-poc-client-id';
|
const PLEX_CLIENT_ID_KEY = 'qbz-plex-poc-client-id';
|
||||||
@@ -841,8 +850,11 @@
|
|||||||
loadRemoteControlStatus();
|
loadRemoteControlStatus();
|
||||||
|
|
||||||
// Warm-start Plex panel from local cache and refresh in background
|
// Warm-start Plex panel from local cache and refresh in background
|
||||||
void loadPlexCachedState();
|
hydratePlexAddressFieldsFromBaseUrl();
|
||||||
void refreshPlexInBackground();
|
if (plexEnabled) {
|
||||||
|
void loadPlexCachedState();
|
||||||
|
void refreshPlexInBackground();
|
||||||
|
}
|
||||||
|
|
||||||
// Load notification preferences
|
// Load notification preferences
|
||||||
loadToastsPreference();
|
loadToastsPreference();
|
||||||
@@ -1130,11 +1142,128 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function sanitizePlexPort(value: string): string {
|
||||||
|
const digits = value.replace(/\D+/g, '');
|
||||||
|
if (!digits) return '32400';
|
||||||
|
const num = Math.max(1, Math.min(65535, Number(digits)));
|
||||||
|
return String(num);
|
||||||
|
}
|
||||||
|
|
||||||
|
function isValidPlexPort(value: string): boolean {
|
||||||
|
return /^\d+$/.test(value) && Number(value) >= 1 && Number(value) <= 65535;
|
||||||
|
}
|
||||||
|
|
||||||
|
function normalizePlexServerUrl(value: string): string {
|
||||||
|
const trimmed = value.trim();
|
||||||
|
if (!trimmed) return '';
|
||||||
|
return /^https?:\/\//i.test(trimmed) ? trimmed : `http://${trimmed}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
function isPrivateIpv4(hostname: string): boolean {
|
||||||
|
if (!/^\d+\.\d+\.\d+\.\d+$/.test(hostname)) return false;
|
||||||
|
const octets = hostname.split('.').map(Number);
|
||||||
|
if (octets.some((octet) => Number.isNaN(octet) || octet < 0 || octet > 255)) return false;
|
||||||
|
if (octets[0] === 10) return true;
|
||||||
|
if (octets[0] === 127) return true;
|
||||||
|
if (octets[0] === 192 && octets[1] === 168) return true;
|
||||||
|
if (octets[0] === 172 && octets[1] >= 16 && octets[1] <= 31) return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function isLocalPlexAddress(urlInput: string): boolean {
|
||||||
|
const normalized = normalizePlexServerUrl(urlInput);
|
||||||
|
if (!normalized) return false;
|
||||||
|
try {
|
||||||
|
const parsed = new URL(normalized);
|
||||||
|
const host = parsed.hostname.toLowerCase();
|
||||||
|
if (host === 'localhost' || host === '::1') return true;
|
||||||
|
if (host.endsWith('.local') || host.endsWith('.lan')) return true;
|
||||||
|
if (!host.includes('.')) return true;
|
||||||
|
return isPrivateIpv4(host);
|
||||||
|
} catch {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function resolvePlexBaseUrl(): string {
|
||||||
|
const normalizedUrl = normalizePlexServerUrl(plexServerUrl);
|
||||||
|
if (!normalizedUrl) return '';
|
||||||
|
try {
|
||||||
|
const parsed = new URL(normalizedUrl);
|
||||||
|
if (!['http:', 'https:'].includes(parsed.protocol)) return '';
|
||||||
|
parsed.port = sanitizePlexPort(plexServerPort);
|
||||||
|
return `${parsed.protocol}//${parsed.host}`;
|
||||||
|
} catch {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function hydratePlexAddressFieldsFromBaseUrl() {
|
||||||
|
try {
|
||||||
|
const parsed = new URL(plexBaseUrl || 'http://127.0.0.1:32400');
|
||||||
|
plexServerUrl = `${parsed.protocol}//${parsed.hostname}`;
|
||||||
|
plexServerPort = parsed.port || '32400';
|
||||||
|
} catch {
|
||||||
|
plexServerUrl = 'http://127.0.0.1';
|
||||||
|
plexServerPort = '32400';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function canUsePlexRequests(): boolean {
|
||||||
|
return plexEnabled && isLocalPlexAddress(plexServerUrl) && isValidPlexPort(plexServerPort) && !!plexToken.trim();
|
||||||
|
}
|
||||||
|
|
||||||
function persistPlexConfig() {
|
function persistPlexConfig() {
|
||||||
setUserItem('qbz-plex-poc-base-url', plexBaseUrl.trim());
|
plexServerPort = sanitizePlexPort(plexServerPort);
|
||||||
|
plexBaseUrl = resolvePlexBaseUrl();
|
||||||
|
setUserItem('qbz-plex-poc-base-url', plexBaseUrl);
|
||||||
setUserItem('qbz-plex-poc-token', plexToken.trim());
|
setUserItem('qbz-plex-poc-token', plexToken.trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function persistPlexSelectedSections() {
|
||||||
|
setUserItem(PLEX_CACHE_SELECTED_SECTIONS_KEY, JSON.stringify(plexSelectedSectionKeys));
|
||||||
|
if (plexSelectedSectionKeys.length === 1) {
|
||||||
|
setUserItem(PLEX_CACHE_SELECTED_SECTION_KEY, plexSelectedSectionKeys[0]);
|
||||||
|
} else {
|
||||||
|
removeUserItem(PLEX_CACHE_SELECTED_SECTION_KEY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function readPersistedPlexSelectedSections(): string[] {
|
||||||
|
const raw = getUserItem(PLEX_CACHE_SELECTED_SECTIONS_KEY);
|
||||||
|
if (raw) {
|
||||||
|
try {
|
||||||
|
const parsed = JSON.parse(raw);
|
||||||
|
if (Array.isArray(parsed)) {
|
||||||
|
return parsed.filter((item): item is string => typeof item === 'string' && item.trim().length > 0);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.warn('Failed parsing persisted Plex section keys:', error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const legacySingle = getUserItem(PLEX_CACHE_SELECTED_SECTION_KEY);
|
||||||
|
return legacySingle ? [legacySingle] : [];
|
||||||
|
}
|
||||||
|
|
||||||
|
function togglePlexConnectionBlock() {
|
||||||
|
plexConnectCollapsed = !plexConnectCollapsed;
|
||||||
|
setUserItem(PLEX_CONNECT_COLLAPSED_KEY, plexConnectCollapsed ? 'true' : 'false');
|
||||||
|
}
|
||||||
|
|
||||||
|
function handlePlexEnabledToggle(enabled: boolean) {
|
||||||
|
plexEnabled = enabled;
|
||||||
|
setUserItem(PLEX_ENABLED_KEY, enabled ? 'true' : 'false');
|
||||||
|
if (!enabled) {
|
||||||
|
plexStatusKey = 'settings.integrations.plexStatusDisabled';
|
||||||
|
plexStatusValues = {};
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
plexStatusKey = 'settings.integrations.plexStatusIdle';
|
||||||
|
plexStatusValues = {};
|
||||||
|
void loadPlexCachedState();
|
||||||
|
void refreshPlexInBackground();
|
||||||
|
}
|
||||||
|
|
||||||
function handlePlexMetadataWriteToggle(enabled: boolean) {
|
function handlePlexMetadataWriteToggle(enabled: boolean) {
|
||||||
plexMetadataWriteEnabled = enabled;
|
plexMetadataWriteEnabled = enabled;
|
||||||
setUserItem(PLEX_METADATA_WRITE_KEY, enabled ? 'true' : 'false');
|
setUserItem(PLEX_METADATA_WRITE_KEY, enabled ? 'true' : 'false');
|
||||||
@@ -1151,14 +1280,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function handlePlexConnectEasy() {
|
async function handlePlexConnectEasy() {
|
||||||
if (plexAuthBusy) return;
|
if (!plexEnabled || plexAuthBusy || !isLocalPlexAddress(plexServerUrl) || !isValidPlexPort(plexServerPort)) return;
|
||||||
plexAuthBusy = true;
|
plexAuthBusy = true;
|
||||||
plexLastError = '';
|
plexLastError = '';
|
||||||
|
persistPlexConfig();
|
||||||
try {
|
try {
|
||||||
const clientIdentifier = ensurePlexClientId();
|
const clientIdentifier = ensurePlexClientId();
|
||||||
const pin = await invoke<PlexPinStartResult>('plex_auth_pin_start', {
|
const pin = await invoke<PlexPinStartResult>('plex_auth_pin_start', { clientIdentifier });
|
||||||
clientIdentifier
|
|
||||||
});
|
|
||||||
plexAuthPinId = pin.pinId;
|
plexAuthPinId = pin.pinId;
|
||||||
plexAuthCode = pin.code;
|
plexAuthCode = pin.code;
|
||||||
plexAuthUrl = pin.authUrl;
|
plexAuthUrl = pin.authUrl;
|
||||||
@@ -1177,6 +1305,7 @@
|
|||||||
pinId: plexAuthPinId,
|
pinId: plexAuthPinId,
|
||||||
code: plexAuthCode || null
|
code: plexAuthCode || null
|
||||||
});
|
});
|
||||||
|
|
||||||
if (check.authorized && check.authToken) {
|
if (check.authorized && check.authToken) {
|
||||||
plexToken = check.authToken;
|
plexToken = check.authToken;
|
||||||
persistPlexConfig();
|
persistPlexConfig();
|
||||||
@@ -1188,7 +1317,7 @@
|
|||||||
}
|
}
|
||||||
plexAuthPinId = null;
|
plexAuthPinId = null;
|
||||||
plexAuthCode = '';
|
plexAuthCode = '';
|
||||||
void handlePlexPing();
|
void runPlexAutoSetup();
|
||||||
} else if (check.expired) {
|
} else if (check.expired) {
|
||||||
plexStatusKey = 'settings.integrations.plexStatusAuthExpired';
|
plexStatusKey = 'settings.integrations.plexStatusAuthExpired';
|
||||||
plexStatusValues = {};
|
plexStatusValues = {};
|
||||||
@@ -1230,6 +1359,20 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function handlePlexTokenBlur() {
|
||||||
|
persistPlexConfig();
|
||||||
|
if (canUsePlexRequests()) {
|
||||||
|
await runPlexAutoSetup();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setPlexError(error: unknown) {
|
||||||
|
const message = String(error);
|
||||||
|
plexLastError = message;
|
||||||
|
plexStatusKey = 'settings.integrations.plexStatusError';
|
||||||
|
plexStatusValues = { error: message };
|
||||||
|
}
|
||||||
|
|
||||||
async function handlePlexDisconnect() {
|
async function handlePlexDisconnect() {
|
||||||
const confirmed = await ask(get(t)('settings.integrations.plexDisconnectConfirmDesc'), {
|
const confirmed = await ask(get(t)('settings.integrations.plexDisconnectConfirmDesc'), {
|
||||||
title: get(t)('settings.integrations.plexDisconnectConfirmTitle'),
|
title: get(t)('settings.integrations.plexDisconnectConfirmTitle'),
|
||||||
@@ -1251,12 +1394,13 @@
|
|||||||
plexToken = '';
|
plexToken = '';
|
||||||
plexSections = [];
|
plexSections = [];
|
||||||
plexTracks = [];
|
plexTracks = [];
|
||||||
plexSelectedSectionKey = '';
|
plexSelectedSectionKeys = [];
|
||||||
plexStatusKey = 'settings.integrations.plexStatusDisconnected';
|
plexStatusKey = 'settings.integrations.plexStatusDisconnected';
|
||||||
plexStatusValues = {};
|
plexStatusValues = {};
|
||||||
plexLastError = '';
|
plexLastError = '';
|
||||||
|
|
||||||
removeUserItem('qbz-plex-poc-token');
|
removeUserItem('qbz-plex-poc-token');
|
||||||
|
removeUserItem(PLEX_CACHE_SELECTED_SECTIONS_KEY);
|
||||||
removeUserItem(PLEX_CACHE_SELECTED_SECTION_KEY);
|
removeUserItem(PLEX_CACHE_SELECTED_SECTION_KEY);
|
||||||
removeUserItem(PLEX_CACHE_SERVER_ID_KEY);
|
removeUserItem(PLEX_CACHE_SERVER_ID_KEY);
|
||||||
|
|
||||||
@@ -1278,13 +1422,10 @@
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
await invoke('plex_cache_clear');
|
await invoke('plex_cache_clear');
|
||||||
plexSections = [];
|
|
||||||
plexTracks = [];
|
plexTracks = [];
|
||||||
plexSelectedSectionKey = '';
|
|
||||||
plexStatusKey = 'settings.integrations.plexStatusCacheCleared';
|
plexStatusKey = 'settings.integrations.plexStatusCacheCleared';
|
||||||
plexStatusValues = {};
|
plexStatusValues = {};
|
||||||
plexLastError = '';
|
plexLastError = '';
|
||||||
removeUserItem(PLEX_CACHE_SELECTED_SECTION_KEY);
|
|
||||||
removeUserItem(PLEX_CACHE_SERVER_ID_KEY);
|
removeUserItem(PLEX_CACHE_SERVER_ID_KEY);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Failed clearing Plex cache:', error);
|
console.error('Failed clearing Plex cache:', error);
|
||||||
@@ -1293,19 +1434,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function loadPlexCachedState() {
|
async function loadPlexCachedState() {
|
||||||
|
if (!plexEnabled) return;
|
||||||
try {
|
try {
|
||||||
const cachedSections = await invoke<PlexMusicSection[]>('plex_cache_get_sections');
|
const cachedSections = await invoke<PlexMusicSection[]>('plex_cache_get_sections');
|
||||||
if (Array.isArray(cachedSections) && cachedSections.length > 0) {
|
if (Array.isArray(cachedSections) && cachedSections.length > 0) {
|
||||||
plexSections = cachedSections;
|
plexSections = cachedSections;
|
||||||
}
|
}
|
||||||
|
|
||||||
const cachedSelectedSection = getUserItem(PLEX_CACHE_SELECTED_SECTION_KEY);
|
const persistedSections = readPersistedPlexSelectedSections();
|
||||||
if (cachedSelectedSection) {
|
if (persistedSections.length > 0) {
|
||||||
plexSelectedSectionKey = cachedSelectedSection;
|
plexSelectedSectionKeys = persistedSections;
|
||||||
}
|
}
|
||||||
|
|
||||||
const cachedTracks = await invoke<PlexTrack[]>('plex_cache_get_tracks', {
|
const cachedTracks = await invoke<PlexTrack[]>('plex_cache_get_tracks', {
|
||||||
sectionKey: plexSelectedSectionKey || null
|
sectionKey: null
|
||||||
});
|
});
|
||||||
if (Array.isArray(cachedTracks) && cachedTracks.length > 0) {
|
if (Array.isArray(cachedTracks) && cachedTracks.length > 0) {
|
||||||
plexTracks = cachedTracks;
|
plexTracks = cachedTracks;
|
||||||
@@ -1318,66 +1460,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function refreshPlexInBackground() {
|
async function refreshPlexInBackground() {
|
||||||
if (!plexBaseUrl.trim() || !plexToken.trim()) return;
|
if (!canUsePlexRequests()) return;
|
||||||
try {
|
await runPlexAutoSetup();
|
||||||
const info = await invoke<PlexServerInfo>('plex_ping', {
|
|
||||||
baseUrl: plexBaseUrl.trim(),
|
|
||||||
token: plexToken.trim()
|
|
||||||
});
|
|
||||||
if (info.machineIdentifier) {
|
|
||||||
setUserItem(PLEX_CACHE_SERVER_ID_KEY, info.machineIdentifier);
|
|
||||||
}
|
|
||||||
|
|
||||||
const sections = await invoke<PlexMusicSection[]>('plex_get_music_sections', {
|
|
||||||
baseUrl: plexBaseUrl.trim(),
|
|
||||||
token: plexToken.trim()
|
|
||||||
});
|
|
||||||
plexSections = sections;
|
|
||||||
await invoke<number>('plex_cache_save_sections', {
|
|
||||||
serverId: info.machineIdentifier ?? null,
|
|
||||||
sections
|
|
||||||
});
|
|
||||||
|
|
||||||
if (sections.length > 0 && !sections.some((section) => section.key === plexSelectedSectionKey)) {
|
|
||||||
plexSelectedSectionKey = sections[0].key;
|
|
||||||
}
|
|
||||||
if (plexSelectedSectionKey) {
|
|
||||||
setUserItem(PLEX_CACHE_SELECTED_SECTION_KEY, plexSelectedSectionKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!plexSelectedSectionKey) return;
|
|
||||||
|
|
||||||
const tracks = await invoke<PlexTrack[]>('plex_get_section_tracks', {
|
|
||||||
baseUrl: plexBaseUrl.trim(),
|
|
||||||
token: plexToken.trim(),
|
|
||||||
sectionKey: plexSelectedSectionKey
|
|
||||||
});
|
|
||||||
plexTracks = tracks;
|
|
||||||
await invoke<number>('plex_cache_save_tracks', {
|
|
||||||
serverId: info.machineIdentifier ?? (getUserItem(PLEX_CACHE_SERVER_ID_KEY) || null),
|
|
||||||
sectionKey: plexSelectedSectionKey,
|
|
||||||
tracks
|
|
||||||
});
|
|
||||||
plexStatusKey = 'settings.integrations.plexStatusTracksLoaded';
|
|
||||||
plexStatusValues = { count: tracks.length };
|
|
||||||
} catch (error) {
|
|
||||||
console.warn('Plex background refresh failed:', error);
|
|
||||||
// Keep cached data visible; only surface error if nothing cached is available.
|
|
||||||
if (plexTracks.length === 0) {
|
|
||||||
setPlexError(error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setPlexError(error: unknown) {
|
async function handlePlexPing(): Promise<boolean> {
|
||||||
const message = String(error);
|
if (!canUsePlexRequests()) return false;
|
||||||
plexLastError = message;
|
|
||||||
plexStatusKey = 'settings.integrations.plexStatusError';
|
|
||||||
plexStatusValues = { error: message };
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handlePlexPing() {
|
|
||||||
if (!plexBaseUrl.trim() || !plexToken.trim()) return;
|
|
||||||
plexBusy = true;
|
plexBusy = true;
|
||||||
plexLastError = '';
|
plexLastError = '';
|
||||||
persistPlexConfig();
|
persistPlexConfig();
|
||||||
@@ -1394,16 +1482,70 @@
|
|||||||
server: info.friendlyName || info.machineIdentifier || 'Plex',
|
server: info.friendlyName || info.machineIdentifier || 'Plex',
|
||||||
version: info.version || '?'
|
version: info.version || '?'
|
||||||
};
|
};
|
||||||
|
return true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Failed Plex ping:', error);
|
console.error('Failed Plex ping:', error);
|
||||||
setPlexError(error);
|
setPlexError(error);
|
||||||
|
return false;
|
||||||
|
} finally {
|
||||||
|
plexBusy = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function syncSelectedPlexLibraries() {
|
||||||
|
if (!canUsePlexRequests()) return;
|
||||||
|
plexBusy = true;
|
||||||
|
plexLastError = '';
|
||||||
|
try {
|
||||||
|
const serverId = getUserItem(PLEX_CACHE_SERVER_ID_KEY) || null;
|
||||||
|
await invoke('plex_cache_clear');
|
||||||
|
|
||||||
|
if (plexSections.length > 0) {
|
||||||
|
await invoke<number>('plex_cache_save_sections', {
|
||||||
|
serverId,
|
||||||
|
sections: plexSections
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (plexSelectedSectionKeys.length === 0) {
|
||||||
|
plexTracks = [];
|
||||||
|
plexStatusKey = 'settings.integrations.plexStatusTracksLoaded';
|
||||||
|
plexStatusValues = { count: 0 };
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let totalCount = 0;
|
||||||
|
const sectionCounts: Record<string, number> = {};
|
||||||
|
for (const sectionKey of plexSelectedSectionKeys) {
|
||||||
|
const sectionTracks = await invoke<PlexTrack[]>('plex_get_section_tracks', {
|
||||||
|
baseUrl: plexBaseUrl.trim(),
|
||||||
|
token: plexToken.trim(),
|
||||||
|
sectionKey
|
||||||
|
});
|
||||||
|
const count = sectionTracks.length;
|
||||||
|
sectionCounts[sectionKey] = count;
|
||||||
|
totalCount += count;
|
||||||
|
await invoke<number>('plex_cache_save_tracks', {
|
||||||
|
serverId,
|
||||||
|
sectionKey,
|
||||||
|
tracks: sectionTracks
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
plexSectionTrackCounts = { ...plexSectionTrackCounts, ...sectionCounts };
|
||||||
|
plexTracks = await invoke<PlexTrack[]>('plex_cache_get_tracks', { sectionKey: null });
|
||||||
|
plexStatusKey = 'settings.integrations.plexStatusTracksLoaded';
|
||||||
|
plexStatusValues = { count: totalCount };
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Failed syncing selected Plex libraries:', error);
|
||||||
|
setPlexError(error);
|
||||||
} finally {
|
} finally {
|
||||||
plexBusy = false;
|
plexBusy = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handlePlexLoadSections() {
|
async function handlePlexLoadSections(options: { autoSyncSelected?: boolean } = {}) {
|
||||||
if (!plexBaseUrl.trim() || !plexToken.trim()) return;
|
if (!canUsePlexRequests()) return;
|
||||||
plexBusy = true;
|
plexBusy = true;
|
||||||
plexLastError = '';
|
plexLastError = '';
|
||||||
persistPlexConfig();
|
persistPlexConfig();
|
||||||
@@ -1417,14 +1559,18 @@
|
|||||||
serverId: getUserItem(PLEX_CACHE_SERVER_ID_KEY) || null,
|
serverId: getUserItem(PLEX_CACHE_SERVER_ID_KEY) || null,
|
||||||
sections
|
sections
|
||||||
});
|
});
|
||||||
if (sections.length > 0 && !sections.some((section) => section.key === plexSelectedSectionKey)) {
|
|
||||||
plexSelectedSectionKey = sections[0].key;
|
const available = new Set(sections.map((section) => section.key));
|
||||||
}
|
const persisted = readPersistedPlexSelectedSections().filter((key) => available.has(key));
|
||||||
if (plexSelectedSectionKey) {
|
plexSelectedSectionKeys = persisted.length > 0 ? persisted : sections.map((section) => section.key);
|
||||||
setUserItem(PLEX_CACHE_SELECTED_SECTION_KEY, plexSelectedSectionKey);
|
persistPlexSelectedSections();
|
||||||
}
|
|
||||||
plexStatusKey = 'settings.integrations.plexStatusSectionsLoaded';
|
plexStatusKey = 'settings.integrations.plexStatusSectionsLoaded';
|
||||||
plexStatusValues = { count: sections.length };
|
plexStatusValues = { count: sections.length };
|
||||||
|
|
||||||
|
if (options.autoSyncSelected !== false) {
|
||||||
|
await syncSelectedPlexLibraries();
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Failed loading Plex sections:', error);
|
console.error('Failed loading Plex sections:', error);
|
||||||
setPlexError(error);
|
setPlexError(error);
|
||||||
@@ -1433,31 +1579,27 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handlePlexLoadTracks() {
|
async function runPlexAutoSetup() {
|
||||||
if (!plexBaseUrl.trim() || !plexToken.trim() || !plexSelectedSectionKey) return;
|
const connected = await handlePlexPing();
|
||||||
plexBusy = true;
|
if (!connected) return;
|
||||||
plexLastError = '';
|
await handlePlexLoadSections({ autoSyncSelected: true });
|
||||||
persistPlexConfig();
|
}
|
||||||
try {
|
|
||||||
const tracks = await invoke<PlexTrack[]>('plex_get_section_tracks', {
|
async function handlePlexLibraryToggle(sectionKey: string, checked: boolean) {
|
||||||
baseUrl: plexBaseUrl.trim(),
|
const current = new Set(plexSelectedSectionKeys);
|
||||||
token: plexToken.trim(),
|
if (checked) {
|
||||||
sectionKey: plexSelectedSectionKey
|
current.add(sectionKey);
|
||||||
});
|
} else {
|
||||||
plexTracks = tracks;
|
current.delete(sectionKey);
|
||||||
await invoke<number>('plex_cache_save_tracks', {
|
const nextCounts = { ...plexSectionTrackCounts };
|
||||||
serverId: getUserItem(PLEX_CACHE_SERVER_ID_KEY) || null,
|
delete nextCounts[sectionKey];
|
||||||
sectionKey: plexSelectedSectionKey,
|
plexSectionTrackCounts = nextCounts;
|
||||||
tracks
|
|
||||||
});
|
|
||||||
plexStatusKey = 'settings.integrations.plexStatusTracksLoaded';
|
|
||||||
plexStatusValues = { count: tracks.length };
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Failed loading Plex tracks:', error);
|
|
||||||
setPlexError(error);
|
|
||||||
} finally {
|
|
||||||
plexBusy = false;
|
|
||||||
}
|
}
|
||||||
|
plexSelectedSectionKeys = plexSections
|
||||||
|
.map((section) => section.key)
|
||||||
|
.filter((key) => current.has(key));
|
||||||
|
persistPlexSelectedSections();
|
||||||
|
await syncSelectedPlexLibraries();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loadRemoteControlStatus() {
|
async function loadRemoteControlStatus() {
|
||||||
@@ -3349,116 +3491,211 @@
|
|||||||
<Toggle enabled={musicbrainzEnabled} onchange={handleMusicBrainzChange} />
|
<Toggle enabled={musicbrainzEnabled} onchange={handleMusicBrainzChange} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="lastfm-config plex-poc-panel">
|
<div class="setting-row">
|
||||||
<div class="setting-with-description">
|
<div class="setting-info">
|
||||||
<span class="setting-label">{$t('settings.integrations.plexPoc')}</span>
|
<span class="setting-label">{$t('settings.integrations.plexConnection')}</span>
|
||||||
<span class="setting-description">{$t('settings.integrations.plexPocDesc')}</span>
|
|
||||||
</div>
|
</div>
|
||||||
<small class="setting-note">{$t('settings.integrations.plexLibraryIntegrationNote')}</small>
|
<Toggle enabled={plexEnabled} onchange={handlePlexEnabledToggle} />
|
||||||
<small class="setting-note">{$t('settings.integrations.plexLocalOnlyDirectPlayNote')}</small>
|
</div>
|
||||||
|
|
||||||
|
{#if plexEnabled}
|
||||||
<div class="setting-row">
|
<div class="setting-row">
|
||||||
<div class="setting-info">
|
<small class="setting-note">{$t('settings.integrations.plexConnectionLore')}</small>
|
||||||
<span class="setting-label">{$t('settings.integrations.plexMetadataWrite')}</span>
|
|
||||||
<small class="setting-note">{$t('settings.integrations.plexMetadataWriteDesc')}</small>
|
|
||||||
</div>
|
|
||||||
<Toggle enabled={plexMetadataWriteEnabled} onchange={handlePlexMetadataWriteToggle} />
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="plex-connect-wizard">
|
<div class="setting-row plex-server-row">
|
||||||
<div class="plex-wizard-header">
|
<div class="plex-server-field">
|
||||||
<span class="setting-label">{$t('settings.integrations.plexEasyConnectTitle')}</span>
|
<label for="plex-server-url">{$t('settings.integrations.plexServerUrl')}</label>
|
||||||
<small class="setting-note">{$t('settings.integrations.plexEasyConnectDesc')}</small>
|
<input
|
||||||
|
id="plex-server-url"
|
||||||
|
type="text"
|
||||||
|
bind:value={plexServerUrl}
|
||||||
|
placeholder={$t('settings.integrations.plexServerUrlPlaceholder')}
|
||||||
|
onblur={() => persistPlexConfig()}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="plex-port-field">
|
||||||
|
<label for="plex-server-port">{$t('settings.integrations.plexServerPort')}</label>
|
||||||
|
<input
|
||||||
|
id="plex-server-port"
|
||||||
|
class="remote-control-input plex-port-input"
|
||||||
|
type="number"
|
||||||
|
min="1"
|
||||||
|
max="65535"
|
||||||
|
bind:value={plexServerPort}
|
||||||
|
oninput={() => plexServerPort = sanitizePlexPort(plexServerPort)}
|
||||||
|
onblur={() => persistPlexConfig()}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="plex-actions">
|
{#if !isLocalPlexAddress(plexServerUrl)}
|
||||||
<button class="connect-btn" onclick={handlePlexConnectEasy} disabled={plexBusy || plexAuthBusy}>
|
<small class="setting-note plex-error-note">{$t('settings.integrations.plexLocalAddressRequired')}</small>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<div class="setting-row">
|
||||||
|
<button class="setting-link-button plex-collapse-trigger" onclick={togglePlexConnectionBlock}>
|
||||||
|
<span class="setting-label">{$t('settings.integrations.plexAuthorizeSectionTitle')}</span>
|
||||||
|
{#if plexConnectCollapsed}
|
||||||
|
<ChevronDown size={16} />
|
||||||
|
{:else}
|
||||||
|
<ChevronUp size={16} />
|
||||||
|
{/if}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{#if !plexConnectCollapsed}
|
||||||
|
<div class="setting-row">
|
||||||
|
<small class="setting-note">{$t('settings.integrations.plexAuthorizeSectionLore')}</small>
|
||||||
|
</div>
|
||||||
|
<div class="setting-row">
|
||||||
|
<small class="setting-note">{$t('settings.integrations.plexAuthorizeHelp')}</small>
|
||||||
|
</div>
|
||||||
|
<div class="setting-row plex-two-column-row">
|
||||||
|
<span class="setting-label">{$t('settings.integrations.plexAuthorizeLabel')}</span>
|
||||||
|
<button
|
||||||
|
class="connect-btn"
|
||||||
|
onclick={handlePlexConnectEasy}
|
||||||
|
disabled={plexBusy || plexAuthBusy || !isLocalPlexAddress(plexServerUrl) || !isValidPlexPort(plexServerPort)}
|
||||||
|
>
|
||||||
{plexAuthBusy ? $t('actions.loading') : $t('settings.integrations.plexActionEasyConnect')}
|
{plexAuthBusy ? $t('actions.loading') : $t('settings.integrations.plexActionEasyConnect')}
|
||||||
</button>
|
</button>
|
||||||
{#if plexAuthUrl}
|
</div>
|
||||||
<button
|
|
||||||
class="connect-btn"
|
<div class="plex-divider"></div>
|
||||||
onclick={handleOpenPlexAuthUrl}
|
|
||||||
disabled={plexAuthBusy}
|
<div class="setting-row plex-code-row">
|
||||||
>
|
<input
|
||||||
{$t('settings.integrations.plexActionOpenAuth')}
|
class="remote-control-input plex-code-input"
|
||||||
</button>
|
type="text"
|
||||||
{/if}
|
readonly
|
||||||
<button class="connect-btn danger-btn" onclick={handlePlexDisconnect} disabled={plexBusy || plexAuthBusy}>
|
value={plexAuthCode || $t('settings.integrations.plexCodeEmpty')}
|
||||||
{$t('settings.integrations.plexActionDisconnect')}
|
title={plexAuthCode ? $t('settings.integrations.plexCodeTooltip') : $t('settings.integrations.plexCodeEmpty')}
|
||||||
</button>
|
/>
|
||||||
<button class="connect-btn danger-btn" onclick={handlePlexClearCache} disabled={plexBusy || plexAuthBusy}>
|
<button
|
||||||
{$t('settings.integrations.plexActionClearCache')}
|
class="copy-icon-btn"
|
||||||
|
onclick={handleCopyPlexCode}
|
||||||
|
disabled={!plexAuthCode}
|
||||||
|
title={$t('settings.integrations.plexCodeTooltip')}
|
||||||
|
>
|
||||||
|
<Copy size={16} />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if plexAuthCode}
|
<div class="setting-row plex-two-column-row">
|
||||||
<div class="plex-code-card">
|
<span class="setting-label"></span>
|
||||||
<small class="setting-note">{$t('settings.integrations.plexCodeLabel')}</small>
|
<button
|
||||||
<div class="plex-code-value">{plexAuthCode}</div>
|
class="connect-btn"
|
||||||
<div class="plex-actions">
|
onclick={handleOpenPlexAuthUrl}
|
||||||
<button class="connect-btn" onclick={handleCopyPlexCode}>
|
disabled={!plexAuthUrl}
|
||||||
{$t('settings.integrations.plexActionCopyCode')}
|
>
|
||||||
</button>
|
{$t('settings.integrations.plexActionOpenAuth')}
|
||||||
</div>
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="plex-divider"></div>
|
||||||
|
|
||||||
|
<div class="setting-row">
|
||||||
|
<label class="setting-label plex-manual-toggle">
|
||||||
|
<input type="checkbox" bind:checked={plexManualTokenMode} />
|
||||||
|
<span>{$t('settings.integrations.plexManualTokenToggle')}</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{#if plexManualTokenMode}
|
||||||
|
<div class="setting-row plex-two-column-row">
|
||||||
|
<span class="setting-label">{$t('settings.integrations.plexToken')}</span>
|
||||||
|
<input
|
||||||
|
class="remote-control-input"
|
||||||
|
type="password"
|
||||||
|
bind:value={plexToken}
|
||||||
|
placeholder={$t('settings.integrations.plexTokenPlaceholder')}
|
||||||
|
onblur={handlePlexTokenBlur}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
{/if}
|
||||||
|
|
||||||
<div class="config-field">
|
<div class="setting-row plex-two-column-row">
|
||||||
<label for="plex-base-url">{$t('settings.integrations.plexBaseUrl')}</label>
|
<div class="setting-info">
|
||||||
<input
|
<span class="setting-label">{$t('settings.integrations.plexConnectionCheckLabel')}</span>
|
||||||
id="plex-base-url"
|
{#if plexStatusKey === 'settings.integrations.plexStatusConnected'}
|
||||||
type="text"
|
<small class="setting-note plex-connected-note">{$t(plexStatusKey, { values: plexStatusValues })}</small>
|
||||||
bind:value={plexBaseUrl}
|
{:else}
|
||||||
placeholder={$t('settings.integrations.plexBaseUrlPlaceholder')}
|
<small class="setting-note">{$t(plexStatusKey, { values: plexStatusValues })}</small>
|
||||||
/>
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
<button
|
||||||
<div class="config-field">
|
class="connect-btn"
|
||||||
<label for="plex-token">{$t('settings.integrations.plexToken')}</label>
|
onclick={() => handlePlexPing()}
|
||||||
<input
|
disabled={plexBusy || !canUsePlexRequests()}
|
||||||
id="plex-token"
|
>
|
||||||
type="password"
|
|
||||||
bind:value={plexToken}
|
|
||||||
placeholder={$t('settings.integrations.plexTokenPlaceholder')}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="plex-actions">
|
|
||||||
<button class="connect-btn" onclick={handlePlexPing} disabled={plexBusy || !plexBaseUrl.trim() || !plexToken.trim()}>
|
|
||||||
{plexBusy ? $t('actions.loading') : $t('settings.integrations.plexActionPing')}
|
{plexBusy ? $t('actions.loading') : $t('settings.integrations.plexActionPing')}
|
||||||
</button>
|
</button>
|
||||||
<button class="connect-btn" onclick={handlePlexLoadSections} disabled={plexBusy || !plexBaseUrl.trim() || !plexToken.trim()}>
|
</div>
|
||||||
|
|
||||||
|
<div class="setting-row plex-two-column-row">
|
||||||
|
<div class="setting-info">
|
||||||
|
<span class="setting-label">{$t('settings.integrations.plexGetLibrariesLabel')}</span>
|
||||||
|
<small class="setting-note">{$t('settings.integrations.plexGetLibrariesHelp')}</small>
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
class="connect-btn"
|
||||||
|
onclick={() => handlePlexLoadSections({ autoSyncSelected: true })}
|
||||||
|
disabled={plexBusy || !canUsePlexRequests()}
|
||||||
|
>
|
||||||
{plexBusy ? $t('actions.loading') : $t('settings.integrations.plexActionLoadSections')}
|
{plexBusy ? $t('actions.loading') : $t('settings.integrations.plexActionLoadSections')}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="setting-row plex-inline-row">
|
<div class="setting-row plex-libraries-block">
|
||||||
<span class="setting-label">{$t('settings.integrations.plexMusicSection')}</span>
|
<span class="setting-label">{$t('settings.integrations.plexMusicLibraries')}</span>
|
||||||
<div class="plex-section-controls">
|
<div class="plex-libraries-grid">
|
||||||
<select
|
{#each plexSections as plexSection}
|
||||||
class="remote-control-input plex-section-select"
|
<label class="plex-library-item">
|
||||||
bind:value={plexSelectedSectionKey}
|
<input
|
||||||
disabled={plexSections.length === 0 || plexBusy}
|
type="checkbox"
|
||||||
>
|
checked={plexSelectedSectionKeys.includes(plexSection.key)}
|
||||||
<option value="" disabled selected={plexSelectedSectionKey === ''}>
|
disabled={plexBusy || !canUsePlexRequests()}
|
||||||
{$t('settings.integrations.plexSelectSection')}
|
onchange={(event) => handlePlexLibraryToggle(plexSection.key, (event.currentTarget as HTMLInputElement).checked)}
|
||||||
</option>
|
/>
|
||||||
{#each plexSections as plexSection}
|
<span class="plex-library-name">{plexSection.title}</span>
|
||||||
<option value={plexSection.key}>{plexSection.title}</option>
|
{#if plexSectionTrackCounts[plexSection.key] !== undefined}
|
||||||
{/each}
|
<span class="plex-library-count">({plexSectionTrackCounts[plexSection.key]} {$t('settings.integrations.plexTracksShort')})</span>
|
||||||
</select>
|
{/if}
|
||||||
<button class="connect-btn" onclick={handlePlexLoadTracks} disabled={plexBusy || !plexSelectedSectionKey}>
|
</label>
|
||||||
{plexBusy ? $t('actions.loading') : $t('settings.integrations.plexActionLoadTracks')}
|
{/each}
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
{#if plexLastError}
|
||||||
|
<small class="setting-note plex-error-note">{plexLastError}</small>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<small class="setting-note">{$t(plexStatusKey, { values: plexStatusValues })}</small>
|
<div class="setting-row plex-two-column-row">
|
||||||
{#if plexLastError}
|
<span class="setting-label">{$t('settings.integrations.plexDisconnectRowLabel')}</span>
|
||||||
<small class="setting-note plex-error-note">{plexLastError}</small>
|
<button
|
||||||
{/if}
|
class="connect-btn danger-btn"
|
||||||
</div>
|
onclick={handlePlexDisconnect}
|
||||||
|
disabled={plexBusy || plexAuthBusy || !plexToken.trim()}
|
||||||
|
>
|
||||||
|
{$t('settings.integrations.plexActionDisconnect')}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="setting-row last plex-two-column-row">
|
||||||
|
<div class="setting-info">
|
||||||
|
<span class="setting-label">{$t('settings.integrations.plexClearCacheRowLabel')}</span>
|
||||||
|
<small class="setting-note">{$t('settings.integrations.plexClearCacheRowHelp')}</small>
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
class="connect-btn danger-btn"
|
||||||
|
onclick={handlePlexClearCache}
|
||||||
|
disabled={plexBusy || plexAuthBusy}
|
||||||
|
>
|
||||||
|
{$t('settings.integrations.plexClearButton')}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- Updates Section -->
|
<!-- Updates Section -->
|
||||||
@@ -5130,66 +5367,132 @@ flatpak override --user --filesystem=/home/USUARIO/Música com.blitzfc.qbz</pre>
|
|||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.plex-poc-panel {
|
.plex-server-row {
|
||||||
margin-top: 10px;
|
align-items: end;
|
||||||
display: grid;
|
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.plex-actions {
|
.plex-server-field {
|
||||||
display: flex;
|
flex: 1;
|
||||||
gap: 8px;
|
min-width: 0;
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.plex-inline-row {
|
|
||||||
margin-top: 2px;
|
|
||||||
margin-bottom: 2px;
|
|
||||||
padding-top: 0;
|
|
||||||
padding-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.plex-connect-wizard {
|
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 10px;
|
gap: 6px;
|
||||||
padding: 12px;
|
|
||||||
border: 1px solid var(--border-subtle);
|
|
||||||
border-radius: 10px;
|
|
||||||
background: var(--bg-secondary);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.plex-wizard-header {
|
.plex-port-field {
|
||||||
|
width: 130px;
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 4px;
|
gap: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.plex-code-card {
|
.plex-port-input::-webkit-outer-spin-button,
|
||||||
display: grid;
|
.plex-port-input::-webkit-inner-spin-button {
|
||||||
gap: 10px;
|
-webkit-appearance: none;
|
||||||
padding: 14px;
|
margin: 0;
|
||||||
border-radius: 10px;
|
|
||||||
border: 1px solid var(--accent-primary);
|
|
||||||
background: color-mix(in srgb, var(--accent-primary) 10%, var(--bg-tertiary));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.plex-code-value {
|
.plex-port-input {
|
||||||
font-family: 'JetBrains Mono', 'Fira Code', monospace;
|
-moz-appearance: textfield;
|
||||||
font-size: 32px;
|
appearance: textfield;
|
||||||
line-height: 1;
|
|
||||||
letter-spacing: 0.16em;
|
|
||||||
font-weight: 700;
|
|
||||||
color: var(--text-primary);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.plex-section-controls {
|
.plex-collapse-trigger {
|
||||||
|
width: 100%;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plex-two-column-row {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plex-divider {
|
||||||
|
width: 100%;
|
||||||
|
height: 1px;
|
||||||
|
background: var(--border-subtle);
|
||||||
|
margin: 2px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plex-code-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.plex-section-select {
|
.plex-code-input {
|
||||||
min-width: 240px;
|
flex: 1;
|
||||||
width: 240px;
|
font-family: 'JetBrains Mono', 'Fira Code', monospace;
|
||||||
|
letter-spacing: 0.06em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.copy-icon-btn {
|
||||||
|
width: 34px;
|
||||||
|
height: 34px;
|
||||||
|
border: 1px solid var(--border-subtle);
|
||||||
|
border-radius: 8px;
|
||||||
|
background: var(--bg-tertiary);
|
||||||
|
color: var(--text-secondary);
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.copy-icon-btn:hover:not(:disabled) {
|
||||||
|
color: var(--text-primary);
|
||||||
|
border-color: var(--border-default);
|
||||||
|
}
|
||||||
|
|
||||||
|
.copy-icon-btn:disabled {
|
||||||
|
opacity: 0.45;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plex-manual-toggle {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plex-libraries-block {
|
||||||
|
display: grid;
|
||||||
|
gap: 8px;
|
||||||
|
align-items: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plex-libraries-grid {
|
||||||
|
border: 1px solid var(--border-subtle);
|
||||||
|
border-radius: 10px;
|
||||||
|
background: var(--bg-tertiary);
|
||||||
|
padding: 10px;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
gap: 8px 16px;
|
||||||
|
max-height: 130px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plex-library-item {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
min-height: 28px;
|
||||||
|
color: var(--text-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.plex-library-name {
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plex-library-count {
|
||||||
|
font-size: 11px;
|
||||||
|
color: var(--text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
.plex-connected-note {
|
||||||
|
color: #86efac;
|
||||||
}
|
}
|
||||||
|
|
||||||
.plex-error-note {
|
.plex-error-note {
|
||||||
|
|||||||
@@ -670,6 +670,8 @@
|
|||||||
"plexAuthCode": "Plex-Code: {code}",
|
"plexAuthCode": "Plex-Code: {code}",
|
||||||
"plexCodeCopied": "Plex-Code kopiert.",
|
"plexCodeCopied": "Plex-Code kopiert.",
|
||||||
"plexCodeCopyFailed": "Plex-Code konnte nicht kopiert werden.",
|
"plexCodeCopyFailed": "Plex-Code konnte nicht kopiert werden.",
|
||||||
|
"plexStatusIdle": "Bereit für Plex-LAN-Prüfungen.",
|
||||||
|
"plexStatusDisabled": "Die Plex-Verbindung ist deaktiviert.",
|
||||||
"plexStatusAuthPending": "Plex-Anmeldung gestartet. Schließe die Autorisierung mit dem Code {code} ab.",
|
"plexStatusAuthPending": "Plex-Anmeldung gestartet. Schließe die Autorisierung mit dem Code {code} ab.",
|
||||||
"plexStatusAuthConnected": "Plex-Token erfolgreich empfangen.",
|
"plexStatusAuthConnected": "Plex-Token erfolgreich empfangen.",
|
||||||
"plexStatusAuthExpired": "Der Plex-Anmeldecode ist abgelaufen. Starte die Verbindung erneut.",
|
"plexStatusAuthExpired": "Der Plex-Anmeldecode ist abgelaufen. Starte die Verbindung erneut.",
|
||||||
@@ -709,6 +711,28 @@
|
|||||||
"remoteControlQrHelp": "Diesen QR-Code mit QBZ-Control scannen, um zu koppeln.",
|
"remoteControlQrHelp": "Diesen QR-Code mit QBZ-Control scannen, um zu koppeln.",
|
||||||
"remoteControlUrlLabel": "Lokale URL",
|
"remoteControlUrlLabel": "Lokale URL",
|
||||||
"remoteControlQrAlt": "QR-Code zur Kopplung",
|
"remoteControlQrAlt": "QR-Code zur Kopplung",
|
||||||
|
"plexConnection": "Plex-Verbindung",
|
||||||
|
"plexConnectionLore": "Greife direkt aus der QBZ Local Library auf deine Plex-Bibliothek zu. Diese Integration unterstützt nur lokale und LAN-Plex-Server, um Direct Play zu garantieren.",
|
||||||
|
"plexServerUrl": "Plex-Server-URL",
|
||||||
|
"plexServerUrlPlaceholder": "http://lokale-ip-adresse",
|
||||||
|
"plexServerPort": "Port",
|
||||||
|
"plexLocalAddressRequired": "Verwende eine lokale oder LAN-Plex-Adresse. Remote-Endpunkte werden in diesem Modus nicht unterstützt.",
|
||||||
|
"plexAuthorizeSectionTitle": "QBZ autorisieren",
|
||||||
|
"plexAuthorizeSectionLore": "Autorisiere QBZ, um sich mit deinem Plex-Server zu verbinden.",
|
||||||
|
"plexAuthorizeHelp": "Prüfe deinen externen Browser, um die Autorisierung abzuschließen.",
|
||||||
|
"plexAuthorizeLabel": "QBZ für die Verbindung mit deinem Plex-Server autorisieren",
|
||||||
|
"plexCodeEmpty": "Noch kein Code erzeugt",
|
||||||
|
"plexCodeTooltip": "Code kopieren",
|
||||||
|
"plexManualTokenToggle": "Oder gib dein Plex X-Token direkt ein",
|
||||||
|
"plexConnectionCheckLabel": "Plex-Verbindung prüfen",
|
||||||
|
"plexGetLibrariesLabel": "Plex-Musikbibliotheken laden",
|
||||||
|
"plexGetLibrariesHelp": "Neu synchronisieren, wenn auf dem Plex-Server neue Bibliotheken hinzugefügt wurden.",
|
||||||
|
"plexMusicLibraries": "Musikbibliotheken",
|
||||||
|
"plexTracksShort": "Titel",
|
||||||
|
"plexDisconnectRowLabel": "Plex trennen",
|
||||||
|
"plexClearCacheRowLabel": "Plex-Cache in QBZ leeren",
|
||||||
|
"plexClearCacheRowHelp": "Empfohlen bei Inkonsistenzen in der Bibliothek.",
|
||||||
|
"plexClearButton": "Leeren",
|
||||||
"plexStatusCacheLoaded": "{count} zwischengespeicherte Titel geladen. Aktualisierung von Plex im Hintergrund."
|
"plexStatusCacheLoaded": "{count} zwischengespeicherte Titel geladen. Aktualisierung von Plex im Hintergrund."
|
||||||
},
|
},
|
||||||
"storage": {
|
"storage": {
|
||||||
|
|||||||
@@ -702,6 +702,28 @@
|
|||||||
"remoteControlQrHelp": "Scan this QR code with QBZ-Control to pair.",
|
"remoteControlQrHelp": "Scan this QR code with QBZ-Control to pair.",
|
||||||
"remoteControlUrlLabel": "Local URL",
|
"remoteControlUrlLabel": "Local URL",
|
||||||
"remoteControlQrAlt": "Pairing QR code",
|
"remoteControlQrAlt": "Pairing QR code",
|
||||||
|
"plexConnection": "Plex Connection",
|
||||||
|
"plexConnectionLore": "Access your Plex library directly from QBZ Local Library. This integration supports only local and LAN Plex servers to guarantee direct play.",
|
||||||
|
"plexServerUrl": "Plex Server URL",
|
||||||
|
"plexServerUrlPlaceholder": "http://local-ip-address",
|
||||||
|
"plexServerPort": "Port",
|
||||||
|
"plexLocalAddressRequired": "Use a local or LAN Plex address. Remote Plex endpoints are not supported for this mode.",
|
||||||
|
"plexAuthorizeSectionTitle": "Authorize QBZ",
|
||||||
|
"plexAuthorizeSectionLore": "Authorize QBZ to connect with your Plex server.",
|
||||||
|
"plexAuthorizeHelp": "Check your external web browser to complete authorization.",
|
||||||
|
"plexAuthorizeLabel": "Authorize QBZ to connect with your Plex server",
|
||||||
|
"plexCodeEmpty": "No code generated yet",
|
||||||
|
"plexCodeTooltip": "Copy code",
|
||||||
|
"plexManualTokenToggle": "Or enter your Plex X-Token directly",
|
||||||
|
"plexConnectionCheckLabel": "Check Plex connection",
|
||||||
|
"plexGetLibrariesLabel": "Get Plex music libraries",
|
||||||
|
"plexGetLibrariesHelp": "Re-sync if new libraries were added on your Plex server.",
|
||||||
|
"plexMusicLibraries": "Music libraries",
|
||||||
|
"plexTracksShort": "tracks",
|
||||||
|
"plexDisconnectRowLabel": "Disconnect Plex",
|
||||||
|
"plexClearCacheRowLabel": "Clear Plex cache in QBZ",
|
||||||
|
"plexClearCacheRowHelp": "Recommended if you notice library inconsistencies.",
|
||||||
|
"plexClearButton": "Clear",
|
||||||
"plexPoc": "Plex LAN POC",
|
"plexPoc": "Plex LAN POC",
|
||||||
"plexPocDesc": "Experimental local-only integration. Uses direct media parts from Plex without replacing QBZ playback.",
|
"plexPocDesc": "Experimental local-only integration. Uses direct media parts from Plex without replacing QBZ playback.",
|
||||||
"plexLibraryIntegrationNote": "Plex music is integrated into Local Library (same queue/player flow, no separate tab).",
|
"plexLibraryIntegrationNote": "Plex music is integrated into Local Library (same queue/player flow, no separate tab).",
|
||||||
@@ -732,6 +754,7 @@
|
|||||||
"plexMusicSection": "Music Section",
|
"plexMusicSection": "Music Section",
|
||||||
"plexSelectSection": "Select a section",
|
"plexSelectSection": "Select a section",
|
||||||
"plexStatusIdle": "Ready for Plex LAN checks.",
|
"plexStatusIdle": "Ready for Plex LAN checks.",
|
||||||
|
"plexStatusDisabled": "Plex connection is disabled.",
|
||||||
"plexStatusAuthPending": "Plex sign-in started. Complete authorization with code {code}.",
|
"plexStatusAuthPending": "Plex sign-in started. Complete authorization with code {code}.",
|
||||||
"plexStatusAuthConnected": "Plex token received successfully.",
|
"plexStatusAuthConnected": "Plex token received successfully.",
|
||||||
"plexStatusAuthExpired": "Plex sign-in code expired. Start the connection again.",
|
"plexStatusAuthExpired": "Plex sign-in code expired. Start the connection again.",
|
||||||
|
|||||||
@@ -702,6 +702,28 @@
|
|||||||
"remoteControlQrHelp": "Escanea este código QR con QBZ-Control para emparejar.",
|
"remoteControlQrHelp": "Escanea este código QR con QBZ-Control para emparejar.",
|
||||||
"remoteControlUrlLabel": "URL local",
|
"remoteControlUrlLabel": "URL local",
|
||||||
"remoteControlQrAlt": "Código QR de emparejamiento",
|
"remoteControlQrAlt": "Código QR de emparejamiento",
|
||||||
|
"plexConnection": "Conexión Plex",
|
||||||
|
"plexConnectionLore": "Accede a tu biblioteca de Plex desde QBZ Local Library. Esta integración solo soporta servidores Plex locales o en LAN para garantizar direct play.",
|
||||||
|
"plexServerUrl": "URL del servidor Plex",
|
||||||
|
"plexServerUrlPlaceholder": "http://ip-local",
|
||||||
|
"plexServerPort": "Puerto",
|
||||||
|
"plexLocalAddressRequired": "Usa una dirección Plex local o LAN. Los endpoints remotos no están soportados en este modo.",
|
||||||
|
"plexAuthorizeSectionTitle": "Autorizar QBZ",
|
||||||
|
"plexAuthorizeSectionLore": "Autoriza QBZ para conectarse con tu servidor Plex.",
|
||||||
|
"plexAuthorizeHelp": "Revisa tu navegador externo para completar la autorización.",
|
||||||
|
"plexAuthorizeLabel": "Autorizar QBZ para conectarse con tu servidor Plex",
|
||||||
|
"plexCodeEmpty": "Aún no se generó código",
|
||||||
|
"plexCodeTooltip": "Copiar código",
|
||||||
|
"plexManualTokenToggle": "O ingresa tu Plex X-Token manualmente",
|
||||||
|
"plexConnectionCheckLabel": "Comprobar conexión con Plex",
|
||||||
|
"plexGetLibrariesLabel": "Obtener bibliotecas de música de Plex",
|
||||||
|
"plexGetLibrariesHelp": "Re-sincroniza si agregaste bibliotecas nuevas en tu servidor Plex.",
|
||||||
|
"plexMusicLibraries": "Bibliotecas de música",
|
||||||
|
"plexTracksShort": "pistas",
|
||||||
|
"plexDisconnectRowLabel": "Desconectar Plex",
|
||||||
|
"plexClearCacheRowLabel": "Limpiar caché de Plex en QBZ",
|
||||||
|
"plexClearCacheRowHelp": "Recomendado si notas inconsistencias en la biblioteca.",
|
||||||
|
"plexClearButton": "Limpiar",
|
||||||
"plexPoc": "Plex LAN POC",
|
"plexPoc": "Plex LAN POC",
|
||||||
"plexPocDesc": "Integración experimental solo local. Usa partes directas de medios desde Plex sin reemplazar la reproducción de QBZ.",
|
"plexPocDesc": "Integración experimental solo local. Usa partes directas de medios desde Plex sin reemplazar la reproducción de QBZ.",
|
||||||
"plexLibraryIntegrationNote": "La música de Plex se integra en Local Library (misma cola/reproductor, sin pestaña separada).",
|
"plexLibraryIntegrationNote": "La música de Plex se integra en Local Library (misma cola/reproductor, sin pestaña separada).",
|
||||||
@@ -732,6 +754,7 @@
|
|||||||
"plexMusicSection": "Sección de música",
|
"plexMusicSection": "Sección de música",
|
||||||
"plexSelectSection": "Selecciona una sección",
|
"plexSelectSection": "Selecciona una sección",
|
||||||
"plexStatusIdle": "Listo para pruebas LAN con Plex.",
|
"plexStatusIdle": "Listo para pruebas LAN con Plex.",
|
||||||
|
"plexStatusDisabled": "La conexión con Plex está desactivada.",
|
||||||
"plexStatusAuthPending": "Inicio de sesión de Plex iniciado. Completa la autorización con el código {code}.",
|
"plexStatusAuthPending": "Inicio de sesión de Plex iniciado. Completa la autorización con el código {code}.",
|
||||||
"plexStatusAuthConnected": "Token de Plex recibido correctamente.",
|
"plexStatusAuthConnected": "Token de Plex recibido correctamente.",
|
||||||
"plexStatusAuthExpired": "El código de inicio de Plex expiró. Inicia la conexión nuevamente.",
|
"plexStatusAuthExpired": "El código de inicio de Plex expiró. Inicia la conexión nuevamente.",
|
||||||
|
|||||||
@@ -670,6 +670,8 @@
|
|||||||
"plexAuthCode": "Code Plex : {code}",
|
"plexAuthCode": "Code Plex : {code}",
|
||||||
"plexCodeCopied": "Code Plex copié.",
|
"plexCodeCopied": "Code Plex copié.",
|
||||||
"plexCodeCopyFailed": "Impossible de copier le code Plex.",
|
"plexCodeCopyFailed": "Impossible de copier le code Plex.",
|
||||||
|
"plexStatusIdle": "Prêt pour les vérifications Plex LAN.",
|
||||||
|
"plexStatusDisabled": "La connexion Plex est désactivée.",
|
||||||
"plexStatusAuthPending": "Connexion Plex démarrée. Terminez l'autorisation avec le code {code}.",
|
"plexStatusAuthPending": "Connexion Plex démarrée. Terminez l'autorisation avec le code {code}.",
|
||||||
"plexStatusAuthConnected": "Jeton Plex reçu avec succès.",
|
"plexStatusAuthConnected": "Jeton Plex reçu avec succès.",
|
||||||
"plexStatusAuthExpired": "Le code de connexion Plex a expiré. Relancez la connexion.",
|
"plexStatusAuthExpired": "Le code de connexion Plex a expiré. Relancez la connexion.",
|
||||||
@@ -709,6 +711,28 @@
|
|||||||
"remoteControlQrHelp": "Scannez ce code QR avec QBZ-Control pour appairer.",
|
"remoteControlQrHelp": "Scannez ce code QR avec QBZ-Control pour appairer.",
|
||||||
"remoteControlUrlLabel": "URL locale",
|
"remoteControlUrlLabel": "URL locale",
|
||||||
"remoteControlQrAlt": "Code QR d'appairage",
|
"remoteControlQrAlt": "Code QR d'appairage",
|
||||||
|
"plexConnection": "Connexion Plex",
|
||||||
|
"plexConnectionLore": "Accédez à votre bibliothèque Plex depuis la Local Library de QBZ. Cette intégration prend uniquement en charge les serveurs Plex locaux et LAN pour garantir le direct play.",
|
||||||
|
"plexServerUrl": "URL du serveur Plex",
|
||||||
|
"plexServerUrlPlaceholder": "http://adresse-ip-locale",
|
||||||
|
"plexServerPort": "Port",
|
||||||
|
"plexLocalAddressRequired": "Utilisez une adresse Plex locale ou LAN. Les endpoints distants ne sont pas pris en charge dans ce mode.",
|
||||||
|
"plexAuthorizeSectionTitle": "Autoriser QBZ",
|
||||||
|
"plexAuthorizeSectionLore": "Autorisez QBZ à se connecter à votre serveur Plex.",
|
||||||
|
"plexAuthorizeHelp": "Vérifiez votre navigateur externe pour terminer l'autorisation.",
|
||||||
|
"plexAuthorizeLabel": "Autoriser QBZ à se connecter à votre serveur Plex",
|
||||||
|
"plexCodeEmpty": "Aucun code généré pour le moment",
|
||||||
|
"plexCodeTooltip": "Copier le code",
|
||||||
|
"plexManualTokenToggle": "Ou saisissez directement votre Plex X-Token",
|
||||||
|
"plexConnectionCheckLabel": "Vérifier la connexion Plex",
|
||||||
|
"plexGetLibrariesLabel": "Récupérer les bibliothèques musicales Plex",
|
||||||
|
"plexGetLibrariesHelp": "Re-synchronisez si de nouvelles bibliothèques ont été ajoutées sur votre serveur Plex.",
|
||||||
|
"plexMusicLibraries": "Bibliothèques musicales",
|
||||||
|
"plexTracksShort": "pistes",
|
||||||
|
"plexDisconnectRowLabel": "Déconnecter Plex",
|
||||||
|
"plexClearCacheRowLabel": "Effacer le cache Plex dans QBZ",
|
||||||
|
"plexClearCacheRowHelp": "Recommandé si vous remarquez des incohérences dans la bibliothèque.",
|
||||||
|
"plexClearButton": "Effacer",
|
||||||
"plexStatusCacheLoaded": "{count} pistes en cache chargées. Actualisation depuis Plex en arrière-plan."
|
"plexStatusCacheLoaded": "{count} pistes en cache chargées. Actualisation depuis Plex en arrière-plan."
|
||||||
},
|
},
|
||||||
"storage": {
|
"storage": {
|
||||||
|
|||||||
Reference in new issue
Block a user