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/custom_libs/subliminal_patch/refiners/filebot.py

27 lines
614 B

6 years ago
# coding=utf-8
5 years ago
from __future__ import absolute_import
6 years ago
import logging
from libfilebot import get_filebot_attrs
5 years ago
from .common import update_video
6 years ago
logger = logging.getLogger(__name__)
def refine(video, **kwargs):
"""
:param video:
:param kwargs:
:return:
"""
try:
orig_fn = get_filebot_attrs(video.name)
if orig_fn:
update_video(video, orig_fn)
else:
logger.info(u"%s: Filebot didn't return an original filename", video.name)
except:
logger.exception(u"%s: Something went wrong when retrieving filebot attributes:", video.name)