Sep 12, 2014

PeerTV: Command-Line Tool To Manager And Play TV Series From EZTV Via Peerflix

PeerTV is a command line tool for manage and play TV series from EZTV.it. It uses Peerflix to stream the torrents and by default, the videos are played with mpv, but that can be changed from the PeerTV configuration file.

For those not familiar with Peerflix, this is a an experimental video streaming BitTorrent client for Node.js which can be used to stream video torrents via command line and play the stream with your favorite video player, such as VLC or MPlayer.

PeerTV allows you to easilykeep track of your watched / unwatched episodes: each viewed episode is automatically marked as seen and you can manually mark/unmark episodes as viewed - and of course, you play them with the help of Peerflix, with subtitles support.

For downloading subtitles, PeerTV uses subliminal, a Python library and command line tool which supports subtitle websites such as Addic7ed, OpenSubtitles, Podnapisi, TheSubDB and TvSubtitles.

Important note: PeerTV uses Peerflix to stream TV shows from torrents and that may be illegal in your country. Use at your own risk!

Install PeerTV

In Ubuntu / Linux Mint, most of these should be installed by default and for the rest, use the following commands to install them along with python-pip, which we'll use to install subliminal (and "git", to get the latest PeerTV under step 3):

Modify these variables to suit your needs - as you can see, here you can set the video player to use for playing TV episodes (but, depending on the video player you set, you'll also need to change the other "MPLAYER_" options!), port (for instance, I already had something running on port 8888 so I had to change it to 8887 to get PeerTV to work), subtitle language and so on.

How to use PeerTV

For the commands below, I'll use "Game of Thrones" with the "thrones" shortname as an example - replace these with the TV shows you want to add.

To use it, firstly visit the EZTV show list at http://ift.tt/1BydqoE, copy the show link (Game of Thrones in our example) and add it to PeerTV, like this:

peertv add thrones http://ift.tt/1xTHeO9

("thrones" can be anything and it will be used as the shortname for the TV series - Game of Thrones in this case)

Next, update the series with magnet links from EZTV using the command below:

peertv update thrones

(or, use "all" instead of "thrones" to update all the TV series you've added)

You can list all the episodes of a series by using the command below:

peertv list thrones

You can mark episodes as viewed using the following command (the command below marks Game of Thrones episode 1 from season 1, as seen):

peertv mark thrones 1x1

You can also mark multiple episodes - here's an example in which you'll mark all episodes up to season 3 episode 6 as viewed (from Game of Thrones):