You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bazarr/libs/knowit/properties/subtitle.py

15 lines
303 B

from knowit.core import Configurable
class SubtitleFormat(Configurable[str]):
"""Subtitle Format property."""
@classmethod
def _extract_key(cls, value) -> str:
key = str(value).upper()
if key.startswith('S_'):
key = key[2:]
return key.split('/')[-1]