Currently if I try and add a vimeo video with media 2.x dev you get:
"http://vimeo.com/X could not be added. Only the following types of files are allowed to be uploaded: audio, video".

As per the media_youtube issue #1812976: Register video/youtube mimetype and provide an upgrade path here's a patch!

Attribution would be appreciated :)

Files: 
CommentFileSizeAuthor
#10 file_entity-n1931136-10.patch599 bytesDamienMcKenna
PASSED: [[SimpleTest]]: [MySQL] 874 pass(es).
[ View ]
#1 register-video-vimeo-mimetype-1931136-1.patch1.46 KBheylookalive
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch register-video-vimeo-mimetype-1931136-1.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Comments

heylookalive’s picture

StatusFileSize
new1.46 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch register-video-vimeo-mimetype-1931136-1.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
steinmb’s picture

Version:7.x-1.0-beta5» 7.x-1.x-dev
Status:Active» Reviewed & tested by the community

Rolled against latest dev. and works just fine. Strait port of the 7.x-2.x one from what I can see. Let's get it in.

Jackinloadup’s picture

Patch in #1 worked for me as well on the 7.x-1.x branch

Dave Reid’s picture

Status:Reviewed & tested by the community» Needs work
Dave Reid’s picture

media_vimeo_file_default_types_alter() is also unnecessary.

kreynen’s picture

Version:7.x-1.x-dev» 7.x-2.x-dev
Assigned:Unassigned» kreynen

The update functions are only in the 2.x branch. This patch was to backport those to 1.x... which now looks like it is unnecessary as a result of #1911970: The audio, image, and video file types should default to a wildcard mimetype selector. I will take care of this along with revering the change if necessary in media_archive, media_bliptv, and media_cloudcast.

gmclelland’s picture

DamienMcKenna’s picture

I'm having this problem with Media v7.x-2.0-alpha2 and Media:Vimeo v7.x-2.0-rc1, I had to add "video/vimeo" to the list of mimetypes at admin/structure/file-types/manage/video in order for it to work correctly.

DamienMcKenna’s picture

So on my site, that has been running Media v2 since 2011, the MIME types list for the Video file type includes 54 different "video/[something]" values, whereas on a clean D7 testbed that was reinstalled a week ago it just says "video/*". I imagine this may ultimately be a file_entity problem, along the way it should have fixed its MIME types but failed to do so.

DamienMcKenna’s picture

Title:Register video/vimeo mimetype else not recognised as a video» Fix video MIME types (was "Register video/vimeo mimetype else not recognized as a video")
Project:Media: Vimeo» File Entity (fieldable files)
Assigned:kreynen» Unassigned
Status:Needs work» Needs review
StatusFileSize
new599 bytes
PASSED: [[SimpleTest]]: [MySQL] 874 pass(es).
[ View ]

Moving this to the File Entity queue so that the video MIME type string can be fixed via an update hook.

Dave Reid’s picture

Project:File Entity (fieldable files)» Media: Vimeo
Status:Needs review» Active

I don't believe this is actually something that needs to be fixed. This is why we were actually in the unstable state. The current export is correct and you could always just revert the file type to the default export. You also have the ability to alter the file type definition so this could be altered from a contrib module if needed. At this point we cannot alter what people have set in their file types.

Moving back since the mimetype was committed to 2.x of the Media: Vimeo module. I'm unsure of what further action needs to happen.

DamienMcKenna’s picture

Dave: Might it be worth adding an update script to at least display a message for anyone updating in the past year / six months that the display system has changed substantially and it may be best to rebuild it from the defaults?

Dave Reid’s picture

It might be worth documenting in a guide for unstable to alpha updates, or 1.x to 2.x updates?

DamienMcKenna’s picture

Title:Fix video MIME types (was "Register video/vimeo mimetype else not recognized as a video")» Notify via hook_update_N / document that the file MIME types and displays may need to be rebuilt
Project:Media: Vimeo» Media

I never used v1 on this site, it has always been v2, however because I started using it in 2011 there may not have been much difference at that point, other than the Views integration.