- length = len(self.servicelist.history)
- if length > 0:
- idx = (length - self["list"].getSelectionIndex()) - 1
- del self.servicelist.history[idx]
- self.buildList()
-
- # We must check if the current service is still in the zap-history
- currRef = self.session.nav.getCurrentlyPlayingServiceReference()
- idx = 0
- for x in self.servicelist.history:
- if len(x) == 2: # Single-Bouquet
- ref = x[1]
- else: # Multi-Bouquet
- ref = x[2]
-
- if ref == currRef:
- self.servicelist.history_pos = idx
- break
- else:
- idx += 1
+ if self.allowChanges:
+ length = len(self.servicelist.history)
+ if length > 0:
+ idx = (length - self["list"].getSelectionIndex()) - 1
+ del self.servicelist.history[idx]
+ self.buildList()
+ currRef = self.session.nav.getCurrentlyPlayingServiceReference()
+ idx = 0
+ for x in self.servicelist.history:
+ if len(x) == 2: # Single-Bouquet
+ ref = x[1]
+ else: # Multi-Bouquet
+ ref = x[2]
+ if ref == currRef:
+ self.servicelist.history_pos = idx
+ break
+ else:
+ idx += 1