diff -Naur tvheadend.orig/src/api/api_service.c tvheadend/src/api/api_service.c --- tvheadend.orig/src/api/api_service.c 2015-07-11 09:49:47.000000000 +0200 +++ tvheadend/src/api/api_service.c 2015-07-11 11:51:49.792280472 +0200 @@ -43,7 +43,8 @@ get_u32(merge_same_name); get_u32(provider_tags); get_u32(network_tags); - + get_u32(language_tags); + pthread_mutex_lock(&global_lock); service_mapper_start(&conf, uuids); pthread_mutex_unlock(&global_lock); diff -Naur tvheadend.orig/src/service_mapper.c tvheadend/src/service_mapper.c --- tvheadend.orig/src/service_mapper.c 2015-07-11 09:49:47.000000000 +0200 +++ tvheadend/src/service_mapper.c 2015-07-11 11:58:57.588932277 +0200 @@ -262,6 +262,14 @@ channel_tag_map(channel_tag_find_by_name(si.si_network, 1), chn, chn); } + /* Language */ + if (service_mapper_conf.language_tags) { + elementary_stream_t *st; + TAILQ_FOREACH(st, &s->s_components, es_link) { + channel_tag_map(channel_tag_find_by_name(st->es_lang, 1), chn, chn); + } + } + /* save */ idnode_notify_changed(&chn->ch_id); channel_save(chn); diff -Naur tvheadend.orig/src/service_mapper.h tvheadend/src/service_mapper.h --- tvheadend.orig/src/service_mapper.h 2015-07-11 09:49:47.000000000 +0200 +++ tvheadend/src/service_mapper.h 2015-07-11 11:52:26.404822752 +0200 @@ -28,6 +28,7 @@ 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) + int language_tags; ///< Create tags based on language (feature request #2504) } service_mapper_conf_t; typedef struct service_mapper_status diff -Naur tvheadend.orig/src/version.c tvheadend/src/version.c --- tvheadend.orig/src/version.c 1970-01-01 01:00:00.000000000 +0100 +++ tvheadend/src/version.c 2015-07-11 11:53:01.599382759 +0200 @@ -0,0 +1 @@ +const char *tvheadend_version = "4.1-356~gd9de91c-dirty"; diff -Naur tvheadend.orig/src/webui/static/app/servicemapper.js tvheadend/src/webui/static/app/servicemapper.js --- tvheadend.orig/src/webui/static/app/servicemapper.js 2015-07-11 13:37:23.675156368 +0200 +++ tvheadend/src/webui/static/app/servicemapper.js 2015-07-11 13:30:36.515246568 +0200 @@ -110,9 +110,14 @@ fieldLabel: _('Create network tags'), checked: false }); + var langtagCheck = new Ext.form.Checkbox({ + name: 'language_tags', + fieldLabel: _('Create ISO-639 language tags'), + checked: false + }); // TODO: provider list - items = [availCheck, ftaCheck, mergeCheck, provtagCheck, nettagCheck]; + items = [availCheck, ftaCheck, mergeCheck, provtagCheck, nettagCheck, langtagCheck]; /* Form */ var undoBtn = new Ext.Button({