mirror of
https://github.com/iluvcapra/pycmx.git
synced 2025-12-31 08:50:54 +00:00
Added 'audio' method to ChannelMap
Added `audio` property to channelmap to test if it contains any audio channels.
This commit is contained in:
@@ -8,7 +8,7 @@ copy and reuse this software, refer to the LICENSE file included with the
|
||||
distribution.
|
||||
"""
|
||||
|
||||
__version__ = '1.0'
|
||||
__version__ = '1.1.0'
|
||||
__author__ = 'Jamie Hardt'
|
||||
|
||||
from .parse_cmx_events import parse_cmx3600
|
||||
|
||||
@@ -27,6 +27,11 @@ class ChannelMap:
|
||||
'True if video is included'
|
||||
return self.v
|
||||
|
||||
@property
|
||||
def audio(self):
|
||||
'True if an audio channel is included'
|
||||
return len(self._audio_channel_set) > 0
|
||||
|
||||
@property
|
||||
def channels(self):
|
||||
'A generator for each audio channel'
|
||||
|
||||
2
setup.py
2
setup.py
@@ -4,7 +4,7 @@ with open("README.md", "r") as fh:
|
||||
long_description = fh.read()
|
||||
|
||||
setup(name='pycmx',
|
||||
version='1.0.1',
|
||||
version='1.1.0',
|
||||
author='Jamie Hardt',
|
||||
author_email='jamiehardt@me.com',
|
||||
description='CMX 3600 Edit Decision List Parser',
|
||||
|
||||
@@ -66,6 +66,7 @@ class TestParse(TestCase):
|
||||
self.assertFalse( events[0].edits[0].channels.a1)
|
||||
self.assertTrue( events[0].edits[0].channels.a2)
|
||||
self.assertTrue( events[2].edits[0].channels.get_audio_channel(7) )
|
||||
self.assertTrue( events[2].edits[0].channels.audio)
|
||||
|
||||
|
||||
def test_multi_edit_events(self):
|
||||
|
||||
Reference in New Issue
Block a user