PK gJ@ ' plugin.video.democracynow/changelog.txtplugin.video.democracynow: -------------------------- v2.1.1 (06.06.2017) -fix some date issue. v2.1.0 (06.06.2017) -Rewritten with new api due to website change. v2.0.6 (13.05.2017) -fixed video duration v2.0.5 (15.06.2016) -fixed video url v2.0.4 (20.02.2015) -get rid of unplayable content. v2.0.3 (23.01.2014) -better video quality. thanks to @celadoor -added additional information in addon.xml v2.0.2 (09.01.2012) -frodo release -cosmetic v2.0.1 (03.01.2013) -fix content list v2.0.0 (30.04.2012) -code cleanup and reorder with pep8 -fanart support for content list -use "startswith()" instead of "==" -revert audio support commit v1.0.5 (18.12.2011) -added audio support from Music add-on -fixed thumb issue v1.0.4 (17.12.2011) -prepare for Eden v1.0.3 (16.12.2011) -Now just todays news. Headlines, Features and Full Show. v1.0.2 (11.12.2010) -removed Settings v1.0.1 (12.11.2009) -removed debug option and codes.PK JS " plugin.video.democracynow/addon.py# -*- coding: utf-8 -*- import sys import xbmcgui import xbmcplugin import xbmcaddon import requests addon = xbmcaddon.Addon() addon_icon = addon.getAddonInfo('icon') addon_fanart = addon.getAddonInfo('fanart') addon_handler = int(sys.argv[1]) # Fanart xbmcplugin.setPluginFanart(int(sys.argv[1]), addon_fanart) thumb_replacement = 'https://assets.democracynow.org/assets/default_content_image-354f4555cc64afadc730d64243c658dd0af1f330152adcda6c4900cb4a26f082.jpg' current_show = 'http://www.democracynow.org/api/1/current_show' r = requests.get(current_show).json() def string_correction(_str): return _str.replace('&', '&')\ .replace('"', '"')\ .replace('’', "'")\ .replace('', '').replace('', '')\ .replace('
', '').replace('
', '') def main(): for show in r['media']: if 'High' in show['title']: url = show['src'] title = 'Full Show' thumb = thumb_replacement summary = '' listitem = xbmcgui.ListItem(title, iconImage="DefaultVideoBig.png", thumbnailImage=thumb) listitem.setProperty('fanart_image', addon_fanart) listitem.setProperty('IsPlayable', 'true') listitem.setInfo(type="video", infoLabels={"title": title, "plot": summary}) xbmcplugin.addDirectoryItem(addon_handler, url, listitem, isFolder=False) for video in r['items']: if video['itemType'] == 'headline_section': title = 'Headlines' else: title = string_correction(video['title']) url = '' for _video in video['media']: if 'High' in _video['title']: url = _video['src'] else: pass try: thumb = video['images'][0]['url'] except KeyError: thumb = thumb_replacement try: duration = int(video['duration']) except KeyError: duration = '' try: summary = string_correction(video['summary']) except KeyError: summary = '' if url is not '': listitem = xbmcgui.ListItem(title, iconImage="DefaultVideoBig.png", thumbnailImage=thumb) listitem.setProperty('fanart_image', addon_fanart) listitem.setProperty('IsPlayable', 'true') listitem.setInfo(type="video", infoLabels={"title": title, "plot": summary, "duration": duration}) xbmcplugin.addDirectoryItem(addon_handler, url, listitem, isFolder=False) else: pass xbmcplugin.setContent(addon_handler, 'episodes') # End of list... xbmcplugin.endOfDirectory(addon_handler, True) main() PK ';;L L " plugin.video.democracynow/icon.pngPNG IHDR , , " pHYs gR OiCCPPhotoshop ICC profile xڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ>H3Q5B.@ $p d!s# ~<<+" x M0B\t8K @zB @F&S