Skip to content

gavinlyonsrepo/tv_viewer

Repository files navigation

tv viewer

Website Rss Donate

Overview

  • Name: tv_viewer
  • Title : Graphical user interface to view TV show details using the TV maze API
  • Description:

GUI to view details of TV programs using TV maze application programming interface. Written in python 3 and tkinter, it also stores user favorites in an SQLite database. No dependency outside of python standard library.

  • TV maze API

  • Author: Gavin Lyons

  • Upstream repository: Github

  • Developed and tested on Linux as a Linux App.

Table of contents

Installation and Setup

Latest version 3.0.3

PyPi & pip , pipx

The program is present in python package index, Pypi. Install using the tool, location and environment of your choice. Package name = tv-viewer

Example pipx install

pipx install tv-viewer

Arch based Linux distribution

If you are using an arch Linux based system, the program is packaged in the AUR as 'tv_viewer'.

Manually install from github

The package is also archived on github and can be manually download and installed

curl -sL https://github.com/gavinlyonsrepo/tv_viewer/archive/3.0.3.tar.gz | tar xz
cd tv_viewer-3.0.3
pip install --user .

Usage

type below in terminal to launch or select icon from Desktop app menus under Other( Linux only)

tv_viewer

File system

File Path Description
'HOME'/.config/tv_viewer/fav.db Favourite Database, created by program on startup
'HOME'/.config/tv_viewer/tvviewer_3.cfg config file, created by program on startup
'HOME'/.cache/tv_viewer/TVviewer_YYMMDD_HHMMSS.log Log file Path can be adjusted in config
'HOME'/.local/share/icons/tv_viewer.png icon, Linux only
'HOME'/.local/share/applications/tv_viewer.desktop desktop entry, Linux only

When the program starts for first time it creates a blank database and a config file. The two files for the desktop entry and icon, are downloaded from github using curl if the menu option desktop entry is selected. On Linux systems 'HOME' is defined by os.environ['HOME'] on windows os.environ['HOMEPATH']

Log file

A debug log file to store information outputted by program.

2017-12-04 15:03:32:INFO:__main__:  Main Loop Start
2017-12-04 15:04:42:WARNING:tv_api_work.tv_api_work:No next episode data available

Exceptions are generated by software as a result of missing and incomplete API data by TV maze for some shows. These are caught and outputted to log file and won't interfere with running of program. The software should catch most issues and output them there. Also displayed here are various other debug information. Logging can be switched on and off in and the output path can be changed.

Configuration file

The configuration file is created on startup and populated by default values

Setting Value Default Note
debugOnOff bool 0 Toggles debug output
screen_resolution string 1100x800 Sets screen resolution on start up
font_size int 11 Font size on all widgets
font_name string Courier font used in main information list box widget
loggingOnOff bool 0 Toggles logging output
logpath string file path to place log files /tmp/
networkcheck bool 1 toggles network test uses ping
networkurl url string www.tvmaze.com url to test by network test function

Features

From the menu bar a user can select about and exit options. From here they can also view latest log file and configuration file contents.

The TV maze API associates a unique ID with each TV show called the Maze_ID. On the main screen the user is prompted to enter name of show in input box. The software then returns a list of television shows based on the input. The user can then select the show by row number and is presented with various details of it. From here they select more detailed information by selecting one of the radio buttons and pressing details. Options include overview, seasons, cast, crew, episodes and more miscellaneous information. They can also view and/or toggle the favorite status of show by pressing delete or add favorite button.

The software also includes a favorite function where user can store favorites TV shows in a database. The database has one table show and two fields name and number. the maze_ID of the show is stored at number.

The contents of the database can be displayed by pressing Favorites button. Favorites records can be added by entering a maze_id in input box and pressing add favorite button, records can be deleted by adding a maze_id of show in database and pressing delete favorite button. The favourite section will also show next episode date and days till next episode. You also access the tv show details screen from here by adding a maze_id and pressing search. A reset and exit button is also available. There is a status light with 3 colours.

  1. Green : ready
  2. Yellow : busy , accessing network or files
  3. Red : network check failed, The network check is carried out at start up and when certain buttons fail it can turned off.

Screenshot

There are screenshots( version 2.3) in this repository in documentation folder.

 image

About

GUI to view tv program details using TV maze application programming interface. Written in python 3 , it also stores user favourites in an SQLite database.

Topics

Resources

License

Stars

7 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages