Closed ozh closed 6 years ago
That's odd, as it shouldn't do anything if a featured image already exists, as we bail out early if it exists. https://github.com/WebDevStudios/Automatic-Featured-Images-from-Videos/blob/master/automatic-featured-images-from-videos.php#L45
Is this on a published post or a draft?
Actually, I see the issue.
Every other time it will recreate it, as we set meta to false for _is_video
This should be a simple fix.
What about the scenario where this plugin adds the featured image automatically, then the user removes it. The next time it's saved, the process starts over (and a new version is uploaded).
I'm experiencing the problem on scheduled posts but I'm not sure that's related. I think I've seen it on published posts too.
As I see it (emphasis on "I", maybe the plugin wasn't created with that in mind), the plugin should :
Related #20
Going to start adding video IDs to the title and thus also the GUID column. We'll then do a sql LIKE query for that video ID value and assign that attachment ID as the featured image if one is found.
Hi team
One little bug with this plugin: every time you update a post without changing the Youtube video, it recreates another featured image with the same Youtube screenshot.
A simple workaround would be to store the video URL in metadata after creating the image the first time, and when the post is saved/updated, check if there's already a metadata with that URL.
Cheers!
Ozh