def playService(self, ref, checkParentalControl = True, forceRestart = False):
oldref = self.currentlyPlayingServiceReference
if ref and oldref and ref == oldref and not forceRestart:
- print "ignore request to play already running service"
+ print "ignore request to play already running service(1)"
return 0
print "playing", ref and ref.toString()
if ref is None:
if not oldref:
oldref = eServiceReference()
playref = getBestPlayableServiceReference(ref, oldref)
+ print "playref", playref
+ if playref and oldref and playref == oldref and not forceRestart:
+ print "ignore request to play already running service(2)"
+ return 0
if not playref or (checkParentalControl and not parentalControl.isServicePlayable(playref, boundFunction(self.playService, checkParentalControl = False))):
self.stopService()
return 0
DEFINE_REF(eServiceDVD);
eServiceDVD::eServiceDVD(eServiceReference ref):
- m_ref(ref),
- m_ddvdconfig(ddvd_create()),
- m_subtitle_widget(0),
- m_state(stIdle),
- m_current_trick(0),
- m_pump(eApp, 1)
+ m_ref(ref), m_ddvdconfig(ddvd_create()), m_subtitle_widget(0), m_state(stIdle),
+ m_current_trick(0), m_pump(eApp, 1), m_width(-1), m_height(-1),
+ m_aspect(-1), m_framerate(-1), m_progressive(-1)
{
int aspect = DDVD_16_9;
int policy = DDVD_PAN_SCAN;
m_event(this, evSeekableStatusChanged);
m_event(this, evUser+12);
break;
+#ifdef DDVD_SUPPORTS_PICTURE_INFO
+ case DDVD_SIZE_CHANGED:
+ {
+ int changed = m_width != -1 && m_height != -1 && m_aspect != -1;
+ ddvd_get_last_size(m_ddvdconfig, &m_width, &m_height, &m_aspect);
+ if (changed)
+ m_event((iPlayableService*)this, evVideoSizeChanged);
+ break;
+ }
+ case DDVD_PROGRESSIVE_CHANGED:
+ {
+ int changed = m_progressive != -1;
+ ddvd_get_last_progressive(m_ddvdconfig, &m_progressive);
+ if (changed)
+ m_event((iPlayableService*)this, evVideoProgressiveChanged);
+ break;
+ }
+ case DDVD_FRAMERATE_CHANGED:
+ {
+ int changed = m_framerate != -1;
+ ddvd_get_last_framerate(m_ddvdconfig, &m_framerate);
+ if (changed)
+ m_event((iPlayableService*)this, evVideoFramerateChanged);
+ break;
+ }
+#endif
default:
break;
}
case sUser+7:
case sUser+8:
return resIsPyObject;
+#ifdef DDVD_SUPPORTS_PICTURE_INFO
+ case sVideoWidth:
+ return m_width;
+ case sVideoHeight:
+ return m_height;
+ case sAspect:
+ return m_aspect;
+ case sProgressive:
+ return m_progressive;
+ case sFrameRate:
+ return m_framerate;
+#endif
default:
return resNA;
}
void loadCuesheet();
void saveCuesheet();
+
+ int m_width, m_height, m_aspect, m_framerate, m_progressive;
};
#endif
def getUpdateInfos(self):
self.setState('update')
- iSoftwareTools.getUpdates(self.getUpdateInfosCB)
+ iSoftwareTools.startSoftwareTools(self.getUpdateInfosCB)
def getUpdateInfosCB(self, retval = None):
if retval is not None:
self["status"].setText(_("There are at least ") + str(iSoftwareTools.available_updates) + _(" updates available."))
else:
self["status"].setText(_("There are no updates available."))
+ self.rebuildList()
elif retval is False:
+ self.setState('error')
self["status"].setText(_("No network connection available."))
- self.rebuildList()
def rebuildList(self, retval = None):
if self.currentSelectedTag is None:
return [ ]
return [(_("Software management"), UpgradeMain, "software_manager", 50)]
-def autostart(reason, **kwargs):
- if reason is True:
- iSoftwareTools.startSoftwareTools()
def Plugins(path, **kwargs):
global plugin_path
plugin_path = path
list = [
- PluginDescriptor(where = [PluginDescriptor.WHERE_NETWORKCONFIG_READ], fnc = autostart),
PluginDescriptor(name=_("Software management"), description=_("Manage your receiver's software"), where = PluginDescriptor.WHERE_MENU, fnc=startSetup),
PluginDescriptor(name=_("Ipkg"), where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan)
]
if mutableAlternatives:
mutableAlternatives.setListName(name)
if mutableAlternatives.addService(cur_service.ref):
- print "add", cur_service.toString(), "to new alternatives failed"
+ print "add", cur_service.ref.toString(), "to new alternatives failed"
mutableAlternatives.flushChanges()
self.servicelist.addService(new_ref.ref, True)
self.servicelist.removeCurrent()
self.pvrStateDialog.hide()
else:
self._mayShow()
-
class InfoBarTimeshiftState(InfoBarPVRState):
def __init__(self):
InfoBarPVRState.__init__(self, screen=TimeshiftState, force_show = True)
+ self.__hideTimer = eTimer()
+ self.__hideTimer.callback.append(self.__hideTimeshiftState)
def _mayShow(self):
- if self.execing and self.timeshift_enabled and self.seekstate != self.SEEK_STATE_PLAY:
+ if self.execing and self.timeshift_enabled:
self.pvrStateDialog.show()
+ if self.seekstate == self.SEEK_STATE_PLAY and not self.shown:
+ self.__hideTimer.start(5*1000, True)
+
+ def __hideTimeshiftState(self):
+ self.pvrStateDialog.hide()
class InfoBarShowMovies: