Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add facility to Scan Metadata from G-code Files #1316

Merged
merged 5 commits into from
May 6, 2023

Conversation

siparker
Copy link
Contributor

When viewing a mounted network drive gcode files that are added to the network share and not uploaded via Mainsail do not contain any meta data or thumbnails.
This was originally raised as an issue within Moonraker Arksine/moonraker#614 and determined to be an issue with some mount options, for example cifs, did not properly run inotify events which moonraker relies on.
There was already a moonraker API endpoint /server/files/metascan that can scan existing files so we just added the option to right click and scan meta data via Mainsail instead of trying to cover every mount type and inotify compatibility issues.

Added Scan Metadata option in the gcode file right click menu to call the Metascan Moonraker endpoint to process files that are not auto processed because they are on a network mount or other drive that doesnt support inotify. added a small delay to allow for thumbnail processing as it sometimes took two scans to get the meta and thumbnail.
added supporting phrases for the scan metadata option in gcode files.
@github-actions
Copy link
Contributor

Language file analysis report:

File Missing Keys Unused Keys
en.json 0 0

@meteyou
Copy link
Member

meteyou commented Mar 22, 2023

Thx for your PR. I didn't know that Moonraker had this function by now.

Why do you use the HTTP request, not the WebSocket, to update the metadata?

@siparker
Copy link
Contributor Author

No specific reason other than that is what i had been testing with using postman so i knew the behaviour. The api endpoint has some slightly odd behaviours. Such as if the file doesnt exist then it automatically scans the entire document tree.
If you prefer i could redo it using websockets?

@meteyou
Copy link
Member

meteyou commented Mar 23, 2023

i would prefer to use websocket and send the result to the action files/getMetadata to store the new metadata in the state

@meteyou meteyou changed the title Added facility to Scan Metadata using Moonraker API from the Gcode Files section feat: add facility to Scan Metadata from G-code Files Apr 2, 2023
@meteyou
Copy link
Member

meteyou commented Apr 2, 2023

@siparker pls enable pushing to this branch/pr. I refactored this to switch to websocket requests, but i'm not allowed to push it in your branch.

@siparker
Copy link
Contributor Author

@siparker pls enable pushing to this branch/pr. I refactored this to switch to websocket requests, but i'm not allowed to push it in your branch.

Hi, After a few mins of searching apparently there is a bug to allow edits for maintainers in a push request from an Org. https://github.com/orgs/community/discussions/5634

I have added you as a collaborator on the develop branch, hopefully that allows it?

@github-actions
Copy link
Contributor

Language file analysis report:

File Missing Keys Unused Keys
de.json 0 0
en.json 0 0

@meteyou
Copy link
Member

meteyou commented Apr 10, 2023

Ok. but there was also an issue on my side. I also had to use a own taken for this branch. This could also be my issue.

But now it worked. I pushed my changes. Please, double-check it!

@github-actions
Copy link
Contributor

Language file analysis report:

File Missing Keys Unused Keys
de.json 0 0
en.json 0 0

@meteyou meteyou added this to the v2.6.0 milestone May 1, 2023
@meteyou meteyou merged commit 8bbd5bd into mainsail-crew:develop May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants