add ability to read e1 bouquets
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Sun, 18 Feb 2007 09:48:54 +0000 (09:48 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Sun, 18 Feb 2007 09:48:54 +0000 (09:48 +0000)
lib/dvb/db.cpp

index 6b6aa03..cf65569 100644 (file)
@@ -615,7 +615,7 @@ void eDVBDB::loadBouquet(const char *path)
                        break;
                if (line[0]=='#')
                {
-                       if (!strncmp(line, "#SERVICE ", 9) || !strncmp(line, "#SERVICE: ", 10))
+                       if (!strncmp(line, "#SERVICE", 8))
                        {
                                int offs = line[8] == ':' ? 10 : 9;
                                eServiceReference tmp(line+offs);
@@ -662,13 +662,17 @@ void eDVBDB::loadBouquet(const char *path)
                                read_descr=true;
                                ++entries;
                        }
-                       else if (read_descr && !strncmp(line, "#DESCRIPTION ", 13))
+                       else if (read_descr && !strncmp(line, "#DESCRIPTION", 12))
                        {
-                               e->name = line+13;
+                               int offs = line[12] == ':' ? 14 : 13;
+                               e->name = line+offs;
                                read_descr=false;
                        }
-                       else if (!strncmp(line, "#NAME ", 6))
-                               bouquet.m_bouquet_name=line+6;
+                       else if (!strncmp(line, "#NAME ", 6) || !strncmp(line, "#NAME: ", 7))
+                       {
+                               int offs = line[5] == ':' ? 7 : 6;
+                               bouquet.m_bouquet_name=line+offs;
+                       }
                        continue;
                }
        }