plugin.video.catchuptvandmore icon indicating copy to clipboard operation
plugin.video.catchuptvandmore copied to clipboard

Please add ALL4 Channels and Catch-Up TV (UK Channel 4 Network, formerly known as 4OD)

Open kevwag opened this issue 2 years ago • 17 comments

Content description

ALL4 is the streaming platform for the UK's Channel 4 Network. It includes Catch-up TV, Box Sets, and five live channels with EPG:

  • Name: ALL4
  • Type [e.g. TV channel, Catch-up TV, Website, Radio]: TV Channels (x5) / Catch-up TV
  • Website URL: https:www.channel4.com
  • Content language/country: English / United Kingdom

Content access

  • [x] This content or some part of this content require a free account
  • [ ] This content or some part of this content require a paid account
  • [x] This content is geographically restricted

More information

N/A

kevwag avatar Apr 13 '22 10:04 kevwag

Do you know the api of this site?

joaopa00 avatar Apr 25 '22 04:04 joaopa00

Do you know the api of this site?

http://developer.channel4.com/io-docs

kevwag avatar Apr 26 '22 11:04 kevwag

Here is a beginning of an attempt to implement Channel4 replay: https://github.com/joaopa00/Tests/blob/main/channel4.py

But I am stuck in retrieving request_id and message in payload. If someone has an idea, please share it !!

joaopa00 avatar May 12 '22 14:05 joaopa00

@joaopa00
Thanks for doing this, it'll be awesome to have a bit more UK functionality :) (I think there's an error in your link URL - I get a 404 page)

kevwag avatar May 12 '22 16:05 kevwag

Sorry, the file is in my private github. Here is : test.txt

joaopa00 avatar May 12 '22 20:05 joaopa00

@joaopa00 Am I able to paste that file into the addon on my system and try it out or does it need more work first?

kevwag avatar May 22 '22 10:05 kevwag

For now, this file fetches the title of the episodes only. It can not play any stream.

Recently, I had some progress in playing streams. But I still have problems to fetch the token.

joaopa00 avatar May 22 '22 14:05 joaopa00

For now, this file fetches the title of the episodes only. It can not play any stream.

Recently, I had some progress in playing streams. But I still have problems to fetch the token.

Ah, ok. I remember that the recent fixes for UKTV Play involved hard-coding the token instead of scraping for it. Is that maybe an option or is this different?

kevwag avatar May 23 '22 10:05 kevwag

It is different. It changes all the time.

joaopa00 avatar May 23 '22 15:05 joaopa00

Well that sucks then! Is there anything in the online API documentation about how to do it? There seemed to be quite a lot of documentation at the API URL that I posted but I was instantly out of my depths and didn't have a clue what any of it meant!

kevwag avatar May 23 '22 20:05 kevwag

On their site, I never managed to fetch a key. So I was never able to study their API. DO you know how to request a key?.

joaopa00 avatar May 24 '22 04:05 joaopa00

Once you've signed up for a developer account at developer.channel4.com and you're logged in, the page to request an API Key is at developer.channel4.com/apps.

I noticed that on the interactive documentation page there are a bunch of different calls and methods for performing various functions and tasks. You can interactively try them all out and although the response is always "forbidden" without a valid API key entered, it does give you the URL construction format and other info that might be useful.

kevwag avatar May 25 '22 15:05 kevwag

I registered but received no key...

Channel 4 API Application Form Application Registered!

To get started using your API keys, dig into our documentation and feel free to ask questions in our forum. We look forward to seeing what you create!

joaopa00 avatar May 25 '22 16:05 joaopa00

@joaopa00 Did you check on the developer.channel4.com/apps/mykeys and developer.channel4.com/apps/myapps pages?

The application form suggests that they manually approve key requests rather than automatically issuing a key like many other sites do. I found a couple of posts in the developer portal forum from other users who say they didn't receive a key. Those posts are a few years old but never received replies so I don't think anyone's actively monitoring the portal. I'm guessing that since the API is managed by a third-party company (Tibco), they probably don't want to pay for staff to monitor the portal for API requests or forum posts and most likely don't check the site at all unless the customer (Channel 4) asks them to do something.

I found an email address for Tibco support: [email protected] on an email confirming that I'd changed my dev account password. It's probably worth dropping them an email saying that you didn't receive a key because they probably won't check the site for a long time unless someone gives them a gentle nudge in the right direction.

kevwag avatar May 25 '22 21:05 kevwag

Trying to get the channel4 replay to work based on the thread at https://github.com/xbmc/inputstream.adaptive/issues/995

Where did you find the vale for the basic auth string? Proxy-Authorization=Basic cDluOGl6YWctcmh3dXl6OTpjamJ5NTZ0dTc5

I have looked through hours of developer tools outputs and output from chrome://net-export/ and can't see where the basic auth string comes from?

any pointers will be a great help to try and help me get this to work.

nictjir avatar Sep 19 '22 10:09 nictjir

When I uses browser in Linux, I am stuck at fetching the cookie set by Google Recaptcha. Here is my work in progress. Obviously, you can use it. The best bet is to use the apk of the android version. But this appli is very picky. It refuses rooted devices. And apktool is unable to recompile it. So to sniff in this apk you need

  • non rooted device android <=6 (lollipop or marshmallow, kitkat and below is not supported by the appli)
  • not using vpn (for sniffing you need a tun interface and vpn uses the only one available in android device). I have the first item but I do not live in UK. So item 2 is a stop point.

Here is a link to learn how to sniff ssl traffic in android. https://www.exandroid.dev/2021/03/21/capture-all-android-network-traffic/

channel4.py

joaopa00 avatar Sep 19 '22 16:09 joaopa00

Thankyou for sharing your code and ideas. I am also out of the uk :( Will try and get it to work

nictjir avatar Sep 20 '22 05:09 nictjir

I have based this script on the one from joaopa00 above and addedd in bits to get the access token. the attached script works to watch the channel4 catchup stuff. This works for me in kodi 18 on python 2. (will not work on Kodi 19 as is)

Put the script in (rename it from channel4.txt to channel4.py) .kodi/addons/plugin.video.catchuptvandmore/resources/lib/channels/uk/channel4.py

In .kodi/addons/plugin.video.catchuptvandmore/resources/lib/skeletons/uk_replay.py add "channel4": { "route": "/resources/lib/channels/uk/channel4:list_categories", "label": "Channel4", "thumb": "channels/uk/blaze.png", "fanart": "channels/uk/blaze_fanart.jpg", "enabled": True, "order": 1, },

channel4.txt

nictjir avatar Sep 29 '22 15:09 nictjir

Thank you for your hard work. However, I had already pushed a seemly cleaner solution in Git.

joaopa00 avatar Sep 29 '22 23:09 joaopa00

Indeed way way way cleaner! thankyou!

nictjir avatar Sep 30 '22 05:09 nictjir

And now, the lives are implemented in git. Time to close this issue.

joaopa00 avatar Sep 30 '22 07:09 joaopa00

And now, the lives are implemented in git. Time to close this issue.

What are the steps? Because I don't really understand what to do, I have the Catch-up Tv & More addon installed but there's no Channel4/All4.

Arathonk avatar Oct 06 '22 12:10 Arathonk

For now, you need to install the beta version. Have a look at https://github.com/Catch-up-TV-and-More/plugin.video.catchuptvandmore When the stable version is released, you will be able to install it

joaopa00 avatar Oct 07 '22 02:10 joaopa00

For now, you need to install the beta version. Have a look at https://github.com/Catch-up-TV-and-More/plugin.video.catchuptvandmore When the stable version is released, you will be able to install it

Yes found it, unfortunately it's not working, when going to Channel 4, and click any show, it just doesn't want to load the show.

Arathonk avatar Oct 07 '22 07:10 Arathonk

Do you have a UK IP?

joaopa00 avatar Oct 07 '22 08:10 joaopa00

Do you have a UK IP?

Yes I do

Arathonk avatar Oct 07 '22 08:10 Arathonk

Please attach the log from Kodi here (as a text file)

joaopa00 avatar Oct 07 '22 08:10 joaopa00

@joaopa00 Sorry for making the request and then seemingly disappearing, I've had a lot going on lately and haven't had time to keep up with everything. I did notice the channel 4 section appear in the beta so first of all I'd like to thank you for your hard work, especially with the IPTV integration, it's great that we're getting closer to restoring full Freeview functionality in Kodi without the need for DVB tuners.

I've noticed a bit of a bug in the on-demand section: It's only recognising and playing streams that are TV show episodes and that are contained in numbered season folders. Movies, shows that only have a single season, one-off's and special episodes don't work, it's as if Kodi is trying to open the url as a folder listing instead of playing it as a stream.

Example: Browse to Catch-up>>United Kingdom>>Channel 4>>Comedy>>Bad Robots: Comedy Blap This show only has one season, selecting it produces error: RuntimeError>>no items found The same error happens when trying to play any movie or on-off show directly from the comedy menu.

Special episodes of a TV show produce a slightly different error:

Example: Browse to Catch-up>>United Kingdom>>Channel 4>>Comedy>>The Windsors There are three season folders titled "Series 1", "Series 2", "Series 3" and also folders titled "Christmas Special" and "Royal Wedding Special". The three season folders work fine but selecting either of the specials produces the error: IndexError>>list out of range, I'm guessing that's because it's trying to open the url as a list of folder contents when it should be playing the url as a stream.

Other than this bug, everything else seems good. The epg data's missing for the live channels but that's a known issue affecting all the UK channel listings. The issue has its own error report but that's been open for months without a single response, so I don't know if it'll ever get fixed.

PS... I noticed you guys mentioning problems sniffing traffic whilst using a vpn. Most home broadband routers these days have a config page where you can make the router act as the vpn gateway. If you've got an old router you don't use, you could set it up as a vpn gateway, freeing up that tun in android whilst not interfering with. the availability of your main router's connection.

kevwag avatar Oct 19 '22 12:10 kevwag

Should be fixed in git (or just wait for the next beta release). Thanks for the report. But please, the next time, don't recycle this closed bug report. If you want to report an issue, please open a new ticket.

joaopa00 avatar Oct 19 '22 20:10 joaopa00