Ejemplo n.º 1
0
    def detect(
        cls,
        context: FormatDetectionContext,
    ) -> Optional[FormatDetectionConfidence]:
        if not cls.find_sources_with_params(context.root_path):
            context.fail("specific requirement information unavailable")

        return FormatDetectionConfidence.LOW
Ejemplo n.º 2
0
 def detect(cls, context: FormatDetectionContext) -> None:
     try:
         next(
             find_files(context.root_path, VIDEO_EXTENSIONS,
                        recursive=True))
         return FormatDetectionConfidence.LOW
     except StopIteration:
         context.fail("No video files found in '%s'. "
                      "Checked extensions: %s" %
                      (context.root_path, ', '.join(VIDEO_EXTENSIONS)))