Bug 191059

Summary: [patch] "Prefer tracks" gets disabled/enabled on startup only
Product: [Applications] amarok Reporter: Unknown <null>
Component: generalAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal CC: edward.hades
Priority: NOR    
Version: 2.2-SVN   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Fox for reported problem

Description Unknown 2009-04-29 18:46:45 UTC
Version:           2.0.90 (using 4.2.2 (KDE 4.2.2), Kubuntu packages)
Compiler:          cc
OS:                Linux (i686) release 2.6.28-11-generic

The "Prefer tracks" menu entry doesn't get enabled/disabled correctly: The status is not updated when changing the shuffle mode but only when I start amarok, i.e. when I disable shuffle while amarok runs the submenu stays available and when I enabled it while it runs I can't change the wax tracks are preferred.

This is Amarok 2.1 Beta from kubuntu-unstable
Comment 1 Ralf Jung 2009-05-03 16:49:20 UTC
I have the same issue with the current trunk. Attached patches fixes it for me, but it also changes the behaviour of SelectionAction in general to prevent the preferred (or favoured, as the source calls it) option from being lost when that submenu is disabled, which might have unwanted side-effects for other SelectionActions.
Comment 2 Ralf Jung 2009-05-03 16:56:11 UTC
Created attachment 33317 [details]
Fox for reported problem

- the two removed lines could have unintended side-effects (see last comment)
- I'm sorry if the style is wrong or something similar, this is my very first touch with the amarok source ;-)
Comment 3 Myriam Schweingruber 2009-05-31 15:00:40 UTC
Could somebody look at this patch please?
Comment 4 Ralf Jung 2009-06-21 12:17:45 UTC
Could someone please add [patch] to the title, since it seems to be common
policy to mark reports with patches attached this way? I didn't know that when I reported the problem.
Comment 5 Jeff Mitchell 2009-07-23 18:18:30 UTC
Fixed in Git revision 5a8cc53.
Comment 6 Unknown 2009-08-23 16:58:37 UTC
Git revision 824dc1cb3789f698af6792f15de85d8d0628e6d9 completely disabled the "favour tracks" menu, making the situation even worse than it was when I opened this bug... why that?

Adding author of that revision as CC - I hope this is the usual workflow here.
Comment 7 Edward Hades 2009-08-23 20:28:14 UTC
(In reply to comment #6)
> Git revision 824dc1cb3789f698af6792f15de85d8d0628e6d9 completely disabled the
> "favour tracks" menu, making the situation even worse than it was when I opened
> this bug... why that?

That's because the code for this feature was not yet implemented then. Stay
tuned for an update, though ;)
Comment 8 Edward Hades 2009-08-24 17:15:56 UTC
commit f1a0b2817769e58ff4f476c9f62e75e7b7cbf0bd
Author: Edward Hades <edward.hades@gmail.com>
Date:   Tue Aug 18 12:35:20 2009 +0400

    Added support for Favored random tracks mode.

 src/ActionClasses.cpp                              |    3 +-
 src/CMakeLists.txt                                 |    1 +
 src/playlist/PlaylistActions.cpp                   |    8 ++-
 .../navigators/FavoredRandomTrackNavigator.cpp     |  104 ++++++++++++++++++++
 .../navigators/FavoredRandomTrackNavigator.h       |   44 ++++++++
 5 files changed, 158 insertions(+), 2 deletions(-)