Enhancement: option to show user for Tautulli and Emby/Jellyfin widgets (#3287)

---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
brikim 2024-04-12 22:33:40 -05:00 committed by GitHub
parent c18fd02c8e
commit bfd392026d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 39 additions and 10 deletions

View file

@ -393,6 +393,9 @@ export function cleanServiceGroups(groups) {
enableBlocks,
enableNowPlaying,
// emby, jellyfin, tautulli
enableUser,
// glances, pihole
version,
@ -517,6 +520,14 @@ export function cleanServiceGroups(groups) {
if (["emby", "jellyfin"].includes(type)) {
if (enableBlocks !== undefined) cleanedService.widget.enableBlocks = JSON.parse(enableBlocks);
if (enableNowPlaying !== undefined) cleanedService.widget.enableNowPlaying = JSON.parse(enableNowPlaying);
if (enableUser !== undefined) {
cleanedService.widget.enableUser = !!JSON.parse(enableUser);
}
}
if (["tautulli"].includes(type)) {
if (enableUser !== undefined) {
cleanedService.widget.enableUser = !!JSON.parse(enableUser);
}
}
if (["sonarr", "radarr"].includes(type)) {
if (enableQueue !== undefined) cleanedService.widget.enableQueue = JSON.parse(enableQueue);