Project

General

Profile

tvheadend-language-tags.patch

Paolo Roascio, 2015-07-11 14:04

View differences:

tvheadend/src/api/api_service.c 2015-07-11 11:51:49.792280472 +0200
43 43
  get_u32(merge_same_name);
44 44
  get_u32(provider_tags);
45 45
  get_u32(network_tags);
46
  
46
  get_u32(language_tags);
47

47 48
  pthread_mutex_lock(&global_lock);
48 49
  service_mapper_start(&conf, uuids);
49 50
  pthread_mutex_unlock(&global_lock);
tvheadend/src/service_mapper.c 2015-07-11 11:58:57.588932277 +0200
262 262
      channel_tag_map(channel_tag_find_by_name(si.si_network, 1), chn, chn);
263 263
    }
264 264

265
    /* Language */
266
    if (service_mapper_conf.language_tags) {
267
      elementary_stream_t *st;
268
      TAILQ_FOREACH(st, &s->s_components, es_link) {
269
        channel_tag_map(channel_tag_find_by_name(st->es_lang, 1), chn, chn);
270
      }
271
    }
272

265 273
    /* save */
266 274
    idnode_notify_changed(&chn->ch_id);
267 275
    channel_save(chn);
tvheadend/src/service_mapper.h 2015-07-11 11:52:26.404822752 +0200
28 28
  int merge_same_name;    ///< Merge entries with the same name
29 29
  int provider_tags;      ///< Create tags based on provider name
30 30
  int network_tags;       ///< Create tags based on network name (useful for multi adapter equipments)
31
  int language_tags;      ///< Create tags based on language (feature request #2504)
31 32
} service_mapper_conf_t;
32 33

33 34
typedef struct service_mapper_status
tvheadend/src/version.c 2015-07-11 11:53:01.599382759 +0200
1
const char *tvheadend_version = "4.1-356~gd9de91c-dirty";
tvheadend/src/webui/static/app/servicemapper.js 2015-07-11 13:30:36.515246568 +0200
110 110
        fieldLabel: _('Create network tags'),
111 111
        checked: false
112 112
    });
113
    var langtagCheck = new Ext.form.Checkbox({
114
        name: 'language_tags',
115
        fieldLabel: _('Create ISO-639 language tags'),
116
        checked: false
117
    });
113 118

114 119
    // TODO: provider list
115
    items = [availCheck, ftaCheck, mergeCheck, provtagCheck, nettagCheck];
120
    items = [availCheck, ftaCheck, mergeCheck, provtagCheck, nettagCheck, langtagCheck];
116 121

117 122
    /* Form */
118 123
    var undoBtn = new Ext.Button({