diff --git a/eepg.c b/eepg.c
index f55f9ed..352b364 100644
--- a/eepg.c
+++ b/eepg.c
@@ -623,6 +623,61 @@ void load_theme_dictionaries (void)
 
 }
 
+void load_sky_genre_user_map (void)
+{
+  char Buffer[1024];
+  char *Line;
+  FILE *File;
+
+  LogD (0, prep("start "));
+  DIR *dp = opendir(cSetupEEPG::getInstance()->getConfDir());
+  if(!dp) {
+    LogE (0, prep("Can't read configuration folder '%s'"), cSetupEEPG::getInstance()->getConfDir());
+    return;
+  }
+  closedir(dp);
+
+  for (int table = 0; table < 2; table++) {
+
+    LogD (0, prep("table %d "), table);
+    if (skyGenreDict[table].size() > 0)
+      skyGenreDict[table].clear();
+
+    string fname = string(cSetupEEPG::getInstance()->getConfDir()) + (table ? "/sky_uk.genres" : "/sky_it.genres");
+   LogD (0, prep("file %s "), fname.c_str());
+ 
+    File = fopen (fname.c_str(), "r");
+    if (!File) continue;
+  LogD (0, prep("found "));
+
+    LogD(3, prep("Found user Genre Mapping '%s'."), fname.c_str());
+
+    memset (Buffer, 0, sizeof (Buffer));
+    uchar origGenr = 0;
+    uchar userGenr = 0;
+    while ((Line = fgets (Buffer, sizeof (Buffer), File)) != NULL) {
+      Line = compactspace (skipspace (stripspace (Line)));
+      //Skip empty and commented lines
+      if (isempty (Line) || Line[0] == '#' || Line[0] == ';') continue;
+      if (sscanf (Line, "%hhx=%hhx%*[^\n]\n", &origGenr, &userGenr) == 2) {
+
+        if (!skyGenreDict[table].count(origGenr)) {
+          skyGenreDict[table].insert(pair<uchar,uchar>(origGenr, userGenr));
+          LogD(4, prep("Original '%x' user mapping to '%x'."), origGenr, userGenr);
+        }
+      }     //if scanf
+    }      //while
+    fclose (File);
+    LogD(3, prep("Loaded %i user mappings from %s."), skyGenreDict[table].size(), fname.c_str());
+    LogD(4, prep("Original <-> User Mapping"));
+    map<uchar,uchar>::iterator it;
+    for ( it=skyGenreDict[table].begin() ; it != skyGenreDict[table].end(); it++ )
+      LogD(4, prep("%x <-> %x"), (*it).first, it->second);
+  }
+
+}
+
+
 /** \brief Decode an EPG string as necessary
  *
  *  \param src - Possibly encoded string
@@ -1405,6 +1460,16 @@ void cFilterEEPG::WriteToSchedule(tChannelID channelID, cSchedules* pSchedules,
       free(tmp);
     }
 
+#if APIVERSNUM > 10711
+    uchar Contents[MaxEventContents] = { 0 };
+    map<uchar,uchar>::iterator it;
+    if ((Format == SKY_UK || Format == SKY_IT)
+        && (it = skyGenreDict[Format == SKY_IT ? 0 : 1].find(ThemeId)) != skyGenreDict[0].end()) {
+        Contents[0] = it->second;
+        Event->SetContents(Contents);
+    }
+#endif
+
     if (SummText) {
       WrittenSummary = true;
       CleanString ((uchar *) SummText);
@@ -2637,7 +2702,7 @@ void cFilterEEPG::LoadIntoSchedule (void)
           }
 
           index++;
-          if ((StartTime + T->Duration) < too_old) {
+          if ((StartTime + (int)T->Duration) < too_old) {
             LogD(3, prep("Skipping old event '%s', start time:%s"), T->Text, ctime (&StartTime));
             OldEvents++;
             continue;
@@ -2691,7 +2756,7 @@ void cFilterEEPG::LoadIntoSchedule (void)
 //      esyslog("EEPG Error: lost sync at title %d, summary %d.",i,j);
         } else if (j == (remembersummary - 1) || SummIndex !=-1) { //the last summary to be checked has failed also
           //esyslog ("EEPG Error: could not find summary for summary-available Title %d.", i);
-          if ((T->StartTime + T->Duration) < too_old) {
+          if ((T->StartTime + T->Duration) < (uint)too_old) {
             LogD(3, prep("Skipping old event '%s' without summary, start time:%s"), T->Text, ctime ((time_t*)&T->StartTime));
             OldEvents++;
           } else {
@@ -3663,6 +3728,7 @@ bool cPluginEEPG::Start (void)
   CheckCreateFile("freesat.t1", FreesatT1);
   CheckCreateFile("freesat.t2", FreesatT2);
   load_theme_dictionaries();
+  load_sky_genre_user_map();
 
   sky_tables[0] = NULL;
   sky_tables[1] = NULL;
diff --git a/util.c b/util.c
index 0373d1a..ed3d15c 100644
--- a/util.c
+++ b/util.c
@@ -27,6 +27,7 @@ int YesterdayEpochUTC;
 struct hufftab *tables[2][128];
 int table_size[2][128];
 map<string,string> tableDict;
+map<uchar,uchar> skyGenreDict[2];
 
 cEquivHandler* EquivHandler;
 
diff --git a/util.h b/util.h
index b72aaa1..70a57d6 100644
--- a/util.h
+++ b/util.h
@@ -103,6 +103,7 @@ extern struct hufftab *tables[2][128];
 extern int table_size[2][128];
 //static sNodeH* sky_tables[2];
 extern std::map<std::string,std::string> tableDict;
+extern std::map<unsigned char,unsigned char> skyGenreDict[2];
 
 
 class cCharsetFixer
