How to use the guessit.rules.common.pattern.is_disabled function in guessit

To help you get started, we’ve selected a few guessit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github guessit-io / guessit / guessit / rules / properties / episodes.py View on Github external
                 disabled=lambda context: is_disabled(context, 'episode_format'))
github guessit-io / guessit / guessit / rules / properties / episode_title.py View on Github external
    rebulk = Rebulk(disabled=lambda context: is_disabled(context, 'episode_title'))
    rebulk = rebulk.rules(RemoveConflictsWithEpisodeTitle(previous_names),
github guessit-io / guessit / guessit / rules / properties / bonus.py View on Github external
    rebulk = Rebulk(disabled=lambda context: is_disabled(context, 'bonus'))
    rebulk = rebulk.regex_defaults(flags=re.IGNORECASE)
github guessit-io / guessit / guessit / rules / properties / audio_codec.py View on Github external
def enabled(self, context):
        return not is_disabled(context, 'audio_channels')
github guessit-io / guessit / guessit / rules / properties / title.py View on Github external
def enabled(self, context):
        return not is_disabled(context, 'alternative_title')
github guessit-io / guessit / guessit / rules / properties / country.py View on Github external
    rebulk = Rebulk(disabled=lambda context: is_disabled(context, 'country'))
    rebulk = rebulk.defaults(name='country')
github guessit-io / guessit / guessit / rules / properties / film.py View on Github external
def enabled(self, context):
        return not is_disabled(context, 'film_title')
github guessit-io / guessit / guessit / rules / properties / language.py View on Github external
def __init__(self, context,
                 subtitle_prefixes, subtitle_suffixes,
                 lang_prefixes, lang_suffixes, weak_affixes):
        allowed_languages = context.get('allowed_languages') if context else None
        self.allowed_languages = {l.lower() for l in allowed_languages or []}
        self.weak_affixes = weak_affixes
        self.prefixes_map = {}
        self.suffixes_map = {}

        if not is_disabled(context, 'subtitle_language'):
            self.prefixes_map['subtitle_language'] = subtitle_prefixes
            self.suffixes_map['subtitle_language'] = subtitle_suffixes

        self.prefixes_map['language'] = lang_prefixes
        self.suffixes_map['language'] = lang_suffixes
github guessit-io / guessit / guessit / rules / properties / video_codec.py View on Github external
                    disabled=lambda context: is_disabled(context, 'video_codec'))
github guessit-io / guessit / guessit / rules / properties / title.py View on Github external
    rebulk = Rebulk(disabled=lambda context: is_disabled(context, 'title'))
    rebulk.rules(TitleFromPosition, PreferTitleWithYear)