import os, sys, importlib, glob, inspect

from ffx.track_disposition import TrackDisposition
from .disposition_combinator_2 import DispositionCombinator2


class DispositionCombinator23(DispositionCombinator2):

    VARIANT = 'D11'


    def __init__(self, context = None,
                    createPresets: bool = False):
        super().__init__(context)

        self.__createPresets = createPresets

    def getVariant(self):
        return DispositionCombinator23.VARIANT


    def getPayload(self):

        subtrack0 = set([TrackDisposition.DEFAULT])
        subtrack1 = set([TrackDisposition.DEFAULT])

        #NOTE: Current ffmpeg version will not set most of the dispositions on arbitrary tracks
        # so some checks for preserved dispositions are omitted for now
        if self.__createPresets:
            # subtrack0.add(TrackDisposition.COMMENT) # COMMENT
            subtrack1.add(TrackDisposition.FORCED) # DESCRIPTIONS

        return (subtrack0,
                subtrack1)

    #TODO: tmdb cases
    def createAssertFunc(self):
        def f(assertObj: dict = {}):
            pass
        return f

    def shouldFail(self):
        return True
