import datetime import os import pprint import copy import subliminal from items import get_item from subzero.subtitle_storage import StoredSubtitlesManager from subtitlehelpers import force_utf8 from config import config from helpers import notify_executable, get_title_for_video_metadata, cast_bool, force_unicode from plex_media import PMSMediaProxy get_subtitle_storage = lambda: StoredSubtitlesManager(Data, get_item) def whack_missing_parts(scanned_video_part_map, existing_parts=None): """ cleans out our internal storage's video parts (parts may get updated/deleted/whatever) :param existing_parts: optional list of part ids known :param scanned_video_part_map: videos to check for :return: """ # shortcut if "subs" not in Dict: return if not existing_parts:
def get_subtitle_storage(): return StoredSubtitlesManager(Data, get_item)