]> git.parisson.com Git - telemeta.git/commitdiff
exclude kdenlive filters from fading
authorGuillaume Pellerin <yomguy@parisson.com>
Mon, 12 May 2014 14:01:06 +0000 (16:01 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Mon, 12 May 2014 14:01:06 +0000 (16:01 +0200)
telemeta/util/kdenlive/auto_fade.py
telemeta/util/kdenlive/fade.py

index c58e30c925f5c484fa2940a5109b9858dd1aa321..c716a8c8d9cda4a54665173470efe8be47ebca0d 100755 (executable)
@@ -1,13 +1,11 @@
+#/usr/bin/python
 
 import sys
 from telemeta.util.kdenlive.fade import AutoFade
 
-if __name__ == '__main__':
-    path = sys.argv[-1]
-    fade = AutoFade(path)
-    data = fade.run()
-    f = open(path, 'w')
-    f.write(data)
-    f.close()
-
-
+path = sys.argv[-1]
+fade = AutoFade(path)
+data = fade.run()
+f = open(path, 'w')
+f.write(data)
+f.close()
index c4302d506b87eccc7600d941aa510d5e8570f681..c5901940005304a9ddd281ff66f9c1d879d4b642 100644 (file)
@@ -169,13 +169,14 @@ class AutoFade(object):
     def run(self):
         audio_count = 0
         video_count = 0
-
+        
         for attr in self.session['children']:
             if 'playlist' in attr['name'] and 'children' in attr:
                 for att in attr['children']:
-                    if 'producer' in att['attributes']:
+                    if 'producer' in att['attributes'] and not 'children' in att:                        
                         producer = att['attributes']['producer']
                         if producer != 'black':
+                        
                             frame_in = att['attributes']['in']
                             frame_out = att['attributes']['out']