diff --git a/src/ffx/cli.py b/src/ffx/cli.py index 1c339a9..5e3b784 100755 --- a/src/ffx/cli.py +++ b/src/ffx/cli.py @@ -1394,8 +1394,15 @@ def convert(ctx, from ffx.attachment_format import AttachmentFormat + styledAssDetector = getattr( + sourceMediaDescriptor, + "hasStyledAssSubtitlesWithFontAttachments", + None, + ) styledAssSourceDetected = ( - sourceMediaDescriptor.hasStyledAssSubtitlesWithFontAttachments() + bool(styledAssDetector()) + if callable(styledAssDetector) + else False ) if styledAssSourceDetected: styledAssMessage = ( diff --git a/src/ffx/media_workflow_screen_base.py b/src/ffx/media_workflow_screen_base.py index 7968276..6dd882d 100644 --- a/src/ffx/media_workflow_screen_base.py +++ b/src/ffx/media_workflow_screen_base.py @@ -209,7 +209,12 @@ class MediaWorkflowScreenBase(Screen): return None targetMediaDescriptor = currentPattern.getMediaDescriptor(self.context) - if sourceMediaDescriptor.hasStyledAssSubtitlesWithFontAttachments(): + styledAssDetector = getattr( + sourceMediaDescriptor, + "hasStyledAssSubtitlesWithFontAttachments", + None, + ) + if callable(styledAssDetector) and styledAssDetector(): targetMediaDescriptor = targetMediaDescriptor.withSourceAttachmentTracks( sourceMediaDescriptor, AttachmentFormat.TTF,