From 3b60c78f96732c3098fce03bb880986324858b9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Mon, 17 Oct 2022 01:56:02 +0300 Subject: [PATCH] Create copy of UserList to prevent recursion --- plextraktsync/factory.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plextraktsync/factory.py b/plextraktsync/factory.py index 80e779f41a..97381baaf9 100644 --- a/plextraktsync/factory.py +++ b/plextraktsync/factory.py @@ -172,9 +172,10 @@ def monkey_patch_trakt(): # Monkey patch the class: # - https://stackoverflow.com/a/28500620/2314626 # - https://stackoverflow.com/a/62160225/2314626 - UserListTuple = namedtuple('UserList', trakt.users.UserList._fields + ('type',)) + UserListOriginal = trakt.users.UserList + UserListTuple = namedtuple('UserList', UserListOriginal._fields + ('type',)) - class UserList(UserListTuple, trakt.users.UserList): + class UserList(UserListTuple, UserListOriginal): pass trakt.users.UserList = UserList