diff --git a/web/src/components/DialogTorrentDetailsContent/TorrentCache/style.js b/web/src/components/DialogTorrentDetailsContent/TorrentCache/style.js index 0c7584d..3887f5d 100644 --- a/web/src/components/DialogTorrentDetailsContent/TorrentCache/style.js +++ b/web/src/components/DialogTorrentDetailsContent/TorrentCache/style.js @@ -62,5 +62,5 @@ export const SnakeWrapper = styled.div` export const PercentagePiece = styled.div` background: ${completeColor}; - height: ${({ percentage }) => (percentage)}%; + height: ${({ percentage }) => percentage}%; ` diff --git a/web/src/components/DialogTorrentDetailsContent/index.jsx b/web/src/components/DialogTorrentDetailsContent/index.jsx index 3311fcb..88aa75e 100644 --- a/web/src/components/DialogTorrentDetailsContent/index.jsx +++ b/web/src/components/DialogTorrentDetailsContent/index.jsx @@ -110,8 +110,11 @@ export default function DialogTorrentDetailsContent({ closeDialog, torrent }) { newNameStrings.push(title) } else if (torrentParsedName?.title) newNameStrings.push(torrentParsedName?.title) - // if (torrentParsedName?.year) newNameStrings.push(torrentParsedName?.year) - // if (torrentParsedName?.resolution) newNameStrings.push(torrentParsedName?.resolution) + // These 2 checks are needed to get year and resolution from torrent name if title does not have this info + if (torrentParsedName?.year && !title.includes(torrentParsedName?.year)) + newNameStrings.push(torrentParsedName?.year) + if (torrentParsedName?.resolution && !title.includes(torrentParsedName?.resolution)) + newNameStrings.push(torrentParsedName?.resolution) return newNameStrings.join(' ') } @@ -145,10 +148,17 @@ export default function DialogTorrentDetailsContent({ closeDialog, torrent }) {