Skip to content
This repository has been archived by the owner on Aug 24, 2023. It is now read-only.

Can't select second game after suspended game resumed #23

Closed
icediamond opened this issue Aug 29, 2018 · 5 comments
Closed

Can't select second game after suspended game resumed #23

icediamond opened this issue Aug 29, 2018 · 5 comments

Comments

@icediamond
Copy link

Mets vs. Cubs resumed their suspended game today, the second game today cannot be selected. It just keeps trying to play the suspended game. I can't seem to find a selector that I can use to grab the other game stream.

@kmac
Copy link
Owner

kmac commented Aug 31, 2018

I'll have to dig through the game data on that one. It's probably not marked as a double-header, so it would be selecting the first game it matches on.

@SlimJimPoisson
Copy link

It's an odd situation. I just experienced the same thing with the resumed KC-Boston game on August 22nd. It looks strange on the MLB.TV site with two undistinguished links for the broadcast. The first link is for the resumption; the second is for the original (https://www.mlb.com/live-stream-games/2019/08/22).

For me there is no need to list the original game as that will be available on the date it was started so just being able to access the resumption is all that is needed. Still, it happens so rarely that if you just called it a limitation of the software then I would understand.

@kmac
Copy link
Owner

kmac commented Aug 28, 2019

I just haven't looked into it yet. It probably needs to be handled as a special case since it sounds like there are two distinct sets of media links.

@kmac
Copy link
Owner

kmac commented Aug 28, 2019

I went looking at the json data for that game, and they are only providing the media links for the original game day, which is odd. ie there is no media data there for the resumed stream. I'll do more digging to see if I can find it.

In the meantime, note to self, they identify these games with an extra resumedFrom field:

"resumedFrom" : "2019-08-07T23:10:00Z",

edit: It looks like the original game date contains media links for both portions. Should be able to do something to allow the selection of either feed. Maybe I will have some sort of info pointer back to the original game date, then you'd be able to select the feed based on the original game date.

And the original game date has resumeDate field:

"resumeDate" : "2019-08-22T17:05:00Z",

kmac added a commit that referenced this issue Aug 28, 2019
- Resumed games show up as their own feed, alongside the original feed,
  with a '-res' or '-resume' identifier, e.g. 'a-res' or 'away-resume'
@kmac
Copy link
Owner

kmac commented Aug 28, 2019

I put in some basic support for this, and it seems to work okay. If you are setup to run from git maybe you could pull the latest and give it a go?

 - Resumed games show up as their own feed, alongside the original feed,
   with a '-res' or '-resume' identifier, e.g. 'a-res' or 'away-resume'

The two dates show up like this:

> mlbv --date 2019-08-07
       2019-08-07 Wed                            Series  │ Score │   State   │ Feeds
─────────────────────────────────────────────────────────┼───────┼───────────┼────────────────
01:10 pm: Texas (TEX) at Cleveland (CLE)          DH-1   │  0-2  │ Final     │ a,h cnd,rcp
11:33 pm: Texas (TEX) at Cleveland (CLE)          DH-2   │  1-5  │ Final     │ a,h cnd,rcp
12:10 pm: Miami (MIA) at NY Mets (NYM)             4/4   │  2-7  │ Final     │ a,h cnd,rcp
01:10 pm: Toronto (TOR) at Tampa Bay (TB)          3/3   │  4-3  │ Final     │ a,h cnd,rcp
01:10 pm: Chi White Sox (CWS) at Detroit (DET)     4/4   │  8-1  │ Final     │ a,h cnd,rcp
01:10 pm: Atlanta (ATL) at Minnesota (MIN)         3/3   │ 11-7  │ Final     │ a,h cnd,rcp
02:10 pm: Colorado (COL) at Houston (HOU)          2/2   │ 3-14  │ Final     │ a,h,ima,imh cnd,rcp
02:20 pm: Oakland (OAK) at Chi Cubs (CHC)          3/3   │ 1-10  │ Final     │ a,h cnd,rcp
03:10 pm: St. Louis (STL) at LA Dodgers (LAD)      3/3   │  1-2  │ Final     │ nat cnd,rcp
03:45 pm: Washington (WSH) at San Francisco (SF)   3/3   │  4-1  │ Final     │ a,h cnd,rcp
06:40 pm: San Diego (SD) at Seattle (SEA)          2/2   │  2-3  │ Final     │ a,h,imh cnd,rcp
07:05 pm: Milwaukee (MIL) at Pittsburgh (PIT)      3/3   │  8-3  │ Final     │ a,h,imh cnd,rcp
07:05 pm: NY Yankees (NYY) at Baltimore (BAL)      3/3   │ 14-2  │ Final     │ a,h cnd,rcp
07:10 pm: Kansas City (KC) at Boston (BOS)         3/3   │  4-5  │ Final(10) │ a,a-res,h,h-res cnd,rcp
  --> Will resume on: 2019-08-22 at 01:05 pm
09:40 pm: Philadelphia (PHI) at Arizona (ARI)      3/3   │  1-6  │ Final     │ a,h cnd,rcp


> mlbv --date 2019-08-22
       2019-08-22 Thu                            Series  │ Score │   State   │ Feeds
─────────────────────────────────────────────────────────┼───────┼───────────┼────────────────
01:05 pm: Kansas City (KC) at Boston (BOS)         3/3   │  4-5  │ Final(10) │ a,a-res,h,h-res cnd,rcp
  --> Resumed from: 2019-08-07 at 07:10 pm
02:20 pm: San Francisco (SF) at Chi Cubs (CHC)     3/3   │  0-1  │ Final     │ a,h cnd,rcp
07:05 pm: Washington (WSH) at Pittsburgh (PIT)     4/4   │  7-1  │ Final     │ a,h,imh cnd,rcp
07:05 pm: Tampa Bay (TB) at Baltimore (BAL)        1/4   │  5-2  │ Final     │ a,h cnd,rcp
07:10 pm: Cleveland (CLE) at NY Mets (NYM)         3/3   │  0-2  │ Bot 8th   │ a,h cnd,rcp
07:20 pm: Miami (MIA) at Atlanta (ATL)             3/3   │  2-3  │ Final     │ a,h cnd,rcp
07:45 pm: Colorado (COL) at St. Louis (STL)        1/4   │  5-6  │ Final     │ a,h,ima cnd,rcp
08:10 pm: Detroit (DET) at Houston (HOU)           4/4   │  3-6  │ Final     │ a,h,imh cnd,rcp
08:10 pm: Texas (TEX) at Chi White Sox (CWS)       1/4   │  1-6  │ Final     │ a,h cnd,rcp
09:37 pm: NY Yankees (NYY) at Oakland (OAK)        3/3   │  3-5  │ Final     │ a,h cnd,rcp
10:10 pm: Toronto (TOR) at LA Dodgers (LAD)        3/3   │  2-3  │ Final     │ a,h cnd,rcp

As you can see, the feeds show up from either date.

To play the first part (you could actually just leave out the feed, since it will pick the away feed by default in this case):

mlbv --date 2019-08-07 -t kc -f a

And for the resumed part:

mlbv --date 2019-08-07 -t kc -f a-res

You can use either date.

@kmac kmac closed this as completed Aug 28, 2019
kmac added a commit that referenced this issue Sep 2, 2019
- Support suspended/resumed games (fixes Issue #23)
- Now caching json requests, under the tmp mlbv directory
    - should not be noticeable, most pages are only cached for a few minutes
    - will be able to use this for supporting unit tests
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants