diff --git a/addon.xml b/addon.xml index 886af73..ea08e3c 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + @@ -33,10 +33,7 @@ resources/img/kodi/clearlogo.png - 1.0.0-rc.2 -- handle direct download video_url's (e.g. Heroero.com) -- minimal cleanups -1.0.0-rc.1 + 1.0.0-alpha.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 c2290b6..dd33f00 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,7 +1,4 @@ -1.0.0-rc.2 -- handle direct download video_url's (e.g. Heroero.com) -- minimal cleanups -1.0.0-rc.1 +1.0.0-alpha.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 4dceba9..258f9ee 100644 --- a/default.py +++ b/default.py @@ -493,35 +493,37 @@ def numbers(): def camelot(): - 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() + #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() def opensettings(): @@ -737,25 +739,20 @@ def resolveprovider(entry): ): provider = str(entry["sources"][0]["provider"]) videoid = str(entry["sources"][0]["videoid"]) - agerestricted = int(entry["sources"][0]["age_limit"]) - video_url = str(entry["sources"][0]["video_url"]) + restricted = int(entry["sources"][0]["age_limit"]) elif entry["sources"][1]["provider"] == preferedprovider: provider = str(entry["sources"][1]["provider"]) videoid = str(entry["sources"][1]["videoid"]) - agerestricted = int(entry["sources"][1]["age_limit"]) - video_url = str(entry["sources"][1]["video_url"]) + restricted = int(entry["sources"][1]["age_limit"]) else: provider = str(entry["sources"][0]["provider"]) videoid = str(entry["sources"][0]["videoid"]) - agerestricted = int(entry["sources"][0]["age_limit"]) - video_url = str(entry["sources"][0]["video_url"]) + restricted = int(entry["sources"][0]["age_limit"]) else: - # we should never end up here? provider = str(entry["sources"][0]["provider"]) videoid = str(entry["sources"][0]["videoid"]) - agerestricted = int(entry["sources"][0]["age_limit"]) - video_url = str(entry["sources"][0]["video_url"]) - + agerestricted = 0 + agerestricted = int(entry["sources"][0]["age_limit"]) slug = str(entry["slug"]) addonyoutube = addon.getSetting("addon-youtube") addonyoutubeagerestricted = addon.getSetting("addon-youtube-age-restricted") @@ -838,9 +835,6 @@ def resolveprovider(entry): % (videoid) ) provider = addonvevo - elif len(video_url) > 0: - url = video_url - if provider == "script.module.youtube.dl": import YDStreamExtractor