Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ If you have questions or encounter issues please take a look at the [Frequently
1. Install this plugin via the bundled [Plugin Manager](https://github.com/foosel/OctoPrint/wiki/Plugin:-Plugin-Manager)
or manually using this URL:

`https://github.com/malnvenshorn/OctoPrint-FilamentManager/archive/master.zip`
`https://github.com/oschwartz10612/OctoPrint-FilamentManager/archive/master.zip`

1. For PostgreSQL support you need to install an additional dependency:

Expand Down
2 changes: 1 addition & 1 deletion octoprint_filamentmanager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def get_update_information(self):
current=self._plugin_version,

# update method: pip
pip="https://github.com/malnvenshorn/OctoPrint-FilamentManager/archive/{target_version}.zip"
pip="https://github.com/oschwartz10612/OctoPrint-FilamentManager/archive/{target_version}.zip"
)
)

Expand Down
16 changes: 15 additions & 1 deletion octoprint_filamentmanager/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@

from .util import *


class FilamentManagerApi(octoprint.plugin.BlueprintPlugin):

def send_client_message(self, message_type, data=None):
self._plugin_manager.send_plugin_message(self._identifier, dict(type=message_type, data=data))

@octoprint.plugin.BlueprintPlugin.route("/profiles", methods=["GET"])
def get_profiles_list(self):
force = request.values.get("force", "false") in valid_boolean_trues
Expand Down Expand Up @@ -199,6 +201,12 @@ def create_spool(self):

try:
saved_spool = self.filamentManager.create_spool(new_spool)

if "update" in json_data:
update = json_data["update"]
if update == True:
self.send_client_message("data_changed", data=dict(table="spools", action="update"))

return jsonify(dict(spool=saved_spool))
except Exception as e:
self._logger.error("Failed to create spool: {message}".format(message=str(e)))
Expand Down Expand Up @@ -288,6 +296,12 @@ def update_selection(self, identifier):

try:
saved_selection = self.filamentManager.update_selection(identifier, self.client_id, selection)

if "update" in json_data:
update = json_data["update"]
if update == True:
self.send_client_message("data_changed", data=dict(table="spools", action="update"))

except Exception as e:
self._logger.error("Failed to update selected spool for tool{id}: {message}"
.format(id=str(identifier), message=str(e)))
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
plugin_identifier = "filamentmanager"
plugin_package = "octoprint_filamentmanager"
plugin_name = "OctoPrint-FilamentManager"
plugin_version = "0.5.3"
plugin_version = "0.5.4"
plugin_description = "Manage your spools and keep track of remaining filament on them"
plugin_author = "Sven Lohrmann"
plugin_author_email = "malnvenshorn@gmail.com"
plugin_url = "https://github.com/malnvenshorn/OctoPrint-FilamentManager"
plugin_author_email = "oschwartz10612@gmail.com"
plugin_url = "https://github.com/oschwartz10612/OctoPrint-FilamentManager"
plugin_license = "AGPLv3"
plugin_requires = ["backports.csv>=1.0.5,<1.1",
"uritools>=2.1,<2.2",
Expand Down