feat: auto update playlist option

This commit is contained in:
antebrl
2025-01-18 00:14:55 +00:00
parent 96e4ab927b
commit 456f97e1c5
12 changed files with 150 additions and 12 deletions

View File

@@ -29,7 +29,7 @@ class ChannelService {
return filtered;
}
addChannel({ name, url, avatar, mode, headersJson, group = null, playlist = null, playlistName = null }, save = true) {
addChannel({ name, url, avatar, mode, headersJson, group = null, playlist = null, playlistName = null, playlistUpdate = false }, save = true) {
// const existing = this.channels.find(channel => channel.url === url);
// if (existing) {
// throw new Error('Channel already exists');
@@ -42,7 +42,7 @@ class ChannelService {
} catch (error) {
}
const newChannel = new Channel(name, url, avatar, mode, headers, group, playlist, playlistName);
const newChannel = new Channel(name, url, avatar, mode, headers, group, playlist, playlistName, playlistUpdate);
this.channels.push(newChannel);
if(save) ChannelStorage.save(this.channels);