HMS

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

commit d04876fb4fc75e7640e1566565f95297bce5098a
parent df721073c5bc4a5ee43496a9097a47a3bd81911c
Author: Brian C. Lane <bcl@brianlane.com>
Date:   Fri, 15 Oct 2010 22:15:03 -0700

Added sort (case insensitive) of the list

Diffstat:
MHMS/source/appDisplayDirectory.brs | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/HMS/source/appDisplayDirectory.brs b/HMS/source/appDisplayDirectory.brs @@ -33,7 +33,12 @@ Sub displayDirectory( url ) As Void displayList = displayVideos(files) end if + Sort( displayList, function(k) + return LCase(k[0]) + end function) + for each f in displayList + print f[0] print f[1] end for End Sub @@ -52,7 +57,7 @@ Sub displayVideos( files As Object ) As Object p = CreateObject("roPath", "pkg:/" + f) if p.IsValid() then fileType = videoTypes[p.Split().extension.mid(1)] - if fileType = true then + if f.Right(1) = "/" or fileType = true then list.push([f, p.Split()]) end if end if