fix url encode

This commit is contained in:
YouROK
2021-02-24 22:27:21 +03:00
parent 3fbb437695
commit c46ebc0c12

View File

@@ -58,10 +58,10 @@ export default function DialogTorrentInfo(props) {
<List> <List>
<ListItem> <ListItem>
<ButtonGroup style={style.width100} variant="contained" color="primary" aria-label="contained primary button group"> <ButtonGroup style={style.width100} variant="contained" color="primary" aria-label="contained primary button group">
<Button style={style.width100} href={playlistTorrHost() + '/' + encodeURI(torrent.name || torrent.title || 'file') + '.m3u?link=' + torrent.hash + '&m3u'}> <Button style={style.width100} href={playlistTorrHost() + '/' + encodeURIComponent(torrent.name || torrent.title || 'file') + '.m3u?link=' + torrent.hash + '&m3u'}>
Playlist Playlist
</Button> </Button>
<Button style={style.width100} href={playlistTorrHost() + '/' + encodeURI(torrent.name || torrent.title || 'file') + '.m3u?link=' + torrent.hash + '&m3u&fromlast'}> <Button style={style.width100} href={playlistTorrHost() + '/' + encodeURIComponent(torrent.name || torrent.title || 'file') + '.m3u?link=' + torrent.hash + '&m3u&fromlast'}>
Playlist after last view Playlist after last view
</Button> </Button>
</ButtonGroup> </ButtonGroup>
@@ -71,7 +71,7 @@ export default function DialogTorrentInfo(props) {
<ButtonGroup style={style.width100} disableElevation variant="contained" color="primary"> <ButtonGroup style={style.width100} disableElevation variant="contained" color="primary">
<Button <Button
style={style.width100} style={style.width100}
href={streamHost() + '/' + encodeURI(file.path.split('\\').pop().split('/').pop()) + '?link=' + torrent.hash + '&index=' + file.id + '&play'} href={streamHost() + '/' + encodeURIComponent(file.path.split('\\').pop().split('/').pop()) + '?link=' + torrent.hash + '&index=' + file.id + '&play'}
> >
<Typography> <Typography>
{file.path.split('\\').pop().split('/').pop()} | {humanizeSize(file.length)} {file.path.split('\\').pop().split('/').pop()} | {humanizeSize(file.length)}