{"id":27264217,"url":"https://github.com/furey/fetchtv","last_synced_at":"2026-04-29T00:33:33.273Z","repository":{"id":287029921,"uuid":"963327986","full_name":"furey/fetchtv","owner":"furey","description":"Fetch TV CLI Tool","archived":false,"fork":false,"pushed_at":"2025-04-12T14:16:50.000Z","size":85,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-27T05:51:45.455Z","etag":null,"topics":["cli","download","fetchtv","nodejs","tool"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/furey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-09T14:06:56.000Z","updated_at":"2025-04-12T14:16:54.000Z","dependencies_parsed_at":"2025-04-09T16:43:22.398Z","dependency_job_id":null,"html_url":"https://github.com/furey/fetchtv","commit_stats":null,"previous_names":["furey/fetchtv"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/furey/fetchtv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/furey%2Ffetchtv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/furey%2Ffetchtv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/furey%2Ffetchtv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/furey%2Ffetchtv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/furey","download_url":"https://codeload.github.com/furey/fetchtv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/furey%2Ffetchtv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32405901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","download","fetchtv","nodejs","tool"],"created_at":"2025-04-11T06:51:39.608Z","updated_at":"2026-04-29T00:33:33.261Z","avatar_url":"https://github.com/furey.png","language":"JavaScript","funding_links":["https://www.buymeacoffee.com/furey","https://github.com/sponsors/furey"],"categories":[],"sub_categories":[],"readme":"# fetchtv\n\n[![NPM Version](https://img.shields.io/npm/v/fetchtv)](https://www.npmjs.com/package/fetchtv)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\nA Node.js CLI tool to download Fetch TV recordings.\n\nBased on [`lingfish/fetchtv-cli`](https://github.com/lingfish/fetchtv-cli) (Python) which is based on [`jinxo13/FetchTV-Helpers`](https://github.com/jinxo13/FetchTV-Helpers) (also Python).\n\n## Contents\n\n- [Demo](#demo)\n- [Quick Start](#quick-start)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Template Variables](#template-variables)\n- [Examples](#examples)\n- [Disclaimer](#disclaimer)\n- [Support](#support)\n\n## Demo\n\nhttps://gist.github.com/user-attachments/assets/61dfab62-a715-4cc3-a4d1-93ee0db43827\n\n## Quick Start\n\n- [Install](#installation) `fetchtv`\n- [Run](#usage) `fetchtv`\n\n## Installation\n\n- [NPX](#installation-npx) (Easiest)\n- [Node.js from Source](#installation-nodejs-from-source)\n- [Docker from Source](#installation-docker-from-source)\n\n### Installation: NPX\n\n\u003e [!NOTE]\u003cbr\u003e\n\u003e NPX requires [Node.js](https://nodejs.org/en/download) installed and running on your system (suggestion: use [Volta](https://volta.sh)).\n\nThe easiest way to install `fetchtv` is via NPX.\n\nFirst, ensure Node.js is running:\n\n```console\nnode --version # Ideally \u003e= v22.x but fetchtv is \u003e= v18.x compatible\n```\n\nThen, run `fetchtv` via NPX:\n\n```console\nnpx fetchtv             # Run the tool\nnpx fetchtv@latest      # (optional) \"@latest\" ensures package is up-to-date\nnpx -y fetchtv@latest   # (optional) \"-y\" flag skips any prompts\n\nnpx fetchtv info\nnpx fetchtv shows\nnpx fetchtv recordings\n\n# etc…\n```\n\n\u003e If you encounter permissions errors with `npx` try running `npx clear-npx-cache` prior to running `npx -y fetchtv` (this clears the cache and re-downloads the package).\n\n### Installation: Node.js from Source\n\n\u003e [!NOTE]\u003cbr\u003e\n\u003e Node.js from source requires [Node.js](https://nodejs.org/en/download) installed and running on your system (suggestion: use [Volta](https://volta.sh)).\n\n1. Clone the `fetchtv` repository:\u003cbr\u003e\n    ```console\n    git clone https://github.com/furey/fetchtv.git\n    ```\n1. Navigate to the cloned repository directory:\u003cbr\u003e\n    ```console\n    cd /path/to/fetchtv\n    ```\n1. Ensure Node.js is running:\u003cbr\u003e\n    ```console\n    node --version # Ideally \u003e= v22.x but fetchtv is \u003e= v18.x compatible\n    ```\n1. Install Node.js dependencies:\u003cbr\u003e\n    ```console\n    npm ci\n    ```\n1. Run `fetchtv`:\u003cbr\u003e\n    ```console\n    node fetchtv.js\n    node fetchtv.js info\n    node fetchtv.js recordings\n    node fetchtv.js shows\n\n    # etc…\n    ```\n\n#### Optional: Link `fetchtv` Tool\n\nYou may optionally link the `fetchtv` tool to your system path for easier access:\n\n```console\nnpm link\n```\n\nThis will create a symlink to the `fetchtv` command in your global `node_modules` directory, allowing you to run it from anywhere in your terminal:\n\n```console\nfetchtv\nfetchtv info\nfetchtv shows\nfetchtv recordings\n\n# etc…\n```\n\nTo uninstall the linked tool, run:\n\n```console\nnpm unlink\n```\n\n### Installation: Docker from Source\n\n\u003e [!NOTE]\u003cbr\u003e\n\u003e Docker from source requires [Docker](https://docs.docker.com/get-started/get-docker) installed and running on your system.\n\n1. Clone the `fetchtv` repository:\u003cbr\u003e\n    ```console\n    git clone https://github.com/furey/fetchtv.git\n    ```\n1. Navigate to the cloned repository directory:\u003cbr\u003e\n    ```console\n    cd /path/to/fetchtv\n    ```\n1. Ensure Docker is running:\u003cbr\u003e\n    ```console\n    docker --version # Ideally \u003e= v27.x\n    ```\n1. Build the Docker image:\u003cbr\u003e\n    ```console\n    docker build -t fetchtv .\n    ```\n1. Run the container:\u003cbr\u003e\n    ```console\n    docker run -t --rm fetchtv\n    docker run -t --rm fetchtv info\n    docker run -t --rm fetchtv shows\n    docker run -t --rm fetchtv recordings\n\n    # etc…\n    ```\n\n#### UPnP/SSDP Discovery Issues\n\nUPnP/SSDP discovery can be unreliable in Docker containers.\n\nTo work around this, it's recommended to specify your Fetch TV server's IP address directly with the `--ip` (and optionally `--port`) option when running the container. For example:\n\n```console\ndocker run -t --rm fetchtv\ndocker run -t --rm fetchtv info --ip=192.168.86.71\ndocker run -t --rm fetchtv shows --ip=192.168.86.71\ndocker run -t --rm fetchtv recordings --ip=192.168.86.71\n\n# etc…\n```\n\n## Usage\n\nIf you [installed via NPX](#installation-npx), you can run it from anywhere:\n\n```console\nnpx fetchtv \u003cCOMMAND\u003e [OPTIONS]\n```\n\nIf you [installed from Node.js source](#installation-nodejs-from-source), you can run it from the cloned repo directory:\n\n```console\ncd /path/to/fetchtv\nnode fetchtv.js \u003cCOMMAND\u003e [OPTIONS]\n```\n\nIf you [linked the tool](#optional-link-fetchtv-tool) after installing from source, you can run it from anywhere:\n\n```console\nfetchtv \u003cCOMMAND\u003e [OPTIONS]\n```\n\n| Command/Option   | Alias | Type      | Description                                                                     |\n| ---------------- | ----- | --------- | ------------------------------------------------------------------------------- |\n| `info`           |       | `command` | Returns Fetch TV server details                                                 |\n| `recordings`     |       | `command` | List episode recordings                                                         |\n| `shows`          |       | `command` | List show titles and not the episodes within                                    |\n| `--ip`           |       | `string`  | Specify the IP Address of the Fetch TV server                                   |\n| `--port`         |       | `number`  | Specify the port of the Fetch TV server (default: `49152`)                      |\n| `--show`         | `-s`  | `array`   | Filter recordings to show titles containing the specified text (repeatable)     |\n| `--exclude`      | `-e`  | `array`   | Filter recordings to show titles NOT containing the specified text (repeatable) |\n| `--title`        | `-t`  | `array`   | Filter recordings to episode titles containing the specified text (repeatable)  |\n| `--is-recording` |       | `boolean` | Filter recordings to only those that are currently recording                    |\n| `--save`         |       | `string`  | Save recordings to the specified path                                           |\n| `--template`     |       | `string`  | Template for save path/filename structure (uses --save as base path)            |\n| `--for-plex`     |       | `boolean` | Uses Plex-compatible template for saving recordings (overrides --template)      |\n| `--overwrite`    | `-o`  | `boolean` | Overwrite existing files when saving                                            |\n| `--json`         | `-j`  | `boolean` | Output show/recording/save results in JSON                                      |\n| `--debug`        | `-d`  | `boolean` | Enable verbose logging for debugging                                            |\n| `--help`         | `-h`  | `boolean` | Show help message                                                               |\n\n### Template Variables\n\n\u003e [!IMPORTANT]\u003cbr\u003e\n\u003e When using `--template`, the template string must be enclosed in single quotes (`'`) to prevent shell expansion. For example:\u003cbr\u003e\n\u003e ```console\n\u003efetchtv recordings --save=./downloads --template='${show_title}/${recording_title}.${ext}'\n\u003e ```\n\nWhen using `--template`, the following variables are available:\n\n| Variable                   | Description                      | Example                                        |\n| -------------------------- | -------------------------------- | ---------------------------------------------- |\n| `${show_title}`            | Title of the show                | `Australian Survivor`                          |\n| `${recording_title}`       | Title of the recording/episode   | `S10 E2 - Episode 2 of Season 10 - Tue 18 Feb` |\n| `${season_number}`         | Season number (if available)     | `10`                                           |\n| `${season_number_padded}`  | Season number with leading zero  | `10`                                           |\n| `${episode_number}`        | Episode number (if available)    | `2`                                            |\n| `${episode_number_padded}` | Episode number with leading zero | `02`                                           |\n| `${ext}`                   | File extension (ts, mp4, etc)    | `ts`                                           |\n\n#### Plex-Compatible Template\n\nThe `--for-plex` option uses a predefined template optimized for Plex media server:\n\n```js\n`${show_title}/Season ${season_number}/${show_title} - S${season_number}E${episode_number_padded}.${ext}`\n```\n\n#### Example Templates\n\nSave recordings with show folder:\n```\n${show_title}/${recording_title}.${ext}\n```\n\nSave recordings with show folder and `SXXEXX` episode naming:\n```\n${show_title}/S${season_number_padded}E${episode_number_padded}.${ext}\n```\n\nSave recordings with show and season folders:\n```\n${show_title}/Season ${season_number}/${recording_title}.${ext}\n```\n\n## Examples\n\n\u003e [!NOTE]\u003cbr\u003e\n\u003e The following examples assume you have a Fetch TV server on your local network and you've [linked the tool](#optional-link-fetchtv-tool) to your system path.\n\nSearch for Fetch TV servers:\n\n```console\nfetchtv\n```\n\nDisplay Fetch box details (uses auto-discovery):\n\n```console\nfetchtv info\n```\n\nList recorded show titles:\n\n```console\nfetchtv shows --ip=192.168.86.71\n```\n\nList recordings:\n\n```console\nfetchtv recordings --ip=192.168.86.71\n```\n\nList recordings and output as JSON:\n\n```console\nfetchtv recordings --ip=192.168.86.71 --json\n```\n\nSave new recordings to `./downloads` (creates directory if needed):\n\n```console\nfetchtv recordings --ip=192.168.86.71 --save=./downloads\n```\n\nSave new recordings but exclude show titles containing `News`:\n\n```console\nfetchtv recordings --ip=192.168.86.71 --exclude=News --save=./downloads\n```\n\nSave new episodes for the show `MasterChef`:\n\n```console\nfetchtv recordings --ip=192.168.86.71 --show=MasterChef --save=./downloads\n```\n\nSave \u0026 overwrite specific `MasterChef` episodes containing `S04E12` or `S04E13`:\n\n```console\nfetchtv recordings --ip=192.168.86.71 --show=MasterChef --title=S04E12 --title=S04E13 --save=./downloads --overwrite\n```\n\nList only items currently being recorded:\n\n```console\nfetchtv recordings --ip=192.168.86.71 --is-recording\n```\n\nSave only items currently being recorded:\n\n```console\nfetchtv recordings --ip=192.168.86.71 --is-recording --save=./in-progress\n```\n\nSave recordings using a custom path template:\n\n```console\nfetchtv recordings --ip=192.168.86.71 --save=./downloads --template='${show_title}/${recording_title}.${ext}'\n```\n\nSave recordings in Plex-compatible path format:\n\n```console\nfetchtv recordings --ip=192.168.86.71 --save=./media --for-plex\n```\n\n## Disclaimer\n\nThis project:\n\n- Is licensed under the [GNU GPLv3 License](./LICENSE.txt).\n- Is not affiliated with or endorsed by Fetch TV.\n- Is a derivative work based on [`lingfish/fetchtv-cli`](https://github.com/lingfish/fetchtv-cli).\n- Is written with the assistance of AI and may contain errors.\n- Is intended for educational and experimental purposes only.\n- Is provided as-is with no warranty—please use at your own risk.\n\n## Support\n\nIf you've found this project helpful consider supporting my work through:\n\n[Buy Me a Coffee](https://www.buymeacoffee.com/furey) | [GitHub Sponsorship](https://github.com/sponsors/furey)\n\nContributions help me continue developing and improving this tool, allowing me to dedicate more time to add new features and ensuring it remains a valuable resource for the community.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffurey%2Ffetchtv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffurey%2Ffetchtv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffurey%2Ffetchtv/lists"}