add-ons/plugin.video.yelo

Various channels not working

dagwieers opened this issue · 15 comments

From my testing (using Kodi or the testing framework from #10), the following 12 channels (out of 71 Play live channels) appear not to work:

  • Discovery World/play/id/discoverywo
  • Discovery ID/play/id/discoveryid
  • Discovery Science/play/id/discoverysci
  • History/play/id/history
  • Nat Geo Wild/play/id/natgeowild
  • Extreme Sports/play/id/extremesport
  • Boomerang/play/id/boomerang
  • NickToons/play/id/nicktoons
  • Nick Hits/play/id/nickhits
  • VH1 Music/play/id/vh1
  • MTV Live/play/id/mtvnhd
  • Mezzo/play/id/mezzo

Please provide request logging with something like Fiddler. I do not have these channels as they are premium ones so I can't test myself.

This is a "Play" subscription.

This is a "Play" subscription.

Well I don't have these. If you look at your data.json (stored somewhere in add on data) you'll find entitlements these ids are important as they specify which channels you are allowed to watch.

Are you sure you are able to view these channels on yelo.be? If you aren't then there is some bug somewhere in the listing and you shouldn't be able to see them in the first place.

If you are able to view them using yelo.be it would be helpful if you could send some sort of Fiddler trace. Preferably with sensitive data removed like your username and password from the trace.

Yes, they are listed and they work in my browser.

BTW I already looked at the entitlements, and they were correct.

I'm having the same issue, here is what I found:
If you open those channels in a browser which hasn't been registered as a known device with telenet, you are redirected to a page asking to register your device.
Because the Kodi device isn't registered and has no means to ask you to register, those channels are not started.
In my search in solving the login problem, I noticed a "register device" routine in the code, but I guess this is serving another purpose.

Some further details:
The response from def _start_stream is 403, which means not authorized.
A json is returned with:

  • resultCode: DEVICE_AUTHORIZATION_REQUIRED
  • authorisedDevices: 2
  • allowedDevices: 5

In my case, I have already 2 devices registered, and 3 more devices left.

The device_id is tied in with the idToken, refreshToken and the accessToken, so replacing the device_id with an existing one copied from an authorized web client doesn't work. (I knew it but tried it anyway...)

So all that is left is to examine a web client registering a device. I'm a bit hesitating to do this as I can't delete a registered client for 90 days...

Another way would be to copy the tokens and the device_id from a working web client, but I'm not sure this would work. The advantage of trying this is that it won't deduct from my available devices...

If anyone has some more ideas about this, I'd love to hear (read) them...

Some further details:
The response from def _start_stream is 403, which means not authorized.
A json is returned with:

  • resultCode: DEVICE_AUTHORIZATION_REQUIRED
  • authorisedDevices: 2
  • allowedDevices: 5

In my case, I have already 2 devices registered, and 3 more devices left.

The device_id is tied in with the idToken, refreshToken and the accessToken, so replacing the device_id with an existing one copied from an authorized web client doesn't work. (I knew it but tried it anyway...)

So all that is left is to examine a web client registering a device. I'm a bit hesitating to do this as I can't delete a registered client for 90 days...

Another way would be to copy the tokens and the device_id from a working web client, but I'm not sure this would work. The advantage of trying this is that it won't deduct from my available devices...

If anyone has some more ideas about this, I'd love to hear (read) them...

Unfortunately this is something I can't reproduce because I don't have these channels myself in my subscription. All the channels work that are available to me without registering my device.

If someone could maybe lend his credentials (but I guess not a lot of people would want to because of obvious reasons) I could reproduce and probably fix the issue.

If you want to investigate yourself and maybe do a PR feel free. I recommend using a tool like Fiddler to reverse engineer the API the web client accesses.

I already started reverse engineering the API calls, unfortunately things are going to be hectic over here for the next month, so I don't know how much time I can spend on it over the next few weeks.

I will keep you (and everyone else) posted in this thread of my progress.

I thought I would spend some time on it this evening, and, it was way more easy than I had imagined!!!
IT WORKS !
I have all channels behind the "Register Device" working.
The app will register itself as a device titled "YeloPlay"

Tested on 3 different Kodi installs (Kubuntu 18.04, Kubuntu 20.04 and LibreElec) and all are serving all channels from my subscription now.

I created a pull request with the changes, please feel free to adapt them if necessary.

@fripsy this has already been merged by @dagwieers but since I had time to take a look at the code I still have some questions.

If you follow the trace via Fiddler or Chrome when does /device/authorize get called? Is it actually before /stream/start like it has been coded now?

Also could you show me the data returned from a failed request, I would like to take a look at the error title and id.

@shycoderX
If you try to start a stream from the Play Subscription, and the device is not registered with Telenet, a 403 error is returned. The JSON in the return response contains the number of devices already registered and the maximum devices allowed to register.

So the device registration is started after the request for the stream, after registration, we have to start the stream again.

By "the data returned from a failed request" you mean the 403 error?

@shycoderX
If you try to start a stream from the Play Subscription, and the device is not registered with Telenet, a 403 error is returned. The JSON in the return response contains the number of devices already registered and the maximum devices allowed to register.

So the device registration is started after the request for the stream, after registration, we have to start the stream again.

By "the data returned from a failed request" you mean the 403 error?

Yes the message returned with the 403 HTTP status code. I'm not able to reproduce this because for some reason I've never been asked to register my device.

I replaced the deviceid with xxx

The url

https://api.yeloplay.be/api/v1/stream/start

The request

{"meta":{"schema":"stream/Stream.json","version":"4.1"},"stream":{"deviceId":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","resource":{"watchMode":"Live","links":{"tvChannel":"discoverywo"},"timeShiftOffset":0},"context":"Watch-TV","platform":"Web","drmMethod":"WIDEVINE","protocol":"DASH"}}

The response

Status: 403

{"meta":{"schema":"stream/Stream.json","version" : "4.1","ttl":0},"stream":{"authorizationResult":{"resultCode":"DEVICE_AUTHORIZATION_REQUIRED","authorizedDevices":3,"allowedDevices":5}}}

I have 2 accounts available for testing, 1 with Play subscription and 1 without.
The account without subscription doesn't ask for a device registration anymore, even after clearing all cookies.
I'm pretty sure that it did when I tested this a few weeks ago with Eurosport1 and Discovery.
The other account (with subscription) does ask for device registration after clearing all cookies.
Strange...

I no longer have these 12 channels listed in Yelo website or Yelo add-on, I only have 59 channels now.
So for me this is no longer an issue and this ticket can be closed.

Do we still have an issue that was not fixed yet? If so, please open a new ticket for this.
The original reported issue is closed for me.