mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Fix add-on mode.
Hacky, to be tested
This commit is contained in:
parent
a7e2060c5c
commit
a8f2935790
2 changed files with 14 additions and 1 deletions
|
@ -358,6 +358,7 @@ WHERE idPath = ?
|
|||
"""
|
||||
update_path_movie_obj = ["{Path}", "movies", "metadata.local", 1, "{PathId}"]
|
||||
update_path_toptvshow_obj = ["{TopLevel}", "tvshows", "metadata.local", 1, "{TopPathId}"]
|
||||
update_path_toptvshow_addon_obj = ["{TopLevel}", None, None, 1, "{TopPathId}"]
|
||||
update_path_tvshow_obj = ["{Path}", None, None, 1, "{PathId}"]
|
||||
update_path_episode_obj = ["{Path}", None, None, 1, "{PathId}"]
|
||||
update_path_mvideo_obj = ["{Path}", "musicvideos", "metadata.local", 1, "{PathId}"]
|
||||
|
|
|
@ -169,7 +169,19 @@ class TVShows(KodiDb):
|
|||
self.add_unique_id(*values(obj, QU.add_unique_id_tvshow_obj))
|
||||
|
||||
obj['TopPathId'] = self.add_path(obj['TopLevel'])
|
||||
self.update_path(*values(obj, QU.update_path_toptvshow_obj))
|
||||
|
||||
if self.direct_path:
|
||||
# Normal way, we use the actual top path
|
||||
self.update_path(*values(obj, QU.update_path_toptvshow_obj))
|
||||
else:
|
||||
# Hack to allow cast information in add-on mode
|
||||
# We create a path on top of all others that holds mediaType and scrapper
|
||||
self.update_path(*values(obj, QU.update_path_toptvshow_addon_obj))
|
||||
temp_obj = dict()
|
||||
temp_obj['TopLevel'] = 'plugin://plugin.video.jellyfin/'
|
||||
temp_obj['TopPathId'] = self.add_path(temp_obj['TopLevel'])
|
||||
self.update_path(*values(temp_obj, QU.update_path_toptvshow_obj))
|
||||
self.update_path_parent_id(obj['TopPathId'], temp_obj['TopPathId'])
|
||||
|
||||
obj['PathId'] = self.add_path(*values(obj, QU.get_path_obj))
|
||||
|
||||
|
|
Loading…
Reference in a new issue