- if len(config.tv.prevservice.value) and len(config.tv.prevroot.value):
- if config.tv.lastroot.value != config.tv.prevroot.value:
- tmp = config.tv.lastroot.value
- config.tv.lastroot.value = config.tv.prevroot.value
- config.tv.lastroot.save()
- config.tv.prevroot.value = tmp
- config.tv.prevroot.save()
- self.restoreRoot()
- if config.tv.lastservice.value != config.tv.prevservice.value:
- tmp = config.tv.lastservice.value
- config.tv.lastservice.value = config.tv.prevservice.value
- config.tv.lastservice.save()
- config.tv.prevservice.value = tmp
- config.tv.prevservice.save()
- lastservice=eServiceReference(config.tv.lastservice.value)
- self.session.nav.playService(lastservice)
- self.setCurrentSelection(lastservice)
+ hlen = len(self.history)
+ if hlen > 1:
+ if self.history_pos == hlen-1:
+ tmp = self.history[self.history_pos]
+ self.history[self.history_pos] = self.history[self.history_pos-1]
+ self.history[self.history_pos-1] = tmp
+ else:
+ tmp = self.history[self.history_pos+1]
+ self.history[self.history_pos+1] = self.history[self.history_pos]
+ self.history[self.history_pos] = tmp
+ self.setHistoryPath()