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)
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);
}
}
+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())