small optimizations and cleanups by Moritz Venn
[vuplus_dvbapp] / lib / python / Plugins / Extensions / CutListEditor / plugin.py
index 1ef15a5..ed7cfb7 100644 (file)
@@ -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))