I do not think it's useless because in some cases it's possible that the wrong language is set as preferred language otherwise.
For example, you have set up english as first priority language and german as second. Then if the stream includes both these languages with english as stream0 and german as stream1 then without the priority check german or stream1 will be selected because it's also in the preferred list but with higher index in the stream array so it will be selected as the streams array is iterated.
I can see that in you're case it's not working correct either but your solution will break it for others, so I think you'll have to come up with another solution.
//johnzered |