Ejemplo n.º 1
0
from support.config import config
from subzero.constants import ICON_SUB, ICON
from support.plex_media import get_part, get_plex_metadata
from support.scheduler import scheduler
from support.scanning import scan_videos
from support.storage import save_subtitles

from subliminal_patch.subtitle import ModifiedSubtitle

default_thumb = R(ICON_SUB)
main_icon = ICON if not config.is_development else "icon-dev.jpg"

# noinspection PyUnboundLocalVariable
route = route_wrapper
# noinspection PyUnboundLocalVariable
handler = enable_channel_wrapper(handler)


def add_incl_excl_options(oc, kind, callback_menu=None, title=None, rating_key=None, add_kind=True):
    """

    :param oc: oc to add our options to
    :param kind: movie, show, episode ... - gets translated to the ignore key (sections, series, items)
    :param callback_menu: menu to inject
    :param title:
    :param rating_key:
    :return:
    """
    # try to translate kind to the ignore key
    use_kind = kind
    ref_list = get_decision_list()
Ejemplo n.º 2
0
from support.config import config
from subzero.constants import ICON_SUB, ICON
from support.plex_media import get_part, get_plex_metadata
from support.scheduler import scheduler
from support.scanning import scan_videos
from support.storage import save_subtitles

from subliminal_patch.subtitle import ModifiedSubtitle

default_thumb = R(ICON_SUB)
main_icon = ICON if not config.is_development else "icon-dev.jpg"

# noinspection PyUnboundLocalVariable
route = route_wrapper
# noinspection PyUnboundLocalVariable
handler = enable_channel_wrapper(handler)


def add_incl_excl_options(oc,
                          kind,
                          callback_menu=None,
                          title=None,
                          rating_key=None,
                          add_kind=True):
    """

    :param oc: oc to add our options to
    :param kind: movie, show, episode ... - gets translated to the ignore key (sections, series, items)
    :param callback_menu: menu to inject
    :param title:
    :param rating_key:
Ejemplo n.º 3
0
from support.items import get_kind, get_item_thumb
from support.helpers import get_video_display_title
from support.ignore import ignore_list
from support.lib import get_intent
from support.config import config
from subzero.constants import ICON_SUB, ICON
from support.scheduler import scheduler

default_thumb = R(ICON_SUB)
main_icon = ICON if config.permissions_ok else "icon-default_error.jpg"
if config.is_development:
    main_icon = "icon-dev.jpg" if config.permissions_ok else "icon-dev_error.jpg"


# noinspection PyUnboundLocalVariable
route = enable_channel_wrapper(route)
# noinspection PyUnboundLocalVariable
handler = enable_channel_wrapper(handler)


def should_display_ignore(items, previous=None):
    kind = get_kind(items)
    return items and (
        (kind in ("show", "season")) or
        (kind == "episode" and previous != "season")
    )


def add_ignore_options(oc, kind, callback_menu=None, title=None, rating_key=None, add_kind=True):
    """