Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove self cast target #6277

Merged
merged 2 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 2 additions & 25 deletions src/components/playback/playbackmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion src/strings/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,6 @@
"HeaderMetadataSettings": "Metadata Settings",
"HeaderMoreLikeThis": "More Like This",
"HeaderMusicQuality": "Music Quality",
"HeaderMyDevice": "My Device",
"HeaderMyMedia": "My Media",
"HeaderMyMediaSmall": "My Media (small)",
"HeaderNavigation": "Navigation",
Expand Down
Loading