Add logging and small fixes

Prepare userdata by date modified
This commit is contained in:
angelblue05 2018-10-18 07:07:51 -05:00
parent 952e94496d
commit 51f1acef96
3 changed files with 13 additions and 2 deletions

View file

@ -345,7 +345,7 @@ class TheVoid(object):
if window('emby_should_stop.bool'): if window('emby_should_stop.bool'):
LOG.info("Abandon mission! A black hole just swallowed [ %s/%s ]", self.method, self.data['VoidName']) LOG.info("Abandon mission! A black hole just swallowed [ %s/%s ]", self.method, self.data['VoidName'])
return default return
xbmc.sleep(100) xbmc.sleep(100)
LOG.info("--[ void/%s ]", self.data['VoidName']) LOG.info("--[ void/%s ]", self.data['VoidName'])

View file

@ -252,11 +252,21 @@ def get_date_modified(date, parent_id, media=None):
'IsMissing': False, 'IsMissing': False,
'IsVirtualUnaired': False, 'IsVirtualUnaired': False,
'IncludeItemTypes': media or None, 'IncludeItemTypes': media or None,
#'MinDateLastSavedForUser': date,
'MinDateLastSaved': date, 'MinDateLastSaved': date,
'Fields': info() 'Fields': info()
}) })
def get_userdata_date_modified(date, parent_id, media=None):
return users("/Items", params={
'ParentId': parent_id,
'Recursive': True,
'IsMissing': False,
'IsVirtualUnaired': False,
'IncludeItemTypes': media or None,
'MinDateLastSavedForUser': date,
'Fields': info()
})
def refresh_item(item_id): def refresh_item(item_id):
return items("/%s/Refresh" % item_id, "POST", json={ return items("/%s/Refresh" % item_id, "POST", json={
'Recursive': True, 'Recursive': True,

View file

@ -282,6 +282,7 @@ class Monitor(xbmc.Monitor):
self.additional_users(server) self.additional_users(server)
def post_capabilities(self, server): def post_capabilities(self, server):
LOG.info("--[ post capabilities/%s ]", server['auth/server-id'])
server['api'].post_capabilities({ server['api'].post_capabilities({
'PlayableMediaTypes': "Audio,Video", 'PlayableMediaTypes': "Audio,Video",