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

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



- Hitcher - 2011-08-08 22:46

Lol, no worries reverted.


- giftie - 2011-08-14 06:22

ronie - found two errors within the script.

first one:

line 190 in default.py reads as follows:

Code:
if not self.listing(): close("error listing")

should be:
Code:
if not self.listing(): self.close("error listing")

this is because the 'def close' is inside of the Class.

Second error shows up if the user has the JSON RPC compact output turned off. This is done inside advancedsettings.xml(which I have set to false to make the output easier to read - for my own debugging Smile ) :

PHP Code:
<jsonrpc>
       <
compactoutput>false</compactoutput>
</
jsonrpc

Here is the output of the JSON RPC Query with Compact Output set to False: http://pastebin.com/82Rp3hiR
and set to True: http://pastebin.com/8Ur9jk78


This changes the format(adds a lot of tabs and spaces) which seems like the reg-ex fails to pick up the TV Show name. This also breaks TvTunes and Logo Downloader.

Having the JSON RPC set to Compact Output(which is default of course), everything works fine.


- Wanilton - 2011-08-14 14:04

Ronie, I translate script for portuguese(Brazil), download string file here, thanks...
http://dl.dropbox.com/u/25170804/strings.xml


- ronie - 2011-08-14 20:51

Wanilton Wrote:Ronie, I translate script for portuguese(Brazil), download string file here, thanks...
http://dl.dropbox.com/u/25170804/strings.xml

thanx Wanilton, much appreciated!


- samzstein - 2011-08-15 04:23

i cant get the script to open and refresh itself. please help
here is my log file...
http://pastebin.com/qVTdg8rW

nevermind seems to have refreshed itself.. gotta love quality programing. Smile


- ronie - 2011-08-15 19:02

samzstein Wrote:i cant get the script to open and refresh itself. please help
here is my log file...
http://pastebin.com/qVTdg8rW

nevermind seems to have refreshed itself.. gotta love quality programing. Smile

the script failed to connect to the tvrage website, hence it didn't update.
probably some temp hickup on their end.


- BigNoid - 2011-08-15 21:39

@ ronie: ppic was workin on a different solution for this script to integrate it in the videolibrary without a lot of visibility conditions. Do you have plans to do this?


- ronie - 2011-08-15 21:49

Big_Noid Wrote:@ ronie: ppic was workin on a different solution for this script to integrate it in the videolibrary without a lot of visibility conditions. Do you have plans to do this?

nope sorry.
the only thing i wanted to accomplish was getting his scripts eden compatible.

i don't mind doing a bit of bug fixing as well, but adding new functionality is not something i had in mind.


- BigNoid - 2011-08-15 21:58

You did great on making it eden compatible.
I think getting the info in the library thrugh this script is a workaround anyway. The next aired episide data and show status info should be available in xbmc database.

EDIT: oh, that can never happen without rescraping...


- Hitcher - 2011-08-15 22:09

Big_Noid Wrote:@ ronie: ppic was workin on a different solution for this script to integrate it in the videolibrary without a lot of visibility conditions. Do you have plans to do this?

ronie Wrote:nope sorry.
the only thing i wanted to accomplish was getting his scripts eden compatible.

i don't mind doing a bit of bug fixing as well, but adding new functionality is not something i had in mind.

I wonder whether the new $VAR will help with this?


- ronie - 2011-08-15 22:24

giftie Wrote:ronie - found two errors within the script.

first one:

line 190 in default.py reads as follows:

Code:
if not self.listing(): close("error listing")

should be:
Code:
if not self.listing(): self.close("error listing")

this is because the 'def close' is inside of the Class.

thanx giftie, will fix that one. :-)

giftie Wrote:Second error shows up if the user has the JSON RPC compact output turned off. This is done inside advancedsettings.xml(which I have set to false to make the output easier to read - for my own debugging Smile ) :

PHP Code:
<jsonrpc>
       <
compactoutput>false</compactoutput>
</
jsonrpc

Here is the output of the JSON RPC Query with Compact Output set to False: http://pastebin.com/82Rp3hiR
and set to True: http://pastebin.com/8Ur9jk78


This changes the format(adds a lot of tabs and spaces) which seems like the reg-ex fails to pick up the TV Show name. This also breaks TvTunes and Logo Downloader.

Having the JSON RPC set to Compact Output(which is default of course), everything works fine.

after struggling with regex for hours and hours i haven't been able to come up with a fix yet.
if you or anyone else has an idea, i'd certainly appreciate some help.


- ronie - 2011-08-15 22:51

ronie Wrote:thanx giftie, will fix that one. :-)
after struggling with regex for hours and hours i haven't been able to come up with a fix yet.
if you or anyone else has an idea, i'd certainly appreciate some help.

heh...as always...five minutes after you ask for help you figure it out yourself.


- giftie - 2011-08-16 02:28

ronie Wrote:heh...as always...five minutes after you ask for help you figure it out yourself.

It's always the case... It took me about two days to figure out the cause of the problem. Anyways I also got tired of regex and jsonrpc so I just use a module to convert the JSON RPC output to a Python DICT(http://forum.xbmc.org/showthread.php?tid=100598)


- ronie - 2011-08-16 02:38

giftie Wrote:It's always the case... It took me about two days to figure out the cause of the problem. Anyways I also got tired of regex and jsonrpc so I just use a module to convert the JSON RPC output to a Python DICT(http://forum.xbmc.org/showthread.php?tid=100598)

i'm aware and tried your solution some time ago :-)

the only downside is the time needed for the conversion.
it might not be a big deal for this script as it only does a single query,
but if your script makes several (the globalsearch script i did makes 7 queries)
you'll have to wait an additional 5 seconds or so before the results pop up.


- sergiocos - 2011-08-23 01:58

worked on a clean install (latest version and previous). somehow it doesn't work now, suddenly...
Quote:02:55:00 T:1796 NOTICE: -->Python Interpreter Initialized<--
02:55:01 T:1796 ERROR: Error Type: <type 'exceptions.NameError'>
02:55:01 T:1796 ERROR: Error Contents: global name 'close' is not defined
02:55:01 T:1796 ERROR: Traceback (most recent call last):
File "C:\Users\W7SP1x86FEB\AppData\Roaming\XBMC\addons\script.tv.show.next.aired\defau​lt.py", line 290, in <module>
NextAired()
File "C:\Users\W7SP1x86FEB\AppData\Roaming\XBMC\addons\script.tv.show.next.aired\defau​lt.py", line 71, in __init__
self.scan_info()
File "C:\Users\W7SP1x86FEB\AppData\Roaming\XBMC\addons\script.tv.show.next.aired\defau​lt.py", line 190, in scan_info
if not self.listing(): close("error listing")
NameError: global name 'close' is not defined