[mythtv-commits] Ticket #4093: Shuffle shouldn't sort "All My Music"
MythTV
mythtv at cvs.mythtv.org
Sun Oct 21 07:30:34 UTC 2007
#4093: Shuffle shouldn't sort "All My Music"
-------------------------------------------------+--------------------------
Reporter: Paul Lambert <paul at planar.id.au> | Owner: ijr
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: mythmusic | Version: head
Severity: low | Mlocked: 0
-------------------------------------------------+--------------------------
If you select to show the full music tree in the main window, and select a
shuffle mode, the "All My Music" tree gets sorted. It would be tidier if
it didn't.
I've looked through the code, and cannot easily see where this occurs. My
theory is that these nodes have attributes 0->4 on them the same as any
other node, and that the generic tree sorts both leaf nodes and branch
nodes.
I can think of three ways to fix this:
1. Modify the code that creates the branch nodes so that attributes 0-4
are set with numbers rather than whatever they normally are filled with.
If set correctly, that would result in the sort order becoming static for
this tree. This seems a bit kludgy, but is perhaps easier. I can't
obviously see where these branch nodes are created, I've had a bit of a
look around. I don't have a visual debugger, and haven't quite reduced
myself to putting debug statements in the code to work it out.
2. Modify the generic tree so that it only sorts leaf nodes. I cannot
think of any good reason why we would want to sort nodes other than leaf
nodes, but I'm not entirely sure where else in myth the generic tree is
used (being named "generic" suggests it might be used elsewhere).
3. Modify the sorting algorithms or the nodes so that they are aware
whether they are sortable or not. Those that are sortable get sorted,
those that aren't sortable don't. This is similar to 1., but is doing it
properly (at least to my mind). Problem is that I'm not comfortable
enough with the code to make the wholesale changes this would probably
require.
Any advice or pointers would be appreciated - I am happy to undertake some
coding but don't want to break things that I am not aware of.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/4093>
MythTV <http://svn.mythtv.org/trac>
MythTV
More information about the mythtv-commits
mailing list