Giter Site home page Giter Site logo

get_iplayer_downloader's Introduction

get_iplayer_downloader

get_iplayer_downloader is a GUI download utility for the BBC get_iplayer program. It displays episodes in a large tree view with three text columns: series title, series categories and episode title plus episode description.

Features:

  • Find episodes. Filter on categories, channels, recently cached episodes
  • Download episodes or queue episodes for download
  • Visit the episode's "BBC iPlayer" web page
  • View episode properties
  • View download logs and errors

Screenshots:

About:

This is a small utility program for me to try and find out the capabilities of the standard Python libraries and GTK+ 3. This is after I tried creating a version of the downloader with zenity in bash, which was far too slow.

This program works best on a high resolution screen. You can continue using the program, while get_iplayer is downloading in the background. There is also an option to run get_iplayer in a terminal emulator window when it is downloading episodes.

For the latest version, go to:

For other news, go to:

This program is licensed under GPLv3 (see included COPYING file).

Disclaimer: this program does not perform any downloading itself. It relies on the get_iplayer program to perform the actual downloading.

Dependencies

The dependencies are:

  • get_iplayer and its dependencies
    http://www.infradead.org/get_iplayer/html/get_iplayer.html
  • Python 3 (3.2 or higher)
  • Python 3 setuptools for Distutils, used to install get_iplayer_downloader. On Debian/Ubuntu, package: python3-setuptools
  • Python 3 GI/GIR (GObject Introspection Repository) libraries. On Debian/Ubuntu, packages: python3-gi, python3-gi-cairo
  • GTK+ 3 libraries (3.14 or higher). On Debian/Ubuntu, package: gir*-gtk-3* (* is a wildcard character)
  • Linux. This program may work on other platforms with a few minor changes, however, that has not been tested

Configuration

In short:

  • The get_iplayer_downloader preset names should refer to existing get_iplayer presets (by default, files "tv" and "radio" in ~/.get_iplayer/presets/)
  • The get_iplayer "info" property needs to be disabled by default (in the preset files)
  • To modify the category or channel filters, the configuration file needs to be edited manually

get_iplayer

get_iplayer_downloader's default configuration has two get_iplayer presets defined:

  • radio - for radio episodes
  • tv - for television episodes

The preset names are configurable. There is also an option in get_iplayer_downloader to disable the use of get_iplayer presets.

To configure get_iplayer for use with two presets, either reuse existing preset files or create new preset files. To create new preset files, run get_iplayer --preset=radio --prefs-add ..., etc., or create and edit the preset files ~/.get_iplayer/presets/radio and ~/.get_iplayer/presets/tv directly.

Here are two preset file examples. Lines starting with # are commented out. The "info" property should not be set or should be disabled by default, otherwise displaying episode search results will take a very long time.

File ~/.get_iplayer/presets/radio:

#command /usr/share/get_iplayer_downloader/scripts/get_iplayer_post_subdir.py --categories="<categories>" --dir="<dir>" --filename="<filename>" --subdir-format="bbc.<week>//<categorymain>_<categorysub>//<longname>" --force
info 0
output /home/willemw12/Music/bbc
#radiomode better

File ~/.get_iplayer/presets/tv:

#command /usr/share/get_iplayer_downloader/scripts/get_iplayer_post_subdir.py --categories="<categories>" --dir="<dir>" --filename="<filename>" --subdir-format="bbc.<week>//<categorymain>_<categorysub>//<longname>" --force
info 0
output /home/willemw12/Videos/bbc
#tvmode good,better

Verify that get_iplayer --preset=radio ... and get_iplayer --preset=tv ... work properly from the command line.

Optionally, setup a get_iplayer pvr scheduler (a cron job) to download queued episodes. Check the get_iplayer documentation on how to do that.

get_iplayer_downloader

Most configuration options can be managed from the GUI. Other options can be found in the configuration file (~/.config/get_iplayer_downloader/config), which will be created after running the program for the first time. Make sure the program is not running, before editing the configuration file.

Leave options, such as Channels and Download folder, empty in Preferences to use the default value specified in get_iplayer.

Before downloading episodes for the first time, verify the download paths and, optionally, the terminal emulator program name and program arguments.

When searching for episodes, add a minus sign in front of the whole search term to exclude it from the search.

If the program crashes immediately on startup or when the mouse cursor moves over the first column in the episode list, disable the "show-tooltip" option or update GNOME 3 (or just update the GTK+ 3 and GI/GIR libraries).

Categories and channels

The radio and tv category lists and the radio channel list are very long and have been reduced to what is on the BBC iPlayer Radio and TV web pages. You can define your own search categories by editing the configuration file (they are lists of key-value pairs, i.e. lists of "search term"-"GUI label" pairs). File ./extra/my_default.config is an example of that. To generate lists containing all the available categories and channels, which can be put in the configuration file, run from this directory:

$ ./get_iplayer_downloader.py --list-categories --quiet
$ ./get_iplayer_downloader.py --list-channels --quiet

Add a minus sign in front of a channel or a category to exclude it from the search and cache refresh.

Installation

There are several ways to install the program. See below.

To execute without installing, run:

$ <path to this directory>/src/get_iplayer_downloader.py

Or create a symbolic link of get_iplayer_downloader.py to a directory in $PATH. From this directory, run:

$ ln -s $(pwd)/src/get_iplayer_downloader.py ~/bin/gipd

and then run:

$ gipd

Installation script

This should work on any Linux distribution. Run from this directory:

$ ./install.sh

To uninstall, run from this directory:

$ ./uninstall.sh

When python has been upgraded to a newer minor version, then uninstall and install again.

Arch Linux package

To install the latest git version:

$ ./install-pkg-git.sh

To install the latest version:

$ ./install-pkg.sh

Debian/Ubuntu package

Warning: this may not work. Distutils command "bdist_deb" in package "python-stdeb" is required for Python 3.

Install build and package tools (run as root)

# apt-get install python-stdeb

Then

$ ./install-deb.sh

Keyboard shortcuts

The keyboard shortcuts are:

Shortcut                Command       Description

alt+enter               Properties    View properties of the highlighted episode
ctrl+c                  Clear         Clear episode download selection
ctrl+d                  Download      Download selected episodes
ctrl+f                  Find          Go to search entry field on the tool bar
ctrl+l                  Log           View download log
ctrl+p                  Play          Go to BBC iPlayer web page of the highlighted episode
ctrl+q                  Queue         Queue selected episodes for one-off downloading
ctrl+r                  Refresh       Refresh episode cache, limited of the selected programme type (radio or TV)
ctrl+s, ctrl+shift+s    Since         Select since episodes were added to the search cache
ctrl+t                  Type          Select programme type (radio or TV)
f1                      Help          View keyboard shortcuts

ctrl+1                  Type
ctrl+2                  Category
ctrl+3                  Channel
ctrl+4, ctrl+5          Since

down-arrow                            Go from tool bar to episode list
space or enter                        Toggle selection in the episode list

Extra

Q: How to have episodes in separate subfolders, grouped by main category and subcategories or by week?

A: Use the get_iplayer_post_subdir.py script.

File ./extra/get_iplayer_post_subdir.py is a get_iplayer post-processing script. It is an extension to the get_iplayer "subdir" output option. It requires get_iplayer_downloader to be installed and it does not update the download location recorded in the (localfiles) download history. The script supports additional formatting fields (categorymain, categorysub, week) in the subdirectory names. Field <categorymain> is the same as field <category> from get_iplayer. For more information, run:

$ ./extra/get_iplayer_post_subdir.py --help 

The script is installed in /usr/share/get_iplayer_downloader/scripts or in /usr/local/share/get_iplayer_downloader/scripts.

To configure get_iplayer to use this script, put for example in ~/.get_iplayer/presets/tv:

command /usr/share/get_iplayer_downloader/scripts/get_iplayer_post_subdir.py --categories="<categories>" --dir="<dir>" --filename="<filename>" --force --subdir-format="bbc.<week>//<categorymain>_<categorysub>//<longname>"

get_iplayer_downloader's People

Contributors

willemw12 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.