There's an entry in the freedesktop.org.xml file for application/x-srt. This is the SubRip subtitle file format, see e.g. http://en.wikipedia.org/wiki/SubRip. I suggest that the mimetype be changed to "application/x-subrip" and that the comment be changed from the ambiguous "subtitle file" to "SubRip subtitles". I'd also add a string match for " --> ".
Created attachment 11233 [details] [review] Proposed patch
The patch is broken, as this is clearly wrong: + <match type="string" value=" --> " offset="0"/> There's no " --> " at offset 0 in subrip files. You're also completely removing the application/x-srt mime-type. It should be an alias of application/x-subrip, otherwise applications that rely on it will break.
(In reply to comment #2) > The patch is broken, as this is clearly wrong: > + <match type="string" value=" --> " offset="0"/> I didn't quite understand the offset part of the shared mime-info spec. Offset from where? What does byte offset mean for a plain text file of arbitrary character encoding?
(In reply to comment #3) > (In reply to comment #2) > > The patch is broken, as this is clearly wrong: > > + <match type="string" value=" --> " offset="0"/> > > I didn't quite understand the offset part of the shared mime-info spec. Offset > from where? What does byte offset mean for a plain text file of arbitrary > character encoding? It's the offset from the beginning of the file. You probably want something like offset="0:256" to look for that string in the first 256 chars of the file.
Created attachment 11376 [details] [review] Proposed patch Added alias application/x-srt. Added nested match for "1" at offset 0 and fixed offset for " --> ".
2007-09-04 Bastien Nocera <hadess@hadess.net> * freedesktop.org.xml.in: Fix the subrip mime-type to mention subrip, add magic, patch by Osmo Salomaa <otsaloma@cc.hut.fi> * tests/*: add a SubRip subtitle test
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.