TandoorRecipes / recipes

Application for managing recipes, planning meals, building shopping lists and much much more!
https://docs.tandoor.dev
Other
5.53k stars 581 forks source link

Detect duplicate imports from same URL #2857

Open syphernl opened 10 months ago

syphernl commented 10 months ago

Is your feature request related to a problem? Please describe.

You can re-import the same URL again, which results in a duplicate recipe to be created.

Describe the solution you'd like

If a duplicate URL is encountered can we show a message "This recipe already exists, what do you want to do?" and give them the option to "Import again" (which essentially duplicates the recipe, useful if there are local changes) or "Update" to overwrite the existing recipe with the one from the given URL.

Describe alternatives you've considered

No response

Additional context

No response

vabene1111 commented 10 months ago

I see this being quite useful, thanks for the idea

a simple check upon importing against the source_url field should do the trick along with an additional parameter returned by the importer API endpoint

leoniedonskoj commented 10 months ago

Hi. Sorry for asking, but why was my comment with smilerz's answer deleted?

smilerz commented 10 months ago

Hi. Sorry for asking, but why was my comment with smilerz's answer deleted?

An identical comment was added shortly later - I assumed they were both spam (we get a lot of comment spam requesting to contribute)

leoniedonskoj commented 10 months ago

Ah okay, that makes sense. I actually want to work on this issue, it's for a project in my bachelor's degree. I'll just need some time looking into the code and figuring out the high level approach you requested.

smilerz commented 10 months ago

Ah okay, that makes sense. I actually want to work on this issue, it's for a project in my bachelor's degree. I'll just need some time looking into the code and figuring out the high level approach you requested.

Looking forward to it!

ellezhu1 commented 7 months ago

I see that this is still open, and I'd love to take a look. Where are the relevant files located?