Skip to main content

Tool for streaming videos from torrrents

Project description

PyTorr-Play

PyTorr-Play is a Python tool for searching torrents using the Jackett API, displaying results using curses/rofi, and downloading and playing the selected torrents using mpv.

Features

  • Search for torrents using the Jackett API.
  • Display search results in a curses/rofi menu.
  • Select and download torrents.
  • Play downloaded torrents with mpv (or VLC, with webtorrent-cli).
  • Maintain a history of downloaded torrents.

Preview

Watch the video on YouTube

Installation

Using pipx

pipx allows you to install and run Python applications in isolated environments.

  1. Install pipx (if not already installed):

    python -m pip install --user pipx
    python -m pipx ensurepath
    
  2. Install PyTorr-Play:

    pipx install pytorr-play
    

From Source

  1. Clone the repository:

    git clone https://gitlab.com/imithrellas/pytorr-play.git
    cd pytorr-play
    
  2. Install Poetry (if not already installed):

    curl -sSL https://install.python-poetry.org | python3 -
    
  3. Install dependencies:

    poetry install
    
  4. Install system dependencies:

    Use your package manager to install these dependencies:

    sudo pacman -S mpv
    
  5. Activate the virtual environment:

    poetry shell
    

Configuration

Generate the Default Configuration File

pytorr-play --generate-config

This will create a configuration file at ~/.config/torrent_watcher/config.yaml with the following content:

JACKETT_API_KEY: "your_api_key_here"
JACKET_PORT: 9117
JACKET_ADDRESS: "127.0.0.1"

Edit the Configuration File

Replace your_api_key_here with your actual Jackett API key.

Usage

Search for Torrents

pytorr-play

This will prompt you to enter a search query and display the results in a curses menu. Alternatively you can use Rofi, if you have it installed on your system.

pytorr-play --ui Rofi

Show Torrent History

pytorr-play --history

This will display a table of previously downloaded torrents.

Use a Custom Configuration File

pytorr-play --config /path/to/your/config.yaml

This allows you to specify a custom configuration file path.

Arguments

  • -h/--help: Show help.
  • --generate-config: Generate the default configuration file.
  • --config <path>: Specify a custom configuration file path.
  • --history: Show torrent history.
  • --ui: Choose UI (Curses/Rofi).

Example

pytorr-play --config /home/user/custom_config.yaml

Plans

  • Omit Webtorrent
  • Find a way to include timestamp in the history to be able to resume play.
  • Find a way to play multiple files in a playlist
    • Implement a way for the app to know when user switches to a different file in the playlist(Using a callback MPV function?)
  • Implement a menu where the user can choose which files to play
    • List files available
    • Allow selection of multiple files
    • Allow selection of a range of files
  • Include support for VLC(Recreate all of MPVs functionality)

Contributing

Feel free to open issues or submit pull requests for improvements or bug fixes.

Legal Disclaimer

Neither I nor this tool promote or condone the distribution or consumption of illegal content via torrents. This tool is intended solely for legal uses, such as downloading and sharing open-source software, public domain content, and other legally distributable files. Users are responsible for ensuring that their usage complies with all applicable laws and regulations.

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

pytorrplay-0.0.3.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

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

pytorrplay-0.0.3-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file pytorrplay-0.0.3.tar.gz.

File metadata

  • Download URL: pytorrplay-0.0.3.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.9.2-arch1-1

File hashes

Hashes for pytorrplay-0.0.3.tar.gz
Algorithm Hash digest
SHA256 c47b72983d85f570f2f23fe5eb5233c769de5eb568e7a610eadddb1e7d529b54
MD5 bb3378404294bd335a40e4a66d9a32dc
BLAKE2b-256 62ddad7950210d44dd82901151b797019ec5b61ac15b86bf8b22c428a59fc8f1

See more details on using hashes here.

File details

Details for the file pytorrplay-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: pytorrplay-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.9.2-arch1-1

File hashes

Hashes for pytorrplay-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 618fda39905cf2b85d48e26c7efa630ae07afab7bc8b3d7166624e6d2f75909b
MD5 1fb5716d690c18b9e9b40ac0627bd38f
BLAKE2b-256 5af440daec34c50be3fb4e6b6fa322d43427a5d22a1f21cbbe0049843a56d6ac

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