Maker-Management-Platform / agent

BSD 2-Clause "Simplified" License
16 stars 2 forks source link

[Bug] Duplicate import from Thingiverse #126

Closed mechanarchy closed 2 months ago

mechanarchy commented 3 months ago

Hi, it seems you can import the same Thingiverse project multiple times.

Steps to reproduce:

  1. Set up a Thingiverse API key
  2. Go to your MMP server, Projects -> Import
  3. Enter a Thingiverse URL, eg https://www.thingiverse.com/thing:6527320
  4. Click Submit and wait for the toast notification + button to stop showing the spinner
  5. Click Submit again and wait for the toast notification
  6. Go back to the Projects view, and see the same project is there twice.

Related bugs (I can create separate issues if preferred):

mechanarchy commented 3 months ago

Also, I just wanted to say thanks - I've seen you posting about this on r/selfhosted a couple of times and I appreciate the effort you're putting in to develop a platform like this.

It has proved its value very quickly - while setting it up and importing a whole bunch of bookmarks, I found many of them now lead to dead links.

EduardoOliveira commented 3 months ago

Thanks a lot for the feedback. I'll look into it 😉

mechanarchy commented 3 months ago

Forgive me, another: imported project names need to be sanitised. This project (thing:3452348) has a / in its name, which makes MMP report mkdir /library/3452348 Screw and Bolt Sorter / Credit Card sized Measurement Tool ISO: no such file or directory

EduardoOliveira commented 3 months ago

Please don't ask for forgiveness, that information is awesome. Thank you for the feedback

EduardoOliveira commented 2 months ago

Thanks for the awesome feedback, I'm gonna start working on a fix now. I was thinking about swapping the / characters by - to avoid the last issue. As for the duplicate import, I'll try to make it so it redownloads the assets withou errors