diff --git a/plugin.video.mlbtv/addon.xml b/plugin.video.mlbtv/addon.xml index c8722319d..704098cf7 100644 --- a/plugin.video.mlbtv/addon.xml +++ b/plugin.video.mlbtv/addon.xml @@ -1,5 +1,5 @@ - + @@ -22,11 +22,11 @@ Requires an MLB.tv account - - updated Big Inning schedule - - fix for disable captions on catch up - - fix and improvements for play all recaps option - - support for single team packages in stream selection - - support for Stream Finder (auto-switching based on custom criteria) + - bypass skip adjust settings when skipping commercials + - stream finder extra innings LI correction + - skip bugfix at end-of-game + - auto upload Stream Finder form + - proxy playback fix (used for stream length padding) en all diff --git a/plugin.video.mlbtv/resources/lib/mlbmonitor.py b/plugin.video.mlbtv/resources/lib/mlbmonitor.py index 27eca7820..ddba18023 100644 --- a/plugin.video.mlbtv/resources/lib/mlbmonitor.py +++ b/plugin.video.mlbtv/resources/lib/mlbmonitor.py @@ -1017,19 +1017,24 @@ def game_monitor(self, skip_type, game_pk, broadcast_start_timestamp, stream_url # make sure we're not paused, and current time is valid (less than 10 hours) -- sometimes Kodi was returning a crazy large current time as the stream was starting if current_time > 0 and current_time != last_time and current_time < 36000: last_time = current_time - if skip_markers[0][0] > 0: + # apply current skip adjust settings to non-commercial skipping + if skip_markers[0][0] > 0 and skip_type != 1: current_break_start = skip_markers[0][0] + self.skip_adjust_end else: current_break_start = skip_markers[0][0] - current_break_end = skip_markers[0][1] + self.skip_adjust_start + if skip_type != 1: + current_break_end = skip_markers[0][1] + self.skip_adjust_start + else: + current_break_end = skip_markers[0][1] # remove any past skip markers so user can seek backward freely while len(skip_markers) > 0 and current_time > current_break_end: xbmc.log(monitor_name + " removed skip marker at " + str(current_break_end) + ", before current time " + str(current_time)) skip_markers.pop(0) - current_break_end = skip_markers[0][1] + self.skip_adjust_start + if len(skip_markers) > 0: + current_break_end = skip_markers[0][1] + self.skip_adjust_start # seek to end of break if we fall within skip marker range, then remove marker so user can seek backward freely if len(skip_markers) > 0 and current_time >= current_break_start and current_time < current_break_end: - xbmc.log(monitor_name + " processed skip marker at " + str(current_break_end)) + xbmc.log(monitor_name + " current time " + str(current_time) + " falls within skip time from " + str(current_break_start) + " - " + str(current_break_end)) player.seekTime(current_break_end) skip_markers.pop(0) # since we just processed a skip marker, we can delay further processing a little bit @@ -1878,7 +1883,7 @@ def get_stream_finder_games(self): third = game['linescore']['offense']['third']['id'] basesit = self.basesit(first, second, third) - innbaseout = str(currentInning) + str(half) + str(basesit) + str(outs) + innbaseout = str(currentInning if currentInning <= 9 else 9) + str(half) + str(basesit) + str(outs) games.append({ 'gamePk': game['gamePk'], diff --git a/plugin.video.mlbtv/service.py b/plugin.video.mlbtv/service.py index 5513327fc..bdf539d85 100644 --- a/plugin.video.mlbtv/service.py +++ b/plugin.video.mlbtv/service.py @@ -73,7 +73,7 @@ def do_GET(self): self.send_response(200) self.send_header('Content-type', 'text/html') self.end_headers() - content = '

Stream Finder

Click to Download Currently Stored Settings

Settings update

Step 1
Export and download your desired Stream Finder settings at this link:
https://www.baseball-reference.com/stream-finder.shtml

Step 2
Click this button and select the settings file you just downloaded:

Step 3
Click this button to upload the selected settings file to Kodi:

' + content = '

Stream Finder

Click to Download Currently Stored Settings

Settings update

Step 1
Export and download your desired Stream Finder settings at this link:
https://www.baseball-reference.com/stream-finder.shtml

Step 2
Click this button and select the settings file you just downloaded:

' elif self.path == '/downloadsettings': self.send_response(200) self.send_header('Content-type', 'text/plain') @@ -113,7 +113,7 @@ def do_GET(self): self.end_headers() - content = response.content.decode('utf8') + content = response.content.decode('utf8', errors='ignore') # remove subtitles and extraneous lines for Kodi Inputstream Adaptive compatibility content = re.sub(r"(?:#EXT-X-MEDIA:TYPE=SUBTITLES[\S]+\n)", r"", content, flags=re.M) @@ -135,7 +135,7 @@ def do_GET(self): for line in line_array: if line.startswith('#'): # look for uri parameters within non-key "#" lines - if playlist_type == 'master' and KEY_TEXT not in line and URI_START_DELIMETER in line: + if (playlist_type == 'master' and KEY_TEXT not in line and URI_START_DELIMETER in line) or (KEY_TEXT in line and URI_START_DELIMETER in line): line_split = line.split(URI_START_DELIMETER) url_split = line_split[1].split(URI_END_DELIMETER, 1) absolute_url = urljoin(url, url_split[0])