Fix a bug causing channel <> tags mapping not to be restored on load.

This commit is contained in:
Andreas Öman 2009-07-18 19:04:13 +00:00
parent f2988f68f2
commit 47ab30fc92
2 changed files with 8 additions and 3 deletions

2
debian/changelog vendored
View file

@ -64,6 +64,8 @@ hts-tvheadend (2.3) hts; urgency=low
all tuning parameters manually
Ticket #37
* Fix a bug causing channel <> tags mapping not to be restored on load.
hts-tvheadend (2.2) hts; urgency=low
* Set $HOME so forked processes (XMLTV) will have correct environment

View file

@ -241,6 +241,7 @@ channel_load_one(htsmsg_t *c, int id)
htsmsg_t *tags;
htsmsg_field_t *f;
channel_tag_t *ct;
char buf[32];
if(name == NULL)
return;
@ -272,9 +273,11 @@ channel_load_one(htsmsg_t *c, int id)
if((tags = htsmsg_get_list(c, "tags")) != NULL) {
HTSMSG_FOREACH(f, tags) {
if(f->hmf_type == HMF_STR &&
(ct = channel_tag_find(f->hmf_str, 0)) != NULL) {
channel_tag_map(ch, ct, 1);
if(f->hmf_type == HMF_S64) {
snprintf(buf, sizeof(buf), "%lld", f->hmf_s64);
if((ct = channel_tag_find(buf, 0)) != NULL)
channel_tag_map(ch, ct, 1);
}
}
}