From 8b89ff3debedbfc1d0c52695a70916c2086b4263 Mon Sep 17 00:00:00 2001
From: Matt <mcarlton00@gmail.com>
Date: Sun, 2 May 2021 12:46:47 -0400
Subject: [PATCH] Make sure we only sync boxsets once

---
 jellyfin_kodi/full_sync.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/jellyfin_kodi/full_sync.py b/jellyfin_kodi/full_sync.py
index 1dfe7234..9c87d0c1 100644
--- a/jellyfin_kodi/full_sync.py
+++ b/jellyfin_kodi/full_sync.py
@@ -96,7 +96,8 @@ class FullSync(object):
                         # Include boxsets library
                         libraries = self.get_libraries()
                         boxsets = [row.view_id for row in libraries if row.media_type == 'boxsets']
-                        if boxsets:
+                        # Verify we're only trying to sync boxsets once
+                        if boxsets and boxsets[0] not in self.sync['Libraries']:
                             self.sync['Libraries'].append('Boxsets:%s' % boxsets[0])
                     else:
                         # Only called if the library isn't already known about