Comment 7 for bug 17165

Revision history for this message
In , j^ (j) wrote :

to my idea was to use the mime magic paterns to match all known codecs
and fallback to application/ogg if not known.
the problem with the attached version is that it matches "Ogg Multimedia"
in the list view until one selects the file. than it will do an exact match.
is this a bug in nautilus not using the priortiy?

---
  <mime-type type="application/ogg">
    <comment>Ogg Multimedia</comment>
    <magic priority="40">
      <match type="string" value="OggS" offset="0"/>
    </magic>
    <glob pattern="*.ogg"/>
  </mime-type>
  <mime-type type="audio/vorbis">
    <comment>Ogg Vorbis audio</comment>
    <magic priority="50">
      <match type="string" value="OggS" offset="0">
        <match type="string" value="\x01vorbis" offset="28"/>
      </match>
    </magic>
    <glob pattern="*.ogg"/>
  </mime-type>
  <mime-type type="audio/x-oggflac">
    <comment>Ogg FLAC audio</comment>
    <magic priority="50">
      <match type="string" value="OggS" offset="0">
        <match type="string" value="fLaC" offset="28"/>
      </match>
    </magic>
    <glob pattern="*.ogg"/>
  </mime-type>
  <mime-type type="audio/x-speex">
    <comment>Ogg Speex audio</comment>
    <magic priority="50">
      <match type="string" value="OggS" offset="0">
        <match type="string" value="Speex " offset="28"/>
      </match>
    </magic>
    <glob pattern="*.ogg"/>
  </mime-type>
  <mime-type type="video/x-theora">
    <comment>Ogg Theora video</comment>
    <magic priority="50">
      <match type="string" value="OggS" offset="0">
        <match type="string" value="\x80theora" offset="28"/>
      </match>
    </magic>
    <glob pattern="*.ogg"/>
  </mime-type>
  <mime-type type="video/x-ogm">
    <comment>OGM video</comment>
    <magic priority="50">
      <match type="string" value="OggS" offset="0">
        <match type="string" value="video" offset="29"/>
      </match>
    </magic>
    <glob pattern="*.ogm"/>
  </mime-type>