Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong Channel order CVP in JSON #52

Closed
nicolasjoly opened this issue Dec 10, 2015 · 6 comments · May be fixed by nicolasjoly/MumPI#1
Closed

Wrong Channel order CVP in JSON #52

nicolasjoly opened this issue Dec 10, 2015 · 6 comments · May be fixed by nicolasjoly/MumPI#1
Milestone

Comments

@nicolasjoly
Copy link

It still doesn't order the channels the right way (http://i.imgur.com/2JJdZrO.png). As you can see at the bottom, STFU and "Small Talk" should be swapped.

Here's another screenshot with the mumble client on the right and the CV on the left: http://i.imgur.com/Std0Wfk.png

Both channels are set at Position=0.
If I put Position=1 for STFU, it will be at the good place.
If I change STFU to Stfu, it will be at the good place.

So I think that the compare also compares the case. The capital letters are before the non-capital letters in the ascii table which might be the problem.

@Kissaki
Copy link
Owner

Kissaki commented Dec 11, 2015

I guess I’ll have to check how Mumble orders them.
MumPI now uses locale-specific ordering.

By "wrong", you mean different from Mumble I see.
(which is not necessarily wrong)

@Kissaki
Copy link
Owner

Kissaki commented Dec 21, 2015

2015-12-21 23_29_51-mumble -- 1 3 0 883 g2a31708 snapshot
2015-12-21 23_30_03-mview mumble channel viewer

Looks correct to me.

I have all these channels position set 0.

Oh, I guess you are using viewer, not viewer2?
Is there a reason for that?

I guess the installation doc still pointed to viewer, not viewer2.

The reason for the two in the first place is viewer uses SVG images, but renders rather slow for that reason.
viewer2 was created afterwards, in well structured javascript.

(Viewer also does not use the x_connecturl for linking channels, which I guess explains the other problem.)
I should/will probably just drop viewer in favor of viewer2, unless you can present a reason to keep viewer1!?

@Kissaki Kissaki mentioned this issue Dec 21, 2015
@Kissaki Kissaki added this to the 2.2.7 milestone Dec 21, 2015
@nicolasjoly
Copy link
Author

Oh I get why we didn't understand each other :) I'm using my own ChannelViewer (own php, js, etc). All I'm using is your JSON. So I'm not using either viewer or viewer2. This means that there's a big chance your mview.js is perfectly fine with the way ChannelViewerProtocolProducer.php now works and my javascript didn't like the changes.

Here's the JSON I'm using: http://MYIP/MumPI/?view=json&serverId=1

@Kissaki
Copy link
Owner

Kissaki commented Dec 22, 2015

The JSON contains the position field, which should be used by the viewer.
Otherwise it will not be correct when using position values anyway.

But I guess the provided CVP could order it accordingly as well - I have not checked that (only about position and text, not capsulation order specifically).

@Kissaki
Copy link
Owner

Kissaki commented Jan 10, 2016

PHP is a pain in the arse.
Can’t even really iterate through a unicode string per letter…
I am starting to wonder if its worth the effort (and potential performance loss).

@nicolasjoly
Copy link
Author

I thought my fix was pretty simple and effective. Any reason it could cause problems?

@Kissaki Kissaki changed the title Wrong Channel order (2.2.6) Wrong Channel order (in JSON) Jan 16, 2016
@Kissaki Kissaki changed the title Wrong Channel order (in JSON) Wrong Channel order CVP in JSON Jan 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants