From bd489769cab79fb30b743e2d598f04ee3e79b226 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sat, 15 Sep 2018 18:54:00 -0500 Subject: [PATCH] Version bump 3.1.16 Additional logging, fix kodi source. --- addon.xml | 2 +- resources/lib/full_sync.py | 3 +++ resources/lib/helper/xmls.py | 6 +++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/addon.xml b/addon.xml index 07ddb92f..f7bd0052 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@ diff --git a/resources/lib/full_sync.py b/resources/lib/full_sync.py index 4daaa891..37262442 100644 --- a/resources/lib/full_sync.py +++ b/resources/lib/full_sync.py @@ -96,6 +96,7 @@ class FullSync(object): ''' Select all or whitelist libraries. Provides a new list. ''' if not dialog("yesno", heading="{emby}", line1=_(33125), nolabel=_(33126), yeslabel=_(33127)): + LOG.info("Selected sync later.") raise LibraryException('SyncLibraryLater') choices = [x['Name'] for x in libraries] @@ -105,6 +106,7 @@ class FullSync(object): if selection is None: raise LibraryException('LibrarySelection') elif not selection: + LOG.info("Nothing was selected.") raise LibraryException('SyncLibraryLater') if 0 in selection: @@ -128,6 +130,7 @@ class FullSync(object): ''' Main sync process. ''' + LOG.info("starting sync with %s", self.sync['Libraries']) start_time = datetime.datetime.now() for library in list(self.sync['Libraries']): diff --git a/resources/lib/helper/xmls.py b/resources/lib/helper/xmls.py index 7ee18727..4809700a 100644 --- a/resources/lib/helper/xmls.py +++ b/resources/lib/helper/xmls.py @@ -31,7 +31,9 @@ def sources(): xml = etree.Element('sources') video = etree.SubElement(xml, 'video') + files = etree.SubElement(xml, 'files') etree.SubElement(video, 'default', attrib={'pathversion': "1"}) + etree.SubElement(files, 'default', attrib={'pathversion': "1"}) video = xml.find('video') count = 2 @@ -49,11 +51,13 @@ def sources(): etree.SubElement(source, 'path', attrib={'pathversion': "1"}).text = "smb://" etree.SubElement(source, 'allowsharing').text = "true" + files = xml.find('files') + for source in xml.findall('.//path'): if source.text == 'http://kodi.emby.media': break else: - source = etree.SubElement(video, 'source') + source = etree.SubElement(files, 'source') etree.SubElement(source, 'name').text = "kodi.emby.media" etree.SubElement(source, 'path', attrib={'pathversion': "1"}).text = "http://kodi.emby.media" etree.SubElement(source, 'allowsharing').text = "true"