mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-20 15:10:31 +00:00
Fix grouped views
Something changed in the emby returned paths so the verification was failing. For now, we are getting one item from the media folder and comparing using the user view to make sure we are referring to the correct one with the tag name. Asked Luke for an api that would do this.
This commit is contained in:
parent
e2a117ea97
commit
4cdf5c3c4d
2 changed files with 50 additions and 9 deletions
|
@ -367,6 +367,32 @@ class Read_EmbyServer():
|
|||
|
||||
return views
|
||||
|
||||
def verifyView(self, parentid, itemid):
|
||||
|
||||
belongs = False
|
||||
|
||||
url = "{server}/emby/Users/{UserId}/Items?format=json"
|
||||
params = {
|
||||
|
||||
'ParentId': parentid,
|
||||
'CollapseBoxSetItems': False,
|
||||
'IsVirtualUnaired': False,
|
||||
'IsMissing': False,
|
||||
'Recursive': True,
|
||||
'Ids': itemid
|
||||
}
|
||||
result = self.doUtils(url, parameters=params)
|
||||
try:
|
||||
total = result['TotalRecordCount']
|
||||
except TypeError:
|
||||
# Something happened to the connection
|
||||
pass
|
||||
else:
|
||||
if total:
|
||||
belongs = True
|
||||
|
||||
return belongs
|
||||
|
||||
def getMovies(self, parentId, basic=False, dialog=None):
|
||||
|
||||
items = self.getSection(parentId, "Movie", basic=basic, dialog=dialog)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue