Kodi Community Forum

Full Version: MLB.TV®
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
@eracknaphobia

Just noticed that the Recap/Condensed don't work for a finished game on the same day and I think in general the following json source could come in handy, instead of the in use currently (grid_ce.json)

Code:
http://mlb.mlb.com/gdcross/components/game/mlb/year_2016/month_04/day_21/grid.json


Code:
Accept:application/json, text/javascript, */*; q=0.01
Referer:http://mlb.mlb.com/mediacenter/index.jsp?c_id=mlb
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36
X-Requested-With:XMLHttpRequest

There is also a potential to bring back short highlights from a completed game by getting the "game_pk" from the above main feed. E.g for the HOU@TEX game ("game_pk":"447092"), the following lists the player/game highlights available at the web page. These are short individual clips with descriptions etc which are available without subscription or accounts. I am not sure if this is different from the ones that we are calling as Recap/Condensed in the addon, which seem to not work on the day the game is finished.

Code:
http://mlb.mlb.com/ws/search/MediaSearchService?start=0&site=mlb&hitsPerPage=12&hitsPerSite=10&type=json&c_id=mlb&src=vpp&sort=desc&sort_type=date&game=447092

Code:
Accept:application/json, text/javascript, */*; q=0.01
Accept-Encoding:gzip, deflate, sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Host:mlb.mlb.com
Referer:http://mlb.mlb.com/search/media.jsp?game_pk=447092
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36
X-Requested-With:XMLHttpRequest

"url" has the link to xml with the playable mp4/m3u8 for each "N" e.g for the first video "Fielder's RBI fielder's choice"

Code:
http://mlb.mlb.com/gen/multimedia/detail/8/8/3/610231883.xml


EDIT: Above highlights actually start populating as the game progresses and "total" continues to grow well after the game is over. Will be great if we can add this to the addon.
MLB seems to take there time making recaps/condensed versions available.
(2016-04-22, 17:15)sask3m Wrote: [ -> ]MLB seems to take there time making recaps/condensed versions available.

That's where this new highlights feed will be handy. It starts populating during and after the game.
(2016-04-22, 04:16)siuside Wrote: [ -> ]
(2016-04-22, 01:02)Kanipek Wrote: [ -> ]
(2016-04-21, 23:46)MetalChris Wrote: [ -> ]Have you tried this:

Code:
sudo apt-get install python-imaging
Yes sudo is not found

So I was not very familiar with this platform until I searched the Pivos forums and the Kodi Wiki

According to the logs you are on the Linux 32 bit build using a dated version of Kodi

Code:
16:32:49 T:1099901136  NOTICE: Starting Kodi (14.0 Git:2014-12-31). Platform: Linux ARM 32-bit
16:32:49 T:1099901136  NOTICE: Using Debug Kodi x32 build
16:32:49 T:1099901136  NOTICE: Kodi compiled Jan  2 2015 by GCC 4.4.1 for Linux ARM 32-bit version 2.6.32 (132640)
16:32:49 T:1099901136  NOTICE: Running on Buildroot 2013.11, kernel: Linux ARM 32-bit version 2.6.34.14
16:32:49 T:1099901136  NOTICE: FFmpeg statically linked, version: 2.4.4
16:32:49 T:1099901136  NOTICE: WARNING: unsupported ffmpeg version detected
16:32:49 T:1099901136  NOTICE: Host CPU: ARMv7 Processor rev 4 (v7l), 0 cores available
16:32:49 T:1099901136  NOTICE: ARM Features: Neon enabled

Your best option is to look into an overall upgrade of the platform (OS as well as Kodi), rather than trying to learn a lot about Linux and other limitations of the platform. A similar question was asked about it in this thread on the Pivos forums and I found the recommendation the Pivos employee very satisfactory.

The linked recommendation to upgrade to TOFULinux will actually also bring your Kodi to Jarvis 16.x version as they have upgraded the base, which should have all the dependencies for this addon built in. You could also try to move to Android etc and those guides also provided easy step-by-step instructions.

While tasty beverages are always appreciated, please send them to @eracknaphobia for obvious reasons. Blush Mutual help on these forums doesn't require any incentives.
I appreciate the advice. I would love to upgrade to the latest TofuLinux, in fact I have tried this. The problem I found was my MCE IR receiver and remote no longer function under Tofu. I ordered an HP IR receiver and hopefully that fixes the issue and I can do the upgrades to all of the Xios DS's I have. Though I will probably stick with a version of Tofu with Isengard, tried Jarvis and it was very buggy for me. 15.2 works well for me even though it keeps generating crash logs and stacktrace logs without any apparent malfunctions/crashes in Kodi on Windows 7 Pro x64.
Thanks again for taking the time. More info is always better!
(2016-04-22, 19:28)siuside Wrote: [ -> ]
(2016-04-22, 17:15)sask3m Wrote: [ -> ]MLB seems to take there time making recaps/condensed versions available.

That's where this new highlights feed will be handy. It starts populating during and after the game.

Depending on the amount of highlights, it might be a cool option to "catch up" on the game if you try to join it in progress (i.e. start a playlist of all the current highlights before taking you into the live game). Would be a great stand in for the "start from beginning" feature, since there are issues getting that to work.
I'm getting errors with the 4.19 update. It worked for one night, but it hasn't worked for me since Tuesday. My kodi log is giving me the following error. I appreciate any assistance you can provide.

Code:
18:04:55 343.914795 T:2785014768   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ValueError'>
                                            Error Contents: unknown url type:
                                            Traceback (most recent call last):
                                              File "/home/osmc/.kodi/addons/plugin.video.mlbtv/main.py", line 950, in <module>
                                                streamSelect(event_id, gid, teams_stream, stream_date)
                                              File "/home/osmc/.kodi/addons/plugin.video.mlbtv/main.py", line 333, in streamSelect
                                                stream_url = createFullGameStream(stream_url,media_auth,media_state[n])
                                              File "/home/osmc/.kodi/addons/plugin.video.mlbtv/main.py", line 524, in createFullGameStream
                                                bandwidth = getStreamQuality(stream_url)
                                              File "/home/osmc/.kodi/addons/plugin.video.mlbtv/resources/lib/globals.py", line 508, in getStreamQuality
                                                response = urllib2.urlopen(req)
                                              File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
                                                return opener.open(url, data, timeout)
                                              File "/usr/lib/python2.7/urllib2.py", line 423, in open
                                                protocol = req.get_type()
                                              File "/usr/lib/python2.7/urllib2.py", line 285, in get_type
                                                raise ValueError, "unknown url type: %s" % self.__original
                                            ValueError: unknown url type:
                                            -->End of Python script error report<--
18:04:56 344.426819 T:3023725328   ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.mlbtv/?mode=104&name=%5BB%5D%5BCOLOR%3DFFF69E20%5DPre-Game%5B%2FCOLOR%5D+NYM+%5BCOLOR%3DFF00B7EB%5D0%5B%2FCOLOR%5D+at+%5BCOLOR%3DFFCE1141%5DATL%5B%2FCOLOR%5D+%5BCOLOR%3DFF00B7EB%5D0%5B%2FCOLOR%5D%5B%2FB%5D&event_id=14-447110-2016-04-22&gid=2016%2F04%2F22%2Fnynmlb-atlmlb-1&teams_stream=nynatl&stream_date=2016-04-22]
(2016-04-21, 14:06)eracknaphobia Wrote: [ -> ]
(2016-04-21, 03:07)ObvB Wrote: [ -> ]Free Game Of The Day is not working for my MLB.tv account. I have Gameday Audio subscription. I set the option "Single Team / Free Game Subscription" = On because that seemed the most appropriate.

When I have "Single Team / Free Game Subscription" = Off, I get "Account Not Authorized" message on the Free Game.
When I have "Single Team / Free Game Subscription" = On, I just get the "Playback Failed" message without the "Account Not Authorized" message on the Free Game. (And its not a problem with blackouts because tonight's Free Game is not in my area, and I get the expected blackout message when I attempt to view the games that are blacked out in my area)

Everything else works as I'd expect it. I can listen to live audio, and I can watch the "Recap" and "Condensed" of completed games.

Here is the log where I first attempt to access a non-free game and get the expected "Account Not Authorized" message, and then attempting to access the Free Game.

http://xbmclogs.com/pynmkrx12

Please check your stream quality settings. The stream you were going after was a 4500 bitrate which I don't believe exists anymore. 4500 is an old quality selection from the early days of this addon and since the move to 60fps the bitrates have changed.

Thanks. I changed the setting "Stream Quality" to "Always Ask" and then selecting one of the available bitrates works. I'm a bit embarrassed that I didn't figure this out, but the fact that the "Recap" and "Condensed" streams worked confused me.
(2016-04-19, 15:48)eracknaphobia Wrote: [ -> ]Update 2016.4.19 Released

- Free games are now highlighted green
- Changed wording on single team subscription to include free game subscription
- Added not authorized message when user attempts to request a stream their account is not authorized to access
- Added blackout lift time in blackout message if game has finished
- Added logic to catch a username or password change and perform a fresh login

Do you know why when I click on “today's games”nothing happens? I tried re-installing the app and repository. I've tried resetting my user name login. I've tried deleting cache and packages. Your MLB app has been working great for the last couple weeks, but all a sudden nothing is loading inside the app. Your help would be greatly appreciated.
(2016-04-22, 19:48)Kanipek Wrote: [ -> ]
(2016-04-22, 04:16)siuside Wrote: [ -> ]
(2016-04-22, 01:02)Kanipek Wrote: [ -> ]Yes sudo is not found

So I was not very familiar with this platform until I searched the Pivos forums and the Kodi Wiki

According to the logs you are on the Linux 32 bit build using a dated version of Kodi

Code:
16:32:49 T:1099901136  NOTICE: Starting Kodi (14.0 Git:2014-12-31). Platform: Linux ARM 32-bit
16:32:49 T:1099901136  NOTICE: Using Debug Kodi x32 build
16:32:49 T:1099901136  NOTICE: Kodi compiled Jan  2 2015 by GCC 4.4.1 for Linux ARM 32-bit version 2.6.32 (132640)
16:32:49 T:1099901136  NOTICE: Running on Buildroot 2013.11, kernel: Linux ARM 32-bit version 2.6.34.14
16:32:49 T:1099901136  NOTICE: FFmpeg statically linked, version: 2.4.4
16:32:49 T:1099901136  NOTICE: WARNING: unsupported ffmpeg version detected
16:32:49 T:1099901136  NOTICE: Host CPU: ARMv7 Processor rev 4 (v7l), 0 cores available
16:32:49 T:1099901136  NOTICE: ARM Features: Neon enabled

Your best option is to look into an overall upgrade of the platform (OS as well as Kodi), rather than trying to learn a lot about Linux and other limitations of the platform. A similar question was asked about it in this thread on the Pivos forums and I found the recommendation the Pivos employee very satisfactory.

The linked recommendation to upgrade to TOFULinux will actually also bring your Kodi to Jarvis 16.x version as they have upgraded the base, which should have all the dependencies for this addon built in. You could also try to move to Android etc and those guides also provided easy step-by-step instructions.

While tasty beverages are always appreciated, please send them to @eracknaphobia for obvious reasons. Blush Mutual help on these forums doesn't require any incentives.
I appreciate the advice. I would love to upgrade to the latest TofuLinux, in fact I have tried this. The problem I found was my MCE IR receiver and remote no longer function under Tofu. I ordered an HP IR receiver and hopefully that fixes the issue and I can do the upgrades to all of the Xios DS's I have. Though I will probably stick with a version of Tofu with Isengard, tried Jarvis and it was very buggy for me. 15.2 works well for me even though it keeps generating crash logs and stacktrace logs without any apparent malfunctions/crashes in Kodi on Windows 7 Pro x64.
Thanks again for taking the time. More info is always better!

So I installed the TOFULinux version with Kodi 15.2. Then I installed MLB.TV and am still getting a "script error" when I run MLB.TV. Looks like the same error in the log around line 8000.
http://xbmclogs.com/pctyfwkel

I tried to install python using sudo, but sudo is not installed.

I am at a point where I am thinking of just dumping the xios DS's in favor of windows 10 boxes. Has anyone had any issues running Kodi/MLB.TV on windows 10? MCE(RC6) remotes/IR receivers work?
(2016-04-24, 01:29)Kanipek Wrote: [ -> ]So I installed the TOFULinux version with Kodi 15.2. Then I installed MLB.TV and am still getting a "script error" when I run MLB.TV. Looks like the same error in the log around line 8000.
http://xbmclogs.com/pctyfwkel

I tried to install python using sudo, but sudo is not installed.

I am at a point where I am thinking of just dumping the xios DS's in favor of windows 10 boxes. Has anyone had any issues running Kodi/MLB.TV on windows 10? MCE(RC6) remotes/IR receivers work?

According to this thread, the base is now Jarvis ? http://www.pivosforums.com/viewtopic.php?f=37&t=5304

Also I was just checking the pivos forums to see what the sudo setup is. It may be the case where you may not actually need sudo to install packages etc. E.g see the install process for Transmission client http://www.pivosforums.com/viewtopic.php?f=36&t=5237

So see if you can run the commands from the stackexchange thread, without any sudo or su etc. You may have to mount/remount before you can write to read only partitions (check the transmission install example)

I use a Win 10 box with Jarvis with FLIRC for IR remote setup.
(2016-04-24, 05:19)siuside Wrote: [ -> ]
(2016-04-24, 01:29)Kanipek Wrote: [ -> ]So I installed the TOFULinux version with Kodi 15.2. Then I installed MLB.TV and am still getting a "script error" when I run MLB.TV. Looks like the same error in the log around line 8000.
http://xbmclogs.com/pctyfwkel

I tried to install python using sudo, but sudo is not installed.

I am at a point where I am thinking of just dumping the xios DS's in favor of windows 10 boxes. Has anyone had any issues running Kodi/MLB.TV on windows 10? MCE(RC6) remotes/IR receivers work?

According to this thread, the base is now Jarvis ? http://www.pivosforums.com/viewtopic.php?f=37&t=5304

Also I was just checking the pivos forums to see what the sudo setup is. It may be the case where you may not actually need sudo to install packages etc. E.g see the install process for Transmission client http://www.pivosforums.com/viewtopic.php?f=36&t=5237

So see if you can run the commands from the stackexchange thread, without any sudo or su etc. You may have to mount/remount before you can write to read only partitions (check the transmission install example)

I use a Win 10 box with Jarvis with FLIRC for IR remote setup.

Well this is interesting. I am able to run the mount/remount command. So that is promising. I do not however know where to place the Python files. Can you or anyone help out in that regard?

Thanks again for taking the time!
Your questions are really suited for the pivos forums Smile I would encourage to register and open a thread there and they will be able to guide you better and we can keep things more focussed on the addon itself here.

Having said that

1) you should upgrade to Jarvis downloading the images for M3 http://www.pivosforums.com/viewtopic.php?f=37&t=5304

2) As I suspected you have root access directly there when you ssh using the combination root/letmein http://www.pivosforums.com/viewtopic.php?f=27&t=2375 (read this entire thread)

From there it should be as easy as installing python-dev through Optware and then finally

Code:
pip install PIL  --allow-unverified PIL --allow-all-external

Experienced users on those forums can guide you better, but I think installing Jarvis could make all the difference.
(2016-04-24, 21:02)siuside Wrote: [ -> ]Your questions are really suited for the pivos forums Smile I would encourage to register and open a thread there and they will be able to guide you better and we can keep things more focussed on the addon itself here.

Having said that

1) you should upgrade to Jarvis downloading the images for M3 http://www.pivosforums.com/viewtopic.php?f=37&t=5304

2) As I suspected you have root access directly there when you ssh using the combination root/letmein http://www.pivosforums.com/viewtopic.php?f=27&t=2375 (read this entire thread)

From there it should be as easy as installing python-dev through Optware and then finally

Code:
pip install PIL  --allow-unverified PIL --allow-all-external

Experienced users on those forums can guide you better, but I think installing Jarvis could make all the difference.
Wow some minds do think alike! I had just finished making a post over there when I read this.

You are correct I do have root access, which is what I find most frustrating.

So do you think the Jarvis build might just solve the issue? or that I will still need to add python?

Thanks again for your time and the great advice. It is most welcome.

Well it just goes to show if you search for the right term you might just find what you need -
http://www.pivosforums.com/viewtopic.php...hon#p48314
It's for the NHL addon but it was the same problem I was having. MLB.TV is now working for me on TOFULinux with Jarvis. No MCE remote/IR Receiver still but I will have an HP IR receiver shortly. Hopefully that will fix it.
Still life in the boxes yet. Thanks again to you and all you took the time! Much appreciated.
Not sure if Jarvis will *fix* it, but it could be worth a try. Kodi already comes with a PIL module (check in your userdata/addon folder for script.module.pil and script.module.pil/lib folder).

EDIT: Good stuff ! This should come in handy for all the special boxes that have PIL issues.
Anyone having problems with seeing live games on a cellular network? Don't think it is a problem with the add-on but with MLB. Just asking if anyone faced this and solved it. Unfortunately, I cannot rely on MLB support as they do not support anything other than the At Bat app on mobile devices.

On my mobile device, if I have it on WiFi, the add-on works great. But if I switch to cellular data, all live games come back as blacked out (all of them regardless of which team). Archived games can be watched. This might be MLB getting confused with geo-location for the mobile IP address. Here are my experiments to validate this.

1. I checked the mobile IP address against the online geo-location services. All of them get the State right for that IP so MLB should be able to determine at least the state correctly. But most of the services do not provide a city/region within the state. This is why MLB might be refusing to provide a live feed. Checking what's my IP sites also provides a IPV6 address. Don't know if this can confuse MLB as well.

2. I tried going through a web browser on the device with and without "request a desktop site" setting. The live feeds do NOT give a black out message but a "You have launched an event that is only accessible with Adobe Flash Player" and so do not play. The blackout checking might happen with the Flash and so this test is inconclusive.

3. I ran the At Bat app. This works fine but it depends on the Location Services of the device (even when GPS is turned off and only device info is to be used). But the device Location services might be doing the geo-location translation and doing it correctly so MLB can rely on it than try to resolve the IP itself.

4. I ran the hotspot on the device and tethered my laptop to it. Going via the web browser on the laptop I get the same blacked out message for ALL live games regardless of area. So, it is clearly the IP address of the mobile carrier that is tripping MLB.

How to resolve this for use on the cellular network? Any suggestions from anyone?

Thanks