Fixed "library.related" and "libary.tree" to work with "show.episode", 'show.season" media types

This commit is contained in:
Dean Gardiner
2014-07-26 22:29:16 +12:00
parent f2b0d3f80b
commit d75f58f5ec

View File

@@ -63,7 +63,9 @@ class Library(LibraryBase):
while cur and cur.get('parent_id'):
cur = db.get('id', cur['parent_id'])
result[cur['type']] = cur
parts = cur['type'].split('.')
result[parts[-1]] = cur
return result
@@ -85,7 +87,8 @@ class Library(LibraryBase):
keys = []
for item in items:
key = item['doc']['type'] + 's'
parts = item['doc']['type'].split('.')
key = parts[-1] + 's'
if key not in result:
result[key] = {}