retrospect-addon / plugin.video.retrospect

Retrospect is a Kodi video add-on which allows you to watch streams of a number of free and publicly available online TV stream sites.
https://www.rieter.net/content/
GNU General Public License v3.0
105 stars 37 forks source link

Channel request: VTM #758

Closed basrieter closed 7 years ago

basrieter commented 7 years ago

Original report by lovecrafthp (Bitbucket: lovecrafthp, GitHub: lovecrafthp).


Flemish TV channel with lots of free content. You need to log in in order to view the content (cf. Vier).

Website: http://www.vtm.be

Android store: https://play.google.com/store/apps/details?id=be.vmma.vtm.zenderapp

Thanks for looking into it!

basrieter commented 7 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


Issue #572 was marked as a duplicate of this issue.

basrieter commented 7 years ago

Original comment by jokkemudcrawler (Bitbucket: jokkemudcrawler, ).


Can you try to add this channel in the channel list. So whe dont need to go to the officiel vtm app. Lot of advertising!!!! Thx in advance. Best regards Jokke

basrieter commented 7 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


Ok, so here I am now: I can list programs and videos, but I just can't find the full episodes via their API. So any help would be appreciated.

basrieter commented 7 years ago

Original comment by lovecrafthp (Bitbucket: lovecrafthp, GitHub: lovecrafthp).


Okay, how can we help? What is it that you need exactly? The link to the actual video files?

basrieter commented 7 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


I need to figure out the API url for retrieving the actual episodes. I tried the Android App with a HTTP proxy, but the API uses HTTPS connections, and won't work with a man-in-the-middle attack approach.

basrieter commented 7 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


This is what I have so far. Place it in the 'vtmbe' folder in the 'net.rieter.xot.channel.be' folder and restart Retrospect. Is should appear.

basrieter commented 7 years ago

Original comment by Mahammed Zishan Khan (Bitbucket: mahammedkhan, GitHub: mahammedkhan).


@basrieter I have done that but VTM is not showing up in the national channel list. I've also checked settings -> channels and it's not showing up there as well. This is a log: http://pastebin.com/GC3wLiCU

It should be pasted like this right?: not-working.PNG

I've restarted Kodi after putting the folder there and still it's not visible in the channel list.

basrieter commented 7 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


that seems correct. So:

basrieter commented 7 years ago

Original comment by Mahammed Zishan Khan (Bitbucket: mahammedkhan, GitHub: mahammedkhan).


There are no pyo and pyc files in that folder. I've done 3 reboots already(I even turned it off for 5 minutes and then started my pi again manually) and it's still not showing up in the channel list.

basrieter commented 7 years ago

Original comment by Mahammed Zishan Khan (Bitbucket: mahammedkhan, GitHub: mahammedkhan).


@basrieter I've fixed it by adding this to the channeindex.json:

#!json
"chn_vtmbe": {
            "info": "/home/osmc/.kodi/addons/net.rieter.xot.channel.be/vtmbe/chn_vtmbe.json", 
            "version": "4.1.2.5"
        }, 

Most video streams(clips only) are working fine, I've tested 'Allo bij de wegpolitie' for example and that works. De Buurtpolitie for example doesn't work. Log here: http://pastebin.com/yb8DVVdY

basrieter commented 7 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


Right, delete any other .pyo or .pyc in one of the other channels and retry. -> this rebuilds the channelindex.json

basrieter commented 7 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


There is by the way an option to show much more shows, but most of them have no video. Remove the line #70: Return None

basrieter commented 7 years ago

Original comment by Mahammed Zishan Khan (Bitbucket: mahammedkhan, GitHub: mahammedkhan).


Okay I've replaced the chn_vtmbe.py file and removed all the pyo and pyc files in all the channels folders and rebooted kodi. I've started Retrospect(initialising channels) and tried Buurtpolitie again but it's still not working. Log here: http://pastebin.com/fYRdx62m

basrieter commented 7 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


My bad. Wrong file version. This then.

basrieter commented 7 years ago

Original comment by Mahammed Zishan Khan (Bitbucket: mahammedkhan, GitHub: mahammedkhan).


Thanks, Buurtpolitie and Familie video clips are working now.

basrieter commented 7 years ago

Original comment by jokkemudcrawler (Bitbucket: jokkemudcrawler, ).


Thanks Bas, can you change this in the source please? Because i can get it fixed in my android device this way.

basrieter commented 7 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


Sure, but at the moment, no full episodes are available. Is that a major issue? And do you guys prefer the version with a lot of shows, but many not having videos (See my comment above regarding line # 70)? or less shows, but all with videos?

basrieter commented 7 years ago

Original comment by jokkemudcrawler (Bitbucket: jokkemudcrawler, ).


For me less shows, but all with videos is oke. Its a start thanks.

basrieter commented 7 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


Great, I will start with an official update pushed tomorrow.

basrieter commented 7 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


Added: Initial VTM.be channel (Fixes #758)

(cherry picked from commit 42108d8)

basrieter commented 7 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


Added: Initial VTM.be channel (Fixes #758)

basrieter commented 7 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


Updates are rolling out over the next 6 hours: http://www.rieter.net/content/2016/11/20/net-rieter-xot-channel-be-4-1-2-4/

basrieter commented 7 years ago

Original comment by Mahammed Zishan Khan (Bitbucket: mahammedkhan, GitHub: mahammedkhan).


No full episodes is kind of an issue (maybe seperate issue?)

basrieter commented 7 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


Please read back a bit. Currently no full episodes are available, as I just don't know how to get them via their API. So for now, this is it, but I am always open to suggestions and/or help.

basrieter commented 7 years ago

Original comment by Koen Bekaert (Bitbucket: koen_bekaert, ).


Hi Bas,

To get the full episodes you have to create a profile on the website and login (cf vier.be) . It would be great if you could also get the livestream: www.vtm.be/live

basrieter commented 7 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


I have a profile, I just can't figure out the correct API calls to retrieve the list.

basrieter commented 7 years ago

Original comment by Kris (Bitbucket: blowk, GitHub: blowk).


For livestream the api calls url like http://stream-live.medialaan.io/stream-live/v1/channels/vtm/episodes/VM067747F/1564/playlist.m3u8?apikey=vtm-ADDKEY&encryption_type=plain&baseDateTime=ADDKEY&expires=ADDKEY&signature=ADDKEY

and EPG (per day) is loaded http://epg.medialaan.io/epg/v2/feed?apikey=vtm-ADDKEY&channels=vtm&date=2016-12-06

basrieter commented 7 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


That I figured out, however, it is the ADDKEY that I don't know how to get.

basrieter commented 7 years ago

Original comment by Kris (Bitbucket: blowk, GitHub: blowk).


Do you mean the first vtm-ADDKEY (=apikey)?

basrieter commented 7 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


Both the user vtm api key and the session key.

basrieter commented 7 years ago

Original comment by Kris (Bitbucket: blowk, GitHub: blowk).


https://user.medialaan.io/user/v1/gigya/request_token?uid=UIDKEY&signature=SIGNATUREKEY&timestamp=1481050976&apikey=vtm-b7sJGrKwMJj0VhdZvqLDFvgkJF5NLjNY&database=vtm-sso&_=1481050976700

Do you also have this apikey "vtm-b7sJGrKwMJj0VhdZvqLDFvgkJF5NLjNY"?

I have to look for the session key.

basrieter commented 7 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


That I also have, but the UIDKEY and SIGNATUREKEY are required from the login procedure, which is not very straight forward.

basrieter commented 7 years ago

Original comment by Kris (Bitbucket: blowk, GitHub: blowk).


Do you mean the session cookie It is saved as "medialaan-gigya-userinfo" which retrieved all info from the user.

basrieter commented 7 years ago

Original comment by Kris (Bitbucket: blowk, GitHub: blowk).


Ok, I will look where the UIDKEY and SIGNATUREKEY is saved. VTM website is build with Drupal. Maybe the login procedure will be simular?

basrieter commented 7 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


The procedure I need to create is:

  1. open login url
  2. login
  3. fetch session info
  4. get all required keys
  5. call other urls with those keys.

And preferably an API (JSON) interface.

basrieter commented 7 years ago

Original comment by Kris (Bitbucket: blowk, GitHub: blowk).


They use gigye.com as login.

I just found some info on an another website. Maybe this info is usefull.

To request UID, UID signature and Timestamp: https://accounts.eu1.gigya.com/accounts.login?APIKey=3_HZ0FtkMW_gOyKlqQzW5_0FHRC7Nd5XpXJZcDdXY4pk5eES2ZWmejRW5egwVm4ug-&sdk=js_6.1&format=json&loginID={emailAdres}&password={wachtwoord}

On this forum https://userbase.be/forum/viewtopic.php?t=46630&start=40 they describe the use of http://vod.medialaan.io/api/1.0/item/{videoId}/video?app_id=vtm_watch&user_network=vtm-sso&UID={UID}&UIDSignature={UIDSig}&signatureTimestamp={sigTimestamp}

Can this be a help?

basrieter commented 7 years ago

Original comment by Kris (Bitbucket: blowk, GitHub: blowk).


Is there more information needed?

basrieter commented 7 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


Daar moet ik verder mee komen. Zal er naar gaan kijken.

basrieter commented 7 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


It works! Very nice indeed. I will proceed with the implementation

basrieter commented 7 years ago

Original comment by Kris (Bitbucket: blowk, GitHub: blowk).


Ok, great! If there anything else I could help to test, let me know.

basrieter commented 7 years ago

Original comment by Kris (Bitbucket: blowk, GitHub: blowk).


I think the other website Q2 is with the same procedure.

basrieter commented 7 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


Please try this VTM channel. Just delete all files from net.rieter.xot.channel.be/vtmbe/ and add the files from the zip. You should then be able to set the username/password via the Add-on settings and watch live TV

basrieter commented 7 years ago

Original comment by Kris (Bitbucket: blowk, GitHub: blowk).


Hey Bas, thank for this quick update. I've tested it and the live TV is working but I have some trouble with caching. It seems to be that if you click after 1 min, the 'live' TV is showing the from the first moment. I will look at this problem. Also I cannot load the full episodes. Maybe you could load the list from http://vtm.be/video/?f[0]=sm_field_video_origin_cms_longform%3AVolledige%20afleveringen to show only the full episodes?

basrieter commented 7 years ago

Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


Yes, that I noticed, but not just within Kodi, also on the site. It seems as if they start the beginning of the current show. The only thing is that you will need to provide the Retrospect Vault PIN every time you want to play the live TV. I haven't figured out how to prevent this.

The http://vtm.be/video/?f[0]=sm_field_video_origin_cms_longform%3AVolledige%20afleveringen won't work, as it has paging and thus I can't group them per show.

basrieter commented 7 years ago

Original comment by Kris (Bitbucket: blowk, GitHub: blowk).


Hey Bas, I'm using the beta version of Kodi right know. Maybe this is causing some problems when viewing live TV. Is it possible to change the mainListUri to http://vtm.be/video/volledige-afleveringen/ or http://vtm.be/video/?f[0]=sm_field_video_origin_cms_longform%3AVolledige%20afleveringen and filter all programs that have full versions? ( and maybe only filter on http://vtm.be/video/volledige-afleveringen/id/) I don't know the exact json feedlink. (parse from

Programma

)?

basrieter commented 7 years ago

Original comment by Kris (Bitbucket: blowk, GitHub: blowk).


I don't know what option we may have for this live TV. Is it possible with python to just scrape all the

  • list items from

    Programma

    to create the list?

  • basrieter commented 7 years ago

    Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


    That looks interesting. Let me check.

    basrieter commented 7 years ago

    Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


    Please try this version. It has only full episodes. There are some limitations such as that seeking is not supported with these videos.

    basrieter commented 7 years ago

    Original comment by Kris (Bitbucket: blowk, GitHub: blowk).


    This is working. Great! Thanks. The only thing is that the video is not starting from the beginning and like you also said that whenever you want to view something, you have to enter the Retrospect Vault PIN. I have to look why it's not picking up from the beginning...

    basrieter commented 7 years ago

    Original comment by Bas Rieter (Bitbucket: basrieter, GitHub: basrieter).


    I had the same "starting" issue from the site. Dunno why. I will see how I can get the seeking to work and look into the PIN issue. But for now I will push an update soon I think. Would that be OK?