Bug 195427 - JJ: Magnatune settings doesn’t remember download option
Summary: JJ: Magnatune settings doesn’t remember download option
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Internet Services (show other bugs)
Version: 2.3-GIT
Platform: unspecified Linux
: NOR normal
Target Milestone: 2.2.2
Assignee: Amarok Developers
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2009-06-06 10:59 UTC by Karl Ove Hufthammer
Modified: 2009-11-22 11:43 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Ove Hufthammer 2009-06-06 10:59:17 UTC
Version:           2.1 (using 4.2.3 (KDE 4.2.3), Mandriva Linux release 2009.1 (Official) for i586)
Compiler:          gcc
OS:                Linux (i686) release 2.6.29.3-desktop-1mnb

When I change the subscription type from ‘Stream’ to ’Download’ (or ‘Last ned’ as it is called in my localised Amarok) for Magnatune, the setting is forgotten the next time I open the dialogue. It is reset to ‘Stream’ (‘Straum’).

However, the other settings, i.e., the check box ‘I am a member’ and the preferred audio format (‘Ogg Vorbis‘) is remembered.
Comment 1 Myriam Schweingruber 2009-07-16 09:58:27 UTC
Nikolaj, any news on this?
Comment 2 Nikolaj Hald Nielsen 2009-07-16 10:28:04 UTC
yeah, its a bug caused by localized values being stored in the config and compared with non localized values when loading the settings. Ideally this should be saved as a non localized string.

This is a good JJ if anyone wants it.
Comment 3 Myriam Schweingruber 2009-11-16 14:06:02 UTC
Changing to JJ
Comment 4 Nicolas L. 2009-11-22 00:38:28 UTC
i proposed a patch but i don't remember on which bugreport i put it.

i will search it and tell this here
Comment 5 Nicolas L. 2009-11-22 00:40:38 UTC
can someone review this patch ? 


http://bugsfiles.kde.org/attachment.cgi?id=37927
Comment 6 Karl Ove Hufthammer 2009-11-22 09:29:29 UTC
If I understand it correctly, that patch isn't good enough. It tests if the type is equal to the localised value, which means it will break everytime the user switches UI language, or when the translation is updated/changed.

(One common example of the last case is when Amarok is only partly translated, so that an English (or other language) text is stored. When the user upgrades to a later version of Amarok, which has a (new or changed) translation of these strings, suddenly the setting stops working, with no obvious cause.)

The correct solution is to always store the English setting (or a numeric code, or something similar) in the settings file, but *display* it based on the current language settings.
Comment 7 Nikolaj Hald Nielsen 2009-11-22 11:43:14 UTC
commit 9070de03771104f4bac79f6673a877b1ae472778
Author: Nikolaj Hald Nielsen <nhnFreespirit@gmail.com>
Date:   Sun Nov 22 11:40:46 2009 +0100

    Store magnatune membership type setting as an int instead of a string.
    Also provide transparent migration for existing string based setting.
    BUG: 195427