import _database
import _importlib
import base64
import os
import sys
import time
import urllib
import xbmc
import xbmcaddon
import xbmcgui
import xbmcplugin
from bs4 import BeautifulSoup

pluginHandle = int(sys.argv[1])

PLUGINPATH = xbmc.translatePath(_addoncompat.get_path())
RESOURCESPATH = os.path.join(PLUGINPATH,'resources')
CACHEPATH = os.path.join(RESOURCESPATH,'cache')
IMAGEPATH = os.path.join(RESOURCESPATH,'images')
LIBPATH = os.path.join(RESOURCESPATH,'lib')
PLUGINFANART = os.path.join(PLUGINPATH,'fanart.jpg')
FAVICON = os.path.join(PLUGINPATH,'fav.png')
ALLICON = os.path.join(PLUGINPATH,'allshows.png')
PLAYFILE = os.path.join(CACHEPATH,'play.m3u8')
KEYFILE = os.path.join(CACHEPATH,'play.key')
SUBTITLE = os.path.join(CACHEPATH,'subtitle.srt')
SUBTITLESMI = os.path.join(CACHEPATH,'subtitle.smi')
COOKIE = os.path.join(CACHEPATH,'cookie.txt')

ADDONID = 'plugin.video.nbc'
TVDBAPIKEY = '03B8C17597ECBD64'
import _database
import _importlib
import base64
import os
import sys
import time
import urllib
import xbmc
import xbmcaddon
import xbmcgui
import xbmcplugin
from bs4 import BeautifulSoup

pluginHandle = int(sys.argv[1])

PLUGINPATH = xbmc.translatePath(_addoncompat.get_path())
RESOURCESPATH = os.path.join(PLUGINPATH,'resources')
CACHEPATH = os.path.join(RESOURCESPATH,'cache')
IMAGEPATH = os.path.join(RESOURCESPATH,'images')
LIBPATH = os.path.join(RESOURCESPATH,'lib')
PLUGINFANART = os.path.join(PLUGINPATH,'fanart.jpg')
FAVICON = os.path.join(PLUGINPATH,'fav.png')
ALLICON = os.path.join(PLUGINPATH,'allshows.png')
PLAYFILE = os.path.join(CACHEPATH,'play.m3u8')
KEYFILE = os.path.join(CACHEPATH,'play.key')
SUBTITLE = os.path.join(CACHEPATH,'subtitle.srt')
SUBTITLESMI = os.path.join(CACHEPATH,'subtitle.smi')
COOKIE = os.path.join(CACHEPATH,'cookie.txt')

ADDONID = 'plugin.video.ustvvod'
TVDBAPIKEY = '03B8C17597ECBD64'
#!/usr/bin/python
# -*- coding: utf-8 -*-
import _addoncompat
import os
import sys
import urllib
import xbmc
from sqlite3 import dbapi2 as sqlite

DBVERSION = 1
PLUGINPATH = _addoncompat.get_path()
DBPATH = os.path.join(xbmc.translatePath(PLUGINPATH), 'resources', 'database')
DBFILE = os.path.join(DBPATH, 'shows.db')
OLDDBPATH = 'special://home/addons/script.module.free.cable.database/lib/'
OLDDBFILE = os.path.join(xbmc.translatePath(OLDDBPATH), 'shows.db')

class _Info:
	def __init__(self, s):
		args = urllib.unquote_plus(s).split(' , ')
		for x in args:
			try:
				(k, v) = x.split('=', 1)
				setattr(self, k, v.strip('"\''))
			except:
				pass

args = _Info(sys.argv[2][1:].replace('&', ' , '))

def execute_command(command, values = [], commit = False, fetchone = False, fetchall = False):
	conn = sqlite.connect(DBFILE)
	conn.text_factory = str