mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-27 18:17:46 +00:00
18 lines
406 B
Python
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
|