bazarr/libs/knowit/properties/video/codec.py

17 lines
356 B
Python
Raw Normal View History

2020-03-18 19:33:54 +00:00
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from ...property import Configurable
class VideoCodec(Configurable):
"""Video Codec handler."""
@classmethod
def _extract_key(cls, value):
key = value.upper().split('/')[-1]
if key.startswith('V_'):
key = key[2:]
return key.split(' ')[-1]