Merge branch 'master' of https://github.com/kodiondemand/addon
This commit is contained in:
@@ -10,13 +10,12 @@ import sys
|
||||
PY3 = False
|
||||
if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int
|
||||
|
||||
if PY3:
|
||||
import urllib.error as urllib2 # Es muy lento en PY2. En PY3 es nativo
|
||||
else:
|
||||
import urllib2 # Usamos el nativo de PY2 que es más rápido
|
||||
# if PY3:
|
||||
# import urllib.error as urllib2 # Es muy lento en PY2. En PY3 es nativo
|
||||
# else:
|
||||
# import urllib2 # Usamos el nativo de PY2 que es más rápido
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
@@ -312,21 +311,21 @@ def run(item=None):
|
||||
|
||||
platformtools.render_items(itemlist, item)
|
||||
|
||||
except urllib2.URLError as e:
|
||||
import traceback
|
||||
logger.error(traceback.format_exc())
|
||||
|
||||
# Grab inner and third party errors
|
||||
if hasattr(e, 'reason'):
|
||||
logger.error("Reason for the error, code: %s | Reason: %s" % (str(e.reason[0]), str(e.reason[1])))
|
||||
texto = config.get_localized_string(30050) # "No se puede conectar con el sitio web"
|
||||
platformtools.dialog_ok(config.get_localized_string(20000), texto)
|
||||
|
||||
# Grab server response errors
|
||||
elif hasattr(e, 'code'):
|
||||
logger.error("HTTP error code: %d" % e.code)
|
||||
# "El sitio web no funciona correctamente (error http %d)"
|
||||
platformtools.dialog_ok(config.get_localized_string(20000), config.get_localized_string(30051) % e.code)
|
||||
# except urllib2.URLError as e:
|
||||
# import traceback
|
||||
# logger.error(traceback.format_exc())
|
||||
#
|
||||
# # Grab inner and third party errors
|
||||
# if hasattr(e, 'reason'):
|
||||
# logger.error("Reason for the error, code: %s | Reason: %s" % (str(e.reason[0]), str(e.reason[1])))
|
||||
# texto = config.get_localized_string(30050) # "No se puede conectar con el sitio web"
|
||||
# platformtools.dialog_ok(config.get_localized_string(20000), texto)
|
||||
#
|
||||
# # Grab server response errors
|
||||
# elif hasattr(e, 'code'):
|
||||
# logger.error("HTTP error code: %d" % e.code)
|
||||
# # "El sitio web no funciona correctamente (error http %d)"
|
||||
# platformtools.dialog_ok(config.get_localized_string(20000), config.get_localized_string(30051) % e.code)
|
||||
except WebErrorException as e:
|
||||
import traceback
|
||||
from core import scrapertools
|
||||
|
||||
@@ -20,7 +20,7 @@ if PY3:
|
||||
else:
|
||||
import urllib
|
||||
|
||||
import os, xbmc, xbmcgui, xbmcplugin, xbmcaddon
|
||||
import os, xbmc, xbmcgui, xbmcplugin
|
||||
|
||||
from channelselector import get_thumb
|
||||
from core import channeltools
|
||||
@@ -28,7 +28,7 @@ from core import trakt_tools, scrapertools
|
||||
from core.item import Item
|
||||
from platformcode import logger, config, unify
|
||||
|
||||
addon = xbmcaddon.Addon('plugin.video.kod')
|
||||
addon = config.__settings__
|
||||
addon_icon = os.path.join( addon.getAddonInfo( "path" ), "logo.png" )
|
||||
|
||||
class XBMCPlayer(xbmc.Player):
|
||||
|
||||
Reference in New Issue
Block a user