Skip to content

Commit

Permalink
0.12.3-1 - added livestream and quality setting fix for kodi < 19
Browse files Browse the repository at this point in the history
  • Loading branch information
s0faking committed Oct 24, 2021
1 parent 3e87c19 commit 0e47ea4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 26 deletions.
2 changes: 2 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
* 0.12.3-1
- bugfix livestream restart (kodi <19 only)
- removed quality setting
- livestream active bugfix

* 0.12.3
- service api fixes (auth & restart)
Expand Down
6 changes: 2 additions & 4 deletions resources/lib/Addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
translation = settings.getLocalizedString

# hardcoded
video_delivery_list = ["HLS", "Progressive"]
video_quality_list = ["Q1A", "Q4A", "Q6A", "Q8C", "QXB"]
videoProtocol = "http"
videoQuality = "QXB"
videoDelivery = "HLS"

input_stream_protocol = 'mpd'
input_stream_drm_version = 'com.widevine.alpha'
Expand All @@ -48,8 +48,6 @@

# load settings
useServiceAPI = Settings.serviceAPI()
videoQuality = Settings.videoQuality(video_quality_list)
videoDelivery = Settings.videoDelivery(video_delivery_list)
autoPlayPrompt = Settings.autoPlayPrompt()
usePlayAllPlaylist = Settings.playAllPlaylist()

Expand Down
4 changes: 3 additions & 1 deletion resources/lib/HtmlScraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,13 +740,15 @@ def getLiveStreams(self):
section = parseDOM(wrapper, name='section', attrs={'class': 'b-live-program.*?'})
items = parseDOM(section, name='li', attrs={'class': 'channel orf.*?'})

if items:
debugLog("Found %d Livestream Channels" % len(items))
for item in items:
channel = parseDOM(item, name='img', attrs={'class': 'channel-logo'}, ret="alt")
channel = replaceHTMLCodes(channel[0])

debugLog("Processing %s Livestream" % channel)
bundesland_article = parseDOM(item, name='li', attrs={'class': '.*?is-bundesland-heute.*?'}, ret='data-jsb')
article = parseDOM(item, name='article', attrs={'class': 'b-livestream-teaser is-live.*?'})
article = parseDOM(item, name='article', attrs={'class': 'b-livestream-teaser.*?'})
if not len(bundesland_article) and len(article):
figure = parseDOM(article, name='figure', attrs={'class': 'teaser-img'}, ret=False)
image = parseDOM(figure, name='img', attrs={}, ret='data-src')
Expand Down
18 changes: 0 additions & 18 deletions resources/lib/Settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,6 @@ def userAgent():
return __addon__.getSetting('userAgent')


def videoQuality(quality_list):
default_return_index = 2
videoQuality = __addon__.getSetting('videoQuality')
try:
return quality_list[int(videoQuality)]
except (IndexError, ValueError):
return quality_list[default_return_index]


def videoDelivery(delivery_list):
default_return_index = 0
if serviceAPI():
videoDeliveryProgressive = __addon__.getSetting('videoDeliveryProgressive')
if videoDeliveryProgressive == "true":
return delivery_list[1]
return delivery_list[default_return_index]


def autoPlayPrompt():
return __addon__.getSetting("autoPlayPrompt") == "true"

Expand Down
4 changes: 1 addition & 3 deletions resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
<setting id="useSubtitles" type="bool" label="30029" default="false" />
<setting id="enableBlacklist" type="bool" label="30043" visible="eq(1,false)" default="false" />
<setting id="useServiceAPI" type="bool" label="30026" default="false" />
<setting id="videoDeliveryProgressive" label="30056" type="bool" visible="eq(-1,true)" default="false" />
<setting id="showLiveStreamSchedule" label="30061" type="bool" visible="eq(-2,true)" default="false" />
<setting id="showLiveStreamSchedule" label="30061" type="bool" visible="eq(-1,true)" default="false" />
<setting id="usePlayAllPlaylist" label="30058" type="bool" default="true" />
<setting id="videoQuality" type="enum" label="30022" lvalues="30023|30024|30025|30044|30053" default="3"/>
<setting id="userAgent" default="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36" visible="false" />
</category>
</settings>

0 comments on commit 0e47ea4

Please sign in to comment.