示例#1
0
    def selector():

        choices = [control.lang(30004), control.lang(30005)]

        choice = control.selectDialog(choices, control.lang(30007))

        if choice == 0:
            control.setSetting('region', 'GR')
        elif choice == 1:
            control.setSetting('region', 'CY')

        if choice != -1:

            cache.FunctionCache().reset_cache()
            control.sleep(200)
            control.refresh()
    See LICENSES/GPL-3.0-only for more information.
'''

from __future__ import absolute_import

import json, re
from os.path import split
from .constants import *
from .utils import geo_detect, collection_post, tiles_post, live_post, search_post
from tulip import bookmarks as bms, directory, client, cache, control
from tulip.compat import iteritems, range, concurrent_futures, quote, parse_qs
from tulip.parsers import parseDOM, itertags
from tulip.url_dispatcher import urldispatcher
from youtube_resolver import resolve as yt_resolver

cache_function = cache.FunctionCache().cache_function


@urldispatcher.register('root')
def root():

    menu = [
        {
            'title': control.lang(30001),
            'action': 'live',
            'icon': 'channels.jpg'
        },
        {
            'title': control.lang(30002),
            'action': 'listing',
            'url': 'vods',
    (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
'''

from ..modules.tools import *

from ..modules.reddit import url_generator, base_link, dotjson, request_headers, reddit_url, account_info
from tulip import directory, client, bookmarks, cache, control, init
from tulip.compat import iteritems, urlparse, urlunparse, urlencode, parse_qsl

cache_method = cache.FunctionCache().cache_method


# noinspection PyProtectedMember
class Main:

    formatting = '[CR]' if control.setting(
        'label.formatting') == '0' else ' | '

    def __init__(self):

        self.list = []
        self.menu = []
        self.data = []
        self.nested = []
        self.directory = []
示例#4
0
from tulip.log import log_debug
from resources.lib.modules.themes import iconname
from resources.lib.modules.constants import WEBSITE, PINNED, HISTORY, cache_duration
from resources.lib.modules.kodi import force
from os import path
from time import time
from base64 import b64decode
from zlib import decompress, compress
from scrapetube.list_formation import list_playlist_videos, list_playlists

########################################################################################################################

iptv_folder = control.transPath('special://profile/addon_data/pvr.iptvsimple')
vtpi = 'wWb45ycn5Wa0RXZz9ld0BXavcXYy9Cdl5mLydWZ2lGbh9yL6MHc0RHa'
leved = 'Q2dw5CchN3c39mck9ydhJ3L0VmbuI3ZlZXasF2LvoDc0RHa'
reset_cache = cache.FunctionCache().reset_cache
cache_function = cache.FunctionCache().cache_function


def papers():

    control.execute('Dialog.Close(all)')

    control.execute(
        'ActivateWindow(10002,"plugin://plugin.video.AliveGR/?content_type=image",return)'
    )


def stream_picker(links):

    _choice = control.selectDialog(heading=control.lang(30006),
    novasports.Indexer().event(url)

elif action == 'add_date':
    novasports.Indexer().add_date()

elif action == 'webtv':
    novasports.Indexer().webtv()

elif action == 'teams_index':
    novasports.Indexer().teams_index()

elif action == 'categories':
    novasports.Indexer().categories()

elif action == 'switch':
    novasports.Indexer().switch()

elif action == 'bookmarks':
    novasports.Indexer().bookmarks()

elif action == 'go_to_root':
    from tulip.directory import run_builtin
    run_builtin(action='root', path_history='replace')

elif action == 'play':
    novasports.Indexer().play(url)

elif action == 'cache_clear':
    from tulip import cache
    cache.FunctionCache().reset_cache(notify=True)
def clear_cache():
    cache.FunctionCache().reset_cache(notify=True)
def refresh():

    from tulip import cache
    cache.FunctionCache().reset_cache()
    control.refresh()
        GNU General Public License for more details.

        You should have received a copy of the GNU General Public License
        along with this program.  If not, see <http://www.gnu.org/licenses/>.
"""
from __future__ import print_function

import json
from base64 import b64decode
from tulip import youtube, directory, control, cache, bookmarks, client
from tulip.url_dispatcher import urldispatcher
from tulip.compat import iteritems
from youtube_resolver import resolve as resolver

key = b64decode('0g0RRFlc2ITLUpVS2hjVhpmYF50cyknWENUMN9WQrFmQ5NVY6lUQ'[::-1])  # please do not copy this key
function_cache = cache.FunctionCache().cache_function


def channel_id():

    if control.setting('language') == '0':
        if control.infoLabel('System.Language') == 'Greek':
            main_id = 'UC9QSJuIBLUT2GbjgKymkTaQ'
        elif control.infoLabel('System.Language') == 'Japanese':
            main_id = 'UCGVTSfgmHJBzpq1gVq1ofhA'
        else:
            main_id = 'UCzsQf6eiWz4gIHgx0oYadXA'
    elif control.setting('language') == '2':
        main_id = 'UC9QSJuIBLUT2GbjgKymkTaQ'
    elif control.setting('language') == '3':
        main_id = 'UCGVTSfgmHJBzpq1gVq1ofhA'