Пример #1
0
 def _finalize(self):
     """
     Add additional information and correct data.
     FIXME: parse_external_files here is very wrong
     """
     if self.url and self.url.startswith('file://'):
         self.parse_external_files(self.url[7:])
     Media._finalize(self)
Пример #2
0
 def _finalize(self):
     """
     Add additional information and correct data.
     FIXME: parse_external_files here is very wrong
     """
     if self.url and self.url.startswith("file://"):
         self.parse_external_files(self.url[7:])
     Media._finalize(self)
Пример #3
0
 def _finalize(self):
     """
     Correct same data based on specific rules
     """
     Media._finalize(self)
     if not self.length and len(self.video) and self.video[0].length:
         self.length = 0
         # Length not specified for container, so use the largest length
         # of its tracks as container length.
         for track in self.video + self.audio:
             if track.length:
                 self.length = max(self.length, track.length)
Пример #4
0
 def __init__(self):
     Media.__init__(self)
     self.audio = []
     self.video = []
     self.subtitles = []
     self.chapters  = []
Пример #5
0
 def __init__(self, language=None):
     Media.__init__(self)
     self.language = language
Пример #6
0
 def __init__(self, name=None, pos=0):
     Media.__init__(self)
     self.name = name
     self.pos = pos
     self.enabled = True