youtube_scrape_text: generate default file extension
commitf4f0d00e328f8f52a1d508868f1b2c7c7470bd5e
authorJohn Foerch <jjfoerch@earthlink.net>
Tue, 20 Sep 2011 18:45:21 +0000 (20 14:45 -0400)
committerJohn Foerch <jjfoerch@earthlink.net>
Tue, 20 Sep 2011 18:54:23 +0000 (20 14:54 -0400)
treea4cc411c4b21a4c3faa81f9971126c012b219d86
parentbab484d689f8aac65bd83614653065f16cb50d88
youtube_scrape_text: generate default file extension

We found that mime_service.getPrimaryExtension throws
NS_ERROR_NOT_INITIALIZED on some systems for the mime type "video/webm".
What these systems had in common was no entry for this mime type in
/etc/mime.types.  This patch makes the youtube scraper generate a default
extension.  The minor part of the mime type itself is used as the default,
which should be fine for all the mime types that the youtube scraper will
encounter.

Thanks to Ben Spencer for solving this, and many others for helping to
narrow it down.
modules/page-modes/youtube.js