Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Funimation fixes and enhancements #13225

Open
kaithar opened this issue May 29, 2017 · 4 comments
Open

Funimation fixes and enhancements #13225

kaithar opened this issue May 29, 2017 · 4 comments

Comments

@kaithar
Copy link

@kaithar kaithar commented May 29, 2017

Forked and copied off of #11773

I've been digging around in the requests stream and it honestly looks like funimation are returning the initial language at random.

The missing bit in the extractor I think is something mentioned in the description provided by @julianrichen ... specifically, the extractor skips the step of querying https://prod-api-funimationnow.dadcdigital.com/api/source/catalog/title/experience/<video_id>/ and jumps straight to requesting the video/<>/signed url. What I think is going on internally, somewhere, is that the page:

  1. is loaded with a language that isn't always going to be right,
  2. loads the series data using title/experience,
  3. looks at the query string and/or user preference json to work out what language it should be playing
  4. loops the series data to find the correct episode's video id
  5. requests the video/<>/signed url for the video id found in step 4 instead of the one from step 2

I'm making progress fixing things. I'm noticing that there's some sources for subtitle files, can someone point me at a good example of how I could return those sources?

So, uh, I've ended up rewriting quite a bit of the code, and I've also got a prototype of a series extractor, but I've run in to two issues and could do with a little help.

Problem 1 is that I can see how separate subs are listed in the experience file, but it looks like most files might actually have their subs burnt in. It would be handy if someone knows of a video with soft subs to test with. I know it's possible, AoT episode 1 in English has a CC track listed in the textTracks field (srt, vtt, dfxp formats), but it's the only one in the season that has one. Would be nice to fix but I guess it's minor.

Problem 2 is that the geofencing makes it pretty annoying to properly test ... it works for me on funimationnow.uk but I can't really run the test suite or, more of an issue, add tests for the playlist code. Don't suppose I could get some assistance with that?

I'm also running in to a couple of interesting issues with episodes that don't have sensible episode number ... some shows where English apparently isn't an option ... and some where uncut seems to be a valid url but returns 403.

@starchivore
Copy link

@starchivore starchivore commented Jun 4, 2017

https://www.funimation.com/blog/2016/05/23/check-out-whats-next-for-funimationnow/

This is coming out later than we planned, but there’s a really good reason: we’re re-encoding our massive library to show each video in its best possible picture quality AND switching from hard to soft subtitles. When we launch in September, over half of our catalog will be using soft subtitles, and we expect to have everything converted by the end of this year. That’s right: no more hard-sub picture quality issues anymore! Plus, you’ll be able to turn subtitles off and watch with just the Japanese audio if you speak that language (or if you’re learning!).

Here's a series with both hard-subbed and soft-subbed episodes.

Episode 78 = hard-subbed and they're including "burnedInSubs": true as linked below:

https://www.funimation.com/shows/dragon-ball-super/the-gods-of-every-universe-in-shock-losers-erased-in-the-tournament-of-power
https://www.funimation.com/player/256227/

Episode 79 = soft-subbed and they're listing subtitle files in 3 formats:

https://www.funimation.com/shows/dragon-ball-super/universe-9s-basil-the-kicker-vs-universe-7s-majin-buu
https://www.funimation.com/player/256245/
https://d132fumi6di1wa.cloudfront.net/FunimationStoreFront/1590221/Japanese/1590221_Japanese_2c30c000-f9d1-e611-80c5-0017a4776c06.srt
https://d132fumi6di1wa.cloudfront.net/FunimationStoreFront/1590221/Japanese/1590221_Japanese_2930c000-f9d1-e611-80c5-0017a4776c06.vtt
https://d132fumi6di1wa.cloudfront.net/FunimationStoreFront/1590221/Japanese/1590221_Japanese_2b30c000-f9d1-e611-80c5-0017a4776c06.dfxp

Maybe we could borrow something from this one?

https://github.com/streamlink/streamlink/blob/master/src/streamlink/plugins/funimationnow.py

@btaidm
Copy link

@btaidm btaidm commented Jun 26, 2017

Could you make your changes publicly available in a fork. I can see what I can do to look at this as well.

@kaithar
Copy link
Author

@kaithar kaithar commented Jun 28, 2017

I hadn't pushed them as I've been fixing weird edge cases. I've still got a couple more to track down as well.

First problem is that the key I'm binding on does broken things on multi-season shows. A particularly ridiculous example is D.Gray Man where the episodes of seasons 1, 2 and 3 appear to be 1-26, 27-51 and 104-116 respective.

The second problem is that I still have some glitchy episode handling though I might have it contained to the playlist code now. I know for one that it's only seeing the second season of My Hero Academia.

@kaithar
Copy link
Author

@kaithar kaithar commented Jun 28, 2017

Ok, well I answered both of those details. Turns out the episodes on D.Gray are numbered that way consistently thought out, so that's annoying. Aaand I'm getting My Hero Academia listed correctly, it just looks like I'm getting less episodes that I was which probably means I was getting noise or duplicated entries. I'll see if my remaining "had issues" show processes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.