$player->ext_id = $ext_id;
$player->episode()->associate($episode);
}
+ $stream_link = (!empty($twitch) && $twitch != 'No Data') ? 'https://twitch.tv/'.$twitch : '';
$user = $this->getUser($discord, $twitch);
$player->name_override = $discord;
+ $player->stream_override = $stream_link;
if ($user) {
$player->user()->associate($user);
+ if (!$user->stream_link && !empty($stream_link)) {
+ $user->stream_link = $stream_link;
+ $user->save();
+ }
} else {
$player->user()->disassociate();
}
import PropTypes from 'prop-types';
import React from 'react';
import { Button } from 'react-bootstrap';
+import { useTranslation } from 'react-i18next';
import Icon from '../common/Icon';
import { getStreamLink } from '../../helpers/Crew';
const MultiLink = ({ players }) => {
+ const { t } = useTranslation();
+
const streams = players.map(getStreamLink);
const names = streams.map(s => s.split('/').pop());
const url = `https://multistre.am/${names.join('/')}`;
+ if (names.indexOf('') !== -1) {
+ return <div className="episode-channel">
+ <Button
+ title={t('episodes.missingStreams')}
+ variant="outline-warning"
+ >
+ <Icon.WARNING title="" />
+ </Button>
+ </div>;
+ }
+
return <div className="episode-channel">
<Button
href={url}
rel="noreferer"
target="_blank"
- title="MultiTwitch"
+ title="MultiStream"
variant="outline-twitch"
>
- <Icon.STREAM />
+ <Icon.STREAM title="" />
{' MultiStream'}
</Button>
</div>;
channel: 'Kanal',
commentary: 'Kommentar',
empty: 'Keine anstehenden Termine.',
+ missingStreams: 'Fehlende Runner-Streams',
raceroom: 'Raceroom',
restreamDialog: {
acceptComms: 'Suche Kommentatoren',
channel: 'Channel',
commentary: 'Commentary',
empty: 'No dates coming up.',
+ missingStreams: 'Missing runner streams',
raceroom: 'Race room',
restreamDialog: {
acceptComms: 'Open commentary application',