mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 21:51:14 -07:00
Simplify user delete loop
This commit is contained in:
parent
faac6b11c2
commit
104e2929df
2 changed files with 5 additions and 5 deletions
|
@ -673,11 +673,10 @@ class Users(object):
|
|||
# Get the user_ids corresponding to the row_ids
|
||||
result = monitor_db.select('SELECT user_id FROM users '
|
||||
'WHERE id IN ({})'.format(','.join(['?'] * len(row_ids))), row_ids)
|
||||
user_ids = [user['user_id'] for user in result]
|
||||
|
||||
success = []
|
||||
for user_id in user_ids:
|
||||
success.append(self.delete(user_id=user_id, purge_only=purge_only))
|
||||
for user in result:
|
||||
success.append(self.delete(user_id=user['user_id'], purge_only=purge_only))
|
||||
return all(success)
|
||||
|
||||
elif str(user_id).isdigit():
|
||||
|
|
|
@ -1072,7 +1072,7 @@ class WebInterface(object):
|
|||
"duration": 2998290,
|
||||
"friendly_name": "Jon Snow",
|
||||
"guid": "com.plexapp.agents.thetvdb://121361/6/1?lang=en",
|
||||
"id": 1121,
|
||||
"history_row_id": 1121,
|
||||
"ip_address": "xxx.xxx.xxx.xxx",
|
||||
"is_active": 1,
|
||||
"keep_history": "Checked",
|
||||
|
@ -1088,6 +1088,7 @@ class WebInterface(object):
|
|||
"player": "Plex Web (Chrome)",
|
||||
"plays": 487,
|
||||
"rating_key": 153037,
|
||||
"row_id": 1,
|
||||
"thumb": "/library/metadata/153036/thumb/1462175062",
|
||||
"transcode_decision": "transcode",
|
||||
"user_id": 133788,
|
||||
|
@ -1290,7 +1291,7 @@ class WebInterface(object):
|
|||
"data":
|
||||
[{"friendly_name": "Jon Snow",
|
||||
"guid": "com.plexapp.agents.thetvdb://121361/6/1?lang=en",
|
||||
"id": 1121,
|
||||
"history_row_id": 1121,
|
||||
"ip_address": "xxx.xxx.xxx.xxx",
|
||||
"last_played": "Game of Thrones - The Red Woman",
|
||||
"last_seen": 1462591869,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue