Kodi Community Forum
[RELEASE] TV Show Next Aired (Script) Addon - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+---- Thread: [RELEASE] TV Show Next Aired (Script) Addon (/showthread.php?tid=79493)



- ronie - 2011-11-18

Lunatixz Wrote:ohhh, can't wait...thanks
any eta?

how 'bout now? ;-)


- Lunatixz - 2011-11-18

ronie Wrote:how 'bout now? ;-)

do you have a git? or was it pushed to xbmc repo?
also how do you access the library feature?


- ronie - 2011-11-19

new version now in the pre-eden addon repo.

changelog:
v4.1.5
- make items in gui clickable

v4.1.4
- added library path property
- use simplejson instead of regex

v4.1.3
- fixed issue when no airday is provided
- added NextEpisodeNumber, NextSeasonNumber, LatestEpisodeNumber, LatestSeasonNumber

v4.1.2
- automatically update the database every day at midnight
- NextAired.%d.Foo now only sets properties for shows airing today


- Lunatixz - 2011-11-19

ronie Wrote:new version now in the pre-eden addon repo.

changelog:
v4.1.4
- added library path property
- use simplejson instead of regex

v4.1.3
- fixed issue when no airday is provided
- added NextEpisodeNumber, NextSeasonNumber, LatestEpisodeNumber, LatestSeasonNumber

v4.1.2
- automatically update the database every day at midnight
- NextAired.%d.Foo now only sets properties for shows airing today

can you post an example of how to use the library feature?


- Hitcher - 2011-11-19

Knowing ronie it's all in the readme.


- ronie - 2011-11-19

Lunatixz Wrote:can you post an example of how to use the library feature?

changelog:
v4.1.5
- make items in gui clickable

v4.1.5 will handle that for you, no need to change anything in the skin.

just pushed it to the repo, it might take a few hours before it shows up on your end.


- Lunatixz - 2011-11-19

ronie Wrote:changelog:
v4.1.5
- make items in gui clickable

v4.1.5 will handle that for you, no need to change anything in the skin.

just pushed it to the repo, it might take a few hours before it shows up on your end.

awesome, thanks alot


- FrostBox - 2011-11-19

Hi ronie,

little error (UnicodeEncodeError) with tvshowtitle if non ascii character exists

PHP Code:
13:41:50 T:9664  NOTICE: -->Python Interpreter Initialized<--
13:41:59 T:9664   ERRORError Type: <type 'exceptions.UnicodeEncodeError'>
13:41:59 T:9664   ERRORError Contents'ascii' codec can't encode character u'\xe8' in position 11: ordinal not in range(128)
13:41:59 T:9664   ERROR: Traceback (most recent call last):
                          File "C:\Documents and Settings\ME\Application Data\XBMC\addons\script.tv.show.next.aired\default.py", line 405, in <module>
                            NextAired()
                          File "C:\Documents and Settings\ME\Application Data\XBMC\addons\script.tv.show.next.aired\default.py", line 74, in __init__
                            self.update_data()
                          File "C:\Documents and Settings\ME\Application Data\XBMC\addons\script.tv.show.next.aired\default.py", line 106, in update_data
                            self.scan_info()
                          File "C:\Documents and Settings\ME\Application Data\XBMC\addons\script.tv.show.next.aired\default.py", line 152, in scan_info
                            log( "### %s" % show[0] )
                          File "C:\Documents and Settings\ME\Application Data\XBMC\addons\script.tv.show.next.aired\default.py", line 31, in log
                            xbmc.log( str( msg ),level=xbmc.LOGDEBUG )
                        UnicodeEncodeError: '
ascii' codec can't encode character u'\xe8' in position 11ordinal not in range(128
other possible error

PHP Code:
self.get_show_infocurrent_show )
  
File "C:\Documents and Settings\ME\Application Data\XBMC\addons\script.tv.show.next.aired\default.py"line 189in get_show_info
    log
"### search url: http://services.tvrage.com/tools/quickinfo.php?show=%s" urllib.quote_pluscurrent_show["localname"] ) )
  
File "C:\Program Files\XBMC\system\python\Lib\urllib.py"line 1230in quote_plus
    s 
quote(ssafe ' ')
  
File "C:\Program Files\XBMC\system\python\Lib\urllib.py"line 1224in quote
    res 
map(safe_map.__getitem__s)
KeyError: (u'\xe8',) 
And finally, I fixed the errors by this patch
Source: http://passion-xbmc.googlecode.com/svn-history/r989/temp/default.py.patch
PHP Code:
Index: default.py
===================================================================
--- default.
py    (rĂ©vision 235)
+++ default.
py    (copie de travail)
@@ -
27,+27,18 @@
 if 
not xbmcvfs.exists(DATA_PATH):
     
xbmcvfs.mkdir(DATA_PATH)
 
+
def _unicodetextencoding='utf-8' ):
+    try: 
text unicodetextencoding )
+    
exceptpass
+    return text
+
+
+
import unicodedata
+def normalize_stringtext ):
+    try: 
text unicodedata.normalize'NFKD'_unicodetext ) ).encode'ascii''ignore' )
+    
exceptpass
+    return text
+
 
def log(msg):
     
xbmc.logstrmsg ),level=xbmc.LOGDEBUG )
 
@@ -
149,+161,@@
                     
DIALOG_PROGRESS.close()
                     
xbmcgui.Dialog().ok(__language__(32103),__language__(32104))
                     break
+            
#change tuple format to list. because 'tuple' object does not support item assignment
+            show = list(show)
+            
show] = normalize_stringshow] )
             
log"### %s" show[0] )
             
current_show["localname"] = show[0]
             
current_show["path"] = show[1
Frost


[EDIT]
i use version 4.1.5


- Vultures - 2011-11-20

Not only non-ASCII. Colon in the title also causes this.


- ronie - 2011-11-20

FrostBox Wrote:Hi ronie,

little error (UnicodeEncodeError) with tvshowtitle if non ascii character exists

that's for the report...and the patch Smile

much appreciated!


- ronie - 2011-11-20

Vultures Wrote:Not only non-ASCII. Colon in the title also causes this.

i'm not getting any issues with a colon in the name,
could you post a Debug Log?


- ronie - 2011-11-20

just pushed v4.1.6 to the addon repo.
unicode errors should be history now.


- Martijn - 2011-11-21

ronie Wrote:just pushed v4.1.6 to the addon repo.
unicode errors should be history now.

Thanks Big Grin
Did the same with the ArtworkDownlaoder Wink


Script failed on startup - bdee1 - 2011-11-24

I have back row installed on my appletv 2 (black) and now every time I start up xbmc, I get the following error:
"script failed script.tv.show.next.aired"


- papampi - 2011-11-24

bdee1 Wrote:I have back row installed on my appletv 2 (black) and now every time I start up xbmc, I get the following error:
"script failed script.tv.show.next.aired"
it happens to me with confluence and transparency too !!!