autorec: restore channel tag function in idnode model

This commit is contained in:
Ian 2014-08-28 15:22:26 +01:00 committed by Jaroslav Kysela
parent 999d184d69
commit ca742e00a7
2 changed files with 13 additions and 2 deletions

View file

@ -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;
}

View file

@ -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() {
: "<i>Don't care</i>";
var channel = epgStore.baseParams.channel ? tvheadend.channelLookupName(epgStore.baseParams.channel)
: "<i>Don't care</i>";
var tag = epgStore.baseParams.tag ? epgStore.baseParams.tag
var tag = epgStore.baseParams.tag ? tvheadend.tagLookupName(epgStore.baseParams.tag)
: "<i>Don't care</i>";
var contenttype = epgStore.baseParams.contenttype ? tvheadend.contentGroupLookupName(epgStore.baseParams.contenttype)
: "<i>Don't care</i>";