MediaFile.py 496 B

123456789101112131415161718192021
  1. from os import path, getcwd
  2. from pycs.database.File import File
  3. class MediaFile:
  4. # pylint: disable=too-few-public-methods
  5. """
  6. contains various attributes of a saved media file
  7. """
  8. def __init__(self, file: File):
  9. self.type = file.type
  10. self.size = file.size
  11. self.frames = file.frames
  12. self.fps = file.fps
  13. if path.isabs(file.path):
  14. self.path = file.path
  15. else:
  16. self.path = path.join(getcwd(), file.path)