Project

General

Profile

Feature #1959 » tvheadend-network-tags.patch

Paolo Roascio, 2015-07-02 15:03

View differences:

tvheadend-master/src/api/api_service.c 2015-06-30 10:48:59.285404707 +0200
42 42
  get_u32(encrypted);
43 43
  get_u32(merge_same_name);
44 44
  get_u32(provider_tags);
45
  get_u32(network_tags);
45 46
  
46 47
  pthread_mutex_lock(&global_lock);
47 48
  service_mapper_start(&conf, uuids);
tvheadend-master/src/service_mapper.c 2015-07-02 09:24:31.285981279 +0200
255 255
      if ((prov = s->s_provider_name(s)))
256 256
        channel_tag_map(channel_tag_find_by_name(prov, 1), chn, chn);
257 257

  
258
    /* Network */
259
    if (service_mapper_conf.network_tags) {
260
      source_info_t si;
261
      s->s_setsourceinfo(s, &si);
262
      channel_tag_map(channel_tag_find_by_name(si.si_network, 1), chn, chn);
263
    }
264

  
258 265
    /* save */
259 266
    idnode_notify_changed(&chn->ch_id);
260 267
    channel_save(chn);
tvheadend-master/src/service_mapper.h 2015-06-30 11:39:22.240253636 +0200
27 27
  int encrypted;          ///< Include encrypted services
28 28
  int merge_same_name;    ///< Merge entries with the same name
29 29
  int provider_tags;      ///< Create tags based on provider name
30
  int network_tags;       ///< Create tags based on network name (useful for multi adapter equipments)
30 31
} service_mapper_conf_t;
31 32

  
32 33
typedef struct service_mapper_status
tvheadend-master/src/webui/static/app/servicemapper.js 2015-06-30 10:52:23.853861096 +0200
105 105
        fieldLabel: _('Create provider tags'),
106 106
        checked: false
107 107
    });
108
    var nettagCheck = new Ext.form.Checkbox({
109
        name: 'network_tags',
110
        fieldLabel: _('Create network tags'),
111
        checked: false
112
    });
108 113

  
109 114
    // TODO: provider list
110
    items = [availCheck, ftaCheck, mergeCheck, provtagCheck];
115
    items = [availCheck, ftaCheck, mergeCheck, provtagCheck, nettagCheck];
111 116

  
112 117
    /* Form */
113 118
    var undoBtn = new Ext.Button({
(2-2/2)