Skip to content

Commit

Permalink
Server: IndexHandler should put out an ordered mount list
Browse files Browse the repository at this point in the history
  • Loading branch information
nmaier committed Jun 9, 2013
1 parent 6ee0c26 commit fab5495
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/Handlers/IndexHandler.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using NMaier.SimpleDlna.Utilities;
using System.Linq;

namespace NMaier.SimpleDlna.Server
{
Expand Down Expand Up @@ -28,7 +29,8 @@ public IResponse HandleRequest(IRequest req)
var document = article.OwnerDocument;

var list = document.EL("ul");
foreach (var m in owner.MediaMounts) {
var mounts = owner.MediaMounts.OrderBy(m => { return m.Value; }, NaturalStringComparer.CurrentCultureIgnoreCase);
foreach (var m in mounts) {
var li = document.EL("li");
li.AppendChild(document.EL("a", new AttributeCollection() { { "href", m.Key } }, m.Value));
list.AppendChild(li);
Expand Down

0 comments on commit fab5495

Please sign in to comment.