Skip to content

Commit

Permalink
Merge pull request #121 from lifeisafractal/backup-exclude2
Browse files Browse the repository at this point in the history
Exclude thumbnails from backup logic
  • Loading branch information
jneilliii authored Jan 25, 2024
2 parents 29fbfa4 + 8b85789 commit 3aee522
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions octoprint_prusaslicerthumbnails/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,13 @@ def get_update_information(self):
{'name': "Release Candidate", 'branch': "rc", 'comittish': ["rc", "master"]}
], 'pip': "https://github.com/jneilliii/OctoPrint-PrusaSlicerThumbnails/archive/{target_version}.zip"}}

# ~~ Backup hook

def additional_backup_excludes(self, excludes, *args, **kwargs):
if "uploads" in excludes:
return ["."]
return []


__plugin_name__ = "Slicer Thumbnails"
__plugin_pythoncompat__ = ">=2.7,<4" # python 2 and 3
Expand All @@ -401,4 +408,5 @@ def __plugin_load__():
"octoprint.server.http.routes": __plugin_implementation__.route_hook,
"octoprint.server.api.before_request": __plugin_implementation__.hook_octoprint_server_api_before_request,
"octoprint.access.permissions": __plugin_implementation__.get_additional_permissions,
"octoprint.plugin.backup.additional_excludes": __plugin_implementation__.additional_backup_excludes,
}

0 comments on commit 3aee522

Please sign in to comment.