1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #6277 from thornbill/no-self-cast-target

This commit is contained in:
Bill Thornton 2024-11-21 20:07:44 -05:00 committed by GitHub
commit ffd7cad65c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 31 deletions

View file

@ -852,31 +852,8 @@ export class PlaybackManager {
self.getTargets = function () {
const promises = players.filter(displayPlayerIndividually).map(getPlayerTargets);
return Promise.all(promises).then(function (responses) {
return ServerConnections.currentApiClient().getCurrentUser().then(function (user) {
const targets = [];
targets.push({
name: globalize.translate('HeaderMyDevice'),
id: 'localplayer',
playerName: 'localplayer',
playableMediaTypes: ['Audio', 'Video', 'Photo', 'Book'],
isLocalPlayer: true,
supportedCommands: self.getSupportedCommands({
isLocalPlayer: true
}),
user: user
});
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) {