Fix imports
This commit is contained in:
parent
213f870214
commit
f5786437f5
@ -13,3 +13,4 @@ disable=
|
||||
too-many-instance-attributes,
|
||||
too-many-locals,
|
||||
too-many-public-methods,
|
||||
cyclic-import, # This shoud be fixed
|
@ -113,13 +113,13 @@ def addon_profile():
|
||||
|
||||
def url_for(name, *args, **kwargs):
|
||||
"""Wrapper for routing.url_for() to lookup by name"""
|
||||
import addon # pylint: disable=import-error
|
||||
import resources.lib.addon as addon
|
||||
return addon.routing.url_for(getattr(addon, name), *args, **kwargs)
|
||||
|
||||
|
||||
def show_listing(title_items, category=None, sort=None, content=None, cache=True):
|
||||
""" Show a virtual directory in Kodi """
|
||||
from addon import routing # pylint: disable=import-error
|
||||
from resources.lib.addon import routing
|
||||
|
||||
if content:
|
||||
# content is one of: files, songs, artists, albums, movies, tvshows, episodes, musicvideos, videos, images, games
|
||||
@ -190,7 +190,7 @@ def show_listing(title_items, category=None, sort=None, content=None, cache=True
|
||||
|
||||
def play(stream, title=None, art_dict=None, info_dict=None, prop_dict=None):
|
||||
"""Play the given stream"""
|
||||
from addon import routing # pylint: disable=import-error
|
||||
from resources.lib.addon import routing
|
||||
|
||||
play_item = xbmcgui.ListItem(label=title, path=stream)
|
||||
if art_dict:
|
||||
@ -476,7 +476,7 @@ def container_update(url):
|
||||
|
||||
def end_of_directory():
|
||||
"""Close a virtual directory, required to avoid a waiting Kodi"""
|
||||
from addon import routing # pylint: disable=import-error
|
||||
from resources.lib.addon import routing
|
||||
xbmcplugin.endOfDirectory(handle=routing.handle, succeeded=False, updateListing=False, cacheToDisc=False)
|
||||
|
||||
|
||||
|
@ -119,6 +119,11 @@ class TvGuide:
|
||||
else:
|
||||
context_menu = None
|
||||
|
||||
stream_dict = STREAM_DICT.copy()
|
||||
stream_dict.update({
|
||||
'duration': program.duration,
|
||||
})
|
||||
|
||||
title = '{time} - {title}'.format(
|
||||
time=program.start.strftime('%H:%M'),
|
||||
title=program.program_title
|
||||
@ -146,9 +151,7 @@ class TvGuide:
|
||||
'duration': program.duration,
|
||||
'mediatype': 'video',
|
||||
},
|
||||
stream_dict=STREAM_DICT + {
|
||||
'duration': program.duration,
|
||||
},
|
||||
stream_dict=stream_dict,
|
||||
context_menu=context_menu,
|
||||
is_playable=True)
|
||||
)
|
||||
|
@ -5,4 +5,4 @@ from __future__ import absolute_import, division, unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
logging.basicConfig()
|
||||
|
Loading…
Reference in New Issue
Block a user