mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
swap details and format
This commit is contained in:
@@ -110,10 +110,10 @@ export default function DialogTorrentDetailsContent({ closeDialog, torrent }) {
|
|||||||
newNameStrings.push(title)
|
newNameStrings.push(title)
|
||||||
} else if (torrentParsedName?.title) newNameStrings.push(torrentParsedName?.title)
|
} else if (torrentParsedName?.title) newNameStrings.push(torrentParsedName?.title)
|
||||||
|
|
||||||
if (torrentParsedName?.year) newNameStrings.push(torrentParsedName?.year)
|
// if (torrentParsedName?.year) newNameStrings.push(torrentParsedName?.year)
|
||||||
if (torrentParsedName?.resolution) newNameStrings.push(torrentParsedName?.resolution)
|
// if (torrentParsedName?.resolution) newNameStrings.push(torrentParsedName?.resolution)
|
||||||
|
|
||||||
return newNameStrings.join('. ')
|
return newNameStrings.join(' ')
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -146,11 +146,11 @@ export default function DialogTorrentDetailsContent({ closeDialog, torrent }) {
|
|||||||
<div>
|
<div>
|
||||||
{title && name !== title ? (
|
{title && name !== title ? (
|
||||||
<>
|
<>
|
||||||
<SectionTitle>{shortenText(getParsedTitle(), 55)}</SectionTitle>
|
<SectionTitle>{ptt.parse(name).title}</SectionTitle>
|
||||||
<SectionSubName mb={20}>{shortenText(ptt.parse(name).title, 110)}</SectionSubName>
|
<SectionSubName mb={20}>{getParsedTitle()}</SectionSubName>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<SectionTitle mb={20}>{shortenText(getParsedTitle(), 55)}</SectionTitle>
|
<SectionTitle mb={20}>{getParsedTitle()}</SectionTitle>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<WidgetWrapper>
|
<WidgetWrapper>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
export function humanizeSize(size) {
|
export function humanizeSize(size) {
|
||||||
if (!size) return ''
|
if (!size) return ''
|
||||||
const i = Math.floor(Math.log(size) / Math.log(1024))
|
const i = Math.floor(Math.log(size) / Math.log(1024))
|
||||||
return `${(size / Math.pow(1024, i)).toFixed(2) * 1} ${['B', 'kB', 'MB', 'GB', 'TB'][i]}`
|
return `${(size / Math.pow(1024, i)).toFixed(2) * 1} ${['B', 'KB', 'MB', 'GB', 'TB'][i]}`
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getPeerString(torrent) {
|
export function getPeerString(torrent) {
|
||||||
@@ -10,4 +10,4 @@ export function getPeerString(torrent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const shortenText = (text, sympolAmount) =>
|
export const shortenText = (text, sympolAmount) =>
|
||||||
text ? text.slice(0, sympolAmount) + (text.length > sympolAmount ? '...' : '') : ''
|
text ? text.slice(0, sympolAmount) + (text.length > sympolAmount ? '…' : '') : ''
|
||||||
|
|||||||
Reference in New Issue
Block a user