Merge remote-tracking branch 'origin/master'
This commit is contained in:
+6
-3
@@ -804,7 +804,8 @@ def download(itemlist, item, typography='', function_level=1, function=''):
|
|||||||
url=item.url,
|
url=item.url,
|
||||||
action='save_download',
|
action='save_download',
|
||||||
from_action=from_action,
|
from_action=from_action,
|
||||||
contentTitle=contentTitle
|
contentTitle=contentTitle,
|
||||||
|
path=item.path
|
||||||
))
|
))
|
||||||
if from_action == 'episodios':
|
if from_action == 'episodios':
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
@@ -849,7 +850,8 @@ def videolibrary(itemlist, item, typography='', function_level=1, function=''):
|
|||||||
contentTitle=item.contentTitle if item.contentTitle else ''
|
contentTitle=item.contentTitle if item.contentTitle else ''
|
||||||
|
|
||||||
if (function == 'findvideos' and contentType == 'movie') \
|
if (function == 'findvideos' and contentType == 'movie') \
|
||||||
or (function == 'episodios' and contentType != 'movie'):
|
or (function == 'episodios' and contentType != 'movie') \
|
||||||
|
or function == 'get_seasons' and item.channel == 'community':
|
||||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
@@ -861,7 +863,8 @@ def videolibrary(itemlist, item, typography='', function_level=1, function=''):
|
|||||||
url=item.url,
|
url=item.url,
|
||||||
action=action,
|
action=action,
|
||||||
extra=extra,
|
extra=extra,
|
||||||
contentTitle=contentTitle
|
contentTitle=contentTitle,
|
||||||
|
path=item.path
|
||||||
))
|
))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|||||||
@@ -833,7 +833,10 @@ def add_tvshow(item, channel=None):
|
|||||||
# del item.tmdb_stat #Limpiamos el status para que no se grabe en la Videoteca
|
# del item.tmdb_stat #Limpiamos el status para que no se grabe en la Videoteca
|
||||||
|
|
||||||
# Obtiene el listado de episodios
|
# Obtiene el listado de episodios
|
||||||
itemlist = getattr(channel, item.action)(item)
|
if item.channel == 'community':
|
||||||
|
itemlist = getattr(channel, 'get_seasons')(item)
|
||||||
|
else:
|
||||||
|
itemlist = getattr(channel, item.action)(item)
|
||||||
|
|
||||||
insertados, sobreescritos, fallidos, path = save_tvshow(item, itemlist)
|
insertados, sobreescritos, fallidos, path = save_tvshow(item, itemlist)
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ from channelselector import get_thumb
|
|||||||
from core import channeltools
|
from core import channeltools
|
||||||
from core import trakt_tools, scrapertoolsV2
|
from core import trakt_tools, scrapertoolsV2
|
||||||
from core.item import Item
|
from core.item import Item
|
||||||
from platformcode import logger
|
from platformcode import logger, keymaptools
|
||||||
from platformcode import unify
|
from platformcode import unify
|
||||||
|
|
||||||
addon = xbmcaddon.Addon('plugin.video.kod')
|
addon = xbmcaddon.Addon('plugin.video.kod')
|
||||||
@@ -587,7 +587,7 @@ def set_context_commands(item, parent_item):
|
|||||||
if (item.channel != "videolibrary" and not config.get_localized_string(70585) in str(item.context)) \
|
if (item.channel != "videolibrary" and not config.get_localized_string(70585) in str(item.context)) \
|
||||||
or (item.channel != "videolibrary" and config.get_localized_string(70585) in str(item.context) and config.get_localized_string(70714) in str(item.context)):
|
or (item.channel != "videolibrary" and config.get_localized_string(70585) in str(item.context) and config.get_localized_string(70714) in str(item.context)):
|
||||||
# Añadir Serie a la videoteca
|
# Añadir Serie a la videoteca
|
||||||
if item.action in ["episodios", "get_episodios"] and item.contentSerieName:
|
if item.action in ["episodios", "get_episodios", "get_seasons"] and item.contentSerieName:
|
||||||
context_commands.append((config.get_localized_string(60352), "XBMC.RunPlugin(%s?%s)" %
|
context_commands.append((config.get_localized_string(60352), "XBMC.RunPlugin(%s?%s)" %
|
||||||
(sys.argv[0], item.clone(action="add_serie_to_library",
|
(sys.argv[0], item.clone(action="add_serie_to_library",
|
||||||
from_action=item.action).tourl())))
|
from_action=item.action).tourl())))
|
||||||
@@ -608,7 +608,7 @@ def set_context_commands(item, parent_item):
|
|||||||
|
|
||||||
# elif item.contentSerieName:
|
# elif item.contentSerieName:
|
||||||
# Descargar serie
|
# Descargar serie
|
||||||
elif item.contentType == "tvshow" and item.action in ["episodios"]:
|
elif item.contentType == "tvshow" and item.action in ["episodios", "episodesxseason"]:
|
||||||
item.contentType == "tvshow"
|
item.contentType == "tvshow"
|
||||||
context_commands.append((config.get_localized_string(60355), "XBMC.RunPlugin(%s?%s)" %
|
context_commands.append((config.get_localized_string(60355), "XBMC.RunPlugin(%s?%s)" %
|
||||||
(sys.argv[0], item.clone(channel="downloads", action="save_download",
|
(sys.argv[0], item.clone(channel="downloads", action="save_download",
|
||||||
@@ -629,12 +629,12 @@ def set_context_commands(item, parent_item):
|
|||||||
from_action=item.action).tourl())))
|
from_action=item.action).tourl())))
|
||||||
|
|
||||||
# Descargar temporada
|
# Descargar temporada
|
||||||
# elif item.contentType == "season":
|
elif item.contentType == "season":
|
||||||
# context_commands.append((config.get_localized_string(60357), "XBMC.RunPlugin(%s?%s)" %
|
context_commands.append((config.get_localized_string(60357), "XBMC.RunPlugin(%s?%s)" %
|
||||||
# (sys.argv[0], item.clone(channel="downloads", action="save_download",
|
(sys.argv[0], item.clone(channel="downloads", action="save_download",
|
||||||
# from_channel=item.channel,
|
from_channel=item.channel,
|
||||||
# from_action=item.action,
|
from_action=item.action,
|
||||||
# download='season').tourl())))
|
download='season').tourl())))
|
||||||
|
|
||||||
# Abrir configuración
|
# Abrir configuración
|
||||||
if parent_item.channel not in ["setting", "news", "search"]:
|
if parent_item.channel not in ["setting", "news", "search"]:
|
||||||
@@ -656,12 +656,17 @@ def set_context_commands(item, parent_item):
|
|||||||
context_commands = sorted(context_commands, key=lambda comand: comand[0])
|
context_commands = sorted(context_commands, key=lambda comand: comand[0])
|
||||||
# Menu Rapido
|
# Menu Rapido
|
||||||
context_commands.insert(0, (config.get_localized_string(60360),
|
context_commands.insert(0, (config.get_localized_string(60360),
|
||||||
|
"XBMC.RunPlugin(%s?%s)" % (sys.argv[0], Item(channel='side_menu',
|
||||||
|
action="open_shortcut_menu",
|
||||||
|
parent=parent_item.tourl()).tourl(
|
||||||
|
))))
|
||||||
|
context_commands.insert(1, (config.get_localized_string(70737),
|
||||||
"XBMC.Container.Update (%s?%s)" % (sys.argv[0], Item(channel='side_menu',
|
"XBMC.Container.Update (%s?%s)" % (sys.argv[0], Item(channel='side_menu',
|
||||||
action="open_menu",
|
action="open_menu",
|
||||||
parent=parent_item.tourl()).tourl(
|
parent=parent_item.tourl()).tourl(
|
||||||
))))
|
))))
|
||||||
if config.dev_mode():
|
if config.dev_mode():
|
||||||
context_commands.insert(1, ("item info",
|
context_commands.insert(2, ("item info",
|
||||||
"XBMC.Container.Update (%s?%s)" % (sys.argv[0], Item(action="itemInfo",
|
"XBMC.Container.Update (%s?%s)" % (sys.argv[0], Item(action="itemInfo",
|
||||||
parent=item.tojson()).tourl())))
|
parent=item.tojson()).tourl())))
|
||||||
return context_commands
|
return context_commands
|
||||||
|
|||||||
@@ -5660,3 +5660,7 @@ msgstr ""
|
|||||||
msgctxt "#70735"
|
msgctxt "#70735"
|
||||||
msgid "%s Special Episode Number"
|
msgid "%s Special Episode Number"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "#70737"
|
||||||
|
msgid "[B]SIDE MENU[/B]"
|
||||||
|
msgstr ""
|
||||||
@@ -5664,3 +5664,7 @@ msgstr "Numero dell'Episodio Speciale %s"
|
|||||||
msgctxt "#70736"
|
msgctxt "#70736"
|
||||||
msgid "Completed Serie"
|
msgid "Completed Serie"
|
||||||
msgstr "Serie Completa"
|
msgstr "Serie Completa"
|
||||||
|
|
||||||
|
msgctxt "#70737"
|
||||||
|
msgid "[B]SIDE MENU[/B]"
|
||||||
|
msgstr "[B]MENU LATERALE[/B]"
|
||||||
+26
-14
@@ -3,10 +3,10 @@
|
|||||||
# -*- Created for Alfa-addon -*-
|
# -*- Created for Alfa-addon -*-
|
||||||
# -*- By the Alfa Develop Group -*-
|
# -*- By the Alfa Develop Group -*-
|
||||||
|
|
||||||
import re, urllib, os
|
import re, urllib, os, inspect
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from core import httptools, scrapertoolsV2, servertools, jsontools, tmdb
|
from core import httptools, scrapertoolsV2, servertools, jsontools, tmdb, support
|
||||||
from core.item import Item
|
from core.item import Item
|
||||||
from core.support import typo
|
from core.support import typo
|
||||||
from channelselector import get_thumb
|
from channelselector import get_thumb
|
||||||
@@ -74,7 +74,7 @@ def show_channels(item):
|
|||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
def load_json(item):
|
def load_json(item):
|
||||||
|
support.log(item)
|
||||||
url= item if type(item) == str else item.url
|
url= item if type(item) == str else item.url
|
||||||
|
|
||||||
if url:
|
if url:
|
||||||
@@ -144,7 +144,7 @@ def list_all(item):
|
|||||||
title = media['title']
|
title = media['title']
|
||||||
title = set_title(title, language, quality)
|
title = set_title(title, language, quality)
|
||||||
|
|
||||||
new_item = Item(channel=item.channel, title=format_title(title), quality=quality,
|
new_item = Item(channel=item.channel, title=format_title(title), fulltitle=title, show=title, quality=quality,
|
||||||
language=language, plot=plot, personal_plot=plot, thumbnail=poster, path=item.path)
|
language=language, plot=plot, personal_plot=plot, thumbnail=poster, path=item.path)
|
||||||
|
|
||||||
new_item.infoLabels['year'] = media['year'] if 'year' in media else ''
|
new_item.infoLabels['year'] = media['year'] if 'year' in media else ''
|
||||||
@@ -154,10 +154,11 @@ def list_all(item):
|
|||||||
new_item.url = media
|
new_item.url = media
|
||||||
new_item.contentTitle = media['title']
|
new_item.contentTitle = media['title']
|
||||||
new_item.action = 'findvideos'
|
new_item.action = 'findvideos'
|
||||||
|
if 'movies_list' in json_data: new_item.contentType = 'movie'
|
||||||
else:
|
else:
|
||||||
new_item.url = media['seasons_list']
|
new_item.url = media['seasons_list']
|
||||||
new_item.contentSerieName = media['title']
|
new_item.contentSerieName = media['title']
|
||||||
new_item.action = 'seasons'
|
new_item.action = 'get_seasons'
|
||||||
|
|
||||||
itemlist.append(new_item)
|
itemlist.append(new_item)
|
||||||
|
|
||||||
@@ -168,20 +169,31 @@ def list_all(item):
|
|||||||
item.plot = '\n\n' + typo('','submenu') + '\n' + item.personal_plot + '\n' + typo('','submenu') + '\n\n' + item.plot
|
item.plot = '\n\n' + typo('','submenu') + '\n' + item.personal_plot + '\n' + typo('','submenu') + '\n\n' + item.plot
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
def seasons(item):
|
def get_seasons(item):
|
||||||
logger.info()
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
infoLabels = item.infoLabels
|
infoLabels = item.infoLabels if item.infolabels else {}
|
||||||
list_seasons = item.url
|
list_seasons = item.url
|
||||||
|
|
||||||
for season in list_seasons:
|
for season in list_seasons:
|
||||||
|
support.log()
|
||||||
infoLabels['season'] = season['season']
|
infoLabels['season'] = season['season']
|
||||||
title = config.get_localized_string(60027) % season['season']
|
title = config.get_localized_string(60027) % season['season']
|
||||||
url = '' if not season['link'] else season['link'] if ':/' in season['link'] else item.path + season['link']
|
url = '' if not season['link'] else season['link'] if ':/' in season['link'] else item.path + season['link']
|
||||||
itemlist.append(Item(channel=item.channel, title=format_title(title), url=url, action='episodesxseason',
|
itemlist.append(Item(channel=item.channel, title=format_title(title), fulltitle=item.fulltitle, show=item.show, url=url, action='episodesxseason',
|
||||||
contentSeasonNumber=season['season'], infoLabels=infoLabels))
|
contentSeason=season['season'], infoLabels=infoLabels ,contentType = 'tvshow'))
|
||||||
|
|
||||||
tmdb.set_infoLabels(itemlist, seekTmdb=True)
|
logger.info('CANALE= '+ str(inspect.stack()[1][3]))
|
||||||
itemlist = sorted(itemlist, key=lambda i: i.title)
|
if inspect.stack()[1][3] in ['add_tvshow', "get_seasons"]:
|
||||||
|
it = []
|
||||||
|
for item in itemlist:
|
||||||
|
logger.info(str(item))
|
||||||
|
it += episodesxseason(item)
|
||||||
|
|
||||||
|
itemlist = it
|
||||||
|
else:
|
||||||
|
tmdb.set_infoLabels(itemlist, seekTmdb=True)
|
||||||
|
itemlist = sorted(itemlist, key=lambda i: i.title)
|
||||||
|
support.videolibrary(itemlist,item)
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
@@ -199,10 +211,10 @@ def episodesxseason(item):
|
|||||||
infoLabels['season'] = season_number
|
infoLabels['season'] = season_number
|
||||||
infoLabels['episode'] = episode_number
|
infoLabels['episode'] = episode_number
|
||||||
|
|
||||||
title = config.get_localized_string(70677) + ' %s' % (episode_number)
|
title = '%sx%s - %s' % (item.contentSeason, episode_number, episode['title'])
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, title=format_title(title), url=episode, action='findvideos',
|
itemlist.append(Item(channel=item.channel, title=format_title(title), url=episode, action='findvideos',
|
||||||
contentEpisodeNumber=episode_number, infoLabels=infoLabels))
|
contentSeason= item.contentSeason, contentEpisode=episode_number, infoLabels=infoLabels, contentType = 'episode'))
|
||||||
|
|
||||||
tmdb.set_infoLabels(itemlist, seekTmdb=True)
|
tmdb.set_infoLabels(itemlist, seekTmdb=True)
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|||||||
+20
-7
@@ -539,7 +539,10 @@ def download_from_server(item):
|
|||||||
unsupported_servers = ["torrent"]
|
unsupported_servers = ["torrent"]
|
||||||
|
|
||||||
progreso = platformtools.dialog_progress(config.get_localized_string(30101), config.get_localized_string(70178) % item.server)
|
progreso = platformtools.dialog_progress(config.get_localized_string(30101), config.get_localized_string(70178) % item.server)
|
||||||
channel = __import__('channels.%s' % item.contentChannel, None, None, ['channels.%s' % item.contentChannel])
|
if item.contentChannel == 'community':
|
||||||
|
channel = __import__('specials.%s' % item.contentChannel, None, None, ['specials.%s' % item.contentChannel])
|
||||||
|
else:
|
||||||
|
channel = __import__('channels.%s' % item.contentChannel, None, None, ['channels.%s' % item.contentChannel])
|
||||||
if hasattr(channel, "play") and not item.play_menu:
|
if hasattr(channel, "play") and not item.play_menu:
|
||||||
|
|
||||||
progreso.update(50, config.get_localized_string(70178) % item.server, config.get_localized_string(60003) % item.contentChannel)
|
progreso.update(50, config.get_localized_string(70178) % item.server, config.get_localized_string(60003) % item.contentChannel)
|
||||||
@@ -606,7 +609,10 @@ def download_from_best_server(item):
|
|||||||
result = {"downloadStatus": STATUS_CODES.error}
|
result = {"downloadStatus": STATUS_CODES.error}
|
||||||
|
|
||||||
progreso = platformtools.dialog_progress(config.get_localized_string(30101), config.get_localized_string(70179))
|
progreso = platformtools.dialog_progress(config.get_localized_string(30101), config.get_localized_string(70179))
|
||||||
channel = __import__('channels.%s' % item.contentChannel, None, None, ['channels.%s' % item.contentChannel])
|
if item.contentChannel == 'community':
|
||||||
|
channel = __import__('specials.%s' % item.contentChannel, None, None, ['specials.%s' % item.contentChannel])
|
||||||
|
else:
|
||||||
|
channel = __import__('channels.%s' % item.contentChannel, None, None, ['channels.%s' % item.contentChannel])
|
||||||
|
|
||||||
progreso.update(50, config.get_localized_string(70184), config.get_localized_string(70180) % item.contentChannel)
|
progreso.update(50, config.get_localized_string(70184), config.get_localized_string(70180) % item.contentChannel)
|
||||||
|
|
||||||
@@ -652,7 +658,10 @@ def select_server(item):
|
|||||||
"contentAction: %s | contentChannel: %s | url: %s" % (item.contentAction, item.contentChannel, item.url))
|
"contentAction: %s | contentChannel: %s | url: %s" % (item.contentAction, item.contentChannel, item.url))
|
||||||
|
|
||||||
progreso = platformtools.dialog_progress(config.get_localized_string(30101), config.get_localized_string(70179))
|
progreso = platformtools.dialog_progress(config.get_localized_string(30101), config.get_localized_string(70179))
|
||||||
channel = __import__('channels.%s' % item.contentChannel, None, None, ["channels.%s" % item.contentChannel])
|
if item.contentChannel == 'community':
|
||||||
|
channel = __import__('specials.%s' % item.contentChannel, None, None, ['specials.%s' % item.contentChannel])
|
||||||
|
else:
|
||||||
|
channel = __import__('channels.%s' % item.contentChannel, None, None, ['channels.%s' % item.contentChannel])
|
||||||
progreso.update(50, config.get_localized_string(70184), config.get_localized_string(70180) % item.contentChannel)
|
progreso.update(50, config.get_localized_string(70184), config.get_localized_string(70180) % item.contentChannel)
|
||||||
|
|
||||||
if hasattr(channel, item.contentAction):
|
if hasattr(channel, item.contentAction):
|
||||||
@@ -720,9 +729,13 @@ def get_episodes(item):
|
|||||||
# El item es uma serie o temporada
|
# El item es uma serie o temporada
|
||||||
if item.contentType in ["tvshow", "season"]:
|
if item.contentType in ["tvshow", "season"]:
|
||||||
# importamos el canal
|
# importamos el canal
|
||||||
channel = __import__('channels.%s' % item.contentChannel, None, None, ["channels.%s" % item.contentChannel])
|
if item.contentChannel == 'community':
|
||||||
# Obtenemos el listado de episodios
|
channel = __import__('specials.%s' % item.contentChannel, None, None, ["specials.%s" % item.contentChannel])
|
||||||
episodes = getattr(channel, item.contentAction)(item)
|
episodes = getattr(channel, 'episodesxseason')(item)
|
||||||
|
else:
|
||||||
|
channel = __import__('channels.%s' % item.contentChannel, None, None, ["channels.%s" % item.contentChannel])
|
||||||
|
episodes = getattr(channel, item.contentAction)(item)
|
||||||
|
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
@@ -818,7 +831,7 @@ def save_download(item):
|
|||||||
item.contentAction = item.from_action if item.from_action else item.action
|
item.contentAction = item.from_action if item.from_action else item.action
|
||||||
|
|
||||||
if item.contentType in ["tvshow", "episode", "season"]:
|
if item.contentType in ["tvshow", "episode", "season"]:
|
||||||
if 'download' in item:
|
if 'download' in item and item.channel != 'community':
|
||||||
heading = config.get_localized_string(70594) # <- Enter the season number
|
heading = config.get_localized_string(70594) # <- Enter the season number
|
||||||
item.dlseason = platformtools.dialog_numeric(0, heading, '')
|
item.dlseason = platformtools.dialog_numeric(0, heading, '')
|
||||||
if item.dlseason:
|
if item.dlseason:
|
||||||
|
|||||||
@@ -104,6 +104,10 @@ def open_menu(item):
|
|||||||
main.doModal()
|
main.doModal()
|
||||||
del main
|
del main
|
||||||
|
|
||||||
|
def open_shortcut_menu(item):
|
||||||
|
from platformcode import keymaptools
|
||||||
|
keymaptools.open_shortcut_menu()
|
||||||
|
|
||||||
|
|
||||||
class Main(xbmcgui.WindowXMLDialog):
|
class Main(xbmcgui.WindowXMLDialog):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
|||||||
@@ -67,7 +67,10 @@ def list_movies(item, silent=False):
|
|||||||
for canal_org in new_item.library_urls:
|
for canal_org in new_item.library_urls:
|
||||||
canal = generictools.verify_channel(canal_org)
|
canal = generictools.verify_channel(canal_org)
|
||||||
try:
|
try:
|
||||||
channel_verify = __import__('channels.%s' % canal, fromlist=["channels.%s" % canal])
|
if canal == 'community':
|
||||||
|
channel_verify = __import__('specials.%s' % canal, fromlist=["channels.%s" % canal])
|
||||||
|
else:
|
||||||
|
channel_verify = __import__('channels.%s' % canal, fromlist=["channels.%s" % canal])
|
||||||
logger.debug('Channel %s seems correct' % channel_verify)
|
logger.debug('Channel %s seems correct' % channel_verify)
|
||||||
except:
|
except:
|
||||||
dead_item = Item(multicanal=multicanal,
|
dead_item = Item(multicanal=multicanal,
|
||||||
@@ -187,7 +190,10 @@ def list_tvshows(item):
|
|||||||
for canal in item_tvshow.library_urls:
|
for canal in item_tvshow.library_urls:
|
||||||
canal = generictools.verify_channel(canal)
|
canal = generictools.verify_channel(canal)
|
||||||
try:
|
try:
|
||||||
channel_verify = __import__('channels.%s' % canal, fromlist=["channels.%s" % canal])
|
if canal == 'community':
|
||||||
|
channel_verify = __import__('specials.%s' % canal, fromlist=["channels.%s" % canal])
|
||||||
|
else:
|
||||||
|
channel_verify = __import__('channels.%s' % canal, fromlist=["channels.%s" % canal])
|
||||||
logger.debug('El canal %s parece correcto' % channel_verify)
|
logger.debug('El canal %s parece correcto' % channel_verify)
|
||||||
except:
|
except:
|
||||||
dead_item = Item(multicanal=multicanal,
|
dead_item = Item(multicanal=multicanal,
|
||||||
@@ -507,7 +513,10 @@ def findvideos(item):
|
|||||||
|
|
||||||
# Importamos el canal de la parte seleccionada
|
# Importamos el canal de la parte seleccionada
|
||||||
try:
|
try:
|
||||||
channel = __import__('channels.%s' % nom_canal, fromlist=["channels.%s" % nom_canal])
|
if nom_canal == 'community':
|
||||||
|
channel = __import__('specials.%s' % nom_canal, fromlist=["channels.%s" % nom_canal])
|
||||||
|
else:
|
||||||
|
channel = __import__('channels.%s' % nom_canal, fromlist=["channels.%s" % nom_canal])
|
||||||
except ImportError:
|
except ImportError:
|
||||||
exec "import channels." + nom_canal + " as channel"
|
exec "import channels." + nom_canal + " as channel"
|
||||||
|
|
||||||
@@ -576,7 +585,10 @@ def play(item):
|
|||||||
# logger.debug("item:\n" + item.tostring('\n'))
|
# logger.debug("item:\n" + item.tostring('\n'))
|
||||||
|
|
||||||
if not item.contentChannel == "local":
|
if not item.contentChannel == "local":
|
||||||
channel = __import__('channels.%s' % item.contentChannel, fromlist=["channels.%s" % item.contentChannel])
|
if item.contentChannel == 'community':
|
||||||
|
channel = __import__('specials.%s' % item.contentChannel, fromlist=["channels.%s" % item.contentChannel])
|
||||||
|
else:
|
||||||
|
channel = __import__('channels.%s' % item.contentChannel, fromlist=["channels.%s" % item.contentChannel])
|
||||||
if hasattr(channel, "play"):
|
if hasattr(channel, "play"):
|
||||||
itemlist = getattr(channel, "play")(item)
|
itemlist = getattr(channel, "play")(item)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user