feat: add settings option to hide Live TV categories (#11)

Add a liveChannelListMode setting (default 'grouped') with a Settings
toggle to display the Live TV channel list flat, without category
group sections. When enabled, logical channels are listed directly
with their stream variants still grouped as in #9/#10. Cover the
setting default and flat-list behavior with tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
blomios
2026-10-02 09:57:20 +02:00
parent 451f11f21f
commit e06f4ec2c3
8 changed files with 153 additions and 7 deletions

View File

@ -57,6 +57,7 @@ class VideoPlayer {
rememberVolume: true,
lastVolume: 80,
autoPlayNextEpisode: false,
liveChannelListMode: 'grouped',
forceProxy: false,
forceTranscode: false,
forceRemux: false,
@ -94,6 +95,7 @@ class VideoPlayer {
const serverSettings = await API.settings.get();
this.settings = { ...this.getDefaultSettings(), ...serverSettings };
this.settingsLoaded = true;
window.app?.channelList?.setListMode(this.settings.liveChannelListMode);
console.log('[Player] Settings loaded from server');
} catch (err) {
console.warn('[Player] Failed to load settings from server, using defaults:', err.message);