HMS

Home Media Server for Roku Players
git clone https://www.brianlane.com/git/HMS
Log | Files | Refs | README | LICENSE

ValidateURLTask.brs (836B)


      1 '********************************************************************
      2 '**  Home Media Server Application - ValidateURLTask
      3 '**  Copyright (c) 2022 Brian C. Lane All Rights Reserved.
      4 '********************************************************************
      5 sub Init()
      6     print "ValidateURLTask->Init()"
      7     m.top.functionName = "ValidateURL"
      8 end sub
      9 
     10 ' ValidateURL is executed when  m.validateURLTask.control = "run"
     11 ' It checks serverurl and sets valid to true/false
     12 sub ValidateURL()
     13     print "ValidateURLTask->GetContent()"
     14     print m.top.serverurl
     15 
     16     valid = isURLValid(m.top.serverurl)
     17     if valid then
     18         print "Is VALID"
     19 
     20         ' See if there is a keystore available
     21         m.top.keystore = isUrlValid(m.top.serverurl+"/keystore/version")
     22     else
     23         print "Is NOT VALID"
     24     end if
     25     m.top.valid = valid
     26 end sub