Giter Site home page Giter Site logo

script.module.pvr.artwork's Introduction

PVR artwork module

This module is a helper module for scraping PVR related content from Kodi database, file system or from TMDB and fanart.tv. Generated content is cached for 90, 180 or 360 days. The search process is as follows:

  • Previously cached content is read out. The title, year of release and media type (film/series) of a series or film serve as criteria.
  • the series/movies available in the databases are checked for hits with the title to be searched and the information (artwork, meta data) is provided.
  • previously defined folders are checked for hits with the titles to be searched and the artwork available in these folders is provided. This process cannot provide textual metadata (genre, release date, etc.).
  • the final step involves searching for a series/movie on TMDB.org. This requires a valid API key in addition to an online connection. Artwork available at TMDB as well as metadata will be provided. Additional fanart from fanart.tv (API key required) will read out if TMDB search contains an imdb or tvdb id.

The functions of the module is called periodically from an integrated service (main.py) when the following PVR windows are displayed

  • MyPVRChannels.xml
  • MyPVRGuide.xml
  • MyPVRRecordings.xml
  • MyPVRTimers.xml
  • MyPVRSearch.xml
  • MyPVRChannels.xml
  • MyPVRGuide.xml
  • DialogPVRInfo.xml
  • MyPVRRecordings.xml
  • MyPVRTimers.xml
  • MyPVRSearch.xml
  • DialogPVRChannelsOSD.xml
  • DialogPVRChannelGuide

or videoplayer (Video OSD) is present.

All labels and artwork will be set as Properties in Home window, e.g. Window(10000).Property('PVR.Artwork.ListItem.director') or Window(10000).Property('PVR.Artwork.clearart')

PVR.Artwork is the default prefix which can be changed to fill up other properties. The module can be triggered by the <load> and <unload> event of a window, for example:

<onload>RunScript(script.module.pvr.artwork,get_artwork,prefix=PVR.Nextup&amp;title=$INFO[VideoPlayer.NextTitle]&amp;genre=$INFO[VideoPlayer.NextGenre]&amp;channel=$INFO[VideoPlayer.ChannelName])</onload>
<onunload>RunScript(script.module.pvr.artwork,clear_artwork,prefix=PVR.Nextup)</onunload>

This will fill the properties with the prefix PVR.Nextup eg. Window(10000).Property(PVR.Nextup.Artwork.fanart), Window(10000).Property(PVR.Nextup.ListItem.ratings) etc. when the window is loaded and clear them on <onunload>.

Unless information provided by ListItems changes, metadata and artwork do not need to be updated. If none of the above windows are displayed, all Properties with the default prefix of PVR Artwork Module in Home window will be cleared.

Labels

PVR.Artwork.ListItem.director, PVR.Artwork.ListItem.writer, PVR.Artwork.ListItem.genre, PVR.Artwork.ListItem.country, PVR.Artwork.ListItem.studio, PVR.Artwork.ListItem.studiologo, PVR.Artwork.ListItem.premiered, PVR.Artwork.ListItem.mpaa, PVR.Artwork.ListItem.status, PVR.Artwork.ListItem.rating,PVR.Artwork.ListItem.ratings, PVR.Artwork.ListItem.ratings.imdb, PVR.Artwork.ListItem.ratings.tmdb, PVR.Artwork.ListItem.ratings.themoviedb, PVR.Artwork.ListItem.castandrole, PVR.Artwork.ListItem.description, PVR.Artwork.ListItem.is_db

Note that PVR.Artwork.ListItem.is_db contains the full path of "media/defaultnas.png".

Artwork

Artwork depends on the presence of artwork files in file system (cache), database or online (TMDB):

PVR.Artwork.fanart, PVR.Artwork.poster, PVR.Artwork.poster1 ... PVR.Artwork.poster5, PVR.Artwork.fanart1 ... PVR.Artwork.fanart5

additional Artwork:

PVR.Artwork.thumb (folder.jpg), PVR.Artwork.discart (discart.jpg), PVR.Artwork.banner (banner.jpg), PVR.Artwork.logo (logo.png), PVR.Artwork.clearlogo (clearlogo.png), PVR.Artwork.clearart (clearart.png), PVR.Artwork.characterart (characterart.png), PVR.Artwork.landscape (landscape.jpg)

Others

The PVR Artwork Module has a label PVR.Artwork.Lookup. If this label contains the value busy the module is processing a PVR item at this moment. This can be used to show a "Busy"-Spinner or something else to signaling a work in progress.

script.module.pvr.artwork's People

Contributors

b-jesch avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

kalle2000

script.module.pvr.artwork's Issues

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.