vwren | 16 Mar 2012 17:57
Gravatar

MIME Type incorrectly applied

I'm a new ROX user, and I'm setting up my various configurations.  I've
run across at least one incorrectly applied mime-type, though.  In my
music folders, I have an *.m3u file which holds the playlist for the
directory.  When I try to apply an action to it (Audacious, in my case),
ROX wants to change the action for "text/plain"  I looked up where *.m3u
might be referenced in /usr/share/mime, and found these entries:

/usr/share/mime/globs:

audio/x-mpegurl:*.m3u
application/vnd.apple.mpegurl:*.m3u

Also, in /usr/share/mime/audio:

x-mpegurl.xml:  <alias type="application/m3u"/>
x-mpegurl.xml:  <alias type="audio/m3u"/>
x-mpegurl.xml:  <alias type="audio/x-m3u"/>
x-mpegurl.xml:  <glob pattern="*.m3u"/>
x-mpegurl.xml:  <glob pattern="*.m3u8"/>

So clearly the mime type should be "audio/x-mpgurl" based on globbing.

I used the ROX MIME-editor, and when I pull up audio/x-mpegurl, it, too,
shows, right in the first section ("Name matching")
Match "*.m3u"
Match "*.m3u8"
Match "*.vlc"

On the (far-fetched) theory that spaces in the filename were causing
problems, I tried it with no spaces, but it had no effect.
(Continue reading)

Alex Austin | 16 Mar 2012 23:26
Picon

Re: MIME Type incorrectly applied

I suspect it's using libmagic (the file command) to get MIME info. I've found that, under ROX, file extensions don't matter.


- Alex
--
It is referred to as the Fibonacci meal. Today's dinner is the sum of yesterday's leftovers and the day before's leftovers.


On Fri, Mar 16, 2012 at 11:57 AM, <vwren <at> ponyhome.com> wrote:
I'm a new ROX user, and I'm setting up my various configurations.  I've
run across at least one incorrectly applied mime-type, though.  In my
music folders, I have an *.m3u file which holds the playlist for the
directory.  When I try to apply an action to it (Audacious, in my case),
ROX wants to change the action for "text/plain"  I looked up where *.m3u
might be referenced in /usr/share/mime, and found these entries:

/usr/share/mime/globs:

audio/x-mpegurl:*.m3u
application/vnd.apple.mpegurl:*.m3u

Also, in /usr/share/mime/audio:

x-mpegurl.xml:  <alias type="application/m3u"/>
x-mpegurl.xml:  <alias type="audio/m3u"/>
x-mpegurl.xml:  <alias type="audio/x-m3u"/>
x-mpegurl.xml:  <glob pattern="*.m3u"/>
x-mpegurl.xml:  <glob pattern="*.m3u8"/>

So clearly the mime type should be "audio/x-mpgurl" based on globbing.

I used the ROX MIME-editor, and when I pull up audio/x-mpegurl, it, too,
shows, right in the first section ("Name matching")
Match "*.m3u"
Match "*.m3u8"
Match "*.vlc"

On the (far-fetched) theory that spaces in the filename were causing
problems, I tried it with no spaces, but it had no effect.

My question is, how do I determine where ROX is getting the "text/plain"
MIME type for *.m3u, and how do I get it to find the CORRECT one?  Are
there MIME shared libraries ROX depends on? (I built this system from
scratch, so no "yum" or "apt-get" please.)

Victor Wren


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
rox-users mailing list
rox-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rox-users

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
rox-users mailing list
rox-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rox-users
vwren | 17 Mar 2012 14:06
Gravatar

Re: MIME Type incorrectly applied

>> I'm a new ROX user, and I'm setting up my various configurations.  I've
>> run across at least one incorrectly applied mime-type, though.  In my
>> music folders, I have an *.m3u file which holds the playlist for the
>> directory.  When I try to apply an action to it (Audacious, in my case),
>> ROX wants to change the action for "text/plain"  I looked up where *.m3u
>> might be referenced in /usr/share/mime, and found these entries:

> I suspect it's using libmagic (the file command) to get MIME info. I've
> found that, under ROX, file extensions don't matter.
>
> - Alex

Looking at the source directories, it appears to be using the XDG MIME
libraries, including xdgmimeglob.{c,h}  which suggests to me that yes, it
does consider filename extensions. (or should).  Whether ROX is actually
using the information returned by those routines rather than depending on
the file magic information is the question.
--Victor Wren

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
Stephen Watson | 17 Mar 2012 10:28
Picon
Picon

Re: MIME Type incorrectly applied

vwren <at> ponyhome.com wrote:

> I'm a new ROX user, and I'm setting up my various configurations.  I've
> run across at least one incorrectly applied mime-type, though.  In my
> music folders, I have an *.m3u file which holds the playlist for the
> directory.  When I try to apply an action to it (Audacious, in my case),
> ROX wants to change the action for "text/plain"  I looked up where *.m3u
> might be referenced in /usr/share/mime, and found these entries:
> 
> /usr/share/mime/globs:
> 
> audio/x-mpegurl:*.m3u
> application/vnd.apple.mpegurl:*.m3u
> 
> Also, in /usr/share/mime/audio:
> 
> x-mpegurl.xml:  <alias type="application/m3u"/>
> x-mpegurl.xml:  <alias type="audio/m3u"/>
> x-mpegurl.xml:  <alias type="audio/x-m3u"/>
> x-mpegurl.xml:  <glob pattern="*.m3u"/>
> x-mpegurl.xml:  <glob pattern="*.m3u8"/>
> 
> So clearly the mime type should be "audio/x-mpgurl" based on globbing.
> 
> I used the ROX MIME-editor, and when I pull up audio/x-mpegurl, it, too,
> shows, right in the first section ("Name matching")
> Match "*.m3u"
> Match "*.m3u8"
> Match "*.vlc"
> 
> On the (far-fetched) theory that spaces in the filename were causing
> problems, I tried it with no spaces, but it had no effect.
> 
> My question is, how do I determine where ROX is getting the "text/plain"
> MIME type for *.m3u, and how do I get it to find the CORRECT one?  Are
> there MIME shared libraries ROX depends on? (I built this system from
> scratch, so no "yum" or "apt-get" please.)

Just confirm that the .m3u file is not empty.  Zero length files are always
classified as text/plain.

--

-- 
Stephen Watson     http://www.kerofin.demon.co.uk/
If you read this on a mailing list, send any reply back to the list and not
to me.  Not even CC.
Forget the shooty dog thing.

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
vwren | 17 Mar 2012 13:30
Gravatar

Re: MIME Type incorrectly applied

> vwren <at> ponyhome.com wrote:

> Just confirm that the .m3u file is not empty.  Zero length files are
> always
> classified as text/plain.

No, the file is not zero length.  If I open it with Audacious instead of
ROX, it works exactly as it is supposed to.  These are the same kind of
files auto-generated by any of a dozen different CD rippers.

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure

Gmane