Add-on:TV Show - Next Aired: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
(Some early tweaking of the addon info just to hurry it along to the new version's info.)
No edit summary
Line 21: Line 21:


The script will scan your library and tries to fetch next aired info for every show.
The script will scan your library and tries to fetch next aired info for every show.
there's no need to specify an alarm, the script will set one internally, it runs every day at midnight.
There is no need to specify an alarm -- the script will will run a background update at regular intervals.


= Skin integration =
= Skin integration =
Line 238: Line 238:


[[Category:Frodo add-on repository]]
[[Category:Frodo add-on repository]]
[[Category:Eden add-on repository]]
[[Category:Gotham add-on repository]]

Revision as of 06:17, 1 March 2014

TV Show - Next Aired
http://mirrors.xbmc.org/addons/frodo/script.tv.show.next.aired/icon.png

See this add-on on the kodi.tv showcase

Author: Ppic & Frost & ronie & `Black & phil65 & WayneD

Type: Program
Repo:

Source: Source code
Summary: Get info for TV Shows Next Aired.
Home icon grey.png   ▶ Add-ons ▶ TV Show - Next Aired
Attention talk.png Need help with this add-on? See here.

Get info for TV Shows Next Aired. You'll never miss one again.

Installing

This add-on is installed from the Add-on browser located in Kodi as follows:

  1. Settings
  2. Add-ons
  3. Install from repository
  4. Program Add-ons
  5. TV Show - Next Aired
  6. Install

Introduction

The script will scan your library and tries to fetch next aired info for every show. There is no need to specify an alarm -- the script will will run a background update at regular intervals.

Skin integration

Dependency

Add this to your addon.xml to make it install along with your skin.

 <requires>
   <import addon="xbmc.gui" version="3.00"/>
   <import addon="script.tv.show.next.aired" version="4.1.15"/>
 </requires>

Note: Please check on what minimum version you need and change it accordingly

Run at startup

To make sure the script updates on starting XBMC add code below to Startup.xml

   RunScript(script.tv.show.next.aired,silent=True)


Available infolabels

Airing today

For shows that are airing today, the script will set the window properties listed below.

  • Window(Home).Property(*)


Available labels
Property Description
NextAired.%d.Label tv show name
NextAired.%d.Thumb tv show icon
NextAired.%d.AirTime eg. 'Wednesday, Thursday: 09:00 PM'
NextAired.%d.Path tv show path
NextAired.%d.Library eg. videodb://2/2/1/ or videodb://tvshows/titles/1/
NextAired.%d.Status eg. 'Returning Series'/'Final Season'/'New Series'
NextAired.%d.Network name of the tv network that's airing the show
NextAired.%d.Started airdate of the first episode, eg. 'Mon, Sep 24, 2007'
NextAired.%d.Classification type of show; N.B. not currently supported
NextAired.%d.Genre genre of the show
NextAired.%d.Premiered year the first episode was aired, eg. '1999'
NextAired.%d.Country production country of the tv show, eg. 'USA'
NextAired.%d.Runtime duration of the episode in minutes
NextAired.%d.Fanart tv show fanart
NextAired.%d.Today will return 'True' if the show is aired today, otherwise 'False'
NextAired.%d.NextDate date the next episode will be aired
NextAired.%d.NextTitle name of the next episode
NextAired.%d.NextNumber season/episode number of the next episode, eg. '04x01'
NextAired.%d.NextEpisodeNumber episode number of the next episode, eg. '04'
NextAired.%d.NextSeasonNumber season number of the next episode, eg. '01'
NextAired.%d.LatestDate date the last episode was aired
NextAired.%d.LatestTitle name of the last episode
NextAired.%d.LatestNumber season/episode number of the last episode
NextAired.%d.LatestEpisodeNumber episode number of the last episode
NextAired.%d.LatestSeasonNumber season number of the last episode
NextAired.%d.AirDay day of the week the show is aired, eg 'Tuesday'
NextAired.%d.ShortTime time the show is aired, eg. '08:00 PM'
NextAired.%d.Art(poster) tv show poster
NextAired.%d.Art(banner) tv show banner
NextAired.%d.Art(fanart) tv show fanart
NextAired.%d.Art(landscape) tv show landscape - artwork downloader required
NextAired.%d.Art(clearlogo) tv show logo - artwork downloader required
NextAired.%d.Art(clearart) tv show clearart - artwork downloader required
NextAired.%d.Art(characterart) tv show characterart - artwork downloader required
NextAired.Total number of running shows
NextAired.TodayTotal number of shows aired today
NextAired.TodayShow list of shows aired today

MyVideoNav.xml

If you want to use this script you must first make sure you start it using:

   RunScript(script.tv.show.next.aired,backend=True)

The script will run in the background and provide next aired info for the focussed listitem. The infolabels listed above are available, using this format:

   Window(Home).Property(*)

Use code below as a visible condition!

   !IsEmpty(Window(Home).Property(NextAired.NextDate))

example code:

   <control type="group">
       <visible>!IsEmpty(Window(Home).Property(NextAired.NextDate))</visible>
       <control type="label">
           <posx>0</posx>
           <posy>0</posy>
           <width>800</width>
           <height>20</height>
           <label>$INFO[Window(Home).Property(NextAired.NextTitle)]</label>
       </control>
       <control type="label">
           <posx>0</posx>
           <posy>20</posy>
           <width>800</width>
           <height>20</height>
           <label>$INFO[Window(Home).Property(NextAired.NextDate)]</label>
       </control>
   </control>

TV Guide

If you run the script without any options (or if it's started by the user), the script will provide a TV Guide window using

   script-NextAired-TVGuide.xml

This window is fully skinnable.


List of required id's:
container shows airing on
200 monday
201 tuesday
202 wednesday
203 thursday
204 friday
205 saturday
206 sunday
8 in case all the containers above are empty, we set focus to this id
List of available infolabels:
label description
ListItem.Label tv show name
ListItem.Thumb tv show thumb
ListItem.Property(*) see above


Totals are available using the window properties listed above.

label description
Window(home).Property(NextAired.TodayDate) todays date
Window(home).Property(NextAired.%d.Date) date for the lists, eg NextAired.1.Date will show the date for monday


A list of available infolabels, related to the available add-on settings:

label description
Window(home).Property(TVGuide.ThumbType) thumb type selected by the user: 0=poster, 1=banner, 2=logo
Window(home).Property(TVGuide.BackgroundFanart) 1=user selected to show fanart, empty if disabled
Window(home).Property(TVGuide.PreviewThumbs) 1=user selected to show 16:9 showthumbs, empty if disabled

All other id's and properties in the default script window are optional and not required by the script.


Force update

Forcing an update of the nextaired database will rescan your tv shows and re-scrape all nextaired info

   RunScript(script.tv.show.next.aired,force=True)

The force update option is also available in the addon settings.