Fix importing Plex usernames

* Fixes #1710
* Also import the user title (Full Name)
This commit is contained in:
JonnyWong16 2022-04-08 20:00:48 -07:00
parent e996c4b375
commit aa6592eec7
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
3 changed files with 19 additions and 3 deletions

View file

@ -84,6 +84,10 @@ def refresh_users():
else:
item['custom_avatar_url'] = item['thumb']
# Check if title is the same as the username
if item['title'] == item['username']:
item['title'] = None
monitor_db.upsert('users', key_dict=keys_dict, value_dict=item)
query = 'UPDATE users SET is_active = 0 WHERE user_id NOT IN ({})'.format(', '.join(['?'] * len(user_ids)))