Don't load ap information unless we need them.
authorFelix Domke <tmbinc@elitedvb.net>
Thu, 12 Feb 2009 17:20:24 +0000 (18:20 +0100)
committerFelix Domke <tmbinc@elitedvb.net>
Thu, 12 Feb 2009 17:20:24 +0000 (18:20 +0100)
lib/service/servicedvb.cpp

index d4a3a562ab649aa7391be26a31580362ec33f40a..0f01b838fb0d4e04442220a1f9bf42393df11687 100644 (file)
@@ -370,13 +370,17 @@ int eStaticServiceDVBPVRInformation::getLength(const eServiceReference &ref)
        struct stat s;
        stat(ref.path.c_str(), &s);
 
        struct stat s;
        stat(ref.path.c_str(), &s);
 
-       if (tstools.openFile(ref.path.c_str()))
+       if (tstools.openFile(ref.path.c_str(), 1))
                return 0;
 
                        /* check if cached data is still valid */
        if (m_parser.m_data_ok && (s.st_size == m_parser.m_filesize) && (m_parser.m_length))
                return m_parser.m_length / 90000;
 
                return 0;
 
                        /* check if cached data is still valid */
        if (m_parser.m_data_ok && (s.st_size == m_parser.m_filesize) && (m_parser.m_length))
                return m_parser.m_length / 90000;
 
+                       /* open again, this time with stream info */
+       if (tstools.openFile(ref.path.c_str()))
+               return 0;
+
                        /* otherwise, re-calc length and update meta file */
        pts_t len;
        if (tstools.calcLen(len))
                        /* otherwise, re-calc length and update meta file */
        pts_t len;
        if (tstools.calcLen(len))