mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-10-03 05:22:49 +08:00
feat: make Jellyfin an optional source instead of the default
Revert the jellyfin-only default introduced by PR #123 so upgrading users keep their online sources; Jellyfin becomes opt-in: - default enabledProviders is now the online set (netease/qq/bilibili/ youtube/kugou); defaultPlatform() uses a fixed priority order (netease -> qq -> kugou -> jellyfin -> bilibili -> youtube) instead of jellyfin-first, so chat/REST/WebUI default to netease again - Settings: Jellyfin card is always visible with a new enable toggle (its enabled bit is enabledProviders membership); guards against clobbering other providers before the list loads - Setup wizard: saving the Jellyfin step auto-enables the source when a server URL was entered - Search/player store fallbacks flip from jellyfin to netease; !help no longer hardcodes Jellyfin lines - tests: update default-platform assertions, add coverage for the new default set, legacy configs without enabledProviders, priority order, and explicit jellyfin-only configs - README: reframe Jellyfin as optional (badges, command table, quality tiers, dedicated section, changelog), document the enabledProviders default and the v1.10.0 jellyfin-only window fix, credit @ItsEricRao Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3841fa80d3
commit
750ad9b1cc
12 files changed
+270
-72
No files matched your search
@@ -57,7 +57,7 @@
|
||||
|
||||
<template v-else-if="allSongs.length || allAlbums.length || allPlaylists.length">
|
||||
<!-- Only enabled sources are offered (enabledProviders gate); Jellyfin
|
||||
— the primary source — comes first. -->
|
||||
(opt-in) comes first when enabled. -->
|
||||
<div class="source-bar">
|
||||
<button
|
||||
v-if="sourceEnabled('jellyfin')"
|
||||
@@ -218,7 +218,7 @@ function loadSource(): SearchSource {
|
||||
const stored = localStorage.getItem(SOURCE_STORAGE_KEY);
|
||||
if (SEARCH_SOURCES.includes(stored as SearchSource)) return stored as SearchSource;
|
||||
} catch { /* localStorage blocked */ }
|
||||
return 'jellyfin';
|
||||
return 'netease';
|
||||
}
|
||||
|
||||
type TabType = 'songs' | 'albums' | 'playlists';
|
||||
@@ -272,7 +272,7 @@ function fixupSelectedSource() {
|
||||
const def = store.defaultSource as SearchSource;
|
||||
selectedSource.value = SEARCH_SOURCES.includes(def) && sourceEnabled(def)
|
||||
? def
|
||||
: SEARCH_SOURCES.find((s) => s !== 'local' && sourceEnabled(s)) ?? 'jellyfin';
|
||||
: SEARCH_SOURCES.find((s) => s !== 'local' && sourceEnabled(s)) ?? 'netease';
|
||||
}
|
||||
|
||||
// ---- 分页 / 加载更多 ----
|
||||
|
||||
Reference in new issue
Block a user