Skip to content

Commit

Permalink
✨ Add 'operation' field to FILE_ADDED events (#4687)
Browse files Browse the repository at this point in the history
  • Loading branch information
smartin015 authored Dec 12, 2022
1 parent 61e6a6f commit 0bf3928
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ date of first contribution):
* [Arkadiusz Miśkiewicz](https://github.com/arekm)
* ["tempodat"](https://github.com/tempodat)
* [Frederik Kemner](https://github.com/040medien)
* [Scott Martin](https://github.com/smartin015)

OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by
[Daid Braam](https://github.com/daid). Parts of its communication layer and
Expand Down
3 changes: 3 additions & 0 deletions src/octoprint/filemanager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,7 @@ def add_file(
"path": path_in_storage,
"name": name,
"type": get_file_type(name),
"operation": "add",
},
)
eventManager().fire(Events.UPDATED_FILES, {"type": "printables"})
Expand Down Expand Up @@ -787,6 +788,7 @@ def copy_file(self, destination, source, dst):
"path": path_in_storage,
"name": name,
"type": get_file_type(name),
"operation": "copy",
},
)
eventManager().fire(Events.UPDATED_FILES, {"type": "printables"})
Expand Down Expand Up @@ -821,6 +823,7 @@ def move_file(self, destination, source, dst):
"path": dst_path_in_storage,
"name": dst_name,
"type": get_file_type(dst_name),
"operation": "move",
},
)
eventManager().fire(
Expand Down

0 comments on commit 0bf3928

Please sign in to comment.