mirror of
https://github.com/iluvcapra/pycmx.git
synced 2025-12-31 17:00:53 +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.
|
distribution.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__version__ = '1.0'
|
__version__ = '1.1.0'
|
||||||
__author__ = 'Jamie Hardt'
|
__author__ = 'Jamie Hardt'
|
||||||
|
|
||||||
from .parse_cmx_events import parse_cmx3600
|
from .parse_cmx_events import parse_cmx3600
|
||||||
|
|||||||
@@ -27,6 +27,11 @@ class ChannelMap:
|
|||||||
'True if video is included'
|
'True if video is included'
|
||||||
return self.v
|
return self.v
|
||||||
|
|
||||||
|
@property
|
||||||
|
def audio(self):
|
||||||
|
'True if an audio channel is included'
|
||||||
|
return len(self._audio_channel_set) > 0
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def channels(self):
|
def channels(self):
|
||||||
'A generator for each audio channel'
|
'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()
|
long_description = fh.read()
|
||||||
|
|
||||||
setup(name='pycmx',
|
setup(name='pycmx',
|
||||||
version='1.0.1',
|
version='1.1.0',
|
||||||
author='Jamie Hardt',
|
author='Jamie Hardt',
|
||||||
author_email='jamiehardt@me.com',
|
author_email='jamiehardt@me.com',
|
||||||
description='CMX 3600 Edit Decision List Parser',
|
description='CMX 3600 Edit Decision List Parser',
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ class TestParse(TestCase):
|
|||||||
self.assertFalse( events[0].edits[0].channels.a1)
|
self.assertFalse( events[0].edits[0].channels.a1)
|
||||||
self.assertTrue( events[0].edits[0].channels.a2)
|
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.get_audio_channel(7) )
|
||||||
|
self.assertTrue( events[2].edits[0].channels.audio)
|
||||||
|
|
||||||
|
|
||||||
def test_multi_edit_events(self):
|
def test_multi_edit_events(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user