tv show next aired script - new features for skinners

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
ronie Offline
Team-XBMC Member
Posts: 9,092
Joined: Jan 2009
Reputation: 157
Post: #1
it's always been a nightmare for skinners to use the info provided by the script
as it needs a giant amount of visible conditions to turn it into something useful.

recently, 'Black came up with a suggestion to make life a lot easier for skinners.
so, we got to work and added two new features to the script:

1) you can now run the script when entering the library.
Code:
MyVideoNav.xml:

<onload>RunScript(script.tv.show.next.aired,backend=True)</onload>

and the script will return the info for the selected listitem.
(see included readme for details)


2) the script will provide a TV Guide window.
there's no need to construct your own tv guide with hundreds of visible conditions anymore.
you can simply use the one provided by the script and/or skin it to match the look and feel of your skin.

[Image: tvguide-3.jpg]


for backwards compatibility, all the old infolabels (NextAired.%d.Foo) have been left intact,
but i'd like to remove them in time.


if there's any questions or if you think we've missed something, feel free...

script.tv.show.next.aired v4.0.1 is now available in the pre-eden addon repo

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or e-mail Team-XBMC members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
(This post was last modified: 2011-10-11 23:41 by ronie.)
find quote
Hitcher Offline
Skilled Skinner
Posts: 10,624
Joined: Aug 2007
Reputation: 91
Location: Eastleigh, UK
Post: #2
Nice one guys.
find quote
Hitcher Offline
Skilled Skinner
Posts: 10,624
Joined: Aug 2007
Reputation: 91
Location: Eastleigh, UK
Post: #3
Something's wrong with the first Thurs entry - it highlights Fri.
find quote
ronie Offline
Team-XBMC Member
Posts: 9,092
Joined: Jan 2009
Reputation: 157
Post: #4
Hitcher Wrote:Something's wrong with the first Thurs entry - it highlights Fri.

hmmm...can't reproduce.
screenshot maybe?

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or e-mail Team-XBMC members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Sharpe Offline
Skilled Skinner
Posts: 1,026
Joined: Jul 2006
Reputation: 13
Location: North West England
Post: #5
Oh my - all that re-work to do.

Still it makes sense to simplify it - good work guys.

Do you know if these kind of visibilities will still work for airing today style widgets?

Code:
<visible>substring(Window(Home).Property(NextAired.1.Today),true)</visible>
find quote
BigNoid Offline
Team-XBMC Member
Posts: 3,084
Joined: Jul 2010
Reputation: 99
Location: Below sea level
Post: #6
Nice work! I see one error in the log show up:

Code:
19:02:21 T:5720   ERROR: Traceback (most recent call last):
19:02:21 T:5720   ERROR:   File "C:\Program Files (x86)\XBMC_SVN\portable_data\addons\script.tv.show.next.aired\default.py", line 335, in set_labels
19:02:21 T:5720   ERROR:     label.setProperty(prefix + "LatestDate", latest[2] or "")
19:02:21 T:5720   ERROR: IndexError: list index out of range

Do you need a full log for this?

Also the TodayTotal returns 0 while in the next aired window I have several shows airing on sunday.
find quote
Hitcher Offline
Skilled Skinner
Posts: 10,624
Joined: Aug 2007
Reputation: 91
Location: Eastleigh, UK
Post: #7
ronie Wrote:hmmm...can't reproduce.
screenshot maybe?

[Image: screenshot000lm.jpg]

[Image: screenshot001kt.jpg]

[Image: screenshot002sl.jpg]

[Image: screenshot003dc.jpg]

[Image: screenshot004rh.jpg]
find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,289
Joined: Jun 2006
Reputation: 57
Location: Earth
Post: #8
Well I just get nothing Sad
[Image: screenshot025gi.png]
Quote:04:38:01 T:3816 NOTICE: -->Python Interpreter Initialized<--
04:38:01 T:3816 ERROR: Exception in python script callback execution
04:38:01 T:3816 ERROR: Traceback (most recent call last):
04:38:01 T:3816 ERROR: File "D:\XBMC Dev\XBMC_New\portable_data\addons\script.tv.show.next.aired\resources\lib\next_a​ired_dialog.py", line 32, in onInit
04:38:01 T:3816 ERROR: self.set_focus()
04:38:01 T:3816 ERROR: File "D:\XBMC Dev\XBMC_New\portable_data\addons\script.tv.show.next.aired\resources\lib\next_a​ired_dialog.py", line 55, in set_focus
04:38:01 T:3816 ERROR: self.setFocus( self.getControl( 9000 ) )
04:38:01 T:3816 ERROR: Exception
04:38:01 T:3816 ERROR: :
04:38:01 T:3816 ERROR: Unknown control type for python
04:40:38 T:4268 WARNING: XFILE::CFileFactory::CreateLoader - Unsupported protocol(addons) in addons://more/executable.tbn
04:40:38 T:5016 ERROR: CLocalizeStrings::ClearBlock: Trying to clear non existent block D:\XBMC Dev\XBMC_New\portable_data\addons\script.tv.show.next.aired
04:40:43 T:5460 NOTICE: -->Python Interpreter Initialized<--
04:40:43 T:5460 ERROR: Exception in python script callback execution
04:40:43 T:5460 ERROR: Traceback (most recent call last):
04:40:43 T:5460 ERROR: File "D:\XBMC Dev\XBMC_New\portable_data\addons\script.tv.show.next.aired\resources\lib\next_a​ired_dialog.py", line 32, in onInit
04:40:43 T:5460 ERROR: self.set_focus()
04:40:43 T:5460 ERROR: File "D:\XBMC Dev\XBMC_New\portable_data\addons\script.tv.show.next.aired\resources\lib\next_a​ired_dialog.py", line 55, in set_focus
04:40:43 T:5460 ERROR: self.setFocus( self.getControl( 9000 ) )
04:40:43 T:5460 ERROR: Exception
04:40:43 T:5460 ERROR: :
04:40:43 T:5460 ERROR: Unknown control type for python
04:40:53 T:5072 WARNING: XFILE::CFileFactory::CreateLoader - Unsupported protocol(addons) in addons://more/executable.tbn
04:40:53 T:5016 ERROR: CLocalizeStrings::ClearBlock: Trying to clear non existent block D:\XBMC Dev\XBMC_New\portable_data\addons\script.tv.show.next.aired
04:41:01 T:5780 NOTICE: VideoInfoScanner: Starting scan ..
04:41:16 T:5780 NOTICE: VideoInfoScanner: Finished scan. Scanning for video info took 00:15
04:41:28 T:5940 WARNING: XFILE::CFileFactory::CreateLoader - Unsupported protocol(addons) in addons://more/executable.tbn
04:41:30 T:5868 NOTICE: -->Python Interpreter Initialized<--
04:41:30 T:5868 ERROR: Exception in python script callback execution
04:41:30 T:5868 ERROR: Traceback (most recent call last):
04:41:30 T:5868 ERROR: File "D:\XBMC Dev\XBMC_New\portable_data\addons\script.tv.show.next.aired\resources\lib\next_a​ired_dialog.py", line 32, in onInit
04:41:30 T:5868 ERROR: self.set_focus()
04:41:30 T:5868 ERROR: File "D:\XBMC Dev\XBMC_New\portable_data\addons\script.tv.show.next.aired\resources\lib\next_a​ired_dialog.py", line 55, in set_focus
04:41:30 T:5868 ERROR: self.setFocus( self.getControl( 9000 ) )
04:41:30 T:5868 ERROR: Exception
04:41:30 T:5868 ERROR: :
04:41:30 T:5868 ERROR: Unknown control type for python
find quote
humferier Offline
Member
Posts: 92
Joined: Oct 2009
Reputation: 4
Location: Belgium
Post: #9
2 bugs :
- 2 shows have the correct date but displayed on wrong day (red ellipse)
- 3 shows airing today, none at total (green ellipse)

[Image: tvguide_bugs.jpg]

My name is Erier, Humf Erier
[Image: double0smile.gif]
find quote
`Black Offline
Team-XBMC Member
Posts: 2,386
Joined: Apr 2009
Reputation: 66
Location: Germany
Post: #10
@Hitcher
I'll fix that, never tested with mouse. Smile

@Jezz_X
Do you have any tv shows? If so, try to remove the canceled.db & next_aired.db from userdata/addon_data/script.tv.show.next.aired

[Image: xp1080-21.png]
find quote
eddiem Offline
Senior Member
Posts: 115
Joined: Oct 2010
Reputation: 0
Location: Edinburgh, Scotland
Post: #11
humferier Wrote:2 bugs :
- 2 shows have the correct date but displayed on wrong day (red ellipse)

These days and dates come from TVRage.
New Girl: normal air day is Tuesday.
http://www.tvrage.com/The_New_Girl
find quote
Tobby Offline
Fan
Posts: 452
Joined: Jul 2011
Reputation: 1
Post: #12
Is there a way to try it even though I no nothing about code?
find quote
ronie Offline
Team-XBMC Member
Posts: 9,092
Joined: Jan 2009
Reputation: 157
Post: #13
Sharpe Wrote:Do you know if these kind of visibilities will still work for airing today style widgets?

Code:
<visible>substring(Window(Home).Property(NextAired.1.Today),true)</visible>

i'd like to remove all NextAired.%d.Today labels, unless are still needed for some reason of course.

i have no clue in what ways skins are currently using the info provided by next aired, so if the new labels aren't sufficient, let me know.

you can now do
Code:
<visible>substring(Window(Home).Property(NextAired.Today),true)</visible>
on the focused listitem...if that's what you mean Smile

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or e-mail Team-XBMC members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
ronie Offline
Team-XBMC Member
Posts: 9,092
Joined: Jan 2009
Reputation: 157
Post: #14
Big_Noid Wrote:Nice work! I see one error in the log show up:

Code:
19:02:21 T:5720   ERROR: Traceback (most recent call last):
19:02:21 T:5720   ERROR:   File "C:\Program Files (x86)\XBMC_SVN\portable_data\addons\script.tv.show.next.aired\default.py", line 335, in set_labels
19:02:21 T:5720   ERROR:     label.setProperty(prefix + "LatestDate", latest[2] or "")
19:02:21 T:5720   ERROR: IndexError: list index out of range

Do you need a full log for this?

yes please.

Big_Noid Wrote:Also the TodayTotal returns 0 while in the next aired window I have several shows airing on sunday.

the readme might not be entirely clear on this i guess,
but for totals use:
Window(Home).Property(NextAired.TodayTotal)

in case you're already using that, let me know and i'll have a closer look.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or e-mail Team-XBMC members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
ronie Offline
Team-XBMC Member
Posts: 9,092
Joined: Jan 2009
Reputation: 157
Post: #15
Hitcher Wrote:[Image: screenshot000lm.jpg]

you've got some pretty weird results Smile

what skin are you running this on?

mind posting your nextaired db so i can try to reproduce?
(..\userdata\addon_data\script.tv.show.next.aired\next_aired.db)

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or e-mail Team-XBMC members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Post Reply