summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreracknaphobia <eracknaphobia@hotmail.com>2017-12-04 17:41:48 -0500
committerenen92 <enen92@users.noreply.github.com>2017-12-04 22:41:48 +0000
commit84cbab1e6667ec6bc3072052123b1caa2390f0c9 (patch)
tree79d1944da6e6b2f3315d88970fdfe22e91a816b8
parentd55c7ab281e0aa01a415a68386fae5c345be4a46 (diff)
mlbtv (#1538)
-rw-r--r--plugin.video.mlbtv/addon.xml6
-rw-r--r--plugin.video.mlbtv/main.py28
-rw-r--r--plugin.video.mlbtv/resources/language/resource.language.en_gb/strings.po4
-rw-r--r--plugin.video.mlbtv/resources/lib/globals.py1
-rw-r--r--plugin.video.mlbtv/resources/settings.xml3
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 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.video.mlbtv" name="MLB.TV®" version="2017.4.2" provider-name="eracknaphobia">
+<addon id="plugin.video.mlbtv" name="MLB.TV®" version="2017.11.28" provider-name="eracknaphobia">
<requires>
<import addon="xbmc.python" version="2.25.0"/>
<import addon="script.module.simplejson" version="3.3.0"/>
@@ -15,8 +15,8 @@
<description lang="en_GB">Watch every out-of-market regular season game in the office or on the go. The #1 LIVE Streaming Sports Service</description>
<disclaimer lang="en_GB"></disclaimer>
<news>
-- Added Proxy settings
-- Removed PIL (it was causing crashes)
+- Fixed Invalid XML issue
+
</news>
<language>en</language>
<platform>all</platform>
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 @@
<setting id="username" type="text" label="140" default=""/>
<setting id="password" type="text" label="150" option="hidden" default=""/>
<setting id="single_team" type="bool" label="151" default="false"/>
- <setting label="156" type="action" action="RunPlugin(plugin://plugin.video.mlbtv/?url=junk&mode=400)" option="close" />
+ <setting label="156" type="action" action="RunPlugin(plugin://plugin.video.mlbtv/?url=junk&amp;mode=400)" option="close" />
<!-- <setting label="156" type="action" action="RunScript(special://home/addons/plugin.video.nhlgcl/resources/lib/logout.py)" option="close" /> -->
</category>
<category label="159">
<setting id="quality" type="labelenum" label="160" values="SD (450 kbps)|SD (800 kbps)|SD (1200 kbps)|SD (1800 kbps)|HD (2500 kbps)|HD (3500 kbps)|HD (5000 kbps)|Best Available|Always Ask" default="HD (5000 kbps)" />
+ <setting id="cdn" type="labelenum" label="165" values="Akamai|Level 3|No Preference" default="No Preference"/>
<setting id="no_spoilers" type="enum" label="170" lvalues="1700|1701|1702|1703|1704" />
<setting id="fav_team" type="labelenum" label="180" default="None" values="None|Washington Nationals|Toronto Blue Jays|Texas Rangers|Tampa Bay Rays|St. Louis Cardinals|Seattle Mariners|San Francisco Giants|San Diego Padres|Pittsburgh Pirates|Philadelphia Phillies|Oakland Athletics|New York Yankees|New York Mets|Minnesota Twins|Milwaukee Brewers|Los Angeles Dodgers|Los Angeles Angels|Kansas City Royals|Miami Marlins|Houston Astros|Detroit Tigers|Colorado Rockies|Cleveland Indians|Cincinnati Reds|Chicago White Sox|Chicago Cubs|Boston Red Sox|Baltimore Orioles|Atlanta Braves|Arizona Diamondbacks" />