diff options
| author | Felix Domke <tmbinc@2mac.waldobjekt.org> | 2009-06-15 02:05:00 +0200 |
|---|---|---|
| committer | Felix Domke <tmbinc@2mac.waldobjekt.org> | 2009-06-15 02:05:00 +0200 |
| commit | 17d12fc3339d68b023ab6f388a3576af2bcb4949 (patch) | |
| tree | e1851fd7e7f2ab85b667415ee0158185034b7ce3 /lib | |
| parent | c68943c97eeb0107f724ec96aae311e319c750a9 (diff) | |
| download | enigma2-17d12fc3339d68b023ab6f388a3576af2bcb4949.tar.gz enigma2-17d12fc3339d68b023ab6f388a3576af2bcb4949.zip | |
use ::getInfoObject for filesize (allows >4G)
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/python/Components/Converter/MovieInfo.py | 2 | ||||
| -rw-r--r-- | lib/service/servicedvb.cpp | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/lib/python/Components/Converter/MovieInfo.py b/lib/python/Components/Converter/MovieInfo.py index 635cedc4..d5995fe8 100644 --- a/lib/python/Components/Converter/MovieInfo.py +++ b/lib/python/Components/Converter/MovieInfo.py @@ -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) diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index c256213d..70675fd7 100644 --- a/lib/service/servicedvb.cpp +++ b/lib/service/servicedvb.cpp @@ -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()) |
