from resources.lib.simpleplugin import Plugin, Addon from resources.lib.utils import py2_encode, py2_decode # add pytz module to path addon_dir = py2_decode(xbmc.translatePath(xbmcaddon.Addon().getAddonInfo('path'))) module_dir = os.path.join(addon_dir, "resources", "lib", "pytz") sys.path.insert(0, module_dir) import pytz plugin = Plugin() addon = Addon() _ = plugin.initialize_gettext() PER_PAGE = plugin.get_setting("per_page") FUTURE = plugin.get_setting("enable_future") QUALITY = plugin.get_setting("quality") SUBTITLE = plugin.get_setting("enable_subtitle") if SUBTITLE: from resources.lib.subtitles import download_subtitle def list_videos(callback, page, query=None, channel=None): m = MediathekViewWeb(PER_PAGE, FUTURE) data = m.search(query, channel, page) if data["err"]: dialog = xbmcgui.Dialog() dialog.notification(_("Error"), data["err"])
#!/usr/bin/env python # -*- coding: utf-8 -*- import requests import urllib2 from resources.lib.simpleplugin import Plugin from punch import Punch, LoginError from anilist import Anilist import string import xbmc import re plugin = Plugin() punch = Punch(plugin.get_setting("username"), plugin.get_setting("password")) anilist = Anilist() def build_anime_list(animes): animes_list = [] for anime in animes: image = "https://punchsub.zlx.com.br/imagens/projetos/animes/%s.jpg" % ( anime[0]) animes_list.append({ 'label': anime[1], 'url': plugin.get_url(action='view', name=anime[1], id=anime[0]), 'art': { 'thumb': image, 'icon': image, 'poster': image,
import urllib import urlparse import requests from HTMLParser import HTMLParser from resources.lib.simpleplugin import Plugin, Addon, ListContext import xbmc import xbmcgui ListContext.cache_to_disk = True plugin = Plugin() addon = Addon() _ = plugin.initialize_gettext() BASE_URL = 'http://dokustreams.de/wp-json/wp/v2' PER_PAGE = plugin.get_setting('per_page') class DialogSelect(xbmcgui.WindowXMLDialog): def __init__(self, *args, **kwargs): xbmcgui.WindowXMLDialog.__init__(self) self.listing = kwargs.get("listing") self.title = kwargs.get("title") self.totalitems = 0 self.result = None def autofocus_listitem(self): pass def close_dialog(self, cancelled=False): if cancelled: