Skip to content

Commit 3652e24

Browse files
committed
[plugin.video.mlbtv] 2026.2.27+matrix.1
1 parent 32731dc commit 3652e24

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

plugin.video.mlbtv/addon.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2-
<addon id="plugin.video.mlbtv" name="MLB.TV®" version="2025.7.18+matrix.1" provider-name="eracknaphobia, tonywagner">
2+
<addon id="plugin.video.mlbtv" name="MLB.TV®" version="2026.2.27+matrix.1" provider-name="eracknaphobia, tonywagner">
33
<requires>
44
<import addon="xbmc.python" version="3.0.0"/>
55
<import addon="script.module.pytz" />
@@ -22,11 +22,11 @@
2222
</description>
2323
<disclaimer lang="en_GB">Requires an MLB.tv account</disclaimer>
2424
<news>
25-
- updated Big Inning schedule
26-
- fix for disable captions on catch up
27-
- fix and improvements for play all recaps option
28-
- support for single team packages in stream selection
29-
- support for Stream Finder (auto-switching based on custom criteria)
25+
- bypass skip adjust settings when skipping commercials
26+
- stream finder extra innings LI correction
27+
- skip bugfix at end-of-game
28+
- auto upload Stream Finder form
29+
- proxy playback fix (used for stream length padding)
3030
</news>
3131
<language>en</language>
3232
<platform>all</platform>

plugin.video.mlbtv/resources/lib/mlbmonitor.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,19 +1017,24 @@ def game_monitor(self, skip_type, game_pk, broadcast_start_timestamp, stream_url
10171017
# 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
10181018
if current_time > 0 and current_time != last_time and current_time < 36000:
10191019
last_time = current_time
1020-
if skip_markers[0][0] > 0:
1020+
# apply current skip adjust settings to non-commercial skipping
1021+
if skip_markers[0][0] > 0 and skip_type != 1:
10211022
current_break_start = skip_markers[0][0] + self.skip_adjust_end
10221023
else:
10231024
current_break_start = skip_markers[0][0]
1024-
current_break_end = skip_markers[0][1] + self.skip_adjust_start
1025+
if skip_type != 1:
1026+
current_break_end = skip_markers[0][1] + self.skip_adjust_start
1027+
else:
1028+
current_break_end = skip_markers[0][1]
10251029
# remove any past skip markers so user can seek backward freely
10261030
while len(skip_markers) > 0 and current_time > current_break_end:
10271031
xbmc.log(monitor_name + " removed skip marker at " + str(current_break_end) + ", before current time " + str(current_time))
10281032
skip_markers.pop(0)
1029-
current_break_end = skip_markers[0][1] + self.skip_adjust_start
1033+
if len(skip_markers) > 0:
1034+
current_break_end = skip_markers[0][1] + self.skip_adjust_start
10301035
# seek to end of break if we fall within skip marker range, then remove marker so user can seek backward freely
10311036
if len(skip_markers) > 0 and current_time >= current_break_start and current_time < current_break_end:
1032-
xbmc.log(monitor_name + " processed skip marker at " + str(current_break_end))
1037+
xbmc.log(monitor_name + " current time " + str(current_time) + " falls within skip time from " + str(current_break_start) + " - " + str(current_break_end))
10331038
player.seekTime(current_break_end)
10341039
skip_markers.pop(0)
10351040
# 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):
18781883
third = game['linescore']['offense']['third']['id']
18791884

18801885
basesit = self.basesit(first, second, third)
1881-
innbaseout = str(currentInning) + str(half) + str(basesit) + str(outs)
1886+
innbaseout = str(currentInning if currentInning <= 9 else 9) + str(half) + str(basesit) + str(outs)
18821887

18831888
games.append({
18841889
'gamePk': game['gamePk'],

plugin.video.mlbtv/service.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def do_GET(self):
7373
self.send_response(200)
7474
self.send_header('Content-type', 'text/html')
7575
self.end_headers()
76-
content = '<h1>Stream Finder</h1><p><a download="KodiStreamFinder.txt" href="/downloadsettings">Click to Download Currently Stored Settings</a></p><h2>Settings update</h2><p><b><u>Step 1</b></u><br/>Export and download your desired Stream Finder settings at this link:<br/><a href="https://www.baseball-reference.com/stream-finder.shtml" target="_blank">https://www.baseball-reference.com/stream-finder.shtml</a></p><form method="POST" enctype="multipart/form-data"><p><b><u>Step 2</b></u><br/>Click this button and select the settings file you just downloaded:<br/><input name="file" type="file"/></p><p><p><b><u>Step 3</b></u><br/>Click this button to upload the selected settings file to Kodi:<br/><input type="submit" value="Upload"/></p></form>'
76+
content = '<h1>Stream Finder</h1><p><a download="KodiStreamFinder.txt" href="/downloadsettings">Click to Download Currently Stored Settings</a></p><h2>Settings update</h2><p><b><u>Step 1</b></u><br/>Export and download your desired Stream Finder settings at this link:<br/><a href="https://www.baseball-reference.com/stream-finder.shtml" target="_blank">https://www.baseball-reference.com/stream-finder.shtml</a></p><form method="POST" enctype="multipart/form-data"><p><b><u>Step 2</b></u><br/>Click this button and select the settings file you just downloaded:<br/><input name="file" type="file" onchange="form.submit()"/></p></form>'
7777
elif self.path == '/downloadsettings':
7878
self.send_response(200)
7979
self.send_header('Content-type', 'text/plain')
@@ -113,7 +113,7 @@ def do_GET(self):
113113

114114
self.end_headers()
115115

116-
content = response.content.decode('utf8')
116+
content = response.content.decode('utf8', errors='ignore')
117117

118118
# remove subtitles and extraneous lines for Kodi Inputstream Adaptive compatibility
119119
content = re.sub(r"(?:#EXT-X-MEDIA:TYPE=SUBTITLES[\S]+\n)", r"", content, flags=re.M)
@@ -135,7 +135,7 @@ def do_GET(self):
135135
for line in line_array:
136136
if line.startswith('#'):
137137
# look for uri parameters within non-key "#" lines
138-
if playlist_type == 'master' and KEY_TEXT not in line and URI_START_DELIMETER in line:
138+
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):
139139
line_split = line.split(URI_START_DELIMETER)
140140
url_split = line_split[1].split(URI_END_DELIMETER, 1)
141141
absolute_url = urljoin(url, url_split[0])

0 commit comments

Comments
 (0)