Skip to content

Commit

Permalink
Merge pull request jellyfin#160 from mcarlton00/metadata-fix
Browse files Browse the repository at this point in the history
Correct filepath when entering data to database
  • Loading branch information
mcarlton00 authored Dec 14, 2019
2 parents 51430d6 + 014d2ef commit 58c9db9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion jellyfin_kodi/objects/movies.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def get_path_filename(self, obj):
obj['Path'] = obj['Path'].replace(obj['Filename'], "")

else:
obj['Path'] = "plugin://plugin.video.jellyfin/"
obj['Path'] = "plugin://plugin.video.jellyfin/%s/" % obj['LibraryId']
params = {
'filename': obj['Filename'].encode('utf-8'),
'id': obj['Id'],
Expand Down
2 changes: 1 addition & 1 deletion jellyfin_kodi/objects/musicvideos.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def get_path_filename(self, obj):
obj['Path'] = obj['Path'].replace(obj['Filename'], "")

else:
obj['Path'] = "plugin://plugin.video.jellyfin/"
obj['Path'] = "plugin://plugin.video.jellyfin/%s/" % obj['LibraryId']
params = {
'filename': obj['Filename'].encode('utf-8'),
'id': obj['Id'],
Expand Down
4 changes: 2 additions & 2 deletions jellyfin_kodi/objects/tvshows.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,12 @@ def get_path_filename(self, obj):
obj['TopLevel'] = "%s\\" % dirname(dirname(obj['Path']))
else:
obj['Path'] = "%s/" % obj['Path']
obj['TopLevel'] = "%s/" % dirname(dirname(obj['Path']))
obj['TopLevel'] = "plugin://plugin.video.jellyfin/"

if not validate(obj['Path']):
raise Exception("Failed to validate path. User stopped.")
else:
obj['TopLevel'] = "plugin://plugin.video.jellyfin/"
obj['TopLevel'] = "plugin://plugin.video.jellyfin/%s/" % obj['LibraryId']
obj['Path'] = "%s%s/" % (obj['TopLevel'], obj['Id'])

@stop()
Expand Down

0 comments on commit 58c9db9

Please sign in to comment.