Skip to content
Open
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.espn.video"
name="ESPN Video"
version="2.0.5"
version="2.0.6"
provider-name="stacked, Swedemon">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
Expand Down
6 changes: 5 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[B]Version 2.0.6[/B]

- Fixed Android crash

[B]Version 2.0.5[/B]

- Fixed TV Shows and Categories bug
Expand Down Expand Up @@ -29,4 +33,4 @@

[B]Version 1.0.0[/B]

- Initial commit to Eden add-on system
- Initial commit to Eden add-on system
23 changes: 16 additions & 7 deletions default.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

from addonfunc import addListItem, playListItem, getUrl, getPage, setViewMode, getParameters, retry

@retry(IndexError)
#@retry(IndexError)
def build_main_directory():
main=[
( settings.getLocalizedString( 30000 ), tvshows_thumb, 'menu2949050', '1' ),
Expand All @@ -42,11 +42,11 @@ def build_main_directory():
build_video_directory('http://espn.go.com/video/format/libraryPlaylist?categoryid=2378529', 'The Latest', 'null')
setViewMode("503")

@retry(IndexError)
#@retry(IndexError)
def build_sub_directory(url, thumb):
saveurl = url
html = getUrl('http://espn.go.com/video/')
html = html.decode(encoding='UTF-16',errors='ignore') #Swedemon fix 2015-02-16
html = html.decode('UTF-8','ignore') #Swedemon/Mrdally204 Change 2015-08-31
menu = common.parseDOM(html, "div", attrs = { "id": url })
channel = common.parseDOM(menu, "li", attrs = { "class": "channel" })
title = common.parseDOM(channel, "a")
Expand Down Expand Up @@ -111,7 +111,7 @@ def build_sub_directory(url, thumb):
setViewMode("503")
xbmcplugin.endOfDirectory( int( sys.argv[1] ) )

@retry(IndexError)
#@retry(IndexError)
def build_video_directory(url, name, type):
nextname = name
if name == settings.getLocalizedString( 30005 ):
Expand All @@ -134,6 +134,7 @@ def build_video_directory(url, name, type):
url = 'http://search.espn.go.com/results?searchString=' + newStr + '&start=' + str(int(page) * 16) + '&dims=6'
nexturl = url
html = getUrl(url).decode('ascii', 'ignore')
html = html.decode('UTF-8','ignore') #Swedemon/Mrdally204 Change 2015-08-31
results = common.parseDOM(html, "li", attrs = { "class": "result video-result" })
titledata = common.parseDOM(results, "h3")
title = common.parseDOM(titledata, "a", attrs = { "rel": "nofollow" })
Expand All @@ -152,12 +153,17 @@ def build_video_directory(url, name, type):
else:
nexturl = url
html = getUrl(url + "&pageNum=" + str(int(page)) + "&sortBy=&assetURL=http://assets.espn.go.com&module=LibraryPlaylist&pagename=vhub_index")
html = html.decode('UTF-8','ignore') #Swedemon/Mrdally204 Change 2015-08-31
videocell = common.parseDOM(html, "div", attrs = { "class": "video-cell" })
title = common.parseDOM(videocell, "h5")
thumb = common.parseDOM(videocell, "img", ret = "src")
desc = common.parseDOM(common.parseDOM(videocell, "p", attrs = { "class": "watch-now" }), "a", ret = "href")
pagecount = common.parseDOM(html, "div", attrs = { "class": "page-numbers" })[0].rsplit(' of ')
try:
pagecount = common.parseDOM(html, "div", attrs = { "class": "page-numbers" })[0].rsplit(' of ')
except:
pagecount = ''
item_count = 0
#print 'videocell='+str(videocell)+'title='+str(title)+'thumb='+str(thumb)+'desc='+str(desc)+'pagecount='+str(pagecount)
for name in title:
if '/espn360/' not in thumb[item_count]:
if 'http://' in desc[item_count]:
Expand All @@ -178,7 +184,7 @@ def build_video_directory(url, name, type):
infoLabels = { "Title": name, "Plot": plot }
addListItem(label = name, image = thumbnailImage, url = u, isFolder = False, infoLabels = infoLabels)
item_count += 1
if pagecount[0] != pagecount[1]:
if pagecount and pagecount[0] != pagecount[1]:
u = { 'mode': '2', 'name': nextname, 'url': nexturl, 'page': str(int(page) + 1), 'type': 'null' }
infoLabels = { "Title": settings.getLocalizedString( 30003 ), "Plot": settings.getLocalizedString( 30003 ) }
addListItem(label = settings.getLocalizedString( 30003 ), image = next_thumb, url = u, isFolder = True, infoLabels = infoLabels)
Expand Down Expand Up @@ -299,6 +305,9 @@ def play_video(url, name, thumb, plot):
except:
pass

common.dbg = True # Default
common.dbglevel = 3 # Default

try:
if mode == None:
build_main_directory()
Expand All @@ -316,4 +325,4 @@ def play_video(url, name, thumb, plot):
edit_menu(name, url)
except Exception:
buggalo.onExceptionRaised()


Binary file modified downloads/plugin.video.espn.video-frodo.zip
Binary file not shown.
Binary file modified downloads/plugin.video.espn.video.zip
Binary file not shown.