[mythtv] text-plain on mimetype

Renato Araujo renatox at gmail.com
Wed Nov 8 19:57:36 UTC 2006


Hi guys,

I had implemented a upnp browser program, but im my code i need filter
files using the resource field on upnp item, but  mythtv files are
"text/plain".

I saw this function in the code:

QString HTTPRequest::GetMimeType( const QString &sFileExtension )
{
            for (int i = 0; i < g_nMIMELength; i++)
 	    {
 	        if ( sFileExtension == g_MIMETypes[i].pszExtension )
 	            return( g_MIMETypes[i].pszType );
 	    }
 	
 	    return( "text/plain" );
}

 mythtv use the extension for classify a file, but in some cases the
files no have extension like this :
"http://192.168.2.202:6544/getRecording?ChanId=1000&StartTime=2006-09-14T14:45:02"
  , mybe the solution for this is use libmagic for classify mimetype
file, and register a mimetype for nuv files.

Br
Renato


More information about the mythtv-dev mailing list