diff --git a/web/src/components/DialogTorrentDetailsContent/index.jsx b/web/src/components/DialogTorrentDetailsContent/index.jsx index 846dec5..2ba1871 100644 --- a/web/src/components/DialogTorrentDetailsContent/index.jsx +++ b/web/src/components/DialogTorrentDetailsContent/index.jsx @@ -102,6 +102,17 @@ export default function DialogTorrentDetailsContent({ closeDialog, torrent }) { const bufferSize = settings?.PreloadBuffer ? Capacity : 33554432 // Default is 32mb if PreloadBuffer is false + const getTitle = value => { + const torrentParsedName = value && ptt.parse(value) + const newNameStrings = [] + + if (torrentParsedName?.title) newNameStrings.push(` ${torrentParsedName?.title}`) + if (torrentParsedName?.year) newNameStrings.push(`. ${torrentParsedName?.year}.`) + if (torrentParsedName?.resolution) newNameStrings.push(` (${torrentParsedName?.resolution})`) + + return newNameStrings.join(' ') + } + return ( <> {name && name !== title ? ( <> - {shortenText(name, 50)} + {shortenText(getTitle(name), 50)} {shortenText(title, 160)} ) : ( - {shortenText(title, 50)} + {shortenText(getTitle(title), 50)} )} @@ -189,8 +200,8 @@ export default function DialogTorrentDetailsContent({ closeDialog, torrent }) { {seasonAmount?.length > 1 && ( <> - Select Season - + Select Season + {seasonAmount.map(season => (