If inExtinf
maPath = rePath.Match (line)
If maPath.Count () = 2
path = maPath [1]
m3u8List.Push ({
Title: title,
Length: length,
HDPosterUrl: "pkg:/images/HD/" + title + ".jpg",
SDPosterUrl: "pkg:/images/SD/" + title + ".jpg",
If Title = "Example"
ShortDescriptionLine1: "Example 1",
ShortDescriptionLine2: "Example 2",
Endif
Stream: {Url: path + streamid}
bitrate: 0
StreamFormat: "hls"
SwitchingStrategy: "full-adaptation"
})
inExtinf = False
Endif
Endif
"JamesChannel" wrote:
Hello, I'm trying to modify a section of code to add an If statement if title = example but getting that error when trying to side load to my Roku;
If inExtinf
maPath = rePath.Match (line)
If maPath.Count () = 2
path = maPath [1]
m3u8List.Push ({
Title: title,
Length: length,
HDPosterUrl: "pkg:/images/HD/" + title + ".jpg",
SDPosterUrl: "pkg:/images/SD/" + title + ".jpg",
If Title = "Example"
ShortDescriptionLine1: "Example 1",
ShortDescriptionLine2: "Example 2",
Endif
Stream: {Url: path + streamid}
bitrate: 0
StreamFormat: "hls"
SwitchingStrategy: "full-adaptation"
})
inExtinf = False
Endif
Endif
it just reads a M3U file and the "HDPosterUrl: "pkg:/images/HD/" + title + ".jpg"," part works and grabs the correct image depending on the title that is fed through but now I'm trying to add a few If statements to display a different "ShortDescriptionLine1" depending on the title but not working. Probably have the syntax wrong 😞
I wish there was a program you could run the script through to check for errors before zipping and installing on the Roku.
If Title = "Example"
If inExtinf
maPath = rePath.Match (line)
If maPath.Count () = 2
path = maPath [1]
aa = {
Title: title,
Length: length,
HDPosterUrl: "pkg:/images/HD/" + title + ".jpg",
SDPosterUrl: "pkg:/images/SD/" + title + ".jpg",
Stream: {Url: path + streamid}
bitrate: 0
StreamFormat: "hls"
SwitchingStrategy: "full-adaptation"
}
If title = "Example"
aa.ShortDescriptionLine1 = "Example 1"
aa.ShortDescriptionLine2 = "Example 2"
Endif
m3u8List.Push (aa)
inExtinf = False
Endif
Endif
If title = "Example"
aa.ShortDescriptionLine1 = "Example 1"
aa.ShortDescriptionLine2 = "Example 2"
Endif
If title = "ExampleOne"
aa.ShortDescriptionLine1 = "Example One"
aa.ShortDescriptionLine2 = "Example One2"
Endif
If title = "ExampleTwo"
aa.ShortDescriptionLine1 = "Example Two"
aa.ShortDescriptionLine2 = "Example Two2"
Endif
m3u8List.Push (aa)