SceneGraph URL backup

Hello, with the SceneGraph channel we have to change the URL to our own file on line 22 but I was wondering how do I edit that so that if one link is down then to check another? Thanks

  'Variables for storing node selected and position
  m.node  = invalid
  m.array = invalid
  m.UriHandler  = createObject("roSGNode","UriHandler")
  url = "https://devtools.web.roku.com/videoplayer/xml/categories.xml"   ' < ------ Line 22: URL to change to our own server
  makeRequest({}, url, "GET", 0, "")
  m.UriHandler.observeField("content","onContentSet")
  m.UriHandler.observeField("categorycontent","onCategoryContentSet")
  m.RegistryTask.observeField("result","onReadFinished")

in the onError callback make a new request with the updated URL. if you use the same callback for both, put a counter or flag to prevent an infinite loop in the event your backup URL is also erroring.

Looking at the project you’re using,
https://github.com/rokudev/videoplayer- … andler.brs
there’s no failure callback so you’d want to trigger this on line 166, which appears to happen after 3 failed attempts.

Thanks for the info. Now if I just knew how to do that :disappointed_face:

Some coding help here would be much appreciated. Thank you