Skip to content

Commit

Permalink
apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenrats committed Oct 31, 2023
1 parent 7e680a9 commit a3af52c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions source/utils/globals.brs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ sub setConstants()
globals.addFields({
constants: {

jellyfin_server: "jellyfin server",

poster_bg_pallet: ["#00455c", "#44bae1", "#00a4db", "#1c4c5c", "#007ea8"],

colors: {
Expand Down
8 changes: 4 additions & 4 deletions source/utils/misc.brs
Original file line number Diff line number Diff line change
Expand Up @@ -460,11 +460,11 @@ end sub
' accepts the raw json string of /system/info/public and returns
' a boolean indicating if ProductName is "Jellyfin Server"
function isJellyfinServer(systemInfo as object) as boolean
d = ParseJson(systemInfo)
if isValid(d) and isValid(d.ProductName)
return d.ProductName = "Jellyfin Server"
data = ParseJson(systemInfo)
if isValid(data) and isValid(data.ProductName)
return LCase(data.ProductName) = m.global.constants.jellyfin_server
end if
return False
return false
end function

' Check if a specific value is inside of an array
Expand Down

0 comments on commit a3af52c

Please sign in to comment.