Summary: | Fix entry for application/x-srt | ||
---|---|---|---|
Product: | shared-mime-info | Reporter: | Osmo Salomaa <otsaloma> |
Component: | freedesktop.org.xml | Assignee: | Jonathan Blandford <jrb> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | bugzilla, mail |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Proposed patch
Proposed patch |
Description
Osmo Salomaa
2007-08-23 09:37:02 UTC
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.