Skip to main content

Command line utility to search for TV and movie torrents and stream using Peerflix automatically.

Project description

ezflix
======

|Build Status| |codecov|

Command line utility that allows you to search for TV and movie torrents and
stream using Peerflix automatically.

Features
~~~~~~~~

- Provides advanced search functionality. Filter by sort type (download count, seeds, likes), genres, minimum rating.
- Includes subtitle support where subtitles can be downloaded automatically for the chosen TV show or movie.

Demo
~~~~
|asciicast|

.. |asciicast| image:: https://asciinema.org/a/wazWQXnE8bdqXNTjshqtKIuWj.png
:target: https://asciinema.org/a/wazWQXnE8bdqXNTjshqtKIuWj

Install
~~~~~~~

ezflix is available on the Python Package Index (PyPI) at https://pypi.python.org/pypi/ezflix

You can install ezflix using pip.

::

$ pip install ezflix

This program requires Peerflix. You can install Peerflix via `npm <https://www.npmjs.com/package/peerflix>`_.

::

$ npm install -g peerflix

Before any new changes are pushed to PyPi, you can clone the development version to avail of any new features.

.. code:: bash

$ git clone https://github.com/AnthonyBloomer/ezflix.git
$ cd ezflix
$ virtualenv env
$ source env/bin/activate
$ pip install -r requirements.txt
$ python setup.py install

Supported Media Players
~~~~~~~~~~~~~~~~~~~~~~~

Below is a list of media players supported in Peerflix.

- mpv
- airplay
- vlc
- mplayer
- smplayer
- mpchc
- potplayer
- webplay
- omx

In ezflix, the default player is mpv. It will fallback to vlc if mpv isn't found.

You can use the media_player argument to set your media player.

CLI Usage
~~~~~

::

usage: ezflix [-h] [--limit [LIMIT]] [--minimum_rating [MINIMUM_RATING]]
[--media_player [{mpv,vlc,mplayer,smplayer,mpchc,potplayer,webplay,omx,airplay}]]
[--latest] [--subtitles]
[--sort_by [{download_count,like_count,date_added,seeds,peers,rating,title,year}]]
[--sort_order [{asc,desc}]] [--quality [{720p,1080p,3d}]]
[--genre GENRE] [--remove] [--language LANGUAGE]
[{movie,tv}] query

positional arguments:
{movie,tv} The media type.
query The search query.

optional arguments:
-h, --help show this help message and exit
--limit [LIMIT] The number of results to return.
--minimum_rating [MINIMUM_RATING]
Used to filter movie by a given minimum IMDb rating
--media_player [{mpv,vlc,mplayer,smplayer,mpchc,potplayer,webplay,omx,airplay}]
The media player.
--latest Play the latest TV episode.
--subtitles Load subtitles file.
--sort_by [{download_count,like_count,date_added,seeds,peers,rating,title,year}]
Use this argument to sort the torrents.
--sort_order [{asc,desc}]
Use this argument to set the sort order.
--quality [{720p,1080p,3d}]
Use this argument to set the min quality.
--genre GENRE Used to filter by a given genre (See
http://www.imdb.com/genre/ for full list)
--remove Remove files on exit.
--language LANGUAGE Language as IETF code. Set this argument to download
subtitles in a given language.

Examples
~~~~~~~~

.. code:: bash

$ ezflix "The Man in the High Castle"

Pass '--latest' to watch the latest episode of a given TV series.

.. code:: bash

$ ezflix "South Park" --latest

To search for movies, pass the 'movie' argument.

.. code:: bash

$ ezflix movie "Mad Max"

Search for movies released in 2017 and order by like count descending.

.. code:: bash

$ ezflix movie '2017' --sort_by=like_count --sort_order=desc

Search for thrillers released in 2017 and order by download count descending.

.. code:: bash

$ ezflix movie '2017' --sort_by=download_count --sort_order=desc --genre=thriller

Automatically download German subtitles for your chosen TV show or movie.

.. code:: bash

$ ezflix movie 'Goodfellas' --subtitles --language=de

Pass the quality argument to only list torrents of a given quality.


.. code:: bash

$ ezflix movie 'They Live' --quality=720p

Tests
~~~~~

The Python unittest module contains its own test discovery function, which you can run from the command line:

::

$ python -m unittest discover tests/

Programmatic Usage
~~~~~~~~~~~~~~~~~~

You can use Ezflix programmatically in your own applications. Consider the following example:

.. code:: python

from ezflix import Ezflix, peerflix

ezflix = Ezflix(query="Goodfellas", media_type='movie')

torrents = ezflix.get_torrents()

if len(torrents) > 0:
for torrent in torrents:
print(torrent['title'])
print(torrent['magnet'])


first = torrents[0]
file_path = ezflix.find_subtitles(first['title'])
print(file_path)
peerflix(magnet_link=first['magnet'], media_type='movie', media_player='mpv', subtitles=True, remove=True, file_path=file_path)

Contributing
~~~~~~~~~~~~

- Fork the project and clone locally.
- Create a new branch for what you're going to work on.
- Push to your origin repository.
- Create a new pull request in GitHub.

.. |Build Status| image:: https://travis-ci.org/AnthonyBloomer/ezflix.svg?branch=master
:target: https://travis-ci.org/AnthonyBloomer/ezflix

.. |codecov| image:: https://codecov.io/gh/AnthonyBloomer/ezflix/branch/master/graph/badge.svg
:target: https://codecov.io/gh/AnthonyBloomer/ezflix



Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ezflix-1.5.3.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ezflix-1.5.3-py2.py3-none-any.whl (10.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ezflix-1.5.3.tar.gz.

File metadata

  • Download URL: ezflix-1.5.3.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ezflix-1.5.3.tar.gz
Algorithm Hash digest
SHA256 5f303072b36ce89d1270120b111f87b57c954637118a5202416b86e0c6abf083
MD5 abd962f278b4f114d8b6199681408efa
BLAKE2b-256 69cbdc3c5a273053814b4055e7c80a578f84f997d282a4c7a4ab834964cae51e

See more details on using hashes here.

File details

Details for the file ezflix-1.5.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for ezflix-1.5.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b07bee74e37b750388464c3777bd571f169329bda932c5237308925cb1ee33f9
MD5 4e20e2cc558d34076eca7c4370cb78b7
BLAKE2b-256 7bd99f7edc935821127a404cabb9bd57b1668096abd047a244240cda0522856a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page