import os import uuid import contextlib import zipfile import random import base64 import time import thread import socket from datetime import datetime # Tham khảo xbmcswift2 framework cho kodi addon tại # http://xbmcswift2.readthedocs.io/en/latest/ from kodiswift import Plugin, xbmc, xbmcaddon, xbmcgui, actions, xbmcplugin path = xbmc.translatePath( xbmcaddon.Addon().getAddonInfo('path')).decode("utf-8") cache = xbmc.translatePath(os.path.join(path, ".cache")) tmp = xbmc.translatePath('special://temp') addons_folder = xbmc.translatePath('special://home/addons') image = xbmc.translatePath(os.path.join(path, "icon.png")) plugin = Plugin() addon = xbmcaddon.Addon("plugin.video.HieuHien.vn") pluginrootpath = "plugin://plugin.video.HieuHien.vn" http = httplib2.Http(cache, disable_ssl_certificate_validation=True) query_url = "https://docs.google.com/spreadsheets/d/{sid}/gviz/tq?gid={gid}&headers=1&tq={tq}" sheet_headers = { "User-Agent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.3; WOW64; Trident/7.0)", "Accept-Encoding": "gzip, deflate, sdch" }
import urllib import os import uuid import contextlib import zipfile import random import base64 import time import thread import socket from datetime import datetime # Tham khảo xbmcswift2 framework cho kodi addon tại # http://xbmcswift2.readthedocs.io/en/latest/ from kodiswift import Plugin, xbmc, xbmcaddon, xbmcgui, actions path = xbmc.translatePath( xbmcaddon.Addon().getAddonInfo('path')).decode("utf-8") cache = xbmc.translatePath(os.path.join(path, ".cache")) tmp = xbmc.translatePath('special://temp') addons_folder = xbmc.translatePath('special://home/addons') image = xbmc.translatePath(os.path.join(path, "icon.png")) plugin = Plugin() addon = xbmcaddon.Addon("plugin.video.family") pluginrootpath = "plugin://plugin.video.family" http = httplib2.Http(cache, disable_ssl_certificate_validation=True) query_url = "https://docs.google.com/spreadsheets/d/{sid}/gviz/tq?gid={gid}&headers=1&tq={tq}" sheet_headers = { "User-Agent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.3; WOW64; Trident/7.0)", "Accept-Encoding": "gzip, deflate, sdch" }
import urllib import os import uuid import contextlib import zipfile import random import base64 import time import thread import socket from datetime import datetime # Tham khảo xbmcswift2 framework cho kodi addon tại # http://xbmcswift2.readthedocs.io/en/latest/ from kodiswift import Plugin, xbmc, xbmcaddon, xbmcgui, actions, xbmcplugin path = xbmc.translatePath( xbmcaddon.Addon().getAddonInfo('path')).decode("utf-8") cache = xbmc.translatePath(os.path.join(path, ".cache")) tmp = xbmc.translatePath('special://temp') addons_folder = xbmc.translatePath('special://home/addons') image = xbmc.translatePath(os.path.join(path, "icon.png")) plugin = Plugin() addon = xbmcaddon.Addon("plugin.video.hpo1988.playlist") pluginrootpath = "plugin://plugin.video.hpo1988.playlist" http = httplib2.Http(cache, disable_ssl_certificate_validation=True) query_url = "https://docs.google.com/spreadsheets/d/{sid}/gviz/tq?gid={gid}&headers=1&tq={tq}" sheet_headers = { "User-Agent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.3; WOW64; Trident/7.0)", "Accept-Encoding": "gzip, deflate, sdch" }
import urllib import os import uuid import contextlib import zipfile import random import base64 import time import thread import socket from datetime import datetime # Tham khảo xbmcswift2 framework cho kodi addon tại # http://xbmcswift2.readthedocs.io/en/latest/ from kodiswift import Plugin, xbmc, xbmcaddon, xbmcgui, actions, xbmcplugin path = xbmc.translatePath( xbmcaddon.Addon().getAddonInfo('path')).decode("utf-8") cache = xbmc.translatePath(os.path.join(path, ".cache")) tmp = xbmc.translatePath('special://temp') addons_folder = xbmc.translatePath('special://home/addons') image = xbmc.translatePath(os.path.join(path, "icon.png")) plugin = Plugin() addon = xbmcaddon.Addon("plugin.video.salemmax.hien") pluginrootpath = "plugin://plugin.video.salemmax.hien" http = httplib2.Http(cache, disable_ssl_certificate_validation=True) query_url = "https://docs.google.com/spreadsheets/d/{sid}/gviz/tq?gid={gid}&headers=1&tq={tq}" sheet_headers = { "User-Agent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.3; WOW64; Trident/7.0)", "Accept-Encoding": "gzip, deflate, sdch" }
def __init__(self, name=None, addon_id=None, plugin_file=None, info_type=None): """ Args: name (Optional[str]): The name of the plugin, e.g. 'Hello Kodi'. addon_id (Optional[str): The Kodi addon ID for the plugin, e.g. 'plugin.video.hellokodi'. This parameter is now optional and is really only useful for testing purposes. If it is not provided, the correct value will be parsed from the addon.xml file. plugin_file (Optional[str]): If provided, it should be the path to the plugin.py file in the root of the addon directory. This only has an effect when kodiswift is running on the command line. Will default to the current working directory since kodiswift requires execution in the root addon directory anyway. The parameter still exists to ease testing. info_type (Optional[str): """ self._name = name self._routes = [] self._view_functions = {} self._addon = xbmcaddon.Addon() self._addon_id = addon_id or self._addon.getAddonInfo('id') self._name = name or self._addon.getAddonInfo('name') self._info_type = info_type if not self._info_type: types = { 'video': 'video', 'audio': 'music', 'image': 'pictures', } self._info_type = types.get(self._addon_id.split('.')[1], 'video') # Keeps track of the added list items self._current_items = [] # Gets initialized when self.run() is called self._request = None # A flag to keep track of a call to xbmcplugin.endOfDirectory() self._end_of_directory = False # Keep track of the update_listing flag passed to # xbmcplugin.endOfDirectory() self._update_listing = False # The plugin's named logger self._log = setup_log(self._addon_id) # The path to the storage directory for the addon self._storage_path = xbmc.translatePath( 'special://profile/addon_data/%s/.storage/' % self._addon_id) if not os.path.isdir(self._storage_path): os.makedirs(self._storage_path) # If we are running in CLI, we need to load the strings.xml manually # Since kodiswift currently relies on execution from an addon's root # directly, we can rely on cwd for now... if kodiswift.CLI_MODE: from kodiswift.mockxbmc import utils if plugin_file: plugin_dir = os.path.dirname(plugin_file) else: plugin_dir = os.getcwd() strings_fn = os.path.join(plugin_dir, 'resources', 'language', 'English', 'strings.po') utils.load_addon_strings(self._addon, strings_fn)
import re import urllib import os import uuid import contextlib import zipfile import random import base64 import time import thread from datetime import datetime # Tham khảo xbmcswift2 framework cho kodi addon tại # http://xbmcswift2.readthedocs.io/en/latest/ from kodiswift import Plugin, xbmc, xbmcaddon, xbmcgui, actions path = xbmc.translatePath( xbmcaddon.Addon().getAddonInfo('path')).decode("utf-8") cache = xbmc.translatePath(os.path.join(path, ".cache")) tmp = xbmc.translatePath('special://temp') addons_folder = xbmc.translatePath('special://home/addons') image = xbmc.translatePath(os.path.join(path, "icon.png")) plugin = Plugin() addon = xbmcaddon.Addon("plugin.vide0.alohacinema") pluginrootpath = "plugin://plugin.vide0.alohacinema" http = httplib2.Http(cache, disable_ssl_certificate_validation=True) query_url = "https://docs.google.com/spreadsheets/d/{sid}/gviz/tq?gid={gid}&headers=1&tq={tq}" sheet_headers = { "User-Agent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.3; WOW64; Trident/7.0)", "Accept-Encoding": "gzip, deflate, sdch" }
import urllib import os import uuid import contextlib import zipfile import random import base64 import time import thread import socket from datetime import datetime # Tham khảo xbmcswift2 framework cho kodi addon tại # http://xbmcswift2.readthedocs.io/en/latest/ from kodiswift import Plugin, xbmc, xbmcaddon, xbmcgui, actions path = xbmc.translatePath( xbmcaddon.Addon().getAddonInfo('path')).decode("utf-8") cache = xbmc.translatePath(os.path.join(path, ".cache")) tmp = xbmc.translatePath('special://temp') addons_folder = xbmc.translatePath('special://home/addons') image = xbmc.translatePath(os.path.join(path, "icon.png")) plugin = Plugin() #addon = xbmcaddon.Addon("plugin.video.vinh.livetv") #pluginrootpath = "plugin://plugin.video.vinh.livetv" addon = xbmcaddon.Addon("plugin.video.vinh.giaitritv") pluginrootpath = "plugin://plugin.video.vinh.giatritv" http = httplib2.Http(cache, disable_ssl_certificate_validation=True) query_url = "https://docs.google.com/spreadsheets/d/{sid}/gviz/tq?gid={gid}&headers=1&tq={tq}" sheet_headers = { "User-Agent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.3; WOW64; Trident/7.0)", "Accept-Encoding": "gzip, deflate, sdch"
import re import urllib import os import uuid import contextlib import zipfile import random import base64 import time import thread from datetime import datetime # Tham khảo xbmcswift2 framework cho kodi addon tại # http://xbmcswift2.readthedocs.io/en/latest/ from kodiswift import Plugin, xbmc, xbmcaddon, xbmcgui, actions path = xbmc.translatePath( xbmcaddon.Addon().getAddonInfo('path')).decode("utf-8") cache = xbmc.translatePath(os.path.join(path, ".cache")) tmp = xbmc.translatePath('special://temp') addons_folder = xbmc.translatePath('special://home/addons') image = xbmc.translatePath(os.path.join(path, "icon.png")) plugin = Plugin() addon = xbmcaddon.Addon("plugin.video.thongld.vnplaylist") pluginrootpath = "plugin://plugin.video.thongld.vnplaylist" http = httplib2.Http(cache, disable_ssl_certificate_validation=True) query_url = "https://docs.google.com/spreadsheets/d/{sid}/gviz/tq?gid={gid}&headers=1&tq={tq}" sheet_headers = { "User-Agent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.3; WOW64; Trident/7.0)", "Accept-Encoding": "gzip, deflate, sdch, br" }
import urllib import os import uuid import contextlib import zipfile import random import base64 import time import thread import socket from datetime import datetime # Tham khảo xbmcswift2 framework cho kodi addon tại # http://xbmcswift2.readthedocs.io/en/latest/ from kodiswift import Plugin, xbmc, xbmcaddon, xbmcgui, actions, xbmcplugin path = xbmc.translatePath( xbmcaddon.Addon().getAddonInfo('path')).decode("utf-8") cache = xbmc.translatePath(os.path.join(path, ".cache")) tmp = xbmc.translatePath('special://temp') addons_folder = xbmc.translatePath('special://home/addons') image = xbmc.translatePath(os.path.join(path, "icon.png")) plugin = Plugin() addon = xbmcaddon.Addon("plugin.video.tranhuyhoang.playlist") pluginrootpath = "plugin://plugin.video.tranhuyhoang.playlist" http = httplib2.Http(cache, disable_ssl_certificate_validation=True) query_url = "https://docs.google.com/spreadsheets/d/{sid}/gviz/tq?gid={gid}&headers=1&tq={tq}" sheet_headers = { "User-Agent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.3; WOW64; Trident/7.0)", "Accept-Encoding": "gzip, deflate, sdch" }
# -*- coding: utf8 -*- from kodiswift import Plugin, CLI_MODE, xbmcaddon, ListItem, xbmc, xbmcgui, xbmcplugin import os import sys import json import sqlite3 import time try: from ChineseKeyboard import Keyboard except Exception, e: print e from xbmc import Keyboard ADDON = xbmcaddon.Addon() ADDON_ID = ADDON.getAddonInfo('id') ADDON_ICON = ADDON.getAddonInfo('icon') ADDON_NAME = ADDON.getAddonInfo('name') ADDON_PATH = ADDON.getAddonInfo('path').decode("utf-8") ADDON_VERSION = ADDON.getAddonInfo('version') ADDON_DATA_PATH = xbmc.translatePath("special://profile/addon_data/%s" % ADDON_ID).decode("utf-8") sys.path.append(os.path.join(ADDON_PATH, 'resources', 'lib')) sys.path.append(os.path.join(ADDON_PATH, 'database')) from highporn import * from common import * from videodb import VideoDB from videodb_functions import VideoDB_Functions plugin = Plugin() HighPorn = HighPorn()
import urllib import os import uuid import contextlib import zipfile import random import base64 import time import thread import socket from datetime import datetime # Tham khảo xbmcswift2 framework cho kodi addon tại # http://xbmcswift2.readthedocs.io/en/latest/ from kodiswift import Plugin, xbmc, xbmcaddon, xbmcgui, actions, xbmcplugin path = xbmc.translatePath( xbmcaddon.Addon().getAddonInfo('path')).decode("utf-8") cache = xbmc.translatePath(os.path.join(path, ".cache")) tmp = xbmc.translatePath('special://temp') addons_folder = xbmc.translatePath('special://home/addons') image = xbmc.translatePath(os.path.join(path, "icon.png")) plugin = Plugin() addon = xbmcaddon.Addon("plugin.video.ndbzone") pluginrootpath = "plugin://plugin.video.ndbzone" http = httplib2.Http(cache, disable_ssl_certificate_validation=True) query_url = "https://docs.google.com/spreadsheets/d/{sid}/gviz/tq?gid={gid}&headers=1&tq={tq}" sheet_headers = { "User-Agent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.3; WOW64; Trident/7.0)", "Accept-Encoding": "gzip, deflate, sdch" }