diff --git a/index.js b/index.js index 05eb1cc..96aa1f1 100644 --- a/index.js +++ b/index.js @@ -91,7 +91,7 @@ io.on('connection', function(socket) filesList: row.filesList, piecelength: row.piecelength, added: row.added.getTime(), - contentCategory: row.contentCategory, + contentType: row.contentType, } } diff --git a/src/recent-torrents.js b/src/recent-torrents.js index 442a253..36c8470 100644 --- a/src/recent-torrents.js +++ b/src/recent-torrents.js @@ -29,6 +29,81 @@ return ( } } + leftIcon={ + (() => { + console.log(torrent.contentType) + switch(torrent.contentType) + { + case 'video': + return ( + + + + + + + ) + case 'audio': + return ( + + + + + + ) + case 'pictures': + return ( + + + + ) + case 'application': + return ( + + + + ) + case 'books': + return ( + + + + + + + + + ) + } + })() + } rightIcon={ { e.preventDefault(); diff --git a/src/torrent-page.js b/src/torrent-page.js index 3047b34..fe893ca 100644 --- a/src/torrent-page.js +++ b/src/torrent-page.js @@ -101,6 +101,12 @@ const TorrentInformation = (props) => { rightIcon={} primaryText="Indexed/Added torrent date" secondaryText={moment(torrent.added).format('MMMM Do YYYY, h:mm:ss')} + /> + } backgroundColor={yellow600} />} + rightIcon={} + primaryText="Content type" + secondaryText={torrent.contentType} /> } backgroundColor={yellow600} />}