return child
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 != 'black':
frame_in = att['attributes']['in']
frame_out = att['attributes']['out']
-
if 'audio' in producer:
- if not audio_count % 2:
- att['children'] = [self.audio_fade_out(frame_out)]
- else:
- att['children'] = [self.audio_fade_in(frame_in)]
- audio_count += 1
-
-
+ att['children'] = [self.audio_fade_in(frame_in), self.audio_fade_out(frame_out)]
if 'video' in producer:
- if not video_count % 2:
- att['children'] = [self.video_fade_out(frame_out)]
- else:
- att['children'] = [self.video_fade_in(frame_in)]
- video_count += 1
+ att['children'] = [self.video_fade_in(frame_in), self.video_fade_out(frame_out)]
return dicttoxml(self.session).encode('utf-8')