mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-27 18:22:41 -08:00
chore: add project management metadata and remaining repository files
This commit is contained in:
16
launcher/config/jellyfin-config.ts
Normal file
16
launcher/config/jellyfin-config.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import type { LauncherJellyfinConfig } from '../types.js';
|
||||
|
||||
export function parseLauncherJellyfinConfig(root: Record<string, unknown>): LauncherJellyfinConfig {
|
||||
const jellyfinRaw = root.jellyfin;
|
||||
if (!jellyfinRaw || typeof jellyfinRaw !== 'object') return {};
|
||||
const jellyfin = jellyfinRaw as Record<string, unknown>;
|
||||
return {
|
||||
enabled: typeof jellyfin.enabled === 'boolean' ? jellyfin.enabled : undefined,
|
||||
serverUrl: typeof jellyfin.serverUrl === 'string' ? jellyfin.serverUrl : undefined,
|
||||
username: typeof jellyfin.username === 'string' ? jellyfin.username : undefined,
|
||||
defaultLibraryId:
|
||||
typeof jellyfin.defaultLibraryId === 'string' ? jellyfin.defaultLibraryId : undefined,
|
||||
pullPictures: typeof jellyfin.pullPictures === 'boolean' ? jellyfin.pullPictures : undefined,
|
||||
iconCacheDir: typeof jellyfin.iconCacheDir === 'string' ? jellyfin.iconCacheDir : undefined,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user