diff --git a/src/public/js/components/shows/details.js b/src/public/js/components/shows/details.js
index 04043b0..ecaa895 100644
--- a/src/public/js/components/shows/details.js
+++ b/src/public/js/components/shows/details.js
@@ -13,7 +13,10 @@ export default class ShowDetails extends React.Component {
return (
-
+
);
}
@@ -35,7 +38,8 @@ function Header(props){
function HeaderThumbnail(props){
return (
-

+
);
}
@@ -70,7 +74,10 @@ function SeasonsList(props){
{props.data.seasons.length > 0 && props.data.seasons.map(function(season, index) {
return (
-
+
)
})}
@@ -109,9 +116,13 @@ class Season extends React.Component {
{this.props.data.episodes.map(function(episode, index) {
let key = `${episode.season}-${episode.episode}`;
return (
-
+
)
- })}
+ }, this)}
}
@@ -130,7 +141,11 @@ function Episode(props) {
{props.data.torrents && props.data.torrents.map(function(torrent, index) {
let key = `${props.data.season}-${props.data.episode}-${torrent.source}-${torrent.quality}`;
return (
-
+
)
})}
@@ -139,12 +154,25 @@ function Episode(props) {
)
}
-function Torrent(props) {
- return (
-
-
- {props.data.quality}
-
-
- )
+class Torrent extends React.Component {
+ constructor(props) {
+ super(props);
+ this.handleClick = this.handleClick.bind(this);
+ }
+ handleClick(e, url) {
+ e.preventDefault();
+ this.props.addTorrent(url);
+ }
+ render() {
+ return (
+
+ this.handleClick(e, this.props.data.url)}
+ href={this.props.data.url} >
+ {this.props.data.quality}
+
+
+ )
+ }
}