Skip to content

Commit

Permalink
If using backup functionality you can now specify which users to backup.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjonsson committed Dec 27, 2024
1 parent 9f11192 commit 379de2f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 4 additions & 0 deletions config.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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 ##########################
#############################################################################
Expand Down

0 comments on commit 379de2f

Please sign in to comment.