From 379de2f2f9e2a08e7a51c1774607b6cc135cdca6 Mon Sep 17 00:00:00 2001 From: jonjonsson Date: Fri, 27 Dec 2024 17:39:24 +0000 Subject: [PATCH] If using backup functionality you can now specify which users to backup. --- app_backup.py | 5 +++++ config.cfg | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/app_backup.py b/app_backup.py index 91918ec..79299ea 100644 --- a/app_backup.py +++ b/app_backup.py @@ -57,6 +57,11 @@ def get_all_items(user_id, filter): def main(): all_users = emby.get_users() + backup_user_names = config_parser.get("admin", "backup_user_names", fallback=None) + if backup_user_names is not None: + backup_user_names = backup_user_names.split(",") + all_users = [user for user in all_users if user["Name"] in backup_user_names] + if not os.path.exists(directory): os.makedirs(directory) diff --git a/config.cfg b/config.cfg index 8ea26bf..4d49d43 100644 --- a/config.cfg +++ b/config.cfg @@ -51,6 +51,10 @@ refresh_items_in_collections = True refresh_items_in_collections_max_days_since_added = 10 refresh_items_in_collections_max_days_since_premiered = 30 +# If you use the backup script, you can comma seperate the user names of the users you want to backup. +# Leave out to backup all users. +# backup_user_names = john,yoko + ############################################################################# ########################## ADD YOUR MDBLists BELOW ########################## #############################################################################