added function to trim redundant {,[,( symbols if there is no closing brackets

This commit is contained in:
Daniel Shleifman
2021-06-16 16:57:05 +03:00
parent d56fe89ac4
commit 6841fb2521
9 changed files with 65 additions and 33 deletions

View File

@@ -6,7 +6,7 @@ import {
Close as CloseIcon,
Delete as DeleteIcon,
} from '@material-ui/icons'
import { getPeerString, humanizeSize } from 'utils/Utils'
import { getPeerString, humanizeSize, removeRedundantCharacters } from 'utils/Utils'
import { torrentsHost } from 'utils/Hosts'
import { NoImageIcon } from 'icons'
import DialogTorrentDetailsContent from 'components/DialogTorrentDetailsContent'
@@ -45,7 +45,7 @@ const Torrent = ({ torrent }) => {
const titleStrings = []
let parsedTitle = parse('title')
let parsedTitle = removeRedundantCharacters(parse('title'))
const parsedYear = parse('year')
const parsedResolution = parse('resolution')
if (parsedTitle) titleStrings.push(parsedTitle)