Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dreinhard
Visitor

matchfiles call

Hello,

Do any devs have a good example on how to use the matchfiles call when trying enum filenames from a URL that meet the *.mp4 criteria? I keep getting an "Invalid or missing PHY in path" error in the debugger. Thanks in advance.

Dave
0 Kudos
7 REPLIES 7
nowhereman
Visitor

Re: matchfiles call

"dreinhard" wrote:
Hello,

Do any devs have a good example on how to use the matchfiles call when trying enum filenames from a URL that meet the *.mp4 criteria? I keep getting an "Invalid or missing PHY in path" error in the debugger. Thanks in advance.

Dave


I haven't tried it, but I don't think MatchFiles() will work with remote URLs. It's meant for use with the local file system.
twitter:nowhereman
http://www.thenowhereman.com/roku
http://www.thenowhereman.com/netflix
0 Kudos
dreinhard
Visitor

Re: matchfiles call

"nowhereman" wrote:
"dreinhard" wrote:
Hello,

Do any devs have a good example on how to use the matchfiles call when trying enum filenames from a URL that meet the *.mp4 criteria? I keep getting an "Invalid or missing PHY in path" error in the debugger. Thanks in advance.

Dave


I haven't tried it, but I don't think MatchFiles() will work with remote URLs. It's meant for use with the local file system.


Thanks for the fast reply! Local file system meaning on the RVP? If that is the case, that is def. not what i need. Is there a call to enumerate files from a URL location? I have a few dirs. on my system with changing mp4 videos (filename changes with each new recording) and would like to enumerate these files so I can parse out part of the name.

Dave
0 Kudos
RokuKevin
Visitor

Re: matchfiles call

There is no call to enumerate files from a URL.... You would have to code it yourself.

--Kevin
0 Kudos
nowhereman
Visitor

Re: matchfiles call

"dreinhard" wrote:
Local file system meaning on the RVP?


Correct. I believe MatchFiles() is expecting the path argument to begin with something like pkg:/ or tmp:/. That's why you get the "Invalid or missing PHY" error when you give it a path that starts with http://

"dreinhard" wrote:
Is there a call to enumerate files from a URL location? I have a few dirs. on my system with changing mp4 videos (filename changes with each new recording) and would like to enumerate these files so I can parse out part of the name.


It sounds like the videos are hosted on a machine you control. If that's the case, your best bet is to build an XML file on the server side that contains the list of files and other pertinent data and serve that XML to the box where it can be parsed and acted on appropriately. I have been successful using such a mechanism to serve EyeTV recordings to my Roku. The videoplayer example takes this approach as well.
twitter:nowhereman
http://www.thenowhereman.com/roku
http://www.thenowhereman.com/netflix
0 Kudos
dreinhard
Visitor

Re: matchfiles call

"nowhereman" wrote:
"dreinhard" wrote:
Local file system meaning on the RVP?


Correct. I believe MatchFiles() is expecting the path argument to begin with something like pkg:/ or tmp:/. That's why you get the "Invalid or missing PHY" error when you give it a path that starts with http://

"dreinhard" wrote:
Is there a call to enumerate files from a URL location? I have a few dirs. on my system with changing mp4 videos (filename changes with each new recording) and would like to enumerate these files so I can parse out part of the name.


It sounds like the videos are hosted on a machine you control. If that's the case, your best bet is to build an XML file on the server side that contains the list of files and other pertinent data and serve that XML to the box where it can be parsed and acted on appropriately. I have been successful using such a mechanism to serve EyeTV recordings to my Roku. The videoplayer example takes this approach as well.



Thanks again for the fast reply. I do have an almost complete video center coded to my home server that is serving up tv shows, movies, etc... I just started evaluating Beyond TV and have it recording various shows to different directories on my web server. The way I have it setup is to only keep a weeks worth of content for each show I record. The problem is the file names change with each recording so in order for me to control the content to be played through the RVP, I have to figure out a way to fetch the mp4's from the specified URL's on my web server dynamically. It almost sounds like I am going to have to try a different approach.

Dave
0 Kudos
dreinhard
Visitor

Re: matchfiles call

Does anyone have a code sample on how to find a .mp4 file at a url that does not completely match the actual filename? Here is the example on what I mean:

Monday the path for a .mp4 file in will be "http://192.168.1.112/videos/TheView/TheView(actorJoeBlow)Daily.mp4"
Tuesday the path for the .mp4 file will be "http://192.168.1.112/vidoes/TheView/TheView(actressMaryBlow)Daily.mp4"
etc...
etc...
etc...

There will only be 1 .mp4 file in TheView dir at a time. The problem is the (actor....) part of the filename changes daily. Does anyone have a code sample on how I can get brightscript to look for 'TheView*Daily.mp4' at that particular URL and play it? I believe that '*' wildcard is not recognized in brightscript for URL path's but thought there might be another way to code this. Any help would be much appreciated.

Dave
0 Kudos
jjinux
Visitor

Re: matchfiles call

Well, the Roku box can't possibly know what's on the server unless the server tells it. Your best bet is to create some way for the Roku box to ask some server what the right URL is.
0 Kudos