Skip to main content

Python GUI to view tv program details using tvmaze API and SQLite

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tv_viewer-3.0.3.tar.gz (39.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tv_viewer-3.0.3-py3-none-any.whl (37.6 kB view details)

Uploaded Python 3

File details

Details for the file tv_viewer-3.0.3.tar.gz.

File metadata

  • Download URL: tv_viewer-3.0.3.tar.gz
  • Upload date:
  • Size: 39.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for tv_viewer-3.0.3.tar.gz
Algorithm Hash digest
SHA256 ff242f26e2778f2c7c316bded9f64cb2dc2af089d1fefac38e6344609cd3d26b
MD5 00324e9acae8ff40fcfca83d0a3d300c
BLAKE2b-256 c617cdd706b46bf62f6aa2375490438a705891a076ac9c045679bd09511f65a9

See more details on using hashes here.

File details

Details for the file tv_viewer-3.0.3-py3-none-any.whl.

File metadata

  • Download URL: tv_viewer-3.0.3-py3-none-any.whl
  • Upload date:
  • Size: 37.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for tv_viewer-3.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a27a771ab61bb0d22c9bdde85abe8d8e7383ce1e9c8df9a1989fccfc64e169f9
MD5 9ce771f1696dc1245bdee5ac969861a2
BLAKE2b-256 99662aaf6c98a6c605a62bf4540b9b802881207a01b323105b7a9cd452fb4ef3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page