Open ky41083 opened 7 years ago
Thanks for the details, I'll take a look at that as soon as I get a gap - hadn't noticed the truncating. I haven't added any hard limit so will need to see if that's part of the API changes or if it's some default in kodi. Will update on this thread when I have more details.
Cool, sounds good, thanks again. I figured with all the other changes happening it might be easy to miss. I have definitely not changed any Kodi settings, since seeing 0.0.5 work ok. Hopefully that helps track it down.
@ky41083 can you tell me how you navigated to that show. I simply found if from the search, which took me to: https://appletv.redbull.tv/products/AP-1K1B6MP4D1W11?single_item=true. Having a look at that response though, it only lists up to episode 20 (The Perfect Storm). I haven't found any API endpoint where I can get the full list of episodes - so potentially it is a limit of the API itself.
There is a oneLineMenuItem
which seems to have the intention of starting to play the season playlist, which I'm ignoring, which links to: https://appletv.redbull.tv/content/AP-1M5XZC3TH2111?playlist_path=playlists%2FAP-1K1B6MP4D1W11%3Aseason%3A1%3Ftotal%3D39%26limit%3D20%26offset%3D0, which in essence is the first episode, but has a relatedPlaybackURL
which points to the next episode (https://appletv.redbull.tv/playlists/AP-1K1B6MP4D1W11:season:1?current_video_id=AP-1M5XZC3TH2111&limit=20&offset=0&related=true&total=39), which in turn has a relatedPlaybackURL
which points to the next episode. This will just link through 1 episode at a time though, I can't see any way to get all the episodes back together.
I assume if you're using this add-on with Kodi you don't have an AppleTV to see if it works on that?
Yeah I see what you mean...
I navigated to that show through multiple vectors in the plugin. Search, preset listings, both do the same short list. The second URL I linked above has the full episode listing. It is the show hash, but at /collection/ rather than /show/, with :season:1 appended. And yes, I know the URL's I'm referencing are related to the browser API, rather than the AppleTV API.
All this possibly related to the server side API change(s) then? As, again, it worked fine on 0.0.5, accessing the older API...
No, I do not have an AppleTV to try it on. I am dual booting LibreELEC and Android (tablet) on this box though, and the Android app does indeed work, it is actually what I'm using at the moment to watch past episode 20.
If the Android app uses the AppleTV API by some weird coincidence, you should be able to use it on pretty much any Android device. It is 100% free.
Did you notice the "limit=20" in your URL's? Maybe something there... though it's not in the URL for the series listing.
And the limit=x string changes when I bounce around using a browser... maybe there isn't anything to it.
Yes, I did notice the limit
& total
params in the query-string, played with them a bit but couldn't get any other results.
I'm pretty sure the android app would have it's own API, would be quite interested to know what it is but don't have a rooted device and not sure if there's a way to check what requests are being made from the App to determine the API endpoint. It may be a better API to use if I can access it.
From what I can see with waht the AppleTV API gives us though, I can't see a way to get the rest of those episodes 😕 .
I'll leave this issue open for now though, as someone may have a suggestion or alternate approach I haven't thought of.
I feel your frustration...
I run a Sophos UTM at home, it's pretty useful for watching the live log of the web proxy. I wish I had more time this week, I would grab some URL's for you. If I get a chance, I will post as much of a full "from open app to playback episode" session as I can get.
Just looking at this issue and found the following extra bit of information. The browser URL View all
that lists all the episodes:
https://www.redbull.com/int-en/tv/collection/AP-1K1B6MP4D1W11:season:1
Has an equivalent XML URL and subsequent Show more
URL:
https://appletv.redbull.tv/collections/AP-1K1B6MP4D1W11:season:1 https://appletv.redbull.tv/collections/AP-1K1B6MP4D1W11:season:1?limit=20&offset=20
Note: My testing shows that limit
has an upper maximum of 20
, after which it is ignored. It also doesn't work with products/
URLs.
For the browser I would surmise that if there are 20 items in the listing then the View All
button is shown. The alternative theory is that total
in season playlist_path is checked but that would require parsing and rather complicated way to go.
The fix here could be to have an equivalent 'Show more' added for shows/collections for those with 20 episodes and create a link to the collections/<show_id>
URL.
When viewing series' with a larger number of episodes, not all episodes are displayed. The list ends at episode 20, for example, out of 39 episodes, when viewing "Life At The Extreme - 21st Century Sailors", URL's below. This happens consistently & repeatably, and with other large lists of items. Lists that used to be paginated, for example, now simply end at what used to be the first page of results.
All of the above lists worked, fully populated and paginated, when using version 0.0.5 of the plugin. That version no longer works due to API changes, as you well know.
Possibly a hard list size limit? Or it's not looking in the right place for all episodes / items returned? I would poke around if I had time... Please let me know if you need any further details. Thank you!
Great job on the plugin by the way, and the recent updates since you picked up development.
https://www.redbull.tv/show/AP-1K1B6MP4D1W11/life-at-the-extreme https://www.redbull.tv/collection/AP-1K1B6MP4D1W11:season:1