1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-26 17:47:20 +00:00
bazarr/libs/knowit/rules/subtitle/hearingimpaired.py
2020-03-18 15:33:54 -04:00

18 lines
406 B
Python

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import re
from ...rule import Rule
class HearingImpairedRule(Rule):
"""Hearing Impaired rule."""
hi_re = re.compile(r'(\bsdh\b)', re.IGNORECASE)
def execute(self, props, pv_props, context):
"""Hearing Impaired."""
name = props.get('name')
if name and self.hi_re.search(name):
return True