From 84cbab1e6667ec6bc3072052123b1caa2390f0c9 Mon Sep 17 00:00:00 2001 From: eracknaphobia Date: Mon, 4 Dec 2017 17:41:48 -0500 Subject: mlbtv (#1538) --- plugin.video.mlbtv/addon.xml | 6 ++--- plugin.video.mlbtv/main.py | 28 +++++++++++----------- .../language/resource.language.en_gb/strings.po | 4 ++++ plugin.video.mlbtv/resources/lib/globals.py | 1 + plugin.video.mlbtv/resources/settings.xml | 3 ++- 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/plugin.video.mlbtv/addon.xml b/plugin.video.mlbtv/addon.xml index 3c2f6bd..7ef5aa8 100644 --- a/plugin.video.mlbtv/addon.xml +++ b/plugin.video.mlbtv/addon.xml @@ -1,5 +1,5 @@ - + @@ -15,8 +15,8 @@ Watch every out-of-market regular season game in the office or on the go. The #1 LIVE Streaming Sports Service -- Added Proxy settings -- Removed PIL (it was causing crashes) +- Fixed Invalid XML issue + en all diff --git a/plugin.video.mlbtv/main.py b/plugin.video.mlbtv/main.py index 7149b11..5a885a0 100644 --- a/plugin.video.mlbtv/main.py +++ b/plugin.video.mlbtv/main.py @@ -563,25 +563,25 @@ def createFullGameStream(stream_url, media_auth, media_state): if bandwidth != '': if media_state == 'MEDIA_ARCHIVE': #ARCHIVE - #http://mlblive-akc.mlb.com/ls04/mlbam/2016/03/02/MLB_GAME_VIDEO_DETNYA_HOME_20160302/master_wired.m3u8 - #http://mlblive-akc.mlb.com/ls04/mlbam/2016/03/02/MLB_GAME_VIDEO_DETNYA_HOME_20160302/1800K/1800_complete-trimmed.m3u8 - stream_url = stream_url.replace(MASTER_FILE_TYPE, bandwidth+'K/'+bandwidth+'_complete-trimmed.m3u8') - + #stream_url = stream_url.replace(MASTER_FILE_TYPE, bandwidth+'K/'+bandwidth+'_complete_fwv2-trimmed.m3u8') + stream_url = stream_url.replace(MASTER_FILE_TYPE, bandwidth+'K/'+bandwidth+'_complete-trimmed.m3u8') elif media_state == 'MEDIA_ON': - #LIVE - #5000K/5000_slide.m3u8 OR #3500K/3500_complete.m3u8 - # Slide = Live, Complete = Watch from beginning? - stream_url = stream_url.replace(MASTER_FILE_TYPE, bandwidth+'K/'+bandwidth+'_complete.m3u8') - - + #LIVE + #stream_url = stream_url.replace(MASTER_FILE_TYPE, bandwidth+'K/'+bandwidth+'_slide_fwv2.m3u8') + stream_url = stream_url.replace(MASTER_FILE_TYPE, bandwidth+'K/'+bandwidth+'_complete.m3u8') + + #CDN + akc_url = 'akc.mlb.com' + l3c_url = 'l3c.mlb.com' + if CDN == 'Akamai' and akc_url not in stream_url: + stream_url = stream_url.replace(l3c_url,akc_url) + elif CDN == 'Level 3' and l3c_url not in stream_url: + stream_url = stream_url.replace(akc_url,l3c_url) - #cj = cookielib.LWPCookieJar() - #cj.load(os.path.join(ADDON_PATH_PROFILE, 'cookies.lwp'),ignore_discard=True) + #stream_url = stream_url + '|User-Agent='+UA_IPAD+'&Cookie='+media_auth stream_url = stream_url + '|User-Agent='+UA_PS4+'&Cookie='+media_auth return stream_url - - def fetchStream(content_id,event_id,playback_scenario): diff --git a/plugin.video.mlbtv/resources/language/resource.language.en_gb/strings.po b/plugin.video.mlbtv/resources/language/resource.language.en_gb/strings.po index 46d5ecf..ee8d6ea 100644 --- a/plugin.video.mlbtv/resources/language/resource.language.en_gb/strings.po +++ b/plugin.video.mlbtv/resources/language/resource.language.en_gb/strings.po @@ -44,6 +44,10 @@ msgctxt "#160" msgid "Stream Quality" msgstr "" +msgctxt "#165" +msgid "CDN" +msgstr "" + msgctxt "#170" msgid "Hide Scores" msgstr "" diff --git a/plugin.video.mlbtv/resources/lib/globals.py b/plugin.video.mlbtv/resources/lib/globals.py index 15d15a3..6189c16 100644 --- a/plugin.video.mlbtv/resources/lib/globals.py +++ b/plugin.video.mlbtv/resources/lib/globals.py @@ -37,6 +37,7 @@ OLD_USERNAME = str(settings.getSetting(id="old_username")) OLD_PASSWORD = str(settings.getSetting(id="old_password")) ROGERS_SUBSCRIBER = str(settings.getSetting(id="rogers")) QUALITY = str(settings.getSetting(id="quality")) +CDN = str(settings.getSetting(id="cdn")) NO_SPOILERS = settings.getSetting(id="no_spoilers") FAV_TEAM = str(settings.getSetting(id="fav_team")) TEAM_NAMES = settings.getSetting(id="team_names") diff --git a/plugin.video.mlbtv/resources/settings.xml b/plugin.video.mlbtv/resources/settings.xml index f579877..2e38e0c 100644 --- a/plugin.video.mlbtv/resources/settings.xml +++ b/plugin.video.mlbtv/resources/settings.xml @@ -5,11 +5,12 @@ - + + -- cgit v1.2.3