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/format.py

19 lines
390 B

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from six import text_type
from ...property import Configurable
class SubtitleFormat(Configurable):
"""Subtitle Format property."""
@classmethod
def _extract_key(cls, value):
key = text_type(value) .upper()
if key.startswith('S_'):
key = key[2:]
return key.split('/')[-1]