AIMP Forum

AIMP for Windows => Дополнения / Addons => Разработка / Development => Topic started by: Moshi0 on November 18, 2016, 14:46:46

Title: Nodes with the same DisplayTitle in grouping tree
Post by: Moshi0 on November 18, 2016, 14:46:46
How does AIMP handle nodes with the same DisplayTitle in grouping tree?

If I for example have this tree:
Code: [Select]
Music
    Artists
        Sabaton
            Metalizer
            Metalizer

Currently no matter which "Metalizer" node I click in the selection is always the first one.
Is that correct AIMP behavior or its a bug in my code?

I don't think it should work like that if its correct.
Title: Re: Nodes with the same DisplayTitle in grouping tree
Post by: Artem on November 18, 2016, 15:49:23
AIMP group the data by value, not display text. Looks like you have same display text for different values
Title: Re: Nodes with the same DisplayTitle in grouping tree
Post by: Moshi0 on November 18, 2016, 17:39:01
AIMP group the data by value, not display text. Looks like you have same display text for different values

Yes, I have 2 nodes with the same display text but different values.
Still, when I click on any of the two nodes, the selection is always with the first node value.
Title: Re: Nodes with the same DisplayTitle in grouping tree
Post by: Artem on November 18, 2016, 19:51:00
Still, when I click on any of the two nodes, the selection is always with the first node value.

TreeView in UI uses display text to build the path to the specified value.
Title: Re: Nodes with the same DisplayTitle in grouping tree
Post by: Moshi0 on November 19, 2016, 02:17:51
TreeView in UI uses display text to build the path to the specified value.

So there is no way around it?
Seems weird to me that you can add multiple nodes with the same display text but you can't interact with all of them. It's not like the ui does not know they are separate nodes.
Don't know internals of AIMP but seems like this could be fixed to allow multiple nodes with the same display text.
Title: Re: Nodes with the same DisplayTitle in grouping tree
Post by: Artem on November 19, 2016, 12:09:01
Yes, I think that this behavior must be correct, but, anyway, what reason to use one display name for different values?
Title: Re: Nodes with the same DisplayTitle in grouping tree
Post by: Moshi0 on November 19, 2016, 16:02:25
Yes, I think that this behavior must be correct, but, anyway, what reason to use one display name for different values?

It makes no sense if you think about the tree like its a file explorer because you can't have multiple folders with the same name, but many services/apis will have multiple entries with the same display text but different internal id. For example DLNA or PLEX api will return two "Metalizer" albums because there are two versions of it with two release dates.

IMO there is no reason why you can't click on all of the nodes and this should be fixed in future.
Title: Re: Nodes with the same DisplayTitle in grouping tree
Post by: Artem on November 19, 2016, 16:38:12
Ok. This bug will be fixed in next build of v4.12