Use string return type for getItemType()
This commit is contained in:
parent
f0a485a60e
commit
5c6bfdfca9
|
@ -87,7 +87,7 @@ sub playQueue()
|
||||||
nextItem = getCurrentItem()
|
nextItem = getCurrentItem()
|
||||||
nextItemMediaType = getItemType(nextItem)
|
nextItemMediaType = getItemType(nextItem)
|
||||||
|
|
||||||
if not isValid(nextItemMediaType) then return
|
if nextItemMediaType = "" then return
|
||||||
|
|
||||||
if nextItemMediaType = "audio"
|
if nextItemMediaType = "audio"
|
||||||
CreateAudioPlayerView()
|
CreateAudioPlayerView()
|
||||||
|
@ -177,12 +177,12 @@ sub set(items)
|
||||||
end for
|
end for
|
||||||
end sub
|
end sub
|
||||||
|
|
||||||
function getItemType(item) as dynamic
|
function getItemType(item) as string
|
||||||
if isValid(item) and isValid(item.json) and isValid(item.json.mediatype) and item.json.mediatype <> ""
|
if isValid(item) and isValid(item.json) and isValid(item.json.mediatype) and item.json.mediatype <> ""
|
||||||
return LCase(item.json.mediatype)
|
return LCase(item.json.mediatype)
|
||||||
else if isValid(item) and isValid(item.type) and item.type <> ""
|
else if isValid(item) and isValid(item.type) and item.type <> ""
|
||||||
return LCase(item.type)
|
return LCase(item.type)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
return invalid
|
return ""
|
||||||
end function
|
end function
|
||||||
|
|
Loading…
Reference in New Issue
Block a user