<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>197346</bug_id>
          
          <creation_ts>2009-06-21 10:40:01 +0000</creation_ts>
          <short_desc>kcm_filetypes does not store settings for audio/mp3</short_desc>
          <delta_ts>2010-03-02 15:19:47 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>systemsettings</product>
          <component>kcm_filetypes</component>
          <version>unspecified</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Marc Schiffbauer">mschiff</reporter>
          <assigned_to name="David Faure">faure</assigned_to>
          <cc>andresbajotierra</cc>
    
    <cc>muziofg</cc>
    
    <cc>pino</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>779249</commentid>
    <comment_count>0</comment_count>
    <who name="Marc Schiffbauer">mschiff</who>
    <bug_when>2009-06-21 10:40:01 +0000</bug_when>
    <thetext>Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

I was trying to associate &quot;JuK&quot; with the audio/mp3 file type.

Systemsettings -&gt; Advanced -&gt; File-Types (or similar, german locale here)

Then type mp3 into the searchbox, then expand audio -&gt; mp3

Now add &quot;juk&quot; to the applications, it will be added to the list.
So far so good.

But after clicking &quot;apply&quot;, all changes will be lost and old settings are restored.

If I call &quot;keditfiletype audio/mp3&quot; from the console and edit filetypes there it works as expected and the kcm module will show the new settings too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>781269</commentid>
    <comment_count>1</comment_count>
    <who name="Dario Andres">andresbajotierra</who>
    <bug_when>2009-06-24 18:32:53 +0000</bug_when>
    <thetext>Here using:

Qt: 4.5.1 (qt-copy  971295)
KDE: 4.2.92 (KDE 4.2.92 (KDE 4.3 &gt;= 20090617))
kdelibs svn rev. 984425 / kdebase svn rev. 984427
on ArchLinux i686 - Kernel 2.6.29.4

I can reproduce the bug</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>781274</commentid>
    <comment_count>2</comment_count>
    <who name="Dario Andres">andresbajotierra</who>
    <bug_when>2009-06-24 18:41:20 +0000</bug_when>
    <thetext>Further tests:

- &quot;keditfiletype audio/mp3&quot; works properly
- &quot;kcmshell4 filetypes&quot; also shows this behaviour.

Modifying the apps for &quot;audio/mpeg&quot; works properly, but not for &quot;audio/mp3&quot;
Just note that &quot;audio/mp3&quot; is not a &quot;real mimetype&quot; but the extension for &quot;audio/mpeg&quot;. (Also, when &quot;audio/mpeg&quot; is selected, the filename patterns show &quot;mp3&quot; and &quot;mpga&quot;; however if &quot;audio/mp3&quot; is selected, no filename patters are shown)

@David: Could this be related then to this mixup of real mimetypes and extensions ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>781276</commentid>
    <comment_count>3</comment_count>
    <who name="Dario Andres">andresbajotierra</who>
    <bug_when>2009-06-24 18:44:21 +0000</bug_when>
    <thetext>Oh, I&apos;m guessing something:

When you have the complete dialog:
if you edit the &quot;audio/mp3&quot; mimetype, if you add an application , then this is saved, but then the kcmshellApp will save the associated applications for &quot;audio/mpeg&quot; (as this is order by name ascending), and as &quot;audio/mpeg&quot; doesn&apos;t have this new added assoc application, it will delete it. And therefore, when the kcmmodule is updated after save, the &quot;audio/mp3&quot; &quot;mime&quot; will reflect the state of &quot;audio/mpeg&quot;.

That would explain the associated programs not being remembered in this weird case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>887813</commentid>
    <comment_count>4</comment_count>
    <who name="Marc Schiffbauer">mschiff</who>
    <bug_when>2009-12-27 22:30:58 +0000</bug_when>
    <thetext>This bug still exists in 4.3.85 :-(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>893192</commentid>
    <comment_count>5</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2010-01-06 12:53:49 +0000</bug_when>
    <thetext>I don&apos;t even have a audio/mp3 mimetype. The mimetype for mp3 files is audio/mpeg.
audio/mp3 is an alias for audio/mpeg

Hmm. I&apos;ll have to look at what we do with aliases....</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>924851</commentid>
    <comment_count>6</comment_count>
    <who name="Francesco">muziofg</who>
    <bug_when>2010-02-26 16:08:38 +0000</bug_when>
    <thetext>I have the same problem.
But it is strange that, for example, mp3.xml is present in ~/.local/share/mime/audio/ (created by KDE for each first launch of a new user) and does not exist in /usr/share/mime/audio/

I use Kde 4.3.4 on a Debian sqeeze with shared-mime-info 0.70-1 version</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>926680</commentid>
    <comment_count>7</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2010-03-01 13:19:54 +0000</bug_when>
    <thetext>Then there is a packages file that defines audio/mp3 for you. KDE doesn&apos;t define it, it must come from somewhere else (wine, maybe, or some distro hack).

Please search for &quot;audio/mp3&quot; in every directory returned by the command &quot;kde4-config --path xdgdata-mime --locate packages/&quot; and tell me what you find.

E.g. grep mp3 ~/.local/share/mime/packages/*
but also any other directory returned by the command above.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>926695</commentid>
    <comment_count>8</comment_count>
    <who name="Marc Schiffbauer">mschiff</who>
    <bug_when>2010-03-01 14:34:20 +0000</bug_when>
    <thetext>Hi David, I am not Francesco, but I have that mp3.xml too, generated by gentoo&apos;s update-mime-database tool.

mschiff@bart ~ $ kde4-config --path xdgdata-mime --locate packages/
/home/mschiff/.local/share/mime/packages/
mschiff@bart ~ $ grep mp3 ~/.local/share/mime/packages/*
/home/mschiff/.local/share/mime/packages/application-x-nsv-vp3-mp3.xml:    &lt;mime-type type=&quot;application/x-nsv-vp3-mp3&quot;&gt;
/home/mschiff/.local/share/mime/packages/audio-mp3.xml:    &lt;mime-type type=&quot;audio/mp3&quot;&gt;
/home/mschiff/.local/share/mime/packages/audio-mp3.xml:        &lt;glob pattern=&quot;*.mp3&quot;/&gt;
mschiff@bart ~ $</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>926820</commentid>
    <comment_count>9</comment_count>
    <who name="Francesco">muziofg</who>
    <bug_when>2010-03-01 19:12:26 +0000</bug_when>
    <thetext>I have found the same result of Marc Schiffbauer, except of the record &quot;&lt;glob
pattern=&quot;*.mp3&quot;/&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>927030</commentid>
    <comment_count>10</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2010-03-02 09:21:15 +0000</bug_when>
    <thetext>The problem comes from this file, then: /home/mschiff/.local/share/mime/packages/application-x-nsv-vp3-mp3.xml

From its name, I would say that it was created by a webbrowser plugin (also called &quot;netscape plugins&quot;). Can you confirm that this file says &quot;&lt;!--MimeType generated by nspluginscan--&gt;&quot;?

Ah! And in that case, I found the bug: pluginscan.cpp uses KMimeType::mimeType() without &quot;ResolveAliases&quot; so it thinks the mimetype doesn&apos;t exist, and defines it. Pino is right, we really have to change mimeType() so it resolves aliases by default.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>927117</commentid>
    <comment_count>11</comment_count>
    <who name="Marc Schiffbauer">mschiff</who>
    <bug_when>2010-03-02 11:39:48 +0000</bug_when>
    <thetext>Hi David,

bingo!:
cat /home/mschiff/.local/share/mime/packages/application-x-nsv-vp3-mp3.xml
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!--MimeType generated by nspluginscan--&gt;&lt;mime-info xmlns=&quot;http://www.freedesktop.org/standards/shared-mime-info&quot;&gt;
    &lt;mime-type type=&quot;application/x-nsv-vp3-mp3&quot;&gt;
        &lt;comment&gt;Nullsoft Streaming Video&lt;/comment&gt;
    &lt;/mime-type&gt;
&lt;/mime-info&gt;

Great that you found the bug! Any chance to find a bugfix in 4.4.2 then?

Marc</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>927191</commentid>
    <comment_count>12</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2010-03-02 15:19:47 +0000</bug_when>
    <thetext>SVN commit 1097954 by dfaure:

As discussed with Pino: make alias resolution the default in KMimeType::mimeType.
There is just no good reason not to, aliases can be used anywhere, especially with
shared-mime-info replacing mimetypes with aliases over time (e.g. image/ico).

This fixes at least two bugs:
1) a bug noticed by Pino: if you set the old name as filter in kfiledialog, when
   updating s-m-i it won&apos;t work anymore (because aliases are not resolved)
2) the bug that nspluginscan would define mimetypes because &quot;unknown&quot; when they are
   in fact aliases.
BUG: 197346
Fixed for: 4.4.2


 M  +1 -1      services/kmimetype.h  
 M  +8 -4      tests/kmimetypetest.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&amp;revision=1097954</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>