mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Correct filepath when entering data to database
This commit is contained in:
parent
2adad4250a
commit
60cc67eb15
2 changed files with 2 additions and 2 deletions
|
@ -175,7 +175,7 @@ class Movies(KodiDb):
|
||||||
obj['Path'] = obj['Path'].replace(obj['Filename'], "")
|
obj['Path'] = obj['Path'].replace(obj['Filename'], "")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
obj['Path'] = "plugin://plugin.video.jellyfin/"
|
obj['Path'] = "plugin://plugin.video.jellyfin/%s/" % obj['LibraryId']
|
||||||
params = {
|
params = {
|
||||||
'filename': obj['Filename'].encode('utf-8'),
|
'filename': obj['Filename'].encode('utf-8'),
|
||||||
'id': obj['Id'],
|
'id': obj['Id'],
|
||||||
|
|
|
@ -188,7 +188,7 @@ class TVShows(KodiDb):
|
||||||
obj['TopLevel'] = "%s\\" % dirname(dirname(obj['Path']))
|
obj['TopLevel'] = "%s\\" % dirname(dirname(obj['Path']))
|
||||||
else:
|
else:
|
||||||
obj['Path'] = "%s/" % obj['Path']
|
obj['Path'] = "%s/" % obj['Path']
|
||||||
obj['TopLevel'] = "%s/" % dirname(dirname(obj['Path']))
|
obj['TopLevel'] = "plugin://plugin.video.jellyfin/%s/" % obj['LibraryId']
|
||||||
|
|
||||||
if not validate(obj['Path']):
|
if not validate(obj['Path']):
|
||||||
raise Exception("Failed to validate path. User stopped.")
|
raise Exception("Failed to validate path. User stopped.")
|
||||||
|
|
Loading…
Reference in a new issue