Linter Warnings
Variable Capitalization, Unused Variables, Unreachable Code
This commit is contained in:
parent
fa75a11d27
commit
38fa383b4d
|
@ -174,7 +174,6 @@ end sub
|
||||||
sub ItemDataLoaded(msg)
|
sub ItemDataLoaded(msg)
|
||||||
|
|
||||||
itemData = msg.GetData()
|
itemData = msg.GetData()
|
||||||
data = msg.getField()
|
|
||||||
m.loadItemsTask.unobserveField("content")
|
m.loadItemsTask.unobserveField("content")
|
||||||
m.loadItemsTask.content = []
|
m.loadItemsTask.content = []
|
||||||
|
|
||||||
|
|
|
@ -31,10 +31,7 @@ function loadLibraries()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
sub updateSize()
|
sub updateSize()
|
||||||
sideborder = 100
|
|
||||||
m.top.translation = [111, 180]
|
m.top.translation = [111, 180]
|
||||||
|
|
||||||
itemWidth = 480
|
|
||||||
itemHeight = 330
|
itemHeight = 330
|
||||||
|
|
||||||
'Set width of Rows to cut off at edge of Safe Zone
|
'Set width of Rows to cut off at edge of Safe Zone
|
||||||
|
@ -213,7 +210,6 @@ end function
|
||||||
function updateLatestItems(msg)
|
function updateLatestItems(msg)
|
||||||
itemData = msg.GetData()
|
itemData = msg.GetData()
|
||||||
|
|
||||||
data = msg.getField()
|
|
||||||
node = msg.getRoSGNode()
|
node = msg.getRoSGNode()
|
||||||
node.unobserveField("content")
|
node.unobserveField("content")
|
||||||
node.content = []
|
node.content = []
|
||||||
|
|
|
@ -24,8 +24,8 @@ sub loadProgramDetails()
|
||||||
|
|
||||||
program = createObject("roSGNode", "ScheduleProgramData")
|
program = createObject("roSGNode", "ScheduleProgramData")
|
||||||
program.json = data
|
program.json = data
|
||||||
program.channelIndex = ChannelIndex
|
program.channelIndex = channelIndex
|
||||||
program.programIndex = ProgramIndex
|
program.programIndex = programIndex
|
||||||
program.fullyLoaded = true
|
program.fullyLoaded = true
|
||||||
m.top.programDetails = program
|
m.top.programDetails = program
|
||||||
|
|
||||||
|
|
|
@ -8,12 +8,6 @@ sub init()
|
||||||
end sub
|
end sub
|
||||||
|
|
||||||
sub updateSize()
|
sub updateSize()
|
||||||
dimensions = m.top.getScene().currentDesignResolution
|
|
||||||
|
|
||||||
border = 200
|
|
||||||
'm.top.translation = [border, border + 115]
|
|
||||||
|
|
||||||
textHeight = 80
|
|
||||||
itemWidth = 300
|
itemWidth = 300
|
||||||
itemHeight = 364
|
itemHeight = 364
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,6 @@ function onKeyEvent(key as string, press as boolean) as boolean
|
||||||
|
|
||||||
selMenu = m.menus[m.selectedItem]
|
selMenu = m.menus[m.selectedItem]
|
||||||
selIndex = selMenu.itemSelected
|
selIndex = selMenu.itemSelected
|
||||||
child = selMenu.content.GetChild(selIndex)
|
|
||||||
|
|
||||||
if m.selectedAudioIndex = selIndex then
|
if m.selectedAudioIndex = selIndex then
|
||||||
else
|
else
|
||||||
|
|
|
@ -41,7 +41,6 @@ function getData()
|
||||||
end if
|
end if
|
||||||
|
|
||||||
itemData = m.top.itemData
|
itemData = m.top.itemData
|
||||||
rowSize = m.top.rowSize
|
|
||||||
|
|
||||||
' todo - Or get the old data? I can't remember...
|
' todo - Or get the old data? I can't remember...
|
||||||
data = CreateObject("roSGNode", "ContentNode")
|
data = CreateObject("roSGNode", "ContentNode")
|
||||||
|
|
|
@ -17,7 +17,6 @@ sub updateSize()
|
||||||
border = 96
|
border = 96
|
||||||
m.top.translation = [border, 75 + 115]
|
m.top.translation = [border, 75 + 115]
|
||||||
|
|
||||||
textHeight = 80
|
|
||||||
itemWidth = (dimensions["width"] - border*2)
|
itemWidth = (dimensions["width"] - border*2)
|
||||||
itemHeight = 300
|
itemHeight = 300
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,6 @@ sub init()
|
||||||
end sub
|
end sub
|
||||||
|
|
||||||
sub updateSize()
|
sub updateSize()
|
||||||
textHeight = 80
|
|
||||||
itemWidth = 200
|
itemWidth = 200
|
||||||
itemHeight = 380 ' width * 1.5 + text
|
itemHeight = 380 ' width * 1.5 + text
|
||||||
|
|
||||||
|
@ -38,7 +37,6 @@ function getData()
|
||||||
end if
|
end if
|
||||||
|
|
||||||
seasonData = m.top.TVSeasonData
|
seasonData = m.top.TVSeasonData
|
||||||
rowsize = m.top.rowSize
|
|
||||||
data = CreateObject("roSGNode", "ContentNode")
|
data = CreateObject("roSGNode", "ContentNode")
|
||||||
row = data.CreateChild("ContentNode")
|
row = data.CreateChild("ContentNode")
|
||||||
row.title = "Seasons"
|
row.title = "Seasons"
|
||||||
|
|
|
@ -34,17 +34,14 @@ sub itemContentChanged()
|
||||||
if itemData.genres.count() > 0
|
if itemData.genres.count() > 0
|
||||||
setFieldText("genres", itemData.genres.join(", "))
|
setFieldText("genres", itemData.genres.join(", "))
|
||||||
end if
|
end if
|
||||||
director = invalid
|
|
||||||
for each person in itemData.people
|
for each person in itemData.people
|
||||||
if person.type = "Director"
|
if person.type = "Director"
|
||||||
director = person.name
|
|
||||||
exit for
|
exit for
|
||||||
end if
|
end if
|
||||||
end for
|
end for
|
||||||
if itemData.taglines.count() > 0
|
if itemData.taglines.count() > 0
|
||||||
setFieldText("tagline", itemData.taglines[0])
|
setFieldText("tagline", itemData.taglines[0])
|
||||||
end if
|
end if
|
||||||
' m.top.findNode("TVSeasonSelect").TVSeasonData = m.top.itemContent.seasons
|
|
||||||
end sub
|
end sub
|
||||||
|
|
||||||
sub setFieldText(field, value)
|
sub setFieldText(field, value)
|
||||||
|
|
|
@ -35,17 +35,14 @@ sub itemContentChanged()
|
||||||
if itemData.genres.count() > 0
|
if itemData.genres.count() > 0
|
||||||
setFieldText("genres", itemData.genres.join(", "))
|
setFieldText("genres", itemData.genres.join(", "))
|
||||||
end if
|
end if
|
||||||
director = invalid
|
|
||||||
for each person in itemData.people
|
for each person in itemData.people
|
||||||
if person.type = "Director"
|
if person.type = "Director"
|
||||||
director = person.name
|
|
||||||
exit for
|
exit for
|
||||||
end if
|
end if
|
||||||
end for
|
end for
|
||||||
if itemData.taglines.count() > 0
|
if itemData.taglines.count() > 0
|
||||||
setFieldText("tagline", itemData.taglines[0])
|
setFieldText("tagline", itemData.taglines[0])
|
||||||
end if
|
end if
|
||||||
' m.top.findNode("TVSeasonSelect").TVSeasonData = m.top.itemContent.seasons
|
|
||||||
end sub
|
end sub
|
||||||
|
|
||||||
sub setFieldText(field, value)
|
sub setFieldText(field, value)
|
||||||
|
|
|
@ -209,7 +209,6 @@ function Main (args as Dynamic) as Void
|
||||||
else
|
else
|
||||||
' TODO - switch on more node types
|
' TODO - switch on more node types
|
||||||
message_dialog("This type is not yet supported: " + selectedItem.type + ".")
|
message_dialog("This type is not yet supported: " + selectedItem.type + ".")
|
||||||
selectedItem = invalid
|
|
||||||
end if
|
end if
|
||||||
else if isNodeEvent(msg, "movieSelected")
|
else if isNodeEvent(msg, "movieSelected")
|
||||||
' If you select a movie from ANYWHERE, follow this flow
|
' If you select a movie from ANYWHERE, follow this flow
|
||||||
|
@ -549,7 +548,7 @@ sub RunScreenSaver()
|
||||||
m.port = createObject("roMessagePort")
|
m.port = createObject("roMessagePort")
|
||||||
screen.setMessagePort(m.port)
|
screen.setMessagePort(m.port)
|
||||||
|
|
||||||
scene = screen.createScene("Screensaver")
|
screen.createScene("Screensaver")
|
||||||
screen.Show()
|
screen.Show()
|
||||||
|
|
||||||
while(true)
|
while(true)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
function ItemGetPlaybackInfo(id as string, StartTimeTicks = 0 as longinteger)
|
function ItemGetPlaybackInfo(id as string, startTimeTicks = 0 as longinteger)
|
||||||
params = {
|
params = {
|
||||||
"UserId": get_setting("active_user"),
|
"UserId": get_setting("active_user"),
|
||||||
"StartTimeTicks": StartTimeTicks,
|
"StartTimeTicks": startTimeTicks,
|
||||||
"IsPlayback": true,
|
"IsPlayback": true,
|
||||||
"AutoOpenLiveStream": true,
|
"AutoOpenLiveStream": true,
|
||||||
"MaxStreamingBitrate": "140000000"
|
"MaxStreamingBitrate": "140000000"
|
||||||
|
@ -16,7 +16,7 @@ function ItemPostPlaybackInfo(id as string, mediaSourceId = "" as string , audio
|
||||||
}
|
}
|
||||||
params = {
|
params = {
|
||||||
"UserId": get_setting("active_user"),
|
"UserId": get_setting("active_user"),
|
||||||
"StartTimeTicks": StartTimeTicks,
|
"StartTimeTicks": startTimeTicks,
|
||||||
"IsPlayback": true,
|
"IsPlayback": true,
|
||||||
"AutoOpenLiveStream": true,
|
"AutoOpenLiveStream": true,
|
||||||
"MaxStreamingBitrate": "140000000",
|
"MaxStreamingBitrate": "140000000",
|
||||||
|
@ -117,7 +117,6 @@ function ItemMetaData(id as string)
|
||||||
' Return json if we don't know what it is
|
' Return json if we don't know what it is
|
||||||
return data
|
return data
|
||||||
end if
|
end if
|
||||||
return data
|
|
||||||
end function
|
end function
|
||||||
|
|
||||||
' Seasons for a TV Show
|
' Seasons for a TV Show
|
||||||
|
|
|
@ -42,7 +42,6 @@ end function
|
||||||
|
|
||||||
function deleteTranscode(id)
|
function deleteTranscode(id)
|
||||||
devinfo = CreateObject("roDeviceInfo")
|
devinfo = CreateObject("roDeviceInfo")
|
||||||
device_id = devinfo.getChannelClientID()
|
|
||||||
req = APIRequest("/Videos/ActiveEncodings", { "deviceID" : devinfo.getChannelClientID(), "PlaySessionId": id })
|
req = APIRequest("/Videos/ActiveEncodings", { "deviceID" : devinfo.getChannelClientID(), "PlaySessionId": id })
|
||||||
req.setRequest("DELETE")
|
req.setRequest("DELETE")
|
||||||
postVoid(req)
|
postVoid(req)
|
||||||
|
|
|
@ -21,8 +21,7 @@ function MarkItemWatched(id as String)
|
||||||
dateStr += leftPad(stri(date.getSeconds()).trim(), "0", 2)
|
dateStr += leftPad(stri(date.getSeconds()).trim(), "0", 2)
|
||||||
|
|
||||||
url = Substitute("Users/{0}/PlayedItems/{1}", get_setting("active_user"), id)
|
url = Substitute("Users/{0}/PlayedItems/{1}", get_setting("active_user"), id)
|
||||||
resp = APIRequest(url, {"DatePlayed": dateStr})
|
APIRequest(url, {"DatePlayed": dateStr})
|
||||||
data = postJson(resp)
|
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function UnmarkItemWatched(id as String)
|
function UnmarkItemWatched(id as String)
|
||||||
|
|
|
@ -2,10 +2,8 @@ function get_token(user as String, password as String)
|
||||||
url = "Users/AuthenticateByName?format=json"
|
url = "Users/AuthenticateByName?format=json"
|
||||||
req = APIRequest(url)
|
req = APIRequest(url)
|
||||||
|
|
||||||
encPass = CreateObject("roUrlTransfer")
|
|
||||||
json = postJson(req, FormatJson({ "Username": user, "Pw": password }))
|
json = postJson(req, FormatJson({ "Username": user, "Pw": password }))
|
||||||
|
|
||||||
|
|
||||||
if json = invalid then return invalid
|
if json = invalid then return invalid
|
||||||
|
|
||||||
userdata = CreateObject("roSGNode", "UserData")
|
userdata = CreateObject("roSGNode", "UserData")
|
||||||
|
|
|
@ -40,7 +40,7 @@ sub changeSubtitleDuringPlayback(newid)
|
||||||
video = m.scene.focusedChild
|
video = m.scene.focusedChild
|
||||||
|
|
||||||
' If no change of subtitle track, return
|
' If no change of subtitle track, return
|
||||||
if newId = video.SelectedSubtitle then return
|
if newid = video.SelectedSubtitle then return
|
||||||
|
|
||||||
currentSubtitles = video.Subtitles[video.SelectedSubtitle]
|
currentSubtitles = video.Subtitles[video.SelectedSubtitle]
|
||||||
newSubtitles = video.Subtitles[newid]
|
newSubtitles = video.Subtitles[newid]
|
||||||
|
@ -69,7 +69,7 @@ sub changeSubtitleDuringPlayback(newid)
|
||||||
video.subtitleTrack = video.availableSubtitleTracks[newSubtitles.TextIndex].TrackName
|
video.subtitleTrack = video.availableSubtitleTracks[newSubtitles.TextIndex].TrackName
|
||||||
end if
|
end if
|
||||||
|
|
||||||
video.SelectedSubtitle = newId
|
video.SelectedSubtitle = newid
|
||||||
|
|
||||||
end sub
|
end sub
|
||||||
|
|
||||||
|
@ -91,7 +91,6 @@ end function
|
||||||
function sortSubtitles(id as string, MediaStreams)
|
function sortSubtitles(id as string, MediaStreams)
|
||||||
tracks = { "forced": [], "default": [], "normal": [] }
|
tracks = { "forced": [], "default": [], "normal": [] }
|
||||||
'Too many args for using substitute
|
'Too many args for using substitute
|
||||||
dashedid = id.left(8) + "-" + id.mid(8,4) + "-" + id.mid(12,4) + "-" + id.mid(16,4) + "-" + id.right(12)
|
|
||||||
prefered_lang = m.user.Configuration.SubtitleLanguagePreference
|
prefered_lang = m.user.Configuration.SubtitleLanguagePreference
|
||||||
for each stream in MediaStreams
|
for each stream in MediaStreams
|
||||||
if stream.type = "Subtitle" then
|
if stream.type = "Subtitle" then
|
||||||
|
|
|
@ -101,7 +101,6 @@ function lastFocusedChild(obj as object) as object
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function show_dialog(message as string, options = [], defaultSelection = 0) as integer
|
function show_dialog(message as string, options = [], defaultSelection = 0) as integer
|
||||||
group = m.scene.focusedChild
|
|
||||||
lastFocus = lastFocusedChild(m.scene)
|
lastFocus = lastFocusedChild(m.scene)
|
||||||
'We want to handle backPressed instead of the main loop
|
'We want to handle backPressed instead of the main loop
|
||||||
m.scene.unobserveField("backPressed")
|
m.scene.unobserveField("backPressed")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user