Rename method
This commit is contained in:
parent
ab718bae2a
commit
0255bd3584
3 changed files with 15 additions and 16 deletions
|
@ -68,7 +68,7 @@ class Movie(ItemBase):
|
|||
# Network share
|
||||
filename = playurl.rsplit("/", 1)[1]
|
||||
path = playurl.replace(filename, "")
|
||||
kodi_pathid = self.kodidb.add_video_path(path,
|
||||
kodi_pathid = self.kodidb.add_path(path,
|
||||
content='movies',
|
||||
scraper='metadata.local')
|
||||
if do_indirect:
|
||||
|
|
|
@ -143,8 +143,7 @@ class Show(ItemBase, TvShowMixin):
|
|||
if playurl is None:
|
||||
return
|
||||
path, toplevelpath = process_path(playurl)
|
||||
toppathid = self.kodidb.add_video_path(
|
||||
toplevelpath,
|
||||
toppathid = self.kodidb.add_path(toplevelpath,
|
||||
content='tvshows',
|
||||
scraper='metadata.local')
|
||||
else:
|
||||
|
@ -154,7 +153,7 @@ class Show(ItemBase, TvShowMixin):
|
|||
# Do NOT set a parent id because addon-path cannot be "stacked"
|
||||
toppathid = None
|
||||
|
||||
kodi_pathid = self.kodidb.add_video_path(path,
|
||||
kodi_pathid = self.kodidb.add_path(path,
|
||||
date_added=api.date_created(),
|
||||
id_parent_path=toppathid)
|
||||
# UPDATE THE TVSHOW #####
|
||||
|
@ -394,8 +393,8 @@ class Episode(ItemBase, TvShowMixin):
|
|||
filename = playurl.rsplit("/", 1)[1]
|
||||
path = playurl.replace(filename, "")
|
||||
parent_path_id = self.kodidb.parent_path_id(path)
|
||||
kodi_pathid = self.kodidb.add_video_path(
|
||||
path, id_parent_path=parent_path_id)
|
||||
kodi_pathid = self.kodidb.add_path(path,
|
||||
id_parent_path=parent_path_id)
|
||||
if do_indirect:
|
||||
# Set plugin path - do NOT use "intermediate" paths for the show
|
||||
# as with direct paths!
|
||||
|
@ -405,7 +404,7 @@ class Episode(ItemBase, TvShowMixin):
|
|||
% (path, plex_id, v.PLEX_TYPE_EPISODE, filename))
|
||||
playurl = filename
|
||||
# Root path tvshows/ already saved in Kodi DB
|
||||
kodi_pathid = self.kodidb.add_video_path(path)
|
||||
kodi_pathid = self.kodidb.add_path(path)
|
||||
|
||||
# UPDATE THE EPISODE #####
|
||||
if update_item:
|
||||
|
@ -522,7 +521,7 @@ class Episode(ItemBase, TvShowMixin):
|
|||
filename = ('%s%s/?plex_id=%s&plex_type=%s&mode=play&filename=%s'
|
||||
% (path, show_id, plex_id, v.PLEX_TYPE_EPISODE,
|
||||
filename))
|
||||
kodi_pathid = self.kodidb.add_video_path(path)
|
||||
kodi_pathid = self.kodidb.add_path(path)
|
||||
kodi_fileid = self.kodidb.add_file(filename,
|
||||
kodi_pathid,
|
||||
api.date_created())
|
||||
|
|
|
@ -87,7 +87,7 @@ class KodiVideoDB(common.KodiDBBase):
|
|||
(parent_id, pathid))
|
||||
return pathid
|
||||
|
||||
def add_video_path(self, path, date_added=None, id_parent_path=None,
|
||||
def add_path(self, path, date_added=None, id_parent_path=None,
|
||||
content=None, scraper=None):
|
||||
"""
|
||||
Returns the idPath from the path table. Creates a new entry if path
|
||||
|
|
Loading…
Reference in a new issue