Giter Club home page Giter Club logo

script.grab.fanart's Introduction

Grab Fanart

Kodi Version Build Status License PEP8

About:

This script uses the Kodi Database, via the JSON-RPC server, to find information regarding video and music files and exposes them via Window Properties so that skinners can still cycle through the art by referencing a single point of reference.

Fun Fact: This addon was originally intended as a fix for for Kodi (XBMC) Frodo behavior that was breaking some skins I liked to use. In those days all FanArt was kept in a single directory without the need for caching or texture databases!

Using This Addon:

This addon is meant to be integrated as part of a skin. Currently it can be configured by calling the RunScript() function within a script. The parameters that can be set are:

  • Refresh Time: How long between property updates. Default is 10 seconds
  • Mode: Show fanart for recent items (10), or for random items

An example of setting these parameters using the RunScript function would be:

RunScript(script.grab.fanart,mode=random,refresh=10). 

If you want to include these settings are part of the regular skin settings you can pass these as parameters to RunScript upon hitting the home screen or in the Startup.xml file.

Window Properties:

Currently the service part of this addon will update Home window properties that can be used by skinners. The properties are refreshed according to the "refresh" interval.

Property Description
script.grab.fanart.Ready this property is empty until the service has initialized the array of fanart files. It then holds a value of "true". Useful if you skinners want to delay something until the service has started cycling images.
Global Properties
script.grab.fanart.Global.Title the title of a random music or video file, 30% chance music, 30% TV, 40% movie
script.grab.fanart.Global.FanArt path to the fanart image for this media
script.grab.fanart.Global.Logo path to logo for this media - blank if it doesn't exist
Video Properties
script.grab.fanart.Video.Title the title of a random video (movie or tv show). There is a 10% chance of this being a TV show.
script.grab.fanart.Video.FanArt the path to the fanart image for this video
script.grab.fanart.Video.Poster path to poster image for this video
script.grab.fanart.Video.Logo path to clear logo for this video - blank if it doesn't exist
script.grab.fanart.Video.Plot plot outline of this video
script.grab.fanart.Video.Path path to the video file
Movie Properties
script.grab.fanart.Movie.Title title of the selected movie
script.grab.fanart.Movie.FanArt path to movie fanart
script.grab.fanart.Movie.Poster path to movie poster
script.grab.fanart.Movie.Logo path to clear logo for movie - blank if it doesn't exist
script.grab.fanart.Movie.Plot movie plot
script.grab.fanart.Movie.Path path to the movie file
TV Properties
script.grab.fanart.TV.Title title of selected tv show
script.grab.fanart.TV.FanArt path to tv show fanart
script.grab.fanart.TV.Poster path to tv show poster
script.grab.fanart.TV.Logo path to clear logo for tv show - blank if it doesn't exist
script.grab.fanart.TV.Plot tv show plot description
script.grab.fanart.TV.Path path to the tv show show (will be the root folder if in "random" mode or the specific episode if in "recent" mode)
The properties below will only have values when the addon mode is "recent"
script.grab.fanart.TV.Season selected tv show season
script.grab.fanart.TV.Episode selected tv show episode number
script.grab.fanart.TV.Thumb path to thumbnail image of this episode
Music Properties
script.grab.fanart.Music.Artist music artist name
script.grab.fanart.Music.FanArt path to artist fanart
script.grab.fanart.Music.Description artist description

Using In A Skin

To use the script.grab.fanart.Ready property you could use something like this:

!IsEmpty(Window(Home).Property(script.grab.fanart.Ready))

To access any of the other properties to load images or display text you can reference the property within your skin files using:

$INFO[Window(Home).Property(script.grab.fanart.Video.Title)]

script.grab.fanart's People

Contributors

robweber avatar xderecx avatar

Watchers

James Cloos 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.