HMS

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

commit d18c167600cd4772c556b464d4dd60ffa5eb9c05
parent b474c930747bb3e7cf5c21a844296f61db392cea
Author: Brian C. Lane <bcl@ibrianlane.com>
Date:   Sat, 24 Feb 2018 15:59:22 -0800

Assume a directory of movies if there is no directory type file

Diffstat:
MHMS/source/appMediaServer.brs | 19++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/HMS/source/appMediaServer.brs b/HMS/source/appMediaServer.brs @@ -361,17 +361,18 @@ Function getCategoryMetadata(url As String, category As String) As Object displayList = displayFiles(listing, { mp4 : true, m4v : true, mov : true, wmv : true } ) else if dirType = 4 then displayList = displayFiles(listing, { mp4 : true, m4v : true, mov : true, wmv : true } ) + else + ' Assume movies if there is no type file + displayList = displayFiles(listing, { mp4 : true, m4v : true, mov : true, wmv : true } ) end if - if dirType <> 0 then - Sort(displayList, function(k) - return LCase(k[0]) - end function) - list = CreateObject("roArray", displayList.Count(), false) - for j = 0 to displayList.Count()-1 - list.Push(MovieObject(displayList[j], cat_url, listing_hash)) - end for - end if + Sort(displayList, function(k) + return LCase(k[0]) + end function) + list = CreateObject("roArray", displayList.Count(), false) + for j = 0 to displayList.Count()-1 + list.Push(MovieObject(displayList[j], cat_url, listing_hash)) + end for return list End Function