Ubuntu / Linux news and application reviews.

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 easily keep 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

1. PeerTV depends on bash, sed, wget, rt, sqlite3, peerflix, mpv (or some other video player), and optionally: subliminal and notify-send.

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):
sudo apt-get install wget git sqlite3 python-pip mpv libnotify-bin
sudo pip install subliminal

2. You'll also need Peerflix - for how to install Peerflix, see THIS article.

3. And finally, download and install PeerTV using the following commands:
cd && git clone https://gitorious.org/peertv/peertv-bash.git
cd peertv-bash
sudo PREFIX="/usr/local" make install

You can also download PeerTV manually from HERE.

Later on if you want to update PeerTV, navigate to its directory (assuming you've used the commands above, it should be in your home folder):
cd ~/peertv-bash

And update it using the following commands:
git pull
sudo PREFIX="/usr/local" make install

Arch Linux users can install PeerTV via AUR.

Configure PeerTV

The first time you run peertv (so run "peertv" in a terminal), it creates a configuration file under: ~/.config/peertv.conf

To see all the available configuration options, run the following command:
peertv config

To change some configuration options, use:
peertv set <configuration> <value>

For instance, to set the default subtitle language to English, use:
peertv set subtitle en
Modify these configuration options 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), 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 https://eztv.it/showlist/, copy the show link (Game of Thrones in our example) and add it to PeerTV, like this:
peertv add thrones https://eztv.it/shows/481/game-of-thrones/
("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):
peertv mark thrones "<3x6"

To view all the PeerTV available options, run:
peertv help

More examples, etc. available at PeerTV's Gitorious page.