use ::getInfoObject for filesize (allows >4G)
authorFelix Domke <tmbinc@2mac.waldobjekt.org>
Mon, 15 Jun 2009 00:05:00 +0000 (02:05 +0200)
committerFelix Domke <tmbinc@2mac.waldobjekt.org>
Mon, 15 Jun 2009 00:05:00 +0000 (02:05 +0200)
lib/python/Components/Converter/MovieInfo.py
lib/service/servicedvb.cpp

index 635cedc..d5995fe 100644 (file)
@@ -41,7 +41,7 @@ class MovieInfo(Converter, object):
                                rec_ref_str = info.getInfoString(service, iServiceInformation.sServiceref)
                                return ServiceReference(rec_ref_str).getServiceName()
                        elif self.type == self.MOVIE_REC_FILESIZE:
-                               return "%d MB" % (info.getInfo(service, iServiceInformation.sFileSize) / (1024*1024))
+                               return "%d MB" % (info.getInfoObject(service, iServiceInformation.sFileSize) / (1024*1024))
                return ""
 
        text = property(getText)
index c256213..70675fd 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);
@@ -427,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())