Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[plugin.video.mlbtv@matrix] 2022.5.6+matrix.1 #3993

Merged
merged 1 commit into from
May 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions plugin.video.mlbtv/addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.mlbtv" name="MLB.TV®" version="2022.5.5+matrix.1" provider-name="eracknaphobia">
<addon id="plugin.video.mlbtv" name="MLB.TV®" version="2022.5.6+matrix.1" provider-name="eracknaphobia">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
<import addon="script.module.pytz" />
Expand All @@ -21,11 +21,10 @@
</description>
<disclaimer lang="en_GB">Requires an MLB.tv account</disclaimer>
<news>
- options to automatically skip breaks and non-action pitches
- option to start at specific inning
- improved Big Inning stream retrieval
- perfect game / no hitter flags
- fix free games only
- restored pass exceptions for game list items
- handle missing flags for postponements
- added setting for auto selecting a stream (favorite/home)
- added context menu item for choosing stream manually
</news>
<language>en</language>
<platform>all</platform>
Expand Down
11 changes: 11 additions & 0 deletions plugin.video.mlbtv/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
# Prev and Next
todays_games(game_day)

# from context menu, use an extra parameter to force manual stream selection
elif mode == 103:
stream_select(game_pk, spoiler, True)

elif mode == 104:
stream_select(game_pk, spoiler)
Expand All @@ -56,6 +59,14 @@
prev_day = display_day - timedelta(days=1)
todays_games(prev_day.strftime("%Y-%m-%d"))

# highlights from context menu
elif mode == 106:
list_highlights(game_pk)

# play all highlights for game from context menu
elif mode == 107:
play_all_highlights_for_game(game_pk)

elif mode == 200:
# Goto Date
search_txt = ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ msgctxt "#30306"
msgid "Ask to automatically skip breaks"
msgstr ""

msgctxt "#30307"
msgid "Auto-select favorite/home video stream"
msgstr ""

msgctxt "#30300"
msgid "In Market Streams"
msgstr ""
Expand Down Expand Up @@ -328,3 +332,6 @@ msgctxt "#30410"
msgid "Bottom"
msgstr ""

msgctxt "#30411"
msgid "Play All"
msgstr ""
4 changes: 4 additions & 0 deletions plugin.video.mlbtv/resources/lib/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
TEAM_NAMES = settings.getSetting(id="team_names")
TIME_FORMAT = settings.getSetting(id="time_format")
SINGLE_TEAM = str(settings.getSetting(id='single_team'))
AUTO_SELECT_STREAM = str(settings.getSetting(id='auto_select_stream'))
CATCH_UP = str(settings.getSetting(id='catch_up'))
ASK_TO_SKIP = str(settings.getSetting(id='ask_to_skip'))
ONLY_FREE_GAMES = str(settings.getSetting(id="only_free_games"))
Expand Down Expand Up @@ -210,6 +211,9 @@ def add_stream(name, title, game_pk, icon=None, fanart=None, info=None, video_in
if audio_info is not None:
liz.addStreamInfo('audio', audio_info)

# add Choose Stream and Highlights as context menu items
liz.addContextMenuItems([(LOCAL_STRING(30390), 'PlayMedia(plugin://plugin.video.mlbtv/?mode='+str(103)+'&name='+urllib.quote_plus(name)+'&game_pk='+urllib.quote_plus(str(game_pk))+'&stream_date='+urllib.quote_plus(str(stream_date))+'&spoiler='+urllib.quote_plus(str(spoiler))+')'), (LOCAL_STRING(30391), 'Container.Update(plugin://plugin.video.mlbtv/?mode='+str(106)+'&name='+urllib.quote_plus(name)+'&game_pk='+urllib.quote_plus(str(game_pk))+')')])

ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=False)
xbmcplugin.setContent(addon_handle, 'episodes')

Expand Down
Loading