Metadata-Version: 2.4
Name: animepahe-tmux
Version: 1.0.7
Summary: CLI-only AnimePahe downloader with tmux pane support — Termux compatible
License: MIT
Project-URL: Homepage, https://github.com/animepahe-tmux/animepahe-tmux
Keywords: anime,animepahe,cli,downloader,tmux,termux
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: click>=8.1
Requires-Dist: rich>=13.0
Requires-Dist: urllib3>=2.0
Requires-Dist: beautifulsoup4>=4.12
Requires-Dist: pycryptodome>=3.18
Requires-Dist: libtmux>=0.28
Requires-Dist: questionary>=2.0
Requires-Dist: pyfzf>=0.3
Requires-Dist: tqdm>=4.65
Provides-Extra: session
Requires-Dist: DrissionPage>=4.0; extra == "session"

# animepahe-tmux

CLI-only AnimePahe downloader with **tmux pane** support. Built on top of [animepahe-dl](https://pypi.org/project/animepahe-dl/).

## Features

- **tmux-native** — each episode download gets its own tiled tmux pane with live progress  
- **Rich fallback** — concurrent progress bars when not inside tmux  
- **fzf selection** — fuzzy-search anime and multi-select episodes interactively  
- **Stream** episodes directly via mpv / vlc / ffplay  
- **Resume** interrupted downloads automatically  
- **Quality & audio** flags: `best`, `1080`, `720`, `480`, `360` and `jpn`/`eng`

## Requirements

| Tool | Purpose |
|------|---------|
| `ffmpeg` | Segment compilation (required) |
| `node` | KV decrypt (required by animepahe-dl) |
| `fzf` | Interactive selection (optional, recommended) |
| `mpv` / `vlc` | Streaming (optional) |

## Installation

```bash
pip install animepahe-tmux
```

Or install from this directory:

```bash
pip install .
```

## Usage

```
animepahe-tmux [OPTIONS] COMMAND [ARGS]...
```

### download

Search, select anime + episodes, then download them.

```bash
# Interactive (inside tmux → panes; outside → Rich progress)
animepahe-tmux download "attack on titan"

# Specific episodes, best quality, Japanese audio
animepahe-tmux download "death note" -e "1-12" -q best -a jpn

# Force Rich progress bars even inside tmux
animepahe-tmux download "naruto" --no-tmux
```

### search

```bash
animepahe-tmux search "chainsaw man"
```

### stream

```bash
animepahe-tmux stream "one piece" -q 720 -p mpv
```

### list

```bash
animepahe-tmux list
animepahe-tmux list -d /path/to/anime
```

### config

```bash
animepahe-tmux config --show
animepahe-tmux config --set download_directory /mnt/nas/anime
animepahe-tmux config --set quality 1080
```

## tmux pane layout

When running inside a tmux session, `download` opens (or reuses) a window named **`animepahe-dl`** and tiles one pane per episode:

```
┌────────────────────┬────────────────────┐
│ Attack on Titan    │ Attack on Titan     │
│ Episode 1          │ Episode 2           │
│ ████████░░░ 76%    │ ████░░░░░░ 41%      │
│ ETA 0:02:14        │ ETA 0:04:59         │
├────────────────────┼────────────────────┤
│ Attack on Titan    │ Attack on Titan     │
│ Episode 3          │ Episode 4           │
│ ██░░░░░░░░ 18%     │ Getting stream…     │
└────────────────────┴────────────────────┘
```

## Options reference

| Flag | Default | Description |
|------|---------|-------------|
| `-e`, `--episodes` | (prompt) | Episode selection, e.g. `1,3,5-10` |
| `-q`, `--quality` | `best` | `best`, `1080`, `720`, `480`, `360` |
| `-a`, `--audio` | `jpn` | `jpn` or `eng` |
| `-t`, `--threads` | `8` | Segments downloaded in parallel per episode |
| `-c`, `--concurrent` | `3` | Concurrent episodes (non-tmux mode) |
| `-d`, `--dir` | `~/anime` | Download output directory |
| `--no-tmux` | off | Force Rich progress bars |
