diff options
Diffstat (limited to 'libmat2/video.py')
| -rw-r--r-- | libmat2/video.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libmat2/video.py b/libmat2/video.py index 4d33aa4..772a89e 100644 --- a/libmat2/video.py +++ b/libmat2/video.py | |||
| @@ -3,7 +3,7 @@ import functools | |||
| 3 | import shutil | 3 | import shutil |
| 4 | import logging | 4 | import logging |
| 5 | 5 | ||
| 6 | from typing import Union | 6 | from typing import Union, Dict |
| 7 | 7 | ||
| 8 | from . import exiftool | 8 | from . import exiftool |
| 9 | from . import bubblewrap | 9 | from . import bubblewrap |
| @@ -12,7 +12,7 @@ from . import bubblewrap | |||
| 12 | class AbstractFFmpegParser(exiftool.ExiftoolParser): | 12 | class AbstractFFmpegParser(exiftool.ExiftoolParser): |
| 13 | """ Abstract parser for all FFmpeg-based ones, mainly for video. """ | 13 | """ Abstract parser for all FFmpeg-based ones, mainly for video. """ |
| 14 | # Some fileformats have mandatory metadata fields | 14 | # Some fileformats have mandatory metadata fields |
| 15 | meta_key_value_allowlist = {} # type: dict[str, Union[str, int]] | 15 | meta_key_value_allowlist = {} # type: Dict[str, Union[str, int]] |
| 16 | 16 | ||
| 17 | def remove_all(self) -> bool: | 17 | def remove_all(self) -> bool: |
| 18 | if self.meta_key_value_allowlist: | 18 | if self.meta_key_value_allowlist: |
| @@ -45,10 +45,10 @@ class AbstractFFmpegParser(exiftool.ExiftoolParser): | |||
| 45 | return False | 45 | return False |
| 46 | return True | 46 | return True |
| 47 | 47 | ||
| 48 | def get_meta(self) -> dict[str, Union[str, dict]]: | 48 | def get_meta(self) -> Dict[str, Union[str, Dict]]: |
| 49 | meta = super().get_meta() | 49 | meta = super().get_meta() |
| 50 | 50 | ||
| 51 | ret = dict() # type: dict[str, Union[str, dict]] | 51 | ret = dict() # type: Dict[str, Union[str, Dict]] |
| 52 | for key, value in meta.items(): | 52 | for key, value in meta.items(): |
| 53 | if key in self.meta_key_value_allowlist: | 53 | if key in self.meta_key_value_allowlist: |
| 54 | if value == self.meta_key_value_allowlist[key]: | 54 | if value == self.meta_key_value_allowlist[key]: |
