longer sdt timeout (needed for "dish network" scan)
[enigma2.git] / lib / service / servicedvb.cpp
index c97980fd0f0272a8e0198c0221db51209561bd20..e62d7783e8104b2eb7c49837ebd48d1d58fd8dd7 100644 (file)
@@ -336,6 +336,7 @@ public:
        int isPlayable(const eServiceReference &ref, const eServiceReference &ignore) { return 1; }
        int getInfo(const eServiceReference &ref, int w);
        std::string getInfoString(const eServiceReference &ref,int w);
+       PyObject *getInfoObject(const eServiceReference &r, int what);
 };
 
 DEFINE_REF(eStaticServiceDVBPVRInformation);
@@ -400,6 +401,8 @@ int eStaticServiceDVBPVRInformation::getInfo(const eServiceReference &ref, int w
                return iServiceInformation::resIsString;
        case iServiceInformation::sServiceref:
                return iServiceInformation::resIsString;
+       case iServiceInformation::sFileSize:
+               return m_parser.m_filesize;
        case iServiceInformation::sTimeCreate:
                if (m_parser.m_time_create)
                        return m_parser.m_time_create;
@@ -425,6 +428,17 @@ std::string eStaticServiceDVBPVRInformation::getInfoString(const eServiceReferen
        }
 }
 
+PyObject *eStaticServiceDVBPVRInformation::getInfoObject(const eServiceReference &r, int what)
+{
+       switch (what)
+       {
+       case iServiceInformation::sFileSize:
+               return PyLong_FromLongLong(m_parser.m_filesize);
+       default:
+               Py_RETURN_NONE;
+       }
+}
+
 RESULT eStaticServiceDVBPVRInformation::getEvent(const eServiceReference &ref, ePtr<eServiceEvent> &evt, time_t start_time)
 {
        if (!ref.path.empty())
@@ -1515,7 +1529,7 @@ int eDVBServicePlay::getInfo(int w)
                int aspect = -1;
                if (m_decoder)
                        aspect = m_decoder->getVideoAspect();
-               if (no_program_info)
+               if (aspect == -1 && no_program_info)
                        break;
                else if (aspect == -1 && !program.videoStreams.empty() && program.videoStreams[0].component_tag != -1)
                {