Kissaki / MumPI

A Webinterface for Mumble Server. Written in PHP, using Ice middleware.
http://kissaki.github.io/MumPI/
Other
104 stars 30 forks source link

Wrong Channel order CVP in JSON #52

Closed nicolasjoly closed 8 years ago

nicolasjoly commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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!?

nicolasjoly commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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