diff --git a/interfaces/default/js/tvheadend.js b/interfaces/default/js/tvheadend.js
index 3b62fc484..1862fa624 100644
--- a/interfaces/default/js/tvheadend.js
+++ b/interfaces/default/js/tvheadend.js
@@ -67,6 +67,8 @@ function getChannelTags() {
$(".tab-content").append(strTabPane.append($("
").attr("id", "tag-" + pEntry.identifier + "-grid").attr("class", "thumbnails")));
});
+
+ getChannels();
});
$(window).trigger("hashchange");
@@ -142,6 +144,5 @@ function getRecordings() {
$(document).ready(function () {
getChannelTags();
- getChannels();
getRecordings();
});
\ No newline at end of file
diff --git a/modules/tvheadend.py b/modules/tvheadend.py
index 9f1a651aa..9c903bf41 100644
--- a/modules/tvheadend.py
+++ b/modules/tvheadend.py
@@ -35,7 +35,7 @@ def GetEPG(self, strLimit = "300", strChannel = ""):
@cherrypy.expose()
@cherrypy.tools.json_out()
def GetChannels(self):
- return self.fetch("api/channel/grid", None)
+ return self.fetch("api/channel/grid", { 'dir': 'ASC', 'sort': 'tags', 'limit': 1000 })
@cherrypy.expose()
@cherrypy.tools.json_out()
@@ -71,7 +71,7 @@ def fetch(self, strQuery, rgpData):
try:
pRequest = urllib2.Request("http://%s:%s/%s" % (htpc.settings.get("tvheadend_host", ""), htpc.settings.get("tvheadend_port", ""), strQuery), data = strData, headers = rgpHeaders)
strResponse = urllib2.urlopen(pRequest).read()
- except urllib2.HTTPError, e:
- print e
+ except:
+ pass
return json.loads(strResponse)
\ No newline at end of file