diff --git a/addon.xml b/addon.xml index ea08e3c..886af73 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + @@ -33,7 +33,10 @@ resources/img/kodi/clearlogo.png - 1.0.0-alpha.1 + 1.0.0-rc.2 +- handle direct download video_url's (e.g. Heroero.com) +- minimal cleanups +1.0.0-rc.1 - finally push an initial 1.0.0-rc.1 with all the additions and fixes added in the last years 0.9.9 - play with new Vimeo Add-on from jaylinski if it's available and otherwise fallback to youtube-dl diff --git a/changelog.txt b/changelog.txt index dd33f00..c2290b6 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,7 @@ -1.0.0-alpha.1 +1.0.0-rc.2 +- handle direct download video_url's (e.g. Heroero.com) +- minimal cleanups +1.0.0-rc.1 - finally push an initial 1.0.0-rc.1 with all the additions and fixes added in the last years 0.9.9 - play with new Vimeo Add-on from jaylinski if it's available and otherwise fallback to youtube-dl diff --git a/default.py b/default.py index 258f9ee..4dceba9 100644 --- a/default.py +++ b/default.py @@ -493,37 +493,35 @@ def numbers(): def camelot(): - #fanart = "resources/img/camelot/camleot.png" - if sort == "random" or sort == "date": - num1 = 0 - for num in range(1, 13): - # logic to get get all the different translation strings from camelot wheel - minor = 30149 + num + num1 - major = 30149 + num + num1 + 1 - log( - msg="camelotnumber=%s, minor=%s, major=%s" % (num, minor, major), - level=xbmc.LOGINFO, - ) - fanart = os.path.join( - addonDir, "resources/img/camelot/" + str(num) + "A.png" - ) - addDir( - translation(minor), - "&limit=camelot&sort=" + sort + "&start=" + str(num) + "A", - "sortTitlesBy", - fanart, - ) - fanart = os.path.join( - addonDir, "resources/img/camelot/" + str(num) + "B.png" - ) - addDir( - translation(major), - "&limit=camelot&sort=" + sort + "&start=" + str(num) + "B", - "sortTitlesBy", - fanart, - ) - num1 += 1 - endOfDirectory() + num1 = 0 + for num in range(1, 13): + # logic to get get all the different translation strings from camelot wheel + minor = 30149 + num + num1 + major = 30149 + num + num1 + 1 + log( + msg="camelotnumber=%s, minor=%s, major=%s" % (num, minor, major), + level=xbmc.LOGINFO, + ) + fanart = os.path.join( + addonDir, "resources/img/camelot/" + str(num) + "A.png" + ) + addDir( + translation(minor), + "&limit=camelot&sort=" + sort + "&start=" + str(num) + "A", + "sortTitlesBy", + fanart, + ) + fanart = os.path.join( + addonDir, "resources/img/camelot/" + str(num) + "B.png" + ) + addDir( + translation(major), + "&limit=camelot&sort=" + sort + "&start=" + str(num) + "B", + "sortTitlesBy", + fanart, + ) + num1 += 1 + endOfDirectory() def opensettings(): @@ -739,20 +737,25 @@ def resolveprovider(entry): ): provider = str(entry["sources"][0]["provider"]) videoid = str(entry["sources"][0]["videoid"]) - restricted = int(entry["sources"][0]["age_limit"]) + agerestricted = int(entry["sources"][0]["age_limit"]) + video_url = str(entry["sources"][0]["video_url"]) elif entry["sources"][1]["provider"] == preferedprovider: provider = str(entry["sources"][1]["provider"]) videoid = str(entry["sources"][1]["videoid"]) - restricted = int(entry["sources"][1]["age_limit"]) + agerestricted = int(entry["sources"][1]["age_limit"]) + video_url = str(entry["sources"][1]["video_url"]) else: provider = str(entry["sources"][0]["provider"]) videoid = str(entry["sources"][0]["videoid"]) - restricted = int(entry["sources"][0]["age_limit"]) + agerestricted = int(entry["sources"][0]["age_limit"]) + video_url = str(entry["sources"][0]["video_url"]) else: + # we should never end up here? provider = str(entry["sources"][0]["provider"]) videoid = str(entry["sources"][0]["videoid"]) - agerestricted = 0 - agerestricted = int(entry["sources"][0]["age_limit"]) + agerestricted = int(entry["sources"][0]["age_limit"]) + video_url = str(entry["sources"][0]["video_url"]) + slug = str(entry["slug"]) addonyoutube = addon.getSetting("addon-youtube") addonyoutubeagerestricted = addon.getSetting("addon-youtube-age-restricted") @@ -835,6 +838,9 @@ def resolveprovider(entry): % (videoid) ) provider = addonvevo + elif len(video_url) > 0: + url = video_url + if provider == "script.module.youtube.dl": import YDStreamExtractor