Add-on:TV Show - Next Aired

From XBMC
Jump to: navigation, search

TV Show - Next Aired
Author: Ppic & Frost & ronie & `Black & phil65 & WayneD
Website: link
Type: Program
Version: 6.0.7
Repo: XBMC.org (v13-unreleased)
XBMC.org (v12)

License: GPL v2.0
Source: Source code
Summary: Get info for TV Shows Next Aired.
Attention talk.png See TV Show - Next Aired on the XBMC Forum for more information.

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

Contents

1 Installing

To install this add-on you must do so from the Add-on manager from within XBMC by going to:

  1. Settings
  2. Add-ons
  3. Get add-ons
  4. XBMC.org Add-ons
  5. Program Add-ons
  6. TV Show - Next Aired
  7. Install

2 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.

3 Skin integration

3.1 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="6.0.5"/>
 </requires>

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

3.2 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)


4 Available infolabels

4.1 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. 'New Series'/'Returning Series'/'Cancelled/Ended'
NextAired.%d.StatusID ID of the Status string
NextAired.%d.Network name of the tv network that's airing the show
NextAired.%d.Started airdate of the first episode, eg. 09/24/07, 'Mon, Sep 24, 2007', etc.
NextAired.%d.Classification type of show, eg. Reality, Mini-Series, etc. Data is also in Genre.
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.NextDay "nice" localized format for NextDate, eg. "Wed, Jun 11" or "Mon, Jan 26, 2015"
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
LatestDay "nice" localized format for LatestDate, eg. "Wed, Jun 11" or "Mon, Jan 26, 2015"
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(s) of the week the show is aired, eg 'Tuesday'
NextAired.%d.ShortTime time the show is aired, eg. "20:00" or "08:00 PM"
SecondWeek 1 == show is in the second week of the Monday-week Guide, otherwise 0
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

4.2 MyVideoNav.xml

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

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

or make a call for each show when the user changes shows:

   RunScript(script.tv.show.next.aired,tvshowtitle=The TvShowTitle Show Name)

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>

4.3 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 either

   script-NextAired-TVGuide.xml

or

   script-NextAired-TVGuide2.xml

The former is the Monday-week guide and the latter is the today-week guide. These windows are fully skinnable.

List of required IDs in script-NextAired-TVGuide.xml, which is used if the user has selected the traditional Monday-week guide:
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, which is usually a settings button.
List of required IDs in script-NextAired-TVGuide2.xml, which is used if the user has selected the new Today-week guide:
container shows aired/airing
200 Yesterday
201 Today
202 Today+1 (Tomorrow)
203 Today+2
204 Today+3
205 Today+4
206 Today+5
207 Today+6
208 Today+7
209 Today+8
210 Today+9
211 Today+10
212 Today+11
213 Today+12
214 Today+13
215 Today+14
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) today's date
Window(home).Property(NextAired.Today) localized string for "today"
Window(home).Property(NextAired.YesterdayDate) yesterday's date
Window(home).Property(NextAired.Yesterday) localized string for "yesterday"
Window(home).Property(NextAired.TomorrowDate) tomorrow's date
Window(home).Property(NextAired.Tomorrow) localized string for "tomorrow"
Window(home).Property(NextAired.%d.Date) 1 - 7 is the date for the Monday-week guide (1 for Monday and 7 for Sunday)
Window(home).Property(NextAired.%d.Date) 200 - 215 is the date for either guide (numbered by container)
Window(home).Property(NextAired.%d.Weekday) 200 - 215 is the localized weekday name for either guide (numbered by container)
Window(home).Property(NextAired.%d.Wday) 200 - 215 is the localized, abbreviated weekday name for either guide (numbered by container)

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 show-thumbs, empty if disabled

All other IDs and properties in the default script window are optional and not required by the script.

4.4 Force update

To force an update of the next-aired database ahead of its next scheduled time: Forcing an update of the next-aired database will look for updates related to your shows and grab any changed info.

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

To force an update as well as reset all the existing data (forcing a fresh scan of everything) use the reset option:

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

The force update and reset options are also available in the addon settings.

To force an update of a single show (which always grabs the full data for that show):

   RunScript(script.tv.show.next.aired,updateshow=TvShowTitle Goes Here)

The latter can be achieved with a button like this one:

   <control type="button" id="550">
   <label>$LOCALIZE[24069] $LOCALIZE[4]</label>
   <include>DialogVideoInfoButton</include>
   <onclick>RunScript(script.tv.show.next.aired,updateshow=$INFO[ListItem.Label])</onclick>
   <visible>Container.Content(tvshows)</visible>
   </control>
Personal tools
Namespaces

Variants
Actions
Google Search
Navigation
Wiki help
Toolbox