CutListEditor: always restart service on cutlist editor close
[enigma2.git] / lib / python / Plugins / Extensions / CutListEditor / plugin.py
index 1ef15a53b9e491232858e297d84441a81e5a754f..ee75ec0957610159cd0bfa1ed50dd542df2fcdf5 100644 (file)
@@ -79,7 +79,7 @@ class CutListContextMenu(FixedMenu):
                else:
                        menu.append((_("remove this mark"), self.removeMark))
 
-               menu.append((("grab this frame as bitmap"), self.grabFrame))
+               menu.append((_("grab this frame as bitmap"), self.grabFrame))
                FixedMenu.__init__(self, session, _("Cut"), menu)
                self.skinName = "Menu"
 
@@ -189,7 +189,7 @@ class CutListEditor(Screen, InfoBarBase, InfoBarSeek, InfoBarCueSheetSupport, He
                self.onClose.append(self.__onClose)
 
        def __onClose(self):
-               self.session.nav.playService(self.old_service)
+               self.session.nav.playService(self.old_service, forceRestart=True)
 
        def showTutorial(self):
                if not self.tutorial_seen:
@@ -317,7 +317,7 @@ class CutListEditor(Screen, InfoBarBase, InfoBarSeek, InfoBarCueSheetSupport, He
                elif result == CutListContextMenu.RET_ENDCUT:
                        # remove in/out marks between the new cut
                        for (where, what) in self.cut_list[:]:
-                               if self.cut_start <= where <= self.context_position and what in [0,1]:
+                               if self.cut_start <= where <= self.context_position and what in (0,1):
                                        self.cut_list.remove((where, what))
 
                        bisect.insort(self.cut_list, (self.cut_start, 1))
@@ -350,7 +350,7 @@ class CutListEditor(Screen, InfoBarBase, InfoBarSeek, InfoBarCueSheetSupport, He
                elif result == CutListContextMenu.RET_REMOVEBEFORE:
                        # remove in/out marks before current position
                        for (where, what) in self.cut_list[:]:
-                               if where <= self.context_position and what in [0,1]:
+                               if where <= self.context_position and what in (0,1):
                                        self.cut_list.remove((where, what))
                        # add 'in' point
                        bisect.insort(self.cut_list, (self.context_position, 0))
@@ -358,7 +358,7 @@ class CutListEditor(Screen, InfoBarBase, InfoBarSeek, InfoBarCueSheetSupport, He
                elif result == CutListContextMenu.RET_REMOVEAFTER:
                        # remove in/out marks after current position
                        for (where, what) in self.cut_list[:]:
-                               if where >= self.context_position and what in [0,1]:
+                               if where >= self.context_position and what in (0,1):
                                        self.cut_list.remove((where, what))
                        # add 'out' point
                        bisect.insort(self.cut_list, (self.context_position, 1))