<div>Vincent,</div><div><br></div>In python-mime, I integrated both defaults.list and mimeinfo.cache:<div><a href="https://github.com/Adys/python-xdg/blob/master/xdg/actions.py#L119">https://github.com/Adys/python-xdg/blob/master/xdg/actions.py#L119</a></div>
<div><br></div><div>I remember going through the spec and kind of having to take decisions in its stead; is the ordering I have reasonable? (See the comment)</div><div><div><br></div><div><br clear="all">J. Leclanche<br>
<br><br><div class="gmail_quote">On Tue, Oct 2, 2012 at 3:48 PM, Vincent Untz <span dir="ltr"><<a href="mailto:vuntz@gnome.org" target="_blank">vuntz@gnome.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Le mardi 02 octobre 2012, à 16:29 +0200, Paul Menzel a écrit :<br>
<div><div class="h5">> Am Dienstag, den 02.10.2012, 16:14 +0200 schrieb Vincent Untz:<br>
> > Le lundi 01 octobre 2012, à 10:18 +0200, Paul Menzel a écrit :<br>
> > > Even adding `x-scheme-handler/cdda` to the desktop file<br>
> > ><br>
> > > $ grep MimeType /usr/share/applications/rhythmbox-device.desktop<br>
> > > MimeType=x-content/audio-player;x-content/audio-cdda;x-scheme-handler/cdda;<br>
> > ><br>
> > > and updating the MIME database<br>
> > ><br>
> > > $ sudo update-mime-database /usr/share/mime/<br>
> ><br>
> > I think you need to call update-desktop-database, not<br>
> > update-mime-database.<br>
><br>
> Thanks, but still no luck.<br>
><br>
> $ grep cdda /usr/share/applications/rhythmbox-device.desktop<br>
> MimeType=x-content/audio-player;x-content/audio-cdda;x-scheme-handler/cdda;<br>
> $ update-desktop-database<br>
> Warning in file "/usr/share/applications/pcmanfm.desktop": usage of MIME type "x-directory/normal" is discouraged ("x-directory" is an old media type that should be replaced with a modern equivalent)<br>
> Warning in file "/usr/share/applications/gnumeric.desktop": usage of MIME type "zz-application/zz-winassoc-xls" is discouraged ("zz-application/zz-winassoc-xls" should be replaced with "application/vnd.ms-excel")<br>
> The databases in [/usr/local/share/applications, /usr/share/applications] could not be updated.<br>
> $ xdg-mime query default "x-scheme-handler/cdda"<br>
> $ sudo update-desktop-database<br>
> Warning in file "/usr/share/applications/pcmanfm.desktop": usage of MIME type "x-directory/normal" is discouraged ("x-directory" is an old media type that should be replaced with a modern equivalent)<br>
> Warning in file "/usr/share/applications/gnumeric.desktop": usage of MIME type "zz-application/zz-winassoc-xls" is discouraged ("zz-application/zz-winassoc-xls" should be replaced with "application/vnd.ms-excel")<br>
> $ xdg-mime query default "x-scheme-handler/cdda"<br>
> $<br>
<br>
</div></div>Ah, right, xdg-mime looks at /usr/share/applications/defaults.list, and<br>
how this file is updated actually depends on the distro. This is<br>
unfortunately not covered by any spec.<br>
<br>
That being said, xdg-mime should probably fall back to looking at the<br>
content of /usr/share/applications/mimeinfo.cache and take one .desktop<br>
file from there if the mime type is present in there.<br>
<br>
This is <a href="https://bugs.freedesktop.org/show_bug.cgi?id=31629" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=31629</a><br>
<div class="HOEnZb"><div class="h5"><br>
Cheers,<br>
<br>
Vincent<br>
<br>
--<br>
Les gens heureux ne sont pas pressés.<br>
_______________________________________________<br>
xdg mailing list<br>
<a href="mailto:xdg@lists.freedesktop.org">xdg@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/xdg" target="_blank">http://lists.freedesktop.org/mailman/listinfo/xdg</a><br>
</div></div></blockquote></div><br></div></div>