Linter: Code style: remove parenthesis around conditions
This commit is contained in:
parent
da54bc86fe
commit
579475a34c
|
@ -105,12 +105,12 @@ function onKeyEvent(key as string, press as boolean) as boolean
|
|||
if not press then return false
|
||||
|
||||
if key = "left"
|
||||
if(m.selectedFocusedIndex > 0) m.selectedFocusedIndex = m.selectedFocusedIndex - 1
|
||||
if m.selectedFocusedIndex > 0 then m.selectedFocusedIndex = m.selectedFocusedIndex - 1
|
||||
highlightSelected(m.selectedFocusedIndex)
|
||||
m.top.focusedIndex = m.selectedFocusedIndex
|
||||
return true
|
||||
else if key = "right"
|
||||
if(m.selectedFocusedIndex < m.buttonCount - 1) m.selectedFocusedIndex = m.selectedFocusedIndex + 1
|
||||
if m.selectedFocusedIndex < m.buttonCount - 1 then m.selectedFocusedIndex = m.selectedFocusedIndex + 1
|
||||
highlightSelected(m.selectedFocusedIndex)
|
||||
m.top.focusedIndex = m.selectedFocusedIndex
|
||||
return true
|
||||
|
|
|
@ -287,7 +287,7 @@ end sub
|
|||
'Check if options updated and any reloading required
|
||||
sub optionsClosed()
|
||||
|
||||
if (m.options.view = "tvGuide") then
|
||||
if m.options.view = "tvGuide" then
|
||||
showTVGuid()
|
||||
return
|
||||
else if m.tvGuide <> invalid then
|
||||
|
|
|
@ -135,15 +135,15 @@ function onKeyEvent(key as string, press as boolean) as boolean
|
|||
|
||||
return true
|
||||
else if key = "OK"
|
||||
if(m.menus[m.selectedItem].isInFocusChain()) then
|
||||
if m.menus[m.selectedItem].isInFocusChain() then
|
||||
' Handle View Screen
|
||||
if(m.selectedItem = 0) then
|
||||
if m.selectedItem = 0 then
|
||||
m.selectedViewIndex = m.menus[0].itemSelected
|
||||
m.top.view = m.viewNames[m.selectedViewIndex]
|
||||
end if
|
||||
|
||||
' Handle Sort screen
|
||||
if(m.selectedItem = 1) then
|
||||
if m.selectedItem = 1 then
|
||||
if m.menus[1].itemSelected <> m.selectedSortIndex then
|
||||
m.menus[1].focusedCheckedIconUri = m.global.constants.icons.ascending_black
|
||||
m.menus[1].checkedIconUri = m.global.constants.icons.ascending_white
|
||||
|
@ -165,7 +165,7 @@ function onKeyEvent(key as string, press as boolean) as boolean
|
|||
end if
|
||||
end if
|
||||
' Handle Filter screen
|
||||
if(m.selectedItem = 2) then
|
||||
if m.selectedItem = 2 then
|
||||
m.selectedFilterIndex = m.menus[2].itemSelected
|
||||
m.top.filter = m.filterNames[m.selectedFilterIndex]
|
||||
end if
|
||||
|
|
|
@ -65,7 +65,7 @@ sub onLibrariesLoaded()
|
|||
[464, 331] ' Next Up
|
||||
]
|
||||
' validate library data
|
||||
if (m.libraryData <> invalid and m.libraryData.count() > 0) then
|
||||
if m.libraryData <> invalid and m.libraryData.count() > 0 then
|
||||
userConfig = m.top.userConfig
|
||||
' populate My Media row
|
||||
filteredMedia = filterNodeArray(m.libraryData, "id", userConfig.MyMediaExcludes)
|
||||
|
|
|
@ -198,7 +198,7 @@ function onKeyEvent(key as string, press as boolean) as boolean
|
|||
|
||||
' Due to the way the button pressed event works, need to catch the release for the button as the press is being sent
|
||||
' directly to the main loop. Will get this sorted in the layout update for Movie Details
|
||||
if (key = "OK" and m.top.findNode("audio-button").isInFocusChain())
|
||||
if key = "OK" and m.top.findNode("audio-button").isInFocusChain()
|
||||
m.options.visible = true
|
||||
m.options.setFocus(true)
|
||||
end if
|
||||
|
|
|
@ -79,7 +79,7 @@ function onKeyEvent(key as string, press as boolean) as boolean
|
|||
|
||||
return true
|
||||
else if key = "OK"
|
||||
if(m.menus[m.selectedItem].isInFocusChain()) then
|
||||
if m.menus[m.selectedItem].isInFocusChain() then
|
||||
|
||||
selMenu = m.menus[m.selectedItem]
|
||||
selIndex = selMenu.itemSelected
|
||||
|
|
|
@ -79,7 +79,7 @@ sub Main (args as Dynamic) as Void
|
|||
' This now only references m. fields so could be placed anywhere, in theory
|
||||
' "group" is always "whats on the screen"
|
||||
' m.scene's children is the "previous view" stack
|
||||
while(true)
|
||||
while true
|
||||
msg = wait(0, m.port)
|
||||
if type(msg) = "roSGScreenEvent" and msg.isScreenClosed() then
|
||||
print "CLOSING SCREEN"
|
||||
|
@ -551,9 +551,9 @@ sub RunScreenSaver()
|
|||
screen.createScene("Screensaver")
|
||||
screen.Show()
|
||||
|
||||
while(true)
|
||||
while true
|
||||
msg = wait(8000, m.port)
|
||||
if (msg <> invalid)
|
||||
if msg <> invalid
|
||||
msgType = type(msg)
|
||||
if msgType = "roSGScreenEvent"
|
||||
if msg.isScreenClosed() then return
|
||||
|
@ -565,7 +565,7 @@ end sub
|
|||
|
||||
sub wipe_groups()
|
||||
' The 1 remaining child should be the overhang
|
||||
while(m.scene.getChildCount() > 1)
|
||||
while m.scene.getChildCount() > 1
|
||||
m.scene.removeChildIndex(1)
|
||||
end while
|
||||
end sub
|
||||
|
|
|
@ -23,7 +23,7 @@ function CreateServerGroup()
|
|||
server_hostname = config.content.getChild(0)
|
||||
group.observeField("backPressed", port)
|
||||
|
||||
while(true)
|
||||
while true
|
||||
msg = wait(0, port)
|
||||
if type(msg) = "roSGScreenEvent" and msg.isScreenClosed()
|
||||
return "false"
|
||||
|
@ -105,7 +105,7 @@ function CreateUserSelectGroup(users = [])
|
|||
group.findNode("userRow").observeField("userSelected", port)
|
||||
group.findNode("alternateOptions").observeField("itemSelected", port)
|
||||
group.observeField("backPressed", port)
|
||||
while(true)
|
||||
while true
|
||||
msg = wait(0, port)
|
||||
if type(msg) = "roSGScreenEvent" and msg.isScreenClosed()
|
||||
group.visible = false
|
||||
|
@ -163,7 +163,7 @@ function CreateSigninGroup(user = "")
|
|||
|
||||
group.observeField("backPressed", port)
|
||||
|
||||
while(true)
|
||||
while true
|
||||
msg = wait(0, port)
|
||||
if type(msg) = "roSGScreenEvent" and msg.isScreenClosed()
|
||||
group.visible = false
|
||||
|
|
|
@ -53,7 +53,7 @@ sub changeSubtitleDuringPlayback(newid)
|
|||
video.control = "play"
|
||||
video.globalCaptionMode = "Off" ' Using encoded subtitles - so turn off text subtitles
|
||||
|
||||
else if (currentSubtitles <> invalid AND currentSubtitles.IsEncoded) then
|
||||
else if currentSubtitles <> invalid AND currentSubtitles.IsEncoded then
|
||||
|
||||
' Switching from an Encoded stream to a text stream
|
||||
video.control = "stop"
|
||||
|
@ -96,7 +96,7 @@ function sortSubtitles(id as string, MediaStreams)
|
|||
if stream.type = "Subtitle" then
|
||||
|
||||
url = ""
|
||||
if(stream.DeliveryUrl <> invalid) then
|
||||
if stream.DeliveryUrl <> invalid then
|
||||
url = buildURL(stream.DeliveryUrl)
|
||||
end if
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user