Fix blocks for emby/jellyfin, support enable/disable

This commit is contained in:
shamoon 2023-03-12 16:50:28 -07:00
parent 29c7a51b04
commit eaf7ba608b
3 changed files with 101 additions and 86 deletions

View file

@ -247,7 +247,9 @@ export function cleanServiceGroups(groups) {
namespace, // kubernetes widget
app,
podSelector,
wan // opnsense widget
wan, // opnsense widget,
enableBlocks, // emby/jellyfin
enableNowPlaying
} = cleanedService.widget;
const fieldsList = typeof fields === 'string' ? JSON.parse(fields) : fields;
@ -278,6 +280,10 @@ export function cleanServiceGroups(groups) {
if (type === "opnsense") {
if (wan) cleanedService.widget.wan = wan;
}
if (type === "emby" || type === "jellyfin") {
if (enableBlocks) cleanedService.widget.enableBlocks = enableBlocks === 'true';
if (enableNowPlaying) cleanedService.widget.enableNowPlaying = enableNowPlaying === 'true';
}
}
return cleanedService;