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) |
TV Show Next Aired (Script) Addon, now w/TheTVDB data - WayneD - 2014-02-12 Hi, folks! The Next Aired script has been updated to v6.0.x to provide better performance and fix a bunch of bugs. This should take care of the slow updating that everyone was seeing and make the 7-day Guide view much more accurate. To do all this I switched the scraping over to using TheTVDB as its data source. It makes use of the update zip files to efficiently grab only shows that have changes, so it can update more frequently during the day (by default it checks every 8 hours) as well as updating when the user enters the guide display (also defaults to 8 hours). I've taken over as maintainer from ronie, in order to make a variety of improvements, such as allowing skins to show more upcoming guide info and also improving the translation support. Here are some improvements that you may notice:
The end result is now in the addons, so anyone with this installed should have it by now. I'm also continuing to make my latest work available via zip file, so if you want to try any new features I mention later in this thread, snag the beta zip file and either unzip it into the XBMC/addons dir over the current code or use the menu prompts to install from zip. The file will include a unique 8-character string (right before the .zip suffix) for each changed version in order to work around a bug in the xbmc zip installer. If you use wget, be sure to use the --trust-server-names option if you plan to install the file via xbmc. After installation, you should exit XBMC and start it up again so that the background updating process gets going on the new code (assuming that your skin starts it up). If you're interested in helping out with the coding/fixing, feel free to check out the code's git repo. This thread started out as a WIP discussion of the 6.0.0 version, as seen in the first comments below. Enjoy! ..wayne.. RE: [TESTING] TV Show Next Aired (Script) Addon, now w/TheTVDB data - User 55003 - 2014-02-13 Nice work! Updates are a lot faster. Just noticed 2 minor problems. 1. format of the Genre string. You could use something like this to produce a more appealing format. Code: self.genre = node.findtext("Genre").strip('|').replace('|',' / ') 2. The airtime seems to be local (no adjustment for time diff). RE: [TESTING] TV Show Next Aired (Script) Addon, now w/TheTVDB data - Tricky - 2014-02-13 Ask here How do I get the next air date in a list container? This doesnt seem to work. $INFO[ListItem.Property(NextDate)] RE: [TESTING] TV Show Next Aired (Script) Addon, now w/TheTVDB data - warlion - 2014-02-13 Nice I will try on a few hours Thanks for the hard work ------- its just me or the status id for thetvdb is just ended and continuing RE: [TESTING] TV Show Next Aired (Script) Addon, now w/TheTVDB data - Vaikin - 2014-02-13 If you have a show in your database that hasn't had any episodes out yet, the script can't parse the first aired line(since it doesn't have one yet) and it crashes. Here is the error from the log. Edit: The show for me is Bastard Executioner found @ http://www.thetvdb.com/?tab=series&id=276170 RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - WayneD - 2014-02-13 (2014-02-13, 02:23)Steveb Wrote: 1. format of the Genre string. (2014-02-13, 05:48)Vaikin Wrote: If you have a show in your database that hasn't had any episodes out yet, the script can't parse the first aired line(since it doesn't have one yet) and it crashes. Thanks for the quick feedback. I've fixed the genre string to be formatted as it was before (though a show won't change format until it gets an update or until the DB is reset). I've also fixed the crash for a show with no episodes. The timezone issue is already on my list of things to improve, and I'll be getting to it soon. I've updated the zip file (mentioned in the first post) with the fixes. ..wayne.. RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - WayneD - 2014-02-14 (2014-02-13, 08:27)WayneD Wrote: The timezone issue is already on my list of things to improve, and I'll be getting to it soon. The timezones (and thus aired times) are now fixed up in the latest version of the zip file. I included a heuristic that will cause all the tv data to be refetched the first time you start up xbmc after the upgrade (assuming your skin starts the background updater) or the first time you enter the Guide (if it does not). For those upgrading from my earlier 6.0.0 files: I haven't been incrementing the version yet, so upgrades seem to be a bit manual at the moment -- I actually just went into the XBMC/addons dir and unzipped the new script.tv.*.zip file there. I did this because trying to tell xbmc to install my latest 6.0.0 zip file didn't actually update any of the files (it presumably thought I already had 6.0.0, but still, it should really just install from the zip I point it at). ..wayne.. RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - WayneD - 2014-02-14 (2014-02-13, 03:37)Tricky Wrote: How do I get the next air date in a list container? I assume you're asking about from a skin's perspective (which I haven't fiddled with). I do know that Ace and MQ5 make extensive use of Next Aired data, so you might try grepping through one of those for an answer. For instance, I see this in the 720p/IncludesVariables.xml file of Ace: Code: $INFO[Container(200).ListItem.Property(NextDate)] ..wayne.. RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - bill1972 - 2014-02-14 I seems to be getting a script error at little house on the prairie. 17:24:59 T:3500 NOTICE: script.tv.show.next.aired: ### getting series & episode information for Line of Duty 17:24:59 T:3500 NOTICE: script.tv.show.next.aired: ### getting series & episode information for Little House on the Prairie 17:25:00 T:3500 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <type 'exceptions.ValueError'> Error Contents: hour must be in 0..23 Traceback (most recent call last): File "C:\Users\Home Server\AppData\Roaming\XBMC\addons\script.tv.show.next.aired\default.py", line 858, in <module> NextAired() File "C:\Users\Home Server\AppData\Roaming\XBMC\addons\script.tv.show.next.aired\default.py", line 119, in __init__ self.show_gui() File "C:\Users\Home Server\AppData\Roaming\XBMC\addons\script.tv.show.next.aired\default.py", line 664, in show_gui self.update_data() File "C:\Users\Home Server\AppData\Roaming\XBMC\addons\script.tv.show.next.aired\default.py", line 310, in update_data tid = self.check_show_info(tvdb, tid, current_show, prior_data) File "C:\Users\Home Server\AppData\Roaming\XBMC\addons\script.tv.show.next.aired\default.py", line 454, in check_show_info airtime = TheTVDB.convert_time(show.airs_time) File "C:\Users\Home Server\AppData\Roaming\XBMC\addons\script.tv.show.next.aired\thetvdbapi.py", line 171, in convert_time return datetime.time(hour, int(gd["minute"])) ValueError: hour must be in 0..23 -->End of Python script error report<-- RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - WayneD - 2014-02-14 (2014-02-14, 00:31)bill1972 Wrote: Error Contents: hour must be in 0..23 That's actually a bug in thetvdbapi.py (12:00pm -> 24:00). I've fixed it in my local (extended) version of that file, and will let someone know about it. I've also added a try-except block to catch any future failures of that code. The latest zip has this fixed. Thanks! ..wayne.. RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - bill1972 - 2014-02-14 Thanks working now RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - WayneD - 2014-02-15 FYI, I've updated the zip file again with some more improvements: the updating algorithm got some fixing in the its scheduling, in how the background- and foreground-updating interacts, in how episode data is updated when we didn't re-grab the episodes (e.g. when the show's time changes it affects each episode's datetime value), and in some improvements to how a canceled update affects the data (we don't end up with partial data anymore). Also, the timezone code was improved to handle DST, the settings were tweaked a bit more to try to be a bit clearer, and some error-handling code was also improved. I'm thinking that this version is now where I want it to be for an initial release, so we just need to hammer on it some more and ensure that it is bug-free enough for wider distribution. Be sure to glance at the last 2 addon settings (the ones that affect update intervals) and let me know if you think they are reasonably clear and useful (the idea is to support background-only updating, foreground-only updating, and a combination thereof). A big "thank you" to everyone who is helping to test! Enjoy, ..wayne.. RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - WayneD - 2014-02-17 Another note for those who are testing: I've made a few more changes to the addon, and uploaded it to the same zip file (as mentioned above). Firstly, I discovered that the addon has had (for quite some time) a bad habit of starting up a new background update proc (w/o killing the old one) every time someone switches profiles in XBMC (if the skin starts it up). This makes me wonder how many people out there may be hammering tvrage in multiple simultaneous runs each day (for those users that leave their xbmc open a long time and like to switch profiles). Regardless, I've added some code to my latest version that notices if another background updater has started, which causes the older one to exit. This bug could also cause an issue with the wrong show list getting stored by the still-running update proc(s) if the profiles are configured to use different sources (the older update proc would get the current profile's list of shows, but save it to the old profile's data). While I was fiddling around with the code I also improved the tv-db-parsing base class some more to make it faster (I switched it over to expat incremental parsing, which made a local parse of the full Jeopardy! xml data decrease from 1.8 seconds to 0.6 seconds in my testing). I also made it download the .zip version of the data (which makes the grabbed data much smaller). Please let me know if I broke anything.... ..wayne.. RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - warlion - 2014-02-17 i get this error with the last update 6hours ago Code: 0:29:40 T:6088 NOTICE: script.tv.show.next.aired: ### getting series & episode information for Con el culo al aire is always happening with the spain seria "Con el culo al aire" after removing the seri came back with another for Mike & Molly Code: 00:33:21 T:5248 NOTICE: script.tv.show.next.aired: ### getting series & episode information for Mike & Molly RE: TV Show Next Aired (Script) Addon, now w/TheTVDB data - WayneD - 2014-02-17 (2014-02-17, 08:32)warlion Wrote: Error Type: <type 'exceptions.KeyError'> This should be all fixed up now. Thanks for the report! ..wayne.. |