Kodi Community Forum
Release TV Show Next Aired (Script) Addon, now w/TheTVDB data - 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, now w/TheTVDB data (/showthread.php?tid=186090)



RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - warlion - 2014-02-17

all working now Wayne thanks for the fast fix

the only problem that i see is the Status ids: it keeps giving me -1 for the current air shows and nothing for the cancel shows , not shure the api of tvDB give


RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - warlion - 2014-02-17

i just find something really odd

i had the tv show One Piece but it not getting any information from the script
it is searching for the information

14:53:18 T:4044 NOTICE: script.tv.show.next.aired: ### getting series & episode information for One Piece

but its not getting anything any idea how to solve this?

----edit----------
never mind, i found the problem, thetvdb is incomplete


RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - WayneD - 2014-02-18

(2014-02-17, 09:32)warlion Wrote: the only problem that i see is the Status ids: it keeps giving me -1 for the current air shows and nothing for the cancel shows , not shure the api of tvDB give

Yeah, the Status values that TheTVDB gives appear to be just "Continuing" and "Ended". The former status doesn't match any prior known string, while the latter matches status_id 11 (so I'm not sure why you didn't get 11 for those). I need to either extend the STATUS list to add Continuing (making it ID 12), or try to fudge the status based on the show's series numbers (e.g. choose between new and returning if it is listed as Continuing). I'll look into this soon and see if I like the heuristic idea.

..wayne..


RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - warlion - 2014-02-18

(2014-02-18, 03:30)WayneD Wrote: Yeah, the Status values that TheTVDB gives appear to be just "Continuing" and "Ended". The former status doesn't match any prior known string, while the latter matches status_id 11 (so I'm not sure why you didn't get 11 for those). I need to either extend the STATUS list to add Continuing (making it ID 12), or try to fudge the status based on the show's series numbers (e.g. choose between new and returning if it is listed as Continuing). I'll look into the soon and see if I like the heuristic idea.

..wayne..

ohh isee why i have problem with the id=11 i miss to add that img
right now i cant test it , the script is giving me a error of timeout

Error Type: <type 'exceptions.IOError'>
Error Contents: [Errno socket error] timed out

i guess rigth now thetvdb api is down not sure

its going to be a pain in the arsh the status id good job Wayne


RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - WayneD - 2014-02-18

(2014-02-18, 04:08)warlion Wrote: i guess rigth now thetvdb api is down not sure

Yeah, they've been having various issues in both their api and web pages today. Seems to be back to normal now, though. The nice thing about the problems was that I found and fixed a few issues in the script's error handling.

I went ahead and implemented the status heuristic, so now it is choosing either ID 4 (new) or ID 0 (returning) for continuing shows. I also changed Ended to be 2 (Cancelled/Ended) instead of 11. It will also return the TBD/Bubble response if someone changes the status to the indeterminate state that the site provides. Finally, it will return "Final Season" if someone sets the show to "Ended" with some upcoming episodes still around.

The zip file has this change and a few others, such as the improved error handling for thetvdb issues, and a few logging tweaks.

..wayne..


RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - warlion - 2014-02-18

nice thanks Wayne it is working fine the new status id perhaps you should change the readme and the first post with the correct working status id to not confuse people

thanks Wayne working great

edit meaby something like this can open new status id

if show has next show and is "continuing" and had more than 1 season status id = Returning Series
if show has next show and is "continuing" and dont had more than 1 season status id = New serie
if show dont had next show and is "continuing" status id = TBD/On The Bubble


RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - andrew0404 - 2014-02-19

I am getting a script error on Frodo 12.2 with Aeon Nox.

Here is the log:
http://pastebin.com/ev32aPyC


RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - WayneD - 2014-02-19

(2014-02-19, 05:46)andrew0404 Wrote: I am getting a script error on Frodo 12.2 with Aeon Nox. [...]

Ah yes, I had missed the case where 'number' could be missing in that section. I've updated the zip file with a fix. Thanks!

..wayne..


RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - warlion - 2014-02-19

since 2 days ago my aired time change any idea how can i revert the aired time
old script
Image

new script
Image


also im having problems with lastestepisode# lastestseason# well everyting that is from lastest

im using
Code:
<control type="label">
                <left>22</left>
                <top>538</top>
                <width>415</width>
                <height>80</height>
                <label>$LOCALIZE[31189]:[CR][COLOR white2]S$INFO[ListItem.Property(LatestSeasonNumber)]E$INFO[ListItem.Property(LatestEpisodeNumber)][COLOR grey] ($LOCALIZE[31322]: $INFO[ListItem.Property(LatestDate)])[/COLOR]:[CR] $INFO[ListItem.Property(LatestTitle)][/COLOR]</label>
                <textcolor>$VAR[TitleColorVar]</textcolor>
            </control>





edit----------
the new line 'usa': (-5, True),
made it thanks Wayne


RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - WayneD - 2014-02-19

(2014-02-19, 06:28)warlion Wrote: since 2 days ago my aired time change any idea how can i revert the aired time?

Looks like when I changed "United States" into "USA" (to be more like the old script's country value) I sadly didn't add the timezone lookup for "usa". This is fixed in the latest zip file.

I'm looking into the Latest*Number issue.

..wayne..


RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - warlion - 2014-02-19

i was checking your default seems to me there is not set those Propertys

Code:
label.setProperty(prefix + "AirTime", '%s at %s' % (airdays, item.get("Airtime", "")))
        label.setProperty(prefix + "Path", item.get("path", ""))
        label.setProperty(prefix + "Library", item.get("dbid", ""))
        label.setProperty(prefix + "Status", status)
        label.setProperty(prefix + "StatusID", status_id)
        label.setProperty(prefix + "Network", item.get("Network", ""))
        label.setProperty(prefix + "Started", item.get("Started", ""))
        # XXX Note that Classification is always unset at the moment!
        label.setProperty(prefix + "Classification", item.get("Classification", ""))
        label.setProperty(prefix + "Genre", item.get("Genres", ""))
        label.setProperty(prefix + "Premiered", str(item.get("Premiered", "")))
        label.setProperty(prefix + "Country", item.get("Country", ""))
        label.setProperty(prefix + "Runtime", str(item.get("Runtime", "")))
        # Keep old fanart property for backwards compatibility
        label.setProperty(prefix + "Fanart", art.get("fanart", ""))
        # New art properties
        label.setProperty(prefix + "Art(fanart)", art.get("fanart", ""))
        label.setProperty(prefix + "Art(poster)", art.get("poster", ""))
        label.setProperty(prefix + "Art(banner)", art.get("banner", ""))
        label.setProperty(prefix + "Art(landscape)", art.get("landscape", ""))
        label.setProperty(prefix + "Art(clearlogo)", art.get("clearlogo", ""))
        label.setProperty(prefix + "Art(characterart)", art.get("characterart", ""))
        label.setProperty(prefix + "Art(clearart)", art.get("clearart", ""))
        label.setProperty(prefix + "Today", is_today)
        label.setProperty(prefix + "AirDay", airdays)
        label.setProperty(prefix + "ShortTime", item.get("Airtime", ""))

but you add the clearproperty
Code:
self.WINDOW.clearProperty("NextAired.%d.Label" % ( count + 1, ))
            self.WINDOW.clearProperty("NextAired.%d.Thumb" % ( count + 1, ))
            self.WINDOW.clearProperty("NextAired.%d.NextDate" % ( count + 1, ))
            self.WINDOW.clearProperty("NextAired.%d.NextTitle" % ( count + 1, ))
            self.WINDOW.clearProperty("NextAired.%d.NextNumber" % ( count + 1, ))
            self.WINDOW.clearProperty("NextAired.%d.NextEpisodeNumber" % ( count + 1, ))
            self.WINDOW.clearProperty("NextAired.%d.NextSeasonNumber" % ( count + 1, ))
            self.WINDOW.clearProperty("NextAired.%d.LatestDate" % ( count + 1, ))
            self.WINDOW.clearProperty("NextAired.%d.LatestTitle" % ( count + 1, ))
            self.WINDOW.clearProperty("NextAired.%d.LatestNumber" % ( count + 1, ))
            self.WINDOW.clearProperty("NextAired.%d.LatestEpisodeNumber" % ( count + 1, ))
            self.WINDOW.clearProperty("NextAired.%d.LatestSeasonNumber" % ( count + 1, ))

btw wayne can i ask you a favor, it is possible that you gave me a example of the api of a tv show , im unable to find the correct api lol, sorry about that


RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - WayneD - 2014-02-19

(2014-02-19, 07:25)warlion Wrote: i was checking your default seems to me there is not set those Propertys

See the self.set_episode_info() calls for where they get set.

I had made the listitem callbacks not set Latest* values, since this seemed to just be setting the info for the icons in the GUI (the Latest* values get set for the other areas where there is just the one constant "Next*" episode value). I've gone ahead and changed the code to set the same value for all the listitems, so that it has the info of the prior-broadcast episode for all the upcoming show instances.

The alternative would be to give each future episode the info from the prior episode in the list. e.g., if there are 3 future episodes (e1, e2, & e3), then e1 would get the current "Latest*" value (lets call it p1), e2 would get e1 as its Latest* values, and e3 would get e2. Since the old script set the same p1 & e1 value for all the show's icons, I'm not sure what skin designers might find the most useful.

Quote:btw wayne can i ask you a favor, it is possible that you gave me a example of the api of a tv show

Do you mean the various fields mentioned in the README.txt file? I'm trying to keep the values the same as what they were before, but this is one area where things are a little different due to the extended number of future episodes that are presented in the 7-day list of upcoming shows.

..wayne..


RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - warlion - 2014-02-19

(2014-02-19, 08:11)WayneD Wrote:
(2014-02-19, 07:25)warlion Wrote: i was checking your default seems to me there is not set those Propertys

See the self.set_episode_info() calls for where they get set.

I had made the listitem callbacks not set Latest* values, since this seemed to just be setting the info for the icons in the GUI (the Latest* values get set for the other areas where there is just the one constant "Next*" episode value). I've gone ahead and changed the code to set the same value for all the listitems, so that it has the info of the prior-broadcast episode for all the upcoming show instances.

The alternative would be to give each future episode the info from the prior episode in the list. e.g., if there are 3 future episodes (e1, e2, & e3), then e1 would get the current "Latest*" value (lets call it p1), e2 would get e1 as its Latest* values, and e3 would get e2. Since the old script set the same p1 & e1 value for all the show's icons, I'm not sure what skin designers might find the most useful.

Quote:btw wayne can i ask you a favor, it is possible that you gave me a example of the api of a tv show

Do you mean the various fields mentioned in the README.txt file?

..wayne..

got it thanks wayne i will do some test

actually the example is cuz i can get further than lol
http://thetvdb.com/api/2B8557E0CBF7D720/


RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - warlion - 2014-02-19

Wayne the last change 5 min ago fix all working without any error for the Latest thanks a lot
still i was unable to see any status id for TBD/On The Bubble but i can live without it

btw any chance to update for gotham?
dbid = 'videodb://2/2/'

http://wiki.xbmc.org/?title=Opening_Windows_and_Dialogs


RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - WayneD - 2014-02-19

(2014-02-19, 08:11)WayneD Wrote: The alternative would be to give each future episode the info from the prior episode in the list.

After thinking about this a bit more, I decided I like this idea better. Then I noticed that your skin has "Previous Episode", which seems to agree with this. Updated.

Thanks for the clarification on your API question. In thetvdbapi.py's function get_show(), it lists this url:
Code:
url = "%s/series/%s/%s.xml" % (self.base_xml_url, show_id, self.language)

So, one possible result would be:
Code:
http://thetvdb.com/api/2B8557E0CBF7D720/series/77666/en.xml

..wayne..


This forum uses Lukasz Tkacz MyBB addons.