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:
commit
ffd7cad65c
3 changed files with 10 additions and 31 deletions
|
@ -65,17 +65,20 @@ const RemotePlayMenu: FC<RemotePlayMenuProps> = ({
|
||||||
open={open}
|
open={open}
|
||||||
onClose={onMenuClose}
|
onClose={onMenuClose}
|
||||||
>
|
>
|
||||||
{!isChromecastPluginLoaded && ([
|
{!isChromecastPluginLoaded && (
|
||||||
<MenuItem key='cast-unsupported-item' disabled>
|
<MenuItem disabled>
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
<Warning />
|
<Warning />
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
<ListItemText>
|
<ListItemText>
|
||||||
{globalize.translate('GoogleCastUnsupported')}
|
{globalize.translate('GoogleCastUnsupported')}
|
||||||
</ListItemText>
|
</ListItemText>
|
||||||
</MenuItem>,
|
</MenuItem>
|
||||||
<Divider key='cast-unsupported-divider' />
|
)}
|
||||||
])}
|
|
||||||
|
{!isChromecastPluginLoaded && playbackTargets.length > 0 && (
|
||||||
|
<Divider />
|
||||||
|
)}
|
||||||
|
|
||||||
{playbackTargets.map(target => (
|
{playbackTargets.map(target => (
|
||||||
<MenuItem
|
<MenuItem
|
||||||
|
|
|
@ -852,31 +852,8 @@ export class PlaybackManager {
|
||||||
self.getTargets = function () {
|
self.getTargets = function () {
|
||||||
const promises = players.filter(displayPlayerIndividually).map(getPlayerTargets);
|
const promises = players.filter(displayPlayerIndividually).map(getPlayerTargets);
|
||||||
|
|
||||||
return Promise.all(promises).then(function (responses) {
|
return Promise.all(promises)
|
||||||
return ServerConnections.currentApiClient().getCurrentUser().then(function (user) {
|
.then(responses => responses.flat().sort(sortPlayerTargets));
|
||||||
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);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
self.playerHasSecondarySubtitleSupport = function (player = self._currentPlayer) {
|
self.playerHasSecondarySubtitleSupport = function (player = self._currentPlayer) {
|
||||||
|
|
|
@ -452,7 +452,6 @@
|
||||||
"HeaderMetadataSettings": "Metadata Settings",
|
"HeaderMetadataSettings": "Metadata Settings",
|
||||||
"HeaderMoreLikeThis": "More Like This",
|
"HeaderMoreLikeThis": "More Like This",
|
||||||
"HeaderMusicQuality": "Music Quality",
|
"HeaderMusicQuality": "Music Quality",
|
||||||
"HeaderMyDevice": "My Device",
|
|
||||||
"HeaderMyMedia": "My Media",
|
"HeaderMyMedia": "My Media",
|
||||||
"HeaderMyMediaSmall": "My Media (small)",
|
"HeaderMyMediaSmall": "My Media (small)",
|
||||||
"HeaderNavigation": "Navigation",
|
"HeaderNavigation": "Navigation",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue