@stefan: I guess for files on gvfs-mounted volumes only the filename
extension is checked. My remote volumes are all mounted through NFS,
which is handled by the kernel (not gvfs) and is fully transparent to
the mime-type framework. So the header bytes are checked remotely too.

Unfortunately video/mp2t and application/x-linguist both match the
extension *.ts, only have different header bytes. My patch for
video/mp2t places its rule next to video/mpeg, which is AFTER
application/x-linguist. That's why application/x-linguist has priority
as long as header bytes do not count. (I did not want to break existing
associations with my patch ;-)

To help fixing your issue, please try to modify your 
/usr/share/mime/packages/freedesktop.org.xml. Move the following section of 
text/vnd.trolltech.linguist (alias application/x-linguist) down to the end, 
just before the </mime-info>:
  <mime-type type="text/vnd.trolltech.linguist">
    ...
    <glob pattern="*.ts"/>
    <alias type="application/x-linguist"/>
  </mime-type>
Then rebuild your mime-database (don't care if there are "unknown media types"):
$ sudo update-mime-database /usr/share/mime

Are your files on the network share now "MPEG-2 transport stream"?

-- 
.ts files always get recognized as application/x-linguist and never as 
video/mp2t (mpeg transport stream)
https://bugs.launchpad.net/bugs/502642
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to