From 71f462cdf4708b7132c96aeee1fa69907a97c810 Mon Sep 17 00:00:00 2001 From: Chris Pinkham Date: Wed, 18 Jul 2012 16:10:57 -0700 Subject: [PATCH] Make HLS encoder debugging a little easier. Add the ability to search by recording title/subtitle/description in the hlstest.qsp HLS demo page. --- mythtv/html/samples/hlstest.qsp | 152 +++++++++++++++++++++----------- 1 file changed, 102 insertions(+), 50 deletions(-) diff --git a/mythtv/html/samples/hlstest.qsp b/mythtv/html/samples/hlstest.qsp index feff71c4e91..f432ea6fe96 100644 --- a/mythtv/html/samples/hlstest.qsp +++ b/mythtv/html/samples/hlstest.qsp @@ -168,72 +168,119 @@ function addStream() { }); } +function getFormStart() { + var str = ""; + + str += "
"; + str += "Width: "; + str += "   "; + str += "Height:
"; + str += "Bitrate: "; + str += "   "; + str += "Audio:
"; + str += ""; + str += "
"; + + return str; +} + +function getFormEnd() { + var str = ""; + + str += "
"; + + return str; +} + function listFiles() { var group = $("#sgName").val(); var filter = $("#sgFilter").val().toLowerCase(); $("#links").html("Loading..."); $.getJSON("/Content/GetFileList", { StorageGroup: group }, function(data) { $("#links").html(""); - var str = "
"; - str += "Width: "; - str += "   "; - str += "Height:
"; - str += "Bitrate: "; - str += "   "; - str += "Audio:
"; - str += ""; - str += "
"; + var str = getFormStart(); $.each(data.StringList, function(i, value) { if ((filter.length == 0) || (value.toLowerCase().indexOf(filter) >= 0)) { - var tmpGroup = "'" + group + "'"; var tmpValue = "'" + value + "'"; str += '' + value + "
"; } }); - str += "
"; + + str += getFormEnd(); $("#links").html(str); }); } + +function listRecordings() { + var filter = $("#recFilter").val().toLowerCase(); + + $("#links").html("Loading..."); + $.getJSON("/Dvr/GetRecordedList", + { Descending: 1, StartIndex: 0, nCount: 20000 }, function(data) { + $("#links").html(""); + + var str = getFormStart(); + + $.each(data.ProgramList.Programs, function(i, value) { + if ((filter.length == 0) || + (value.SubTitle.toLowerCase().indexOf(filter) >= 0) || + (value.Title.toLowerCase().indexOf(filter) >= 0) || + (value.Description.toLowerCase().indexOf(filter) >= 0) || + (value.FileName.toLowerCase().indexOf(filter) >= 0) + ) { + var tmpValue = "'" + value + "'"; + str += + '' + + value.Title + " - " + value.SubTitle + " (" + value.FileName + ")" + "
"; + } + }); + + str += getFormEnd(); + + $("#links").html(str); + }); +} + HTTP Live Stream Demo (Refresh)
@@ -243,8 +290,8 @@ function listFiles() {
- - Storage Group: + Storage Groups:
+ Group:   -
+
+
+ Recordings:
+ Filter:   + +