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 635cedc4795a98dae3ee8cfc0eed2f7eb886c42f..d5995fe85f5e2eaca3596ee07940ab6ccb30a39f 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 c256213d05373ed64a276cf9d0771d5f92cc9fb7..70675fd7cf73051fc2d67b97f5bc555b1653d68e 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())