Skip to content

lingfish/fetchtv-cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fetchtv-cli

PyPI - Version PyPI - Python Version

blog X (formerly Twitter) Follow

A CLI tool to download recordings from Fetch TV boxes using UPnP.

This is a fork of the original project called FetchTV-Helpers.

Introduction

This tool allows you to download recordings from Fetch TV boxes.

It can also be used to query recording information on the Fetch TV box.

Installation

The recommended way to install fetchtv-cli is to use pipx.

After getting pipx installed, simply run:

pipx install fetchtv-cli

Please don't use pip system-wide.

You can of course also install it using classic virtualenvs.

Features

  • Autodiscover Fetch TV DLNA box
  • View box information
  • List all recordings, or matches for specified shows or titles
  • Save only new recordings, or save everything that matches shows or titles
  • Get responses as JSON. This includes additional item attributes, e.g. file size, duration, type (episode or movie), description
  • List recordings in a pretty table view

Notes/quirks

It seems that Fetch do not reveal if a recording is deleted (actually only marked for deletion), via the DLNA returned.

I've scoured the XML, tried different filters etc -- nothing works. They must be keeping that flag in a different database, of which the status isn't reflected in the XML/DLNA. This means that you'll see all recordings on the box, deleted or not, and if the state JSON goes missing, will probably be re-downloaded in certain situations.

Usage

fetchtv [COMMANDS] [OPTIONS]

Examples

  • Display Fetch box details
    fetchtv --info
    
  • List all available recorded shows (doesn't include episodes)
    fetchtv --recordings --ip 192.168.1.10 --shows
    
  • List only recordings that haven't been saved
    fetchtv --recordings --new --ip 192.168.1.10
    
  • Return responses as JSON
    fetchtv --recordings --json --ip 192.168.1.10
    
  • List all available recorded items (all shows and episodes) in the default table view
    fetchtv --recordings --ip 192.168.1.10
    
  • List all available recorded items (all shows and episodes) in a flatter view
    fetchtv --recordings --ip 192.168.1.10 --no-table
    
  • Save any new recordings to C:\Temp
    fetchtv --recordings --ip 192.168.1.10 --save "C:\\temp"
    
  • Save any new recordings to /tmp
    fetchtv --recordings --ip 192.168.1.10 --save /tmp
    
  • Save any new recordings to C:\Temp apart from 60 Minutes
    fetchtv --recordings --ip 192.168.1.10--save "C:\\temp" --exclude "60 Minutes"
    
  • Save any new episodes for the show 60 Minutes to C:\Temp
    fetchtv --recordings --ip 192.168.1.10 --folder "60 Minutes" --save "C:\\temp"
    
  • Save episode containing 'S4 E12' for the show 60 Minutes to C:\Temp
    fetchtv --recordings --ip 192.168.1.10 --overwrite --folder "60 Minutes" --title "S4 E12" --save "C:\\temp"
    
  • Save episode containing 'S4 E12' or 'S4 E13' for the show 60 Minutes to C:\Temp
    fetchtv --recordings --ip 192.168.1.10 --overwrite --folder "60 Minutes" --title "S4 E12, S4 E13" --save "C:\\temp"
    
  • List anything currently recording
    fetchtv --isrecording --ip 192.168.1.10
    

Commands

Command Description
--help Display this help
--info Attempts auto-discovery and returns the Fetch box details
--recordings List or save recordings
--shows List the names of shows with available recordings
--isrecording List any items that are currently recording. If no filtering is specified this will scan all items on the Fetch box so it can take some time

Options

Option Description
--ip <address> Specify the IP address of the Fetch box, if auto-discovery fails
--port INTEGER Specify the port of the Fetch box, if auto-discovery fails, normally 49152
--overwrite Will save and overwrite any existing files
--save <path> Save recordings to the specified path
--folder <text> Only return recordings where the folder contains the specified text (can be repeated)
--exclude <text> Dont download folders containing the specified text (can be repeated)
--title <text> Only return recordings where the item contains the specified text (can be repeated)
--json Output show/recording/save results in JSON
--table / --no-table Show recordings in a table

About

A CLI tool to download recordings from Fetch TV boxes

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages