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

Cleanup from NeuLion -> WPP/Bruin conversion #294

Closed
15 of 19 tasks
aqw opened this issue Jun 26, 2017 · 30 comments
Closed
15 of 19 tasks

Cleanup from NeuLion -> WPP/Bruin conversion #294

aqw opened this issue Jun 26, 2017 · 30 comments

Comments

@aqw
Copy link
Collaborator

aqw commented Jun 26, 2017

Thanks to @kailu's work in #292, we have a great starting point that works. Now, we just need to start moving through and clean up everything.

Number one priority is:

  • Restore SSL verification

According to @kaileu, the following doesn't work:

  • live games (should work; as historically they're the same as NFL Network Live)
  • specific Bitrates from settings
  • RedZone Archive: There is no Redzone at the moment

My list:

  • Restore cookie support (assuming this is needed. Before, without cookies, stream would stop playing after about 15 minutes)
  • Rename "publishpoint" functions/variables, as we're no longer using publishpoint.
  • Assess whether domestic support is still needed (it was removed by kaileu)
  • assess/restore functionality in display_seasons_weeks()
  • test ProBowl; support for adjusting their weird game info was removed
  • display_shows_episodes(): thumbnails and url
  • Restore coach's tape GUI (search for CoachesFilmGUI)
  • cleanup bitrate stuff
  • Assess how much the new service has consolidated the streams. If all streams are equal, we can consolidate a lot of logic.
  • Examine imports
  • Do we need xmltodict anymore? (answer: yes)
  • minimize the extent we must mangle our http headers
  • rename gen_plid() -> gen_uuid()
  • Update the readme to reflect which shows/seasons/feature/etc have been dropped by the new service.
  • Restore make_request.
@kaileu
Copy link
Collaborator

kaileu commented Jun 26, 2017

To a few Points of this:

  • gen_plid() isn't really needed but the request need some data and i think its not a good idea to pass a
    static string for all users. A unique String is much better. In Publishpoint function the Parameter other: 'other': UNIQUEID+ '|' + self.access_token + '|web|USERAGENT|undefined|' + username.
    Most of the Parameters could be a empty String but thats not really pretty.
  • Header in get_publishpoint_streams() is needed because akamai check the UserAgent.
  • xmltodict is needed because one file is returned as XML not json
  • as far as i see the Cookie is already passed to Kodi correctly. As the new Service authenticate with oauth we just Need the refresh token and no Cookies anymore.

@aqw
Copy link
Collaborator Author

aqw commented Jun 26, 2017

  • Ok. Then we'll rename gen_plid -> gen_uuid or something like that.
  • How is akamai checking the header? In what way doe their response change? I never liked us having to lie with our header. It would be best if our headers lied the least possible. Figuring out what they're sniffing for (I assume/hope it's just browser) and only providing that (rather than OS string as well) would be best.
  • Argh. Of course there's one lingering XML file... so close.
  • Good news indeed if the cookie is not needed. Let's move forward without it. I'm sure we'll notice pretty damn quickly if it is needed. ;-)

I'll update the todo above.

---Alex

@kaileu
Copy link
Collaborator

kaileu commented Jun 26, 2017

Akamai returns HTTP/1.1 403 Forbidden.
it seems that they parse the first part if we use "Firefox" as Useragent it will work so yes we can drop the os string.
Kodi or python will not work.

aqw added a commit that referenced this issue Jun 26, 2017
@aqw
Copy link
Collaborator Author

aqw commented Jun 26, 2017

@kaileu More likely that they sniff for the word Gecko. But good to hear they aren't using the OS string as far as we can tell.

@kaileu
Copy link
Collaborator

kaileu commented Jun 26, 2017

@aqw No i test it with Firefox and it works but the Word Gecko is not working.

@aqw
Copy link
Collaborator Author

aqw commented Jun 26, 2017

Ok. We'll use Firefox then. :-)

@emilsvennesson
Copy link
Collaborator

emilsvennesson commented Jun 26, 2017

A few suggestions right off the top of my head:

  • Restore make_request. It's nice to have one request function for debugging purposes. We could also add one function that parses the response (check for HTTP codes, tries to loads the JSON into a dict, raises errors returned by the Game Pass response). I'll PR this in a bit.
  • Store the access and refresh token in a file. We don't actually have to invoke a login on each startup, because the API tells us how long our tokens are valid for.
  • Specific bitrates: do we really want to hardcode this? To me, it makes more sense to add a setting that allows the user to specify a maximum bitrate to use - avoiding us having to maintain a list of the currently supported bitrates in the manifest.

@aqw
Copy link
Collaborator Author

aqw commented Jun 26, 2017

@emilsvennesson

  • I completely agree about make_request(); Looking forward to the PR. :-)
  • I see the advantage here. Back in the day we did a bit of caching, and it ended up being such a troubleshooting headache that we threw it away. How long is the token good for?
  • I agree that hardcoding feels excessive; I prefer just getting them from the service. The only reason I see to hardcode them is so that the user can specify which bitrate they want to use. Most people simply want the highest bitrate, but we did have a few users with slower connections who always wanted to use a middle bitrate.

---Alex

@kaileu
Copy link
Collaborator

kaileu commented Jun 26, 2017

@emilsvennesson as far as i understand we can't store the json in a dict.
Dict is only a associative array as far as i understand and the json files are multiple nested.
But i agree with the rest.
@aqw the access_token is valid for an hour the refresh_token didn't have an expire_time

aqw pushed a commit that referenced this issue Jun 26, 2017
@aqw
Copy link
Collaborator Author

aqw commented Jun 26, 2017

@kaileu Hmm. I assume we'll need both the access_token and the refresh_token when starting a new session. Yes? If so, I don't think caching the token is of much benefit.

@kaileu
Copy link
Collaborator

kaileu commented Jun 26, 2017

@aqw no we only need the refresh_token but evertime we renew the token a new refresh_token will be generated.
But we have to calculate in every request if our token is expire.

@emilsvennesson
Copy link
Collaborator

I got a mail from NFL Game Pass a couple of days ago:

"We’re excited to announce that we’re rolling out a new NFL Game Pass platform for the 2017 season. It’s exclusively for European fans and will be brought to you by a new service provider."

@kaileu
Copy link
Collaborator

kaileu commented Jul 3, 2017 via email

@aqw
Copy link
Collaborator Author

aqw commented Jul 6, 2017

@emilsvennesson Hrmm... well that's... unfortunate.

I think we should keep doing what we're currently doing. Worst case scenario, we'll ship both the new, updated pigskin.py and the old one. Then just add a setting to toggle between the two.

I imagine the NFL is just playing the two companies off of each other and will consolidate on one a year from now.

---Alex

@kaileu
Copy link
Collaborator

kaileu commented Jul 6, 2017 via email

@aqw
Copy link
Collaborator Author

aqw commented Jul 6, 2017

@kaileu Hmm. I didn't really consider that. It's possible, but I think less likely, as I assume the NFL likes having their own service for ostensible leverage during contracts with broadcasters.

In any case, as you said, we'll have to wait for August 1st and see.

---Alex

@kaileu
Copy link
Collaborator

kaileu commented Jul 7, 2017

I got a confirmation from Gamepass that there will be 2 diffrent Gamepass Services depending on the IP your comming from US and EU.
Did we have any US Coder here ? Because the Subscription for EU will not work for US so there will be no Chance to Code for US if we are in EU.

@aqw
Copy link
Collaborator Author

aqw commented Jul 27, 2017

Ok, so it looks like only Europe is getting the new service. Everyone else (not sure who that includes) gets the NeuLion service. Ugh.

As far as I'm aware, all of the current developers of this addon are in Europe. So, I suggest that we focus on the new service, get it working, and if/when users come along complaining about support for other regions, we'll help them resuscitate the old code and then have them test and maintain that functionality. Whether that functionality should be maintained in other library or folded into pigskin is another question.

Thoughts on that?

As FYI, I'm starting vacation soon, but I should be back a week or two into the preseason for the annual August-bug-squashing-fest. ;-)

---Alex

@kaileu
Copy link
Collaborator

kaileu commented Jul 27, 2017

Is it possible to deliver both Pigskins and dynamically import the right one based on location ?
Another way would be to maintain 2 diffrent Addons a new One Called Gamepass International and an old one called Gamepass.

@aqw
Copy link
Collaborator Author

aqw commented Jul 27, 2017

Their new FAQ is interesting. Including:

Q: Which Historical Games can I watch?
A: You can watch archived games since the 2016 season, including preseason and playoffs,
   as well as select Super Bowl games [...]"

---Alex

@aqw
Copy link
Collaborator Author

aqw commented Jul 27, 2017

@kaileu I'd rather avoid supporting two addons. There'd be /a lot/ of duplicate code and functionality.

We should either choose which pigskin lib to load based on whether they're a Europe or non-Europe customer, or combine it into one all-knowing library.

First option is easier, the second option feels more "correct".

---Alex

@Displayel
Copy link

any update on this ?

@aqw
Copy link
Collaborator Author

aqw commented Aug 3, 2017

@Displayel No update right now.

From what I can tell, most things are working right now. There's a lot of cleanup to do, testing, finding corner cases, but it's functional.

Supporting the old service is hard, as we can't test against it, and I'm /sure/ NeuLion is making changes, as they do every year. For this, I'm waiting for someone with access to come along whom we can help.

As for the rest, I'm going on a 4 day vacation today. But when I'm back, Preseason will be starting, and it's always good to test stuff when live games are going on.

---Alex

@maddes-b
Copy link

maddes-b commented Aug 7, 2017

If you want to test the US services from Europe, just go for a VPN service like Shellfire (a German VPN).
Hopefully your account will be valid for the US service.

@kaileu
Copy link
Collaborator

kaileu commented Aug 7, 2017

No Europe Accounts are not valid for US Services vice versa.

@corro
Copy link

corro commented Aug 9, 2017

A fellow European here. I just wanted to let you guys know that the current version from GitHub works fine so far! I will let you know if I find any bugs. Considering that the current version in the Kodi repo will no longer work, maybe it is time to release a new version?

Edit: Sorry, I did not read the last comments. Apparently you have yet to decide on how to support both services.

@emilsvennesson emilsvennesson mentioned this issue Aug 12, 2017
aqw pushed a commit that referenced this issue Aug 13, 2017
Close #310

Issue #294
@aqw
Copy link
Collaborator Author

aqw commented Aug 14, 2017

As FYI, Game Pass International Support will be handled in issue #313

---Alex

@pyrocumulus
Copy link
Contributor

Completely offtopic... but can I sincerely thank you guys here? If I can't, please stop reading here or delete this message.

As you guys might know, because of the provider switch NFL also switched android apps and such. They have an 'official' NFL Game Pass Europe app but that piece of... work... is raking in 1-star reviews big time. It's pure garbage. Then I thought that my favourite Kodi add-on also did not survive, because I couldn't start it anymore. I figured it was because of the provider switch so all was lost, but so glad I checked here. The Jay C version is running like a charm, who would've thought :)

Thanks for your work guys, I've been enjoying NFL on my sofa for a couple of years now. Couldn't live without it! I don't know Kodi add-on programming, but perhaps I can contribute something in the future.

@aqw
Copy link
Collaborator Author

aqw commented Aug 15, 2017

@pyrocumulus Thanks for the "Thanks." :-)

This offseason has been an.... interesting ride. And this year it lined up with an absolute minimum of free-time for me. The thanks should be especially directed at @kaileu who made this switch happen and @emilsvennesson who fixed a metric schload of the ugly.

I'm glad the addon is working well for you. And there's a lot of ways to help contribute. But simply using the addon and submitting quality bug reports when you run into a problem is a big help. :-)

---Alex

@aqw
Copy link
Collaborator Author

aqw commented Aug 15, 2018

Closing. Most (all) issues are resolved, and any that are remaining should be opened in their own dedicated issues.

@aqw aqw closed this as completed Aug 15, 2018
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

7 participants