mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-23 05:59:54 +00:00
Merge pull request #6277 from thornbill/no-self-cast-target
This commit is contained in:
commit
ffd7cad65c
@ -65,17 +65,20 @@ const RemotePlayMenu: FC<RemotePlayMenuProps> = ({
|
||||
open={open}
|
||||
onClose={onMenuClose}
|
||||
>
|
||||
{!isChromecastPluginLoaded && ([
|
||||
<MenuItem key='cast-unsupported-item' disabled>
|
||||
{!isChromecastPluginLoaded && (
|
||||
<MenuItem disabled>
|
||||
<ListItemIcon>
|
||||
<Warning />
|
||||
</ListItemIcon>
|
||||
<ListItemText>
|
||||
{globalize.translate('GoogleCastUnsupported')}
|
||||
</ListItemText>
|
||||
</MenuItem>,
|
||||
<Divider key='cast-unsupported-divider' />
|
||||
])}
|
||||
</MenuItem>
|
||||
)}
|
||||
|
||||
{!isChromecastPluginLoaded && playbackTargets.length > 0 && (
|
||||
<Divider />
|
||||
)}
|
||||
|
||||
{playbackTargets.map(target => (
|
||||
<MenuItem
|
||||
|
@ -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) {
|
||||
|
@ -452,7 +452,6 @@
|
||||
"HeaderMetadataSettings": "Metadata Settings",
|
||||
"HeaderMoreLikeThis": "More Like This",
|
||||
"HeaderMusicQuality": "Music Quality",
|
||||
"HeaderMyDevice": "My Device",
|
||||
"HeaderMyMedia": "My Media",
|
||||
"HeaderMyMediaSmall": "My Media (small)",
|
||||
"HeaderNavigation": "Navigation",
|
||||
|
Loading…
Reference in New Issue
Block a user