diff -Naur tvheadend-master.orig/src/api/api_service.c tvheadend-master/src/api/api_service.c --- tvheadend-master.orig/src/api/api_service.c 2015-06-28 16:56:23.000000000 +0200 +++ tvheadend-master/src/api/api_service.c 2015-06-30 10:48:59.285404707 +0200 @@ -42,6 +42,7 @@ get_u32(encrypted); get_u32(merge_same_name); get_u32(provider_tags); + get_u32(network_tags); pthread_mutex_lock(&global_lock); service_mapper_start(&conf, uuids); diff -Naur tvheadend-master.orig/src/service_mapper.c tvheadend-master/src/service_mapper.c --- tvheadend-master.orig/src/service_mapper.c 2015-06-28 16:56:23.000000000 +0200 +++ tvheadend-master/src/service_mapper.c 2015-07-02 09:24:31.285981279 +0200 @@ -255,6 +255,13 @@ if ((prov = s->s_provider_name(s))) channel_tag_map(channel_tag_find_by_name(prov, 1), chn, chn); + /* Network */ + if (service_mapper_conf.network_tags) { + source_info_t si; + s->s_setsourceinfo(s, &si); + channel_tag_map(channel_tag_find_by_name(si.si_network, 1), chn, chn); + } + /* save */ idnode_notify_changed(&chn->ch_id); channel_save(chn); diff -Naur tvheadend-master.orig/src/service_mapper.h tvheadend-master/src/service_mapper.h --- tvheadend-master.orig/src/service_mapper.h 2015-06-28 16:56:23.000000000 +0200 +++ tvheadend-master/src/service_mapper.h 2015-06-30 11:39:22.240253636 +0200 @@ -27,6 +27,7 @@ int encrypted; ///< Include encrypted services int merge_same_name; ///< Merge entries with the same name int provider_tags; ///< Create tags based on provider name + int network_tags; ///< Create tags based on network name (useful for multi adapter equipments) } service_mapper_conf_t; typedef struct service_mapper_status diff -Naur tvheadend-master.orig/src/webui/static/app/servicemapper.js tvheadend-master/src/webui/static/app/servicemapper.js --- tvheadend-master.orig/src/webui/static/app/servicemapper.js 2015-06-28 16:56:23.000000000 +0200 +++ tvheadend-master/src/webui/static/app/servicemapper.js 2015-06-30 10:52:23.853861096 +0200 @@ -105,9 +105,14 @@ fieldLabel: _('Create provider tags'), checked: false }); + var nettagCheck = new Ext.form.Checkbox({ + name: 'network_tags', + fieldLabel: _('Create network tags'), + checked: false + }); // TODO: provider list - items = [availCheck, ftaCheck, mergeCheck, provtagCheck]; + items = [availCheck, ftaCheck, mergeCheck, provtagCheck, nettagCheck]; /* Form */ var undoBtn = new Ext.Button({