mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
Merge pull request #160 from mcarlton00/metadata-fix
Correct filepath when entering data to database
This commit is contained in:
commit
58c9db9944
3 changed files with 4 additions and 4 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'],
|
||||||
|
|
|
@ -163,7 +163,7 @@ class MusicVideos(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,12 +188,12 @@ 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/"
|
||||||
|
|
||||||
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.")
|
||||||
else:
|
else:
|
||||||
obj['TopLevel'] = "plugin://plugin.video.jellyfin/"
|
obj['TopLevel'] = "plugin://plugin.video.jellyfin/%s/" % obj['LibraryId']
|
||||||
obj['Path'] = "%s%s/" % (obj['TopLevel'], obj['Id'])
|
obj['Path'] = "%s%s/" % (obj['TopLevel'], obj['Id'])
|
||||||
|
|
||||||
@stop()
|
@stop()
|
||||||
|
|
Loading…
Reference in a new issue