X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/ef1a9823a5da0c626766dad7afc858e15b57a2d0..51550aa81c726aedfa7159af0e67f8bcd5fb8a2f:/lib/python/Screens/ChannelSelection.py diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py index 1e7f9f2a..b203b24e 100644 --- a/lib/python/Screens/ChannelSelection.py +++ b/lib/python/Screens/ChannelSelection.py @@ -21,7 +21,6 @@ profile("ChannelSelection.py 2.3") from Components.Input import Input profile("ChannelSelection.py 3") from Components.ParentalControl import parentalControl -from Components.Pixmap import Pixmap from Screens.InputBox import InputBox, PinInput from Screens.MessageBox import MessageBox from Screens.ServiceInfo import ServiceInfo @@ -112,6 +111,8 @@ class ChannelContextMenu(Screen): else: append_when_current_valid(current, menu, (_("add service to favourites"), self.addServiceToBouquetSelected), level = 0) else: + if current_root.getPath().find('FROM SATELLITES') != -1: + append_when_current_valid(current, menu, (_("remove selected satellite"), self.removeSatelliteServices), level = 0) if haveBouquets: if not inBouquet and current_sel_path.find("PROVIDERS") == -1: append_when_current_valid(current, menu, (_("copy to bouquets"), self.copyCurrentToBouquetList), level = 0) @@ -205,6 +206,17 @@ class ChannelContextMenu(Screen): if recursive: self.close(False) + def removeSatelliteServices(self): + curpath = self.csel.getCurrentSelection().getPath() + idx = curpath.find("satellitePosition == ") + if idx != -1: + tmp = curpath[idx+21:] + idx = tmp.find(')') + if idx != -1: + satpos = int(tmp[:idx]) + eDVBDB.getInstance().removeServices(-1, -1, -1, satpos) + self.close() + def copyCurrentToBouquetList(self): self.csel.copyCurrentToBouquetList() self.close() @@ -1358,6 +1370,11 @@ class ChannelSelectionRadio(ChannelSelectionBase, ChannelSelectionEdit, ChannelS },-1) self["RdsActions"].setEnabled(False) infobar.rds_display.onRassInteractivePossibilityChanged.append(self.RassInteractivePossibilityChanged) + self.onClose.append(self.__onClose) + + def __onClose(self): + lastservice=eServiceReference(config.tv.lastservice.value) + self.session.nav.playService(lastservice) def startRassInteractive(self): self.info.hide(); @@ -1376,8 +1393,6 @@ class ChannelSelectionRadio(ChannelSelectionBase, ChannelSelectionEdit, ChannelS self.infobar.rds_display.onRassInteractivePossibilityChanged.remove(self.RassInteractivePossibilityChanged) self.info.hide() #set previous tv service - lastservice=eServiceReference(config.tv.lastservice.value) - self.session.nav.playService(lastservice) self.close(None) def __evServiceStart(self):