Simplify play target sorting
This commit is contained in:
@@ -852,17 +852,8 @@ export class PlaybackManager {
|
||||
self.getTargets = function () {
|
||||
const promises = players.filter(displayPlayerIndividually).map(getPlayerTargets);
|
||||
|
||||
return Promise.all(promises).then(function (responses) {
|
||||
const targets = [];
|
||||
|
||||
for (const subTargets of responses) {
|
||||
for (const subTarget of subTargets) {
|
||||
targets.push(subTarget);
|
||||
}
|
||||
}
|
||||
|
||||
return targets.sort(sortPlayerTargets);
|
||||
});
|
||||
return Promise.all(promises)
|
||||
.then(responses => responses.flat().sort(sortPlayerTargets));
|
||||
};
|
||||
|
||||
self.playerHasSecondarySubtitleSupport = function (player = self._currentPlayer) {
|
||||
|
||||
Reference in New Issue
Block a user