From 4d60101ab7e3ff36649bf367104f24af49f0cae8 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Sun, 6 Jun 2021 16:43:31 -0700 Subject: [PATCH] Remove Account settings * Settings are only for Plex Web specific settings like remembering selected tab, poster size, etc. --- plexapi/myplex.py | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/plexapi/myplex.py b/plexapi/myplex.py index 5a3c25af..55227948 100644 --- a/plexapi/myplex.py +++ b/plexapi/myplex.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- import copy import threading -import json import time from xml.etree import ElementTree @@ -76,7 +75,6 @@ class MyPlexAccount(PlexObject): REQUESTS = 'https://plex.tv/api/invites/requests' # get SIGNIN = 'https://plex.tv/users/sign_in.xml' # get with auth WEBHOOKS = 'https://plex.tv/api/v2/user/webhooks' # get, post with data - SETTINGS = 'https://plex.tv/api/v2/user/settings' # get OPTOUTS = 'https://plex.tv/api/v2/user/%(userUUID)s/settings/opt_outs' # get LINK = 'https://plex.tv/api/v2/pins/link' # put # Hub sections @@ -1339,31 +1337,6 @@ def _chooseConnection(ctype, name, results): raise NotFound('Unable to connect to %s: %s' % (ctype.lower(), name)) -class AccountSettings(PlexObject): - """ Represents a single Account Setting - 'https://plex.tv/api/v2/user/{userUUID}/settings' - - Attributes: - id (str): Unknown. "experience"? - type (str): "json" - value (dict): Lots of user server, library, - and other endpoints and settings - hidden (str): Unknown. Are these settings hidden? - updatedAt (datetime): Datetime last updated - """ - - def _loadData(self, data): - self.id = data.attrib.get('id') - self.type = data.attrib.get('type') - self.value = self.values(data.attrib.get('value')) - self.hidden = data.attrib.get('hidden') - self.updatedAt = utils.toDatetime(data.attrib.get('updatedAt')) - - def values(self, value): - value.replace(':false', ':False').replace(':true', ':True').replace(':null', ':None') - return json.loads(value) - - class AccountOptOut(PlexObject): """ Represents a single AccountOptOut 'https://plex.tv/api/v2/user/{userUUID}/settings/opt_outs'