[DVDBurn] allow burning of recordings that are currently playing in the background...
[enigma2.git] / lib / python / Plugins / Extensions / DVDBurn / TitleCutter.py
index 210a3d58bac36a62ecb741af4146f5c83b370f8a..06ed1bab32f6c6a4618f1327a75e3881ec7ec5b6 100644 (file)
@@ -1,6 +1,7 @@
 from Plugins.Extensions.CutListEditor.plugin import CutListEditor
 from Components.ServiceEventTracker import ServiceEventTracker
 from enigma import iPlayableService, iServiceInformation
+from Tools.Directories import fileExists
 
 class TitleCutter(CutListEditor):
        def __init__(self, session, t):
@@ -46,7 +47,14 @@ class TitleCutter(CutListEditor):
                self.t.properties.aspect.setValue(aspect)
                self.t.VideoType = service.info().getInfo(iServiceInformation.sVideoType)
 
+       def checkAndGrabThumb(self):
+               if not fileExists(self.t.inputfile.rsplit('.',1)[0] + ".png"):
+                       CutListEditor.grabFrame(self)
+
        def exit(self):
+               if self.t.VideoType == -1:
+                       self.getPMTInfo()
+               self.checkAndGrabThumb()
                self.session.nav.stopService()
                self.close(self.cut_list[:])
 
@@ -56,4 +64,5 @@ class CutlistReader(TitleCutter):
 
        def getPMTInfo(self):
                TitleCutter.getPMTInfo(self)
+               TitleCutter.checkAndGrabThumb(self)
                self.close(self.cut_list[:])