I'm building a site where anonymous users can embed YouTube/Vimeo videos. However, I don't want duplicate videos to be embedded, so I've used the Unique Field module (http://drupal.org/project/unique_field) to make sure duplicates aren't being added. However, it doesn't detect a difference between a shortened URL, or one with/without "http://" before the address. They are unique and an message isn't shown to the user.

You can see the issue here: http://drupal.org/node/1164090

I'm wondering if it's possible to grab the Video ID and store it into a custom field on submission. Then, I could use the Unique Field module to check *that* field for uniqueness.

Comments

mototribe’s picture

that would be an awesome feature, I'm looking for that too.
Wouldn't it be possible to just grab the videoID before importing and doing a SQL LIKE %videoid% search on the existing videos?