import React from 'react'; import { FormattedRelativeTime } from 'react-intl'; import { DownloadingItem } from '../../../server/lib/downloadtracker'; import Badge from '../Common/Badge'; interface DownloadBlockProps { downloadItem: DownloadingItem; is4k?: boolean; } const DownloadBlock: React.FC = ({ downloadItem, is4k = false, }) => { return (
{downloadItem.title}
{downloadItem.size ? Math.round( ((downloadItem.size - downloadItem.sizeLeft) / downloadItem.size) * 100 ) : 0} %
{is4k && ( 4K )} {downloadItem.status} ETA{' '} {downloadItem.estimatedCompletionTime ? ( ) : ( 'N/A' )}
); }; export default DownloadBlock;