mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 23:42:37 -07:00
Fix library stuck as inactive in the database
This commit is contained in:
parent
5499e89058
commit
bfabbe3cdb
2 changed files with 2 additions and 1 deletions
|
@ -61,6 +61,7 @@ def refresh_libraries():
|
||||||
'count': section['count'],
|
'count': section['count'],
|
||||||
'parent_count': section.get('parent_count', None),
|
'parent_count': section.get('parent_count', None),
|
||||||
'child_count': section.get('child_count', None),
|
'child_count': section.get('child_count', None),
|
||||||
|
'is_active': section['is_active']
|
||||||
}
|
}
|
||||||
|
|
||||||
result = monitor_db.upsert('library_sections', key_dict=section_keys, value_dict=section_values)
|
result = monitor_db.upsert('library_sections', key_dict=section_keys, value_dict=section_values)
|
||||||
|
|
|
@ -60,7 +60,7 @@ def refresh_users():
|
||||||
else:
|
else:
|
||||||
item['custom_avatar_url'] = item['thumb']
|
item['custom_avatar_url'] = item['thumb']
|
||||||
|
|
||||||
monitor_db.upsert('users', item, keys_dict)
|
monitor_db.upsert('users', keys_dict=keys_dict, value_dict=item)
|
||||||
|
|
||||||
query = 'UPDATE users SET is_active = 0 WHERE user_id NOT IN ({})'.format(', '.join(['?'] * len(user_ids)))
|
query = 'UPDATE users SET is_active = 0 WHERE user_id NOT IN ({})'.format(', '.join(['?'] * len(user_ids)))
|
||||||
monitor_db.action(query=query, args=user_ids)
|
monitor_db.action(query=query, args=user_ids)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue