Skip to content

Commit

Permalink
code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
marcopeocchi committed Aug 20, 2024
1 parent 3205711 commit 25210cc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
12 changes: 10 additions & 2 deletions frontend/src/views/Livestream.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,18 @@ const LiveStreamMonitorView: React.FC = () => {
{mapStatusToChip(progress[k].Status)}
</TableCell>
<TableCell align='right'>
{formatMicro(Number(progress[k].WaitTime))}
{/* TODO: change to enum */}
{progress[k].Status === 0
? formatMicro(Number(progress[k].WaitTime))
: "-"
}
</TableCell>
<TableCell align='right'>
{new Date(progress[k].LiveDate).toLocaleString()}
{/* TODO: change to enum */}
{progress[k].Status === 0
? new Date(progress[k].LiveDate).toLocaleString()
: "-"
}
</TableCell>
<TableCell align='right'>
<Button variant='contained' size='small' onClick={() => stop(k)}>
Expand Down
1 change: 0 additions & 1 deletion server/internal/livestream/livestream.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ func (l *LiveStream) monitorStartTime(r io.Reader, doneWait chan struct{}) {
}

const TRIES = 5

/*
if it's waiting a livestream the 5th line will indicate the time to live
its a dumb and not robust method.
Expand Down

0 comments on commit 25210cc

Please sign in to comment.