jneilliii / OctoPrint-UltimakerFormatPackage

GNU Affero General Public License v3.0
30 stars 7 forks source link

Thumbnails broken if file is renamed or moved #23

Closed kimdurose closed 4 years ago

kimdurose commented 4 years ago

The thumbnails do not appear when the gcode files are moved to another folder in File Manager.

jneilliii commented 4 years ago

I thought I already fixed that issue, you're using the latest version?

https://github.com/jneilliii/OctoPrint-UltimakerFormatPackage/issues/10

kimdurose commented 4 years ago

After a bit of experimenting, they now work if the file is moved. However, if the file is renamed, the link to the thumbnail is broken. Lovely plug-in though!

jneilliii commented 4 years ago

Thanks, I've updated the title.

jneilliii commented 4 years ago

Although, I'm not sure I'll be able to resolve this because I don't believe there is a built in event for file rename and the FileManager plugin is doing that on his own.

kimdurose commented 4 years ago

Thank you for looking in to it

Kim Durose

Sent from my iPhone

On 12 Jul 2020, at 15:11, jneilliii notifications@github.com wrote:

 Although, I'm not sure I'll be able to resolve this because I don't believe there is a built in event for file rename and the FileManager plugin is doing that on his own.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

kimdurose commented 4 years ago

Hi, I can reconfirm that the preview thumbnail DOES disappear if the gcode file is moved to another folder. It seems to stay for a while then is replaced by a generic icon.

kimdurose commented 4 years ago

image

jneilliii commented 4 years ago

And the file's name stays the same during the move process? That shouldn't be happening unless the process gets broken in some way.

kimdurose commented 4 years ago

Hi Yes, simple cut and paste of the file from within File Manager

Kim Durose

Sent from my iPhone

On 14 Jul 2020, at 20:13, jneilliii notifications@github.com wrote:

 And the file's name stays the same during the move process? That shouldn't be happening unless the process gets broken in some way.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

jneilliii commented 4 years ago

I can confirm. For some reason this has broken, at least in my testing with 1.4.1RC2 and 1.4.1RC3, which incorporates it's own move option in the standard file list. I know I had fixed this at some point and not sure why it's no longer working.

jneilliii commented 4 years ago

Looks like this may have been a bug regression. I think I just fixed it in a separate branch. If you don't mind testing it for me prior to release that would be awesome. Just use the URL below in Plugin Manager to install and let me know if it fixes it or not. Thanks.

https://github.com/jneilliii/OctoPrint-UltimakerFormatPackage/archive/0.1.9.zip

kimdurose commented 4 years ago

No problem I will do. Need to print some stuff later so will look in to it. Thanks again!

Kim Durose

Sent from my iPhone

On 15 Jul 2020, at 15:13, jneilliii notifications@github.com wrote:

 Looks like this may have been a bug regression. I think I just fixed it in a separate branch. If you don't mind testing it for me prior to release that would be awesome. Just use the URL below in Plugin Manager to install and let me know if it fixes it or not. Thanks.

https://github.com/jneilliii/OctoPrint-UltimakerFormatPackage/archive/0.1.9.zip

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

kimdurose commented 4 years ago

Hi Still broken, sorry. Thumbnails are still vanishing.

Kim Durose

Sent from my iPhone

On 15 Jul 2020, at 15:13, jneilliii notifications@github.com wrote:

 Looks like this may have been a bug regression. I think I just fixed it in a separate branch. If you don't mind testing it for me prior to release that would be awesome. Just use the URL below in Plugin Manager to install and let me know if it fixes it or not. Thanks.

https://github.com/jneilliii/OctoPrint-UltimakerFormatPackage/archive/0.1.9.zip

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

kimdurose commented 4 years ago

Three files sent from Cura. All had thumbnails. All three then moved to another folder. Two still have thumbnails, one does not.

Kim Durose

Sent from my iPhone

On 15 Jul 2020, at 15:13, jneilliii notifications@github.com wrote:

 Looks like this may have been a bug regression. I think I just fixed it in a separate branch. If you don't mind testing it for me prior to release that would be awesome. Just use the URL below in Plugin Manager to install and let me know if it fixes it or not. Thanks.

https://github.com/jneilliii/OctoPrint-UltimakerFormatPackage/archive/0.1.9.zip

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

jneilliii commented 4 years ago

Not sure why it would work for some and not others. Were you doing multiple files at once, not even sure if that's possible. Could you go into logging section of octoprint's settings, find the plugin in the dropdown, change to debug and click the plus sign, then save. Try the process a little more and then grab octoprint.log for analysis.

kimdurose commented 4 years ago

Hi Each file was sent over individually from Cura. Then all three were selected in File Manager and cut and paste in to the new folder.

Kim Durose

Sent from my iPhone

On 15 Jul 2020, at 17:34, jneilliii notifications@github.com wrote:

 Not sure why it would work for some and not others. Were you doing multiple files at once, not even sure if that's possible. Could you go into logging section of octoprint's settings, find the plugin in the dropdown, change to debug and click the plus sign, then save. Try the process a little more and then grab octoprint.log for analysis.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

jneilliii commented 4 years ago

Yeah, that could have been the reason. I ended up having to put in a delay and keep track of FileDeleted and FileAdded to handle the move as there is no FileMoved event to monitor for this operation. I will need to work on making that more resilient for multiple files being done at the same time, as I suspect doing them all at once happened to quickly and the tracking of the filename overlapped. Shouldn't be too difficult to switch that to a list of files rather than just a single file, but will take a little longer to fix. If you do just one at a time with a delay between each for now that should work as expected

kimdurose commented 4 years ago

Hi

Just done a test cutting and pasting one at a time and that appears to have fixed it. However, a totally separate file in the top lecel of the folder structure has now lost its preview 😊

From: jneilliii notifications@github.com Sent: 15 July 2020 20:59 To: jneilliii/OctoPrint-UltimakerFormatPackage OctoPrint-UltimakerFormatPackage@noreply.github.com Cc: kimdurose kimdurose@kimsim.co.uk; Author author@noreply.github.com Subject: Re: [jneilliii/OctoPrint-UltimakerFormatPackage] Thumbnails broken if file is renamed or moved (#23)

Yeah, that could have been the reason. I ended up having to put in a delay and keep track of FileDeleted and FileAdded to handle the move as there is no FileMoved event to monitor for this operation. I will need to work on making that more resilient for multiple files being done at the same time, as I suspect doing them all at once happened to quickly and the tracking of the filename overlapped. Shouldn't be too difficult to switch that to a list of files rather than just a single file, but will take a little longer to fix. If you do just one at a time with a delay between each for now that should work as expected

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jneilliii/OctoPrint-UltimakerFormatPackage/issues/23#issuecomment-658977199 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AQIGA25SW3QLUCUKDT6EB4DR3YDAPANCNFSM4OXWK2RQ . https://github.com/notifications/beacon/AQIGA25BHJ262EFKIF72ZIDR3YDAPA5CNFSM4OXWK2R2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOE5DTDLY.gif

kimdurose commented 4 years ago

False alarm. The singly uploaded file has also now lost it’s thumbnail.

From: jneilliii notifications@github.com Sent: 15 July 2020 20:59 To: jneilliii/OctoPrint-UltimakerFormatPackage OctoPrint-UltimakerFormatPackage@noreply.github.com Cc: kimdurose kimdurose@kimsim.co.uk; Author author@noreply.github.com Subject: Re: [jneilliii/OctoPrint-UltimakerFormatPackage] Thumbnails broken if file is renamed or moved (#23)

Yeah, that could have been the reason. I ended up having to put in a delay and keep track of FileDeleted and FileAdded to handle the move as there is no FileMoved event to monitor for this operation. I will need to work on making that more resilient for multiple files being done at the same time, as I suspect doing them all at once happened to quickly and the tracking of the filename overlapped. Shouldn't be too difficult to switch that to a list of files rather than just a single file, but will take a little longer to fix. If you do just one at a time with a delay between each for now that should work as expected

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jneilliii/OctoPrint-UltimakerFormatPackage/issues/23#issuecomment-658977199 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AQIGA25SW3QLUCUKDT6EB4DR3YDAPANCNFSM4OXWK2RQ . https://github.com/notifications/beacon/AQIGA25BHJ262EFKIF72ZIDR3YDAPA5CNFSM4OXWK2R2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOE5DTDLY.gif

jneilliii commented 4 years ago

Could you go into logging section of octoprint's settings, find the plugin listed in the dropdown, change to debug and click the plus sign, then save. Try the process a little more and then grab octoprint.log for analysis.

jneilliii commented 4 years ago

So I just pushed an update to that same branch that should help with multiple files moved at once. I've tested with FileManager and it appears to work, however there is some additional tweaking/optimization necessary. I did notice what you mentioned about the thumbnail going away after a brief time and from what I can tell pressing the refresh button on the default file list in the sidebar did sync things back up and reload the inline thumbnail. If you want to test you can use the same URL as before to install.

kimdurose commented 4 years ago

Hi

Thanks for the update, however refreshing the file list does not bring back the thumbnails.

From: jneilliii notifications@github.com Sent: 16 July 2020 05:59 To: jneilliii/OctoPrint-UltimakerFormatPackage OctoPrint-UltimakerFormatPackage@noreply.github.com Cc: kimdurose kimdurose@kimsim.co.uk; Author author@noreply.github.com Subject: Re: [jneilliii/OctoPrint-UltimakerFormatPackage] Thumbnails broken if file is renamed or moved (#23)

So I just pushed an update to that same branch that should help with multiple files moved at once. I've tested with FileManager and it appears to work, however there is some additional tweaking/optimization necessary. I did notice what you mentioned about the thumbnail going away after a brief time and from what I can tell pressing the refresh button on the default file list in the sidebar did sync things back up and reload the inline thumbnail. If you want to test you can use the same URL as before to install.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jneilliii/OctoPrint-UltimakerFormatPackage/issues/23#issuecomment-659158921 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AQIGA223VA3SIBHFLOKMJU3R32CIPANCNFSM4OXWK2RQ . https://github.com/notifications/beacon/AQIGA26EFAEJ7RXGXBADWOLR32CIPA5CNFSM4OXWK2R2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOE5E7PCI.gif

-- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus

jneilliii commented 4 years ago

Just to verify, you mean after installing this update and testing the refresh button doesn't work? Previous thumbnails may be lost prior to this update, and if they're gone the refresh isn't going to bring them back.

kimdurose commented 4 years ago

Ok I’ll retest later

Kim Durose

Sent from my iPhone

On 16 Jul 2020, at 13:32, jneilliii notifications@github.com wrote:

 Just to verify, you mean after installing this update and testing the refresh button doesn't work? Previous thumbnails may be lost prior to this update, and if they're gone the refresh isn't going to bring them back.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

kimdurose commented 4 years ago

Hi

Working perfectly!!

Thank you so much!!

From: jneilliii notifications@github.com Sent: 16 July 2020 13:32 To: jneilliii/OctoPrint-UltimakerFormatPackage OctoPrint-UltimakerFormatPackage@noreply.github.com Cc: kimdurose kimdurose@kimsim.co.uk; Author author@noreply.github.com Subject: Re: [jneilliii/OctoPrint-UltimakerFormatPackage] Thumbnails broken if file is renamed or moved (#23)

Just to verify, you mean after installing this update and testing the refresh button doesn't work? Previous thumbnails may be lost prior to this update, and if they're gone the refresh isn't going to bring them back.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jneilliii/OctoPrint-UltimakerFormatPackage/issues/23#issuecomment-659380379 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AQIGA25Q7ELTVL7QM4IA4J3R33XNBANCNFSM4OXWK2RQ . https://github.com/notifications/beacon/AQIGA2Z6QQ3VOQEOVH7NYY3R33XNBA5CNFSM4OXWK2R2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOE5GVRGY.gif

jneilliii commented 4 years ago

Awesome, thanks for verifying. Like I said, I need to do a little code clean-up before release, but shouldn't take too long to do. Just need to refactor a couple of things to reduce the duplication of some stuff I did to get it to work.

kimdurose commented 4 years ago

Great stuff, thank you

Kim Durose

Sent from my iPhone

On 16 Jul 2020, at 14:52, jneilliii notifications@github.com wrote:

 Awesome, thanks for verifying. Like I said, I need to do a little code clean-up before release, but shouldn't take too long to do. Just need to refactor a couple of things to reduce the duplication of some stuff I did to get it to work.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.