Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to use a class to describe information of each media file returned #1

Open
jtara1 opened this issue Jan 28, 2018 · 0 comments
Open

Comments

@jtara1
Copy link
Owner

jtara1 commented Jan 28, 2018

Right now I'm using this JSON compatible structure that'll look something like this:

    expected_data = [
        [abspath('tests/media/about.txt'),
         {'General': {'duration': None, 'format': None, 'size': (None, None)}},
         1513722595.3195267],
        [abspath('tests/media/044838940-mountain-range-and-lake-2006-a.jpg'),
         {'General': {'duration': None, 'format': 'JPEG',
                      'size': (None, None)},
          'Image': {'duration': None, 'format': 'JPEG', 'size': (800, 536)}},
         1513722595.3235266],
        [abspath('tests/media/044837513-two-women-walking-hill-1930s-v.jpg'),
         {'General': {'duration': None, 'format': 'JPEG',
                      'size': (None, None)},
          'Image': {'duration': None, 'format': 'JPEG', 'size': (1024, 772)}},
         1513722595.3275266],
        [abspath('tests/media/045844231-my-mother.wav'),
         {'Audio': {'duration': 12863, 'format': 'PCM', 'size': (None, None)},
          'General': {'duration': 12863, 'format': 'Wave',
                      'size': (None, None)}},
         1513722595.3315265]
    ]

but I'd like to organize info of each file to be described in a class that has attributes like audio and inherits from the ABC MutableMapping so I can do media.get_info()['audio'] or media.get_info().audio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant