Merge pull request #1463 from croneter/adjust-paths
Direct paths: corrections to more closely mirror Kodi's way of saving movie and tv show files to the db
This commit is contained in:
commit
e6bf68b6f2
3 changed files with 13 additions and 7 deletions
|
@ -65,6 +65,7 @@ class Movie(ItemBase):
|
|||
content='movies',
|
||||
scraper='metadata.local')
|
||||
path = library_path
|
||||
kodi_parent_pathid = kodi_pathid
|
||||
else:
|
||||
# Plex library contains folders named identical to the
|
||||
# video file, e.g.
|
||||
|
@ -81,6 +82,7 @@ class Movie(ItemBase):
|
|||
path = video_path
|
||||
else:
|
||||
kodi_pathid = self.kodidb.get_path(path)
|
||||
kodi_parent_pathid = kodi_pathid
|
||||
|
||||
if update_item:
|
||||
LOG.info('UPDATE movie plex_id: %s - %s', plex_id, api.title())
|
||||
|
@ -145,7 +147,7 @@ class Movie(ItemBase):
|
|||
api.trailer(),
|
||||
api.list_to_string(api.countries()),
|
||||
path,
|
||||
kodi_pathid,
|
||||
kodi_parent_pathid,
|
||||
api.premiere_date(),
|
||||
api.userrating())
|
||||
|
||||
|
|
|
@ -45,13 +45,15 @@ class KodiVideoDB(common.KodiDBBase):
|
|||
strContent,
|
||||
strScraper,
|
||||
noUpdate,
|
||||
exclude)
|
||||
VALUES (?, ?, ?, ?, ?)
|
||||
exclude,
|
||||
allAudio)
|
||||
VALUES (?, ?, ?, ?, ?, ?)
|
||||
'''
|
||||
self.cursor.execute(query, (path,
|
||||
kind,
|
||||
'metadata.local',
|
||||
1,
|
||||
0,
|
||||
0))
|
||||
|
||||
@db.catch_operationalerrors
|
||||
|
@ -108,11 +110,13 @@ class KodiVideoDB(common.KodiDBBase):
|
|||
idParentPath,
|
||||
strContent,
|
||||
strScraper,
|
||||
noUpdate)
|
||||
VALUES (?, ?, ?, ?, ?, ?)
|
||||
noUpdate,
|
||||
exclude,
|
||||
allAudio)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
||||
''',
|
||||
(path, date_added, id_parent_path, content,
|
||||
scraper, 1))
|
||||
scraper, 1, 0, 0))
|
||||
pathid = self.cursor.lastrowid
|
||||
return pathid
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ COMPANION_PORT = int(_ADDON.getSetting('companionPort'))
|
|||
PKC_MACHINE_IDENTIFIER = None
|
||||
|
||||
# Minimal PKC version needed for the Kodi database - otherwise need to recreate
|
||||
MIN_DB_VERSION = '3.1.1'
|
||||
MIN_DB_VERSION = '3.1.3'
|
||||
|
||||
# Supported databases - version numbers in tuples should decrease
|
||||
SUPPORTED_VIDEO_DB = {
|
||||
|
|
Loading…
Reference in a new issue