From ca742e00a7717787351e1a432ca9b41f93369d60 Mon Sep 17 00:00:00 2001 From: Ian Date: Thu, 28 Aug 2014 15:22:26 +0100 Subject: [PATCH] autorec: restore channel tag function in idnode model --- src/dvr/dvr_autorec.c | 2 +- src/webui/static/app/epg.js | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/dvr/dvr_autorec.c b/src/dvr/dvr_autorec.c index 21cadbb3..f477d396 100644 --- a/src/dvr/dvr_autorec.c +++ b/src/dvr/dvr_autorec.c @@ -560,7 +560,7 @@ _dvr_autorec_add(const char *config_name, dae->dae_title = strdup(title); } - if(tag != NULL && (ct = channel_tag_find_by_name(tag, 0)) != NULL) { + if(tag != NULL && (ct = channel_tag_find_by_uuid(tag)) != NULL) { LIST_INSERT_HEAD(&ct->ct_autorecs, dae, dae_channel_tag_link); dae->dae_channel_tag = ct; } diff --git a/src/webui/static/app/epg.js b/src/webui/static/app/epg.js index 5708df16..add7723f 100644 --- a/src/webui/static/app/epg.js +++ b/src/webui/static/app/epg.js @@ -49,6 +49,17 @@ tvheadend.channelLookupName = function(key) { return channelString; }; +tvheadend.tagLookupName = function(key) { + tagString = ""; + + var index = tvheadend.channelTags.find('key', key); + + if (index !== -1) + var tagString = tvheadend.channelTags.getAt(index).get('val'); + + return tagString; +}; + // Store for duration filters - EPG, autorec dialog and autorec rules in the DVR grid // NB: 'no max' is defined as 9999999s, or about 3 months... @@ -637,7 +648,7 @@ tvheadend.epg = function() { : "Don't care"; var channel = epgStore.baseParams.channel ? tvheadend.channelLookupName(epgStore.baseParams.channel) : "Don't care"; - var tag = epgStore.baseParams.tag ? epgStore.baseParams.tag + var tag = epgStore.baseParams.tag ? tvheadend.tagLookupName(epgStore.baseParams.tag) : "Don't care"; var contenttype = epgStore.baseParams.contenttype ? tvheadend.contentGroupLookupName(epgStore.baseParams.contenttype) : "Don't care";