HMS

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

commit 6e8aa3659db9b3c2ca189b2aa861281fc02e2a67
parent 4fc2d8be36be7f84fc6d9b08f253a4b104560a7a
Author: Brian C. Lane <bcl@brianlane.com>
Date:   Tue, 26 Oct 2010 07:59:23 -0700

Add check for directories inside movie directory

Diffstat:
MHMS/source/appDisplayDirectory.brs | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/HMS/source/appDisplayDirectory.brs b/HMS/source/appDisplayDirectory.brs @@ -116,6 +116,8 @@ Function showCategories( screen As Object, files As Object, dir as Object, url a list = CreateObject("roArray", files.Count(), true) for each f in files + print f[0] + o = CreateObject("roAssociativeArray") o.ContentType = "episode" o.ShortDescriptionLine1 = f[1]["basename"] @@ -211,10 +213,12 @@ Function showMovies( screen As Object, files As Object, dir as Object, url as St else if msg.isListItemSelected() then print "msg: ";msg.GetMessage();" idx: ";msg.GetIndex() ' If the selected entry is a directory, return it + if (files[msg.GetIndex()][0].Right(1) = "/") + return files[msg.GetIndex()] + else ' If it is a movie, play it - - - return files[msg.GetIndex()] + print "Play movie here" + end if end if end while End Function