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

why is my VTMGO - login not accepted even with another password and emailaddress linked on dpgmedia in belgium #387

Open
wim63 opened this issue Jun 28, 2024 · 63 comments

Comments

@wim63
Copy link

wim63 commented Jun 28, 2024

Describe the bug
A clear and concise description of what the bug is.
when try to login the latest version of your plugin here plugin.video.vtm.go, i always keep on being asked to login on my addon and it doesnt even want to connect to the internet with a weird error: xmbc.python plugin is not fulfillable.
How can i get a version vtmgo addon in kodi coreelec that accepts the login only one time and not repeats that query again?

To Reproduce
Steps to reproduce the behavior:
1.installting matrix plugin on coreelec add-on plugin.video.vtm.go
2.opening the add-on makes me ask for the pasword to be filled in in my account but....it always gives the same error just like' vtm Go Error (no further info on the screen)
3. and then it hangs for a while thinking it is loaded but the loading wheel gets stuck somehow

Expected behavior
A clear and concise description of what you expected to happen.
What is to be expected is a normal one time plugin login.

Screenshots
If applicable, add screenshots to help explain your problem.

Logs
Add debug logs to help troubleshoot the issue. See https://kodi.wiki/view/Log_file/Easy for more info.
i tried to do this but in kodi i am not able to log now because the error happens before pressing the button on the add-on

System

  • Addon version: alll versions do not work on corelec i tried them all nothing works
  • Kodi version: I use Coreelec on a odroid n2
  • Inputstream adaptive version: cant yet install it to see if something is bugging here but just stay to ground here versions are the latest ons with kodi version coreclec version 21.0-omega
  • Operating System (Windows / Mac OS / Android / LibreElec / OSMC / ...): COREELEC
  • Special Hardware (RPI / Vero4K+ / ...):odroid N2 4Gigabytes ram version

Additional context
Add any other context about the problem here.
I really am getting my nerves about this problem because there a lot of programmes i would like to watch there before their gone because in belgium the only keep backups if it is important for the world but even then time is limited to be able to watch throug the years something you've missed and the dont come back with a saved version in youtube forget about that kind of kindnessin belgum towards programmes. so a quick good fix for years must be able to be done.
i found out that if you type login.vtm.be/androidtv that site for logging in to dpg does exist so maybe is question of looking for a twice logged in in you authentication python file and update the version to python3 just to mention what could be done.i am hoping an soon solvable respons with sending this to you

anyways kind regards wim pauwels

@Clyde72
Copy link

Clyde72 commented Jun 28, 2024

I have the latest version since a long time and since some days it doesn't work anymore. I guessed connection/login issue with dpg media so I uninstalled and reinstalled it yesterday and I was correct. Can't register/connect anymore. As what you are describing.

@michaelarnauts I guess something must have been changed from dpg media's server side

@wim63
Copy link
Author

wim63 commented Jun 28, 2024

Is it possiblle to be fixed or do you need to negociate about it with the developpers of dpg because it is very annoying at the moment: when i pulled a api registration commandline code i saw that normal accounts dont login anymore the only want you to registrate through an email sent code without password. so maybe there is some way to refix that in the code of authentication.py files. ? i am hoping you can soon find it and most of al fix it. i know you have other things on your list to do but i woulld presume this is something important to many users as from now on i think there are many people who use kodi or corelec or ibreelec and thy want in belgium this addon then it should be somehow working in a short time.

people dont like to login after and after again because it is timeconsuming andnot good for them.

in my case no worries but maybe you could implement an (just a proposal) peace of the web inteface of dpg into the code to be able to get a full login system connected to the addon so it goes directly to their servers so that loginsystem is a UI interface with the right login seperated from the kodi logins. just wondering if that could be possible and i will be able to try it out for you before you sent it to public instances. so you can work on the code without all the negative comments to read beause as long as it is not fixed you need time to do that and a few people to try the reinstall or the update plugin as something that is to be stagely develloped. sorry for my long conversation here i was just thinking with you together we come to vtm go we solve this somehow. because i also tried to remove the services and other stuff to be able to login but it doesnt work because the login has an error and i was looking at the scripts and maybe it could also be that the registration link needs to be alterd in a not seperated token file in py but as on option to login through the addon? could that be helping you dont need to refresh the token code as long as you can login does it?

and more i like to say i am willing to try everything to help you out in my brain not that i am a programmer but i am glad to hep you testing every single bit of a new addon you can put together in the login stage to be solved.

so kind regards again from wim pauwels (en eigenlijk ben ik nederlandstalig maar ik dacht ik zal het in het engels doen dan begrijpt iedere bezoeker het)

@wim63
Copy link
Author

wim63 commented Jun 28, 2024

@michaelarnauts
i will paste here the result the command i mentioned before in the previous comment in this peace of command the last lines are for taking in consideration towards changing the login procedure for our loved vtmGO plugin.

`wim-tv:~ # curl -X GET -H 'Cookie: authId=2dc44dfb-514f-48cb-9962-71836534ee41' 'https://login2.vtm.be/authorize?response_type=code&response_mode=form_povtm.be/vtmgo/aanmelden?redirectUrl=https://vtm.be/vtmgo'
wim-tv:~ # curl -X GET -H 'Cookie: authId=2dc44dfb-514f-48cb-9962-71836534ee41' 'https://vtm.be/vtmgo/aanmelden?redirectUrl=https://vtm.be/vtmgo'
wim-tv:~ # curl -X GET -H 'Cookie: authId=2dc44dfb-514f-48cb-9962-71836534ee41' 'https://login2.vtm.be/authorize?response_type=code&response_mode=form_post&client_id=vtm-go-web&scope=openid%20profile&state=nQhCIMGeFoK6oyNZ-G8S8tA47r8Yt3EsqanKbBl4FgY=&redirect_uri=https://vtm.be/vtmgo/login-callback'

<title>Inlogpoging geblokkeerd</title> <style> .bot-manager_wrapper { font-family: Montserrat, Arial, sans-serif; display: flex; justify-content: center; text-align: center; height: 100vh; width: 100vw; padding: 32px 0; margin: 0 auto; max-width: 600px; }
    .bot-manager_logo {
        display: flex;
        justify-content: center;
        margin-bottom: 40px;
    }

    .bot-manager_logo > img {
        max-height: 100px;
    }

    .bot-manager_title {
        font-family: Sharp Sans Display, Arial, sans-serif;
        font-size: 32px;
        font-weight: 400;
    }

    @media only screen and (max-width: 960px) {
        .bot-manager_wrapper {
            font-size: 14px;
            padding: 0 8px;
        }

        .bot-manager_title {
            font-size: 24px;
        }
    }

    body {
        color: hsl(0, 0%, 30%);
    }

    strong {
        color: hsl(0, 0%, 0%)
    }

    .debug {
        font-size: 0.8em;
        opacity: 0.8;
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    main {
        position: relative;
    }
    ul {
        text-align: left;
    }

    #error-page_subtitle span {
        font-family: "Andale Mono","Consolas", "Courier New", "Courier", monospace;
    }
</style>
<h1 id="error-page_title" class="bot-manager_title">Inlogpoging geblokkeerd</h1>

<section>
    <p>
        Om veiligheidsredenen is het inloggen met wachtwoord tijdelijk niet toegestaan.
    </p>
    <ul>
        <li>Ga terug naar de loginpagina en kies voor <i>inloggen met code</i>.</li>
        <li>Er wordt dan er een 6-cijferige
        code naar het emailadres gestuurd dat bij het account hoort.</li>
        <li>De browser zal een pagina tonen met een invoerveld waar die code ingevoerd
        kan worden, waarna je ingelogd bent.</li>
    </ul>
</section>

<h4 id="error-page_subtitle">Status 406 : <span>0.19173317.1719574886.c81be9c</span></h4>
` hoping this situation info can help you out for reprogramming our login errors? so the server doenst see vtmgo passwords anymore but it keeps comming back as the login is regenerated; that is not right. waiting for you to let me help you out with the testing whatever you change i will try a new installation of your changes.

kind regards wim pauwels

@Clyde72
Copy link

Clyde72 commented Jun 28, 2024

sticking to English is common practice on international tech platforms and yes, it is so all visitors could follow (also Flemish here)

@michaelarnauts
Copy link
Collaborator

I'm not using Kodi (and so also this plugin) anymore, but if someone can find a fix, I can make a new release for it.

I assume they have updated the required API version. See #376 for a previous fix. It might be this simple.

It can also be that they changed some domains. To really check, you would need to setup mitmproxy, and push a patched apk to your mobile phone or emulator, so you can intercept the HTTPS traffic the app is making towards the dpg media backend.

@wim63 I'm not sure what you are saying, but we don't use the username/password authentication flow, but the device flow. This requires to go to a webpage, login and fill in a code. The addon keeps on checking in the background to see if authentication has been granted.

@Clyde72 Correct, I assume all people here speak dutch, but I tend to keep my communication in English on GitHub.

@wim63
Copy link
Author

wim63 commented Jun 28, 2024

i found tshe explenattion of the backend that is in java written and partly in something else:
https://dpgmedia-engineering.medium.com/how-we-built-it-direct-a4acfbcae41b

in this url you may find a bit more information maybe when you go to sitemapsyou find more information about it.

i will look into it futher untill i find it i wont stop with looking for it why the problems with login in vtmgo are this hard today. shouldnt be nontheless it should easier. may be it is now another server dns orsomething that we need to rename in the python code i dont know but i will soon be clearer about all this

kind regards wim pauwels

@wim63
Copy link
Author

wim63 commented Jun 28, 2024

as a result of my searching i found this command under linux to find at least already the DNS servers of vtm.be

wim@wim-desktop:~$ host -t ns vtm.be vtm.be name server use2.akam.net. vtm.be name server eur2.akam.net. vtm.be name server eur5.akam.net. vtm.be name server ns1-25.akam.net. vtm.be name server ns1-125.akam.net. vtm.be name server eur6.akam.net. vtm.be name server usc2.akam.net. vtm.be name server use5.akam.net.

i am gonna go now to the dpg servers to see what is changed there:

for vtmgo this wil be the names:

host -t ns vtmgo.be vtmgo.be name server use2.akam.net. vtmgo.be name server usc2.akam.net. vtmgo.be name server eur2.akam.net. vtmgo.be name server use5.akam.net. vtmgo.be name server eur6.akam.net. vtmgo.be name server ns1-125.akam.net. vtmgo.be name server eur5.akam.net. vtmgo.be name server ns1-25.akam.net.

now i am gonna give the dpgmedia.be dns servers

curious myself

host -t ns dpgmedia.be dpgmedia.be name server use5.akam.net. dpgmedia.be name server eur6.akam.net. dpgmedia.be name server use2.akam.net. dpgmedia.be name server ns1-25.akam.net. dpgmedia.be name server eur2.akam.net. dpgmedia.be name server usc2.akam.net. dpgmedia.be name server ns1-125.akam.net. dpgmedia.be name server eur5.akam.net.

to add the numbers of the ipaddressess i will dig further:

something to find is the following result i found the adresses for dpgmedia acounts and guess what: google handles the protocols i think look at these results for a moment:
host dpgmedia.be dpgmedia.be has address 23.50.131.132 dpgmedia.be has address 23.50.131.139 dpgmedia.be has IPv6 address 2a02:26f0:3500:14::1724:a24c dpgmedia.be has IPv6 address 2a02:26f0:3500:14::1724:a24d dpgmedia.be mail is handled by 1 aspmx.l.google.com. dpgmedia.be mail is handled by 5 alt2.aspmx.l.google.com. dpgmedia.be mail is handled by 5 alt1.aspmx.l.google.com. dpgmedia.be mail is handled by 10 aspmx3.googlemail.com. dpgmedia.be mail is handled by 10 aspmx2.googlemail.com.

so i will now look for more info with this site i am almost there i am gonna take a short break i did this all in two hours just mention. so just to mention the website i got the info from: https://www.cyberciti.biz/faq/linux-unix-host-command-examples-usage-syntax/
this are probably things u can use? because the fix you sent was already implemented in my version of vtmgo on kodi.
probably you can find a hint in here i will also look further after my break for what is wrong in the links in vtmgo.py because i probably saw something but it could be wrong seen from my side. but i will keep you updated.
kind regards again

@gustav-janssens
Copy link

Unfortunately it doesn't look like it's as simple as bumping the version again to e.g. 16, similar to #376... When I try to use the following User-Agent and x-app-versions:

'User-Agent': 'VTM_GO/17.240626 (be.vmma.vtm.zenderapp; build:19069; Android 34) okhttp/4.12.0',
'x-app-version': '17',

It no longer gives an error as reported in #386, and opens the app, but all the program lists are empty...

I got these values by decompiling the most recent VTM GO Android APK, I guessed that perhaps I could find the values to use there... At some point in the app (unfortunately it's obfuscated), the User-Agent is set like this:

return sx.w.a("User-Agent", upperCase + "/" + versionName + " (" + applicationId + "; build:" + versionCode + "; " + str + " " + Build.VERSION.SDK_INT + ") okhttp/4.12.0");

I got the values for versionName, versionCode and SDK version out of the AndroidManifest.xml.

Not sure where to go from there, but perhaps this gives someone inspiration...

@ghen2
Copy link

ghen2 commented Jun 28, 2024

I was just testing the same; bumping the x-app-version as in #376 makes the "426 Upgrade Required" go away, but now every menu item gives a 404. So more changes will be required.

@davidbe
Copy link

davidbe commented Jun 29, 2024

I analysed it a bit. See gist: https://gist.github.com/davidbe/4a09ebc002d4d61cc33f993d5b55f87a

Registering a new device works, that is not an issue.
As @gustav-janssens and @ghen2 mentions, bumping User-Agend and x-app-version solves the "Upgrade Required" error.

@michaelarnauts , that's already something that needs to be updated!

Other issue is, I guess, in parsing the json that is returned for items in the menu. That is something I have to dig in further to understand what has changed.

@michaelarnauts
Copy link
Collaborator

@davidbe that's a great start! I suppose the JSON has indeed changed a bit. If you follow the code, there is a part where I loop over the JSON structure and create actual python objects (Program, Movie, Series) for this. I think the structure has changed a little bit, probably near the top, so it doesn't find any results when looping.

You can also try to run pytest, it should run automated tests, and makes it easier to try a change somewhere and run a test. I think you do need to update an .env file, not sure anymore. (Typing on my mobile, do I can't really check).

Good luck!

@davidbe
Copy link

davidbe commented Jun 30, 2024

@michaelarnauts , thank you for the hint.

I did some follow-up analyses (a bit more chaotic / incomplete: https://gist.github.com/davidbe/f9ba35d9d5a51c68c4ccf3c50b44e041). My conclusion is that vtmgo has simplified different items in their json. It seems that there is no difference anymore betwoon program, movie and series. All have the same content.

I guess what is needed is:

  • to add a new object, which is more generic, Teaser (that's how they are called in the json?)
  • rewrite the main storefront-method where the whole json is parsed and build up in cache to not make a difference between program, movie and series
  • rewrite of all the helper-methods

This is not a little change. :-/

@wim63
Copy link
Author

wim63 commented Jun 30, 2024 via email

@michaelarnauts
Copy link
Collaborator

Please don't involve DPG Media with this. They won't disclose details about anything. This whole plugin is done by reverse engineering the API in someone's free time.

@wim63
Copy link
Author

wim63 commented Jun 30, 2024 via email

@Jerry911
Copy link

Jerry911 commented Jul 1, 2024

A couple things changed:

  1. The API key is now jL3yNhGpDsaew9CqJrDPq2UzMrlmNVbnadUXVOET
  2. x-app-version went from 15 to 16
  3. In vtmgostream.py:_get_video_info the post data now has to include an ads section
    data = { 'deviceType': 'web', 'zone': 'vtmgo', 'ads': '{"provider":{"advertisingDeviceId":"id","advertisingNetworkUserId":"id","gdprConsentString":"b64string"}}' }
  4. The base url changed from https://videoplayer-service.dpgmedia.net/config/ to https://videoplayer-service.dpgmedia.net/play-config/

These changes got my own script going again

@trick72
Copy link

trick72 commented Jul 1, 2024

Great info and a relieve that you got it working again. Hopefully we can see these changes in a new update of the app?

@Clyde72
Copy link

Clyde72 commented Jul 1, 2024

Nice. Seems like we gonna get served streams with ad blocks now. Bummer but not a disaster.

@wim63
Copy link
Author

wim63 commented Jul 1, 2024

@Jerry911
If iI tried to do your adaptations to the code in mine (at first it is need to disable the old plugin and to copy then he whole filetree to the named folder overwrite them allwith your adaptions)
but somehow at the login the thing works but i dont find any streaming content anymore? i iam able to see the list of folders and underneath they open well but when playing a live stream nothing is active? any way how did you solve that problem? please let me know i am in the waiting rooom at this moment with the qestion?

so i adapted nothing exept that i added the code line 3 of your comment in the right way underneatch the other data word so there are now two datas underneath each other.would that be the problem? do i need to delete the old line above it? please tell me soon.
kind regards wim pauwels

@Jerry911
Copy link

Jerry911 commented Jul 1, 2024

@wim63

I am quite sure that you will have to include all of the changes I mentioned. The url from where the content is served changed so the old one wont work. The api key also changed and the app version was also mandatory to update for me to get the requests working.

Also I did these changes on my own scripts which do something different than this repository. I used some of this code as a base though and those 4 changes got it working again for me so I assume that playback should work to.

I am also still trying to figure out where the values for the third point come from, I copy pasted my values that I found in the web browser post request. Those values are personal though.

@wim63
Copy link
Author

wim63 commented Jul 1, 2024

@Jerry911
i must have said it it a bit wrongly but I really followed your four steps. i only cant play livestreams
so that must be probably the question for me to you to answer: i just pasted the point code only the code like so:

In vtmgostream.py:_get_video_info the post data now has to include an ads section
data = { 'deviceType': 'web', 'zone': 'vtmgo', 'ads': '{"provider":{"advertisingDeviceId":"id","advertisingNetworkUserId":"id","gdprConsentString":"b64string"}}' }

in the file underneath the existing word 'data......' in the code of that file but maybe i need to delete the same wordcode form the upperline? that is what is bothering me now; i am waiting for your answer again but in the mean time i will try that file change to do work. i will keeep you updated when i found it or not. already thanks for kind answering my question and till soon kind regards wim pauwels

@Jerry911
Copy link

Jerry911 commented Jul 1, 2024

@wim63
You need to replace the entire data = part so the code should only say
data = { 'deviceType': 'web', 'zone': 'vtmgo', 'ads': '{"provider":{"advertisingDeviceId":"id","advertisingNetworkUserId":"id","gdprConsentString":"b64string"}}' }

Where you have to insert your own advertising id, network user id and gdpr consent string. There should not be 2 "data =" lines, though the last one should override the first one. So I think the problem will probably be something different. I have no experience with the live streams, could be that that url also changed. Or maybe it also requires a new json payload.

@wim63
Copy link
Author

wim63 commented Jul 2, 2024

@Jerry911
i found something about the used streaming protocol: i now know why it is not playable the live tv:
i used Bubblepnpserver for it to try to stream the appstream video live to the tv on my kodi mediacenter (not chromecastplayer)
only dlna/upnp connected but it failed because of the fact that the stream is in WMP code and not mkv or mp4 . so i think that the encoding of the video in their system is not opensource coded. could we do something about that problem (a fix a workaround)?

so that there is a soution to the llive stream section? if we can find this one i i wil today try many things to test that problem. if someone works with me to see of course what coudl be wrong like you did before in code language of course.

we need to retreive the live stream WMP coded stream an put that perhaps instead of the player that now doenst fuction as long as it is logged in by me..... just thinking ..... gonna try something and i will let you know for sure when it worked what i changed.

@Firomanio
Copy link

@Jerry911
you said "Where you have to insert your own advertising id, network user id and gdpr consent string."
any tips on where I can retrieve those?

@gustav-janssens
Copy link

@Firomanio through accessing VTMGO via the browser, use the dev console of your browser, look at the payload of a post request when you watch something there. That should contain the values of "advertisingDeviceId", "advertisingNetworkUserId" and "gdprConsentString".

Unfortunately, using the values I found this way, I was not yet able to for example play a channel, I'm getting server errors (500). Not sure why...

@coreflake1
Copy link

@gustav-janssens

Tried it as well, getting the same error as you.
500 Server Error: Internal Server Error for url: https://videoplayer-service.dpgmedia.net/play-config/channels/d8659669-b964-414c-aa9c-e31d8d15696b?startPosition=0.0&autoPlay=true

Saw that Popcorn-Sdk-Version: 7 is now used by VTMGO, tried to edit that part in the files as well but to no avail.

@davidbe
Copy link

davidbe commented Jul 7, 2024

Has anyone making progress on the addon?

What has to be done for sure:

  • updating utli.py for new version with:

    'User-Agent': 'VTM_GO/17.240626 (be.vmma.vtm.zenderapp; build:19069; Android 34) okhttp/4.12.0',
    'x-app-version': '17',
    'x-persgroep-mobile-app': 'true',
    'x-persgroep-os': 'android',
    'x-persgroep-os-version': '28',
    }
    
    

But then I'm a bit clueless. The json changed, I can rebuild (a bit) the menu, but that's all. I don't really now what is needed to start playing something (which url to get the all the information? and which url to remember to start to play)

Has anyone experience with using mitmproxy and a virtual android device (emulated within Adroid Studio). I followed different guides (they are sparse) but none of them worked, mitmproxy is running but isn't catching anything.
@michaelarnauts have you any tips?

@Firomanio
Copy link

I'm getting the same errors as everyone.

I changed util.py same as @davidbe

Changes in vtmgostream.py (where myID is replaced by my own id's I got from the webplayer):

    def _get_video_info(self, strtype, stream_id, player_token):
        """ Get the stream info for the specified stream.
        :param str strtype:
        :param str stream_id:
        :param str player_token:
        :rtype: dict
        """
# url has been replaced to solve /june24 problems
#        url = 'https://videoplayer-service.dpgmedia.net/config/%s/%s' % (strtype, stream_id)
        url = 'https://videoplayer-service.dpgmedia.net/play-config/%s/%s' % (strtype, stream_id)
        _LOGGER.debug('Getting video info from %s', url)
        response = util.http_post(url,
                                  params={
                                      'startPosition': '0.0',
                                      'autoPlay': 'true',
                                  },
# data part has been replaced to solve /june24 problems
#                                  data={
#                                      'deviceType': 'android-tv',
#                                      'zone': 'vtmgo',
#                                  },
                                  data = {
                                      'deviceType': 'web',
                                      'zone': 'vtmgo', 
                                      'ads': '{"provider": {"advertisingDeviceId": "myID", "advertisingNetworkUserId": "myID", "gdprConsentString": "myID"}}'
                                  },
                                  headers={
                                      'Accept': 'application/json',
                                      'x-api-key': self._V6_API_KEY,
                                      'Popcorn-SDK-Version': '6',
                                      'Authorization': 'Bearer ' + player_token,
                                  })

        info = json.loads(response.text)
        return info

I get the following error when playing whatever:

2024-07-07 21:42:57.823 T:1006    error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'requests.exceptions.HTTPError'>
                                                   Error Contents: 500 Server Error: Internal Server Error for url: https://videoplayer-service.dpgmedia.net/play-config/episodes/ce74ce22-8971-4411-be3a-c96e0d265aa4?startPosition=0.0&autoPlay=true
                                                   Traceback (most recent call last):
                                                     File "/storage/.kodi/addons/plugin.video.vtm.go/addon_entry.py", line 19, in <module>
                                                       run(argv)
                                                     File "/storage/.kodi/addons/plugin.video.vtm.go/resources/lib/addon.py", line 186, in run
                                                       routing.run(params)
                                                     File "/storage/.kodi/addons/script.module.routing/lib/routing.py", line 130, in run
                                                       self._dispatch(self.path)
                                                     File "/storage/.kodi/addons/script.module.routing/lib/routing.py", line 141, in _dispatch
                                                       view_func(**kwargs)
                                                     File "/storage/.kodi/addons/plugin.video.vtm.go/resources/lib/addon.py", line 166, in play
                                                       Player().play(category, item)
                                                     File "/storage/.kodi/addons/plugin.video.vtm.go/resources/lib/modules/player.py", line 56, in play
                                                       resolved_stream = self._stream.get_stream(category, item)
                                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                     File "/storage/.kodi/addons/plugin.video.vtm.go/resources/lib/vtmgo/vtmgostream.py", line 43, in get_stream
                                                       video_info = self._get_video_info(stream_type, stream_id, player_token)
                                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                     File "/storage/.kodi/addons/plugin.video.vtm.go/resources/lib/vtmgo/vtmgostream.py", line 164, in _get_video_info
                                                       response = util.http_post(url,
                                                                  ^^^^^^^^^^^^^^^^^^^
                                                     File "/storage/.kodi/addons/plugin.video.vtm.go/resources/lib/vtmgo/util.py", line 81, in http_post
                                                       return _request('POST', url=url, params=params, form=form, data=data, token=token, profile=profile, headers=headers)
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                     File "/storage/.kodi/addons/plugin.video.vtm.go/resources/lib/vtmgo/util.py", line 188, in _request
                                                       response.raise_for_status()
                                                     File "/storage/.kodi/addons/script.module.requests/lib/requests/models.py", line 1021, in raise_for_status
                                                       raise HTTPError(http_error_msg, response=self)
                                                   requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://videoplayer-service.dpgmedia.net/play-config/episodes/ce74ce22-8971-4411-be3a-c96e0d265aa4?startPosition=0.0&autoPlay=true
                                                   -->End of Python script error report<--

they have definitely changed their API big time.

@davidbe
Copy link

davidbe commented Jul 8, 2024

@Firomanio that's why we need to know what calls the vtmgo-app on android perform and using mitmproxy seems to be a way to go... if you can get it set up, ofcourse :-/

@coreflake1
Copy link

@davidbe

I guess what could work as well is to setup wireshark on a Raspberry pi (or similar), put it in AP mode, enable monitoring in wireshark and having the android phone connect to the PI wifi and use the internet over the PI LAN port.

That way we should be able to see all communication from the VTMGO app no ?

@henkv1
Copy link

henkv1 commented Jul 10, 2024

I forked this repo and fixed some things. Not everything works yet, but it is a start. Please test: https://github.com/henkv1/plugin.video.vtm.go.git

@Firomanio
Copy link

The first tests look promising.
Thanks @henkv1

@trick72
Copy link

trick72 commented Jul 11, 2024

I really appreciate your efforts to fix this @henkv1. Many thanks!!!!!

@michaelarnauts
Copy link
Collaborator

@henkv1 and @davidbe Awesome work!

I managed to get my mitmproxy setup working again, and made some changes in a branch that fixes listings and Movie/Program playback.

See #388

I took a look at the repo of @henkv1 and the changes look similar.

My branch still needs a lot of testing and cleanup though, but you can already try it out.

@coreflake1
Copy link

@michaelarnauts

I just tried the adapted plugin from your new branch but what should (not) work in this branch ?

Livestreams seem to be working, but listings for programs/movies and search are still broken on my end it seems.

@michaelarnauts
Copy link
Collaborator

@michaelarnauts

I just tried the adapted plugin from your new branch but what should (not) work in this branch ?

Livestreams seem to be working, but listings for programs/movies and search are still broken on my end it seems.

Listings should work. I've tried the recommendations and the Movie listings. Live TV also worked. I didn't try search.

@davidbe
Copy link

davidbe commented Jul 11, 2024

@michaelarnauts

I just tried the adapted plugin from your new branch but what should (not) work in this branch ?

Livestreams seem to be working, but listings for programs/movies and search are still broken on my end it seems.

Be sure to clear cache first, always a good thing to do when something seems to be wrong.

@michaelarnauts letting family testing it now :-) Thanks @henkv1 and @michaelarnauts very much!

@wim63
Copy link
Author

wim63 commented Jul 11, 2024

I tried it also and the livestream is working perfectly so thank you for your helping out in this important issue all those things are solvablelike you see. watching qmusic for instance works flawlessly also swapping channels is very well implemented again.
Many thanks for this already just need to see if video on demand also already is fixed but that can wait all little while for my instance unless you all have a soon fix for it...... kind regards wim pauwels sorry for late response but i had a busy time till now

@wim63
Copy link
Author

wim63 commented Jul 11, 2024

in addition to my previous testing post i can confirm that you can also play from within the tv guide on the plugin of this vtmgo fixed plugin programmes that arre on demand to be seen so if you pres on a not live streamed yet listed programme like slisse en cesar for instance when it is not streaming but in the list a few hours later towards the live programme, you can play the entire programme so also that is on demand fixed in the plugin. so many thanks for fixing that too.! wannea thak everyboday to make it work again! kind reagards again to all of you from Wim pauwels

@SirSFL
Copy link

SirSFL commented Jul 12, 2024

@michaelarnauts
I just tried the adapted plugin from your new branch but what should (not) work in this branch ?
Livestreams seem to be working, but listings for programs/movies and search are still broken on my end it seems.

Listings should work. I've tried the recommendations and the Movie listings. Live TV also worked. I didn't try search.

Thank you all for the hard work in rewriting the code. For what I tested, it worked flawlessly
I followed a bit in the background. I’m good with computers and coding but I’ve never done some of the things that passed by here 😄

I wish I had more time to pick up programming again 🙈

@trick72
Copy link

trick72 commented Jul 13, 2024

Thanks for the hard work. I'm glad it got fixed again. How can I use this new version, however? I usually install updates via the KODI ADD-ONS. (RPI 5 with LIBREELEC)? Should I copy it manually now?

@SirSFL
Copy link

SirSFL commented Jul 13, 2024

Thanks for the hard work. I'm glad it got fixed again. How can I use this new version, however? I usually install updates via the KODI ADD-ONS. (RPI 5 with LIBREELEC)? Should I copy it manually now?

Yes, you have to do it manually:

@Clyde72
Copy link

Clyde72 commented Jul 13, 2024

Thx to all the contributors for their effort on this one 🙏. Unfortunately I am not a programmer so I followed the process passively. Trying to grasp the logic behind the addons' functioning.

@trick72
Copy link

trick72 commented Jul 13, 2024

Beautiful. It works again !!! KODI (Raspberry pi5 with libreElec). Again, MANY thanks!!!!!

@henkv1
Copy link

henkv1 commented Jul 13, 2024

Thank you @michaelarnauts . It works well. Only thing I miss is the geoblocked tag (I live in the Netherlands).
I noticed that it was removed from the API, so I tried to use the overlayImageUrl to detect the geoblocked status.
see: api-17...henkv1:plugin.video.vtm.go:api-17
Maybe there is a better way to detect this. But this seems to work for now.

@davidbe
Copy link

davidbe commented Jul 13, 2024

@henkv1 , I saw too that you were using geoblock. I was not really sure whether it was a geoblock or mere a difference between 'vtmgo available free', VTMGo+ (paid) and Streamz (paid).
I'd like to see when something is paid - just adding a '+'-sign to the title would be enough.

Edit: the 'portraitTeaserOverlayImageUrl' is an image overlaying the program's image with the icons of plus or Streamz.

@SirSFL
Copy link

SirSFL commented Jul 13, 2024

@davidbe never noticed any Streamz files in VTMGO.
I always use the separate Streamz add-on (which also doesn’t work anymore)

@michaelarnauts
Copy link
Collaborator

I think indeed the best way is to check the URL of the overlay to indicate if it's geoblocked, VTM+ of streamz... I might add this when I find a bit of free time.

Also, the backend of the vtmgo and streamz service is almost identical, so the same changes as this add-on can be done there. I don't have a streamz-subscription myself anymore, so that makes it harder to test this.

@Firomanio

This comment was marked as resolved.

@henkv1
Copy link

henkv1 commented Jul 14, 2024

@davidbe I added the streamz and vtmgo+ tags in my repo. You can check it out.

@trick72
Copy link

trick72 commented Jul 14, 2024

One think I noticed on KODI on librelec on a RPI 5 is that when after a played program is finished, I see the "wheel" spinning. After a program is played (or stopped) it should go back to the episode listing, but it just seems to 'hang' on the spinning wheel. When the wheel is spinning and I push buttons I hear still the sound effects of the buttons so the KODI is not really hanging but the only thing I can do is a reboot. When I leave the wheel running for several minutes it sometimes goes back but than I'm out of the VTM addon and back in the main "VIDEOS" screen. When I start a program for a few minutes and STOP it, it does go back imediately to the episode list. It's only when the program is played for a long time (to the end) that it hangs. This behaviour was already there in the "old" version of VTM GO (it didn't do it in the VRT and PLAY addons). But it is still here in the new version. Not sure if this is a KODI issue or an add-on issue. Does anyone else experience this?

@badoneti
Copy link

I know works aren't probably finished yet: I have installed henkv1 latest code and tried to watch a movie.
I assume the intermediate click is now needed to get to the actual movie, no big deal.
More disturbing was that after playing a minute or so the audio continued while the video froze. Anyone having same experience?
I'm running on LibreElec 12.0 generic

@davidbe
Copy link

davidbe commented Jul 16, 2024

@badoneti , I have not the same issue. Everything runs without an issue. I'm using @michaelarnauts api-17 branch: https://github.com/add-ons/plugin.video.vtm.go/tree/api-17
Using OSMC on VeroV.

@trick72
Copy link

trick72 commented Jul 16, 2024

after playing a minute or so the audio continued while the video froze. Anyone having same experience? I'm running on LibreElec 12.0 generic

What I do notice when starting a program in VTM go, it first starts with a low quality image, and then after about 2 minutes it automatically goes to a good high resolution image. Maybe at that point is where your video freezes? I think this behaviour has something to do with the setting "Maximum Bandwith (Kbps)" in the VTM go plugin settings (in the "afspelen" menu). This is default 0 which probably means "automatic". Maybe try to add a value in there (like 1024) and see if this makes a difference because maybe this "automatic" behaviour causes your freeze.

@badoneti
Copy link

Thanks for the suggestion. So I tested a bit more, this time explicitly using the branch mentioned by @davidbe

  1. I reproduced the original problem with default settings. Problem confirmed at 0:33 running the movie Baby Driver.
  2. Then I changed the setting as suggested by @trick72 to 1024 kbps and this ran without problems.
  3. Then given the quality wasn't optimal, I tested again with higher bandwith and the problem reappeared. Same timing.
  4. So I tried again several values of the bandwith and finally ended up having the same video freeze while sound continued, even when setting the value to 1024 again.

Perhaps the logfile can help identifying the cause and whether it is specific to this movie or more general

2024-07-16 18:57:42.288 T:1681 warning : Setting most video properties through ListItem.setInfo() is deprecated and might be removed in future Kodi versions. Please use the respective setter in InfoTagVideo.
2024-07-16 18:57:42.288 T:1681 warning : ListItem.addStreamInfo() is deprecated and might be removed in future Kodi versions. Please use InfoTagVideo.addVideoStream(), InfoTagVideo.addAudioStream() and InfoTagVideo.addSubtitleStream().
2024-07-16 18:57:42.391 T:1034 info : VideoPlayer::OpenFile: plugin://plugin.video.vtm.go/play/catalog/movies/73dc8150-191e-4be8-ac25-a7d0646d8a43
2024-07-16 18:57:42.392 T:8337 warning : CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
2024-07-16 18:57:42.393 T:8337 info : Creating InputStream
2024-07-16 18:57:42.394 T:8337 warning : AddOnLog: inputstream.adaptive: Warning "inputstream.adaptive.manifest_type" property is deprecated and will be removed next Kodi version, the manifest type is now automatically detected.
If you are using a proxy remember to add the appropriate "content-type" header to the HTTP manifest response
See Wiki page "How to provide custom manifest/license" to learn more about it.
2024-07-16 18:57:42.399 T:8337 info : AddOnLog: inputstream.adaptive: [Repr. chooser] Resolution set: 1920x1080, max allowed: 1920x1080, Adjust refresh rate: 0
2024-07-16 18:57:42.705 T:8337 info : AddOnLog: inputstream.adaptive: Manifest successfully parsed (Periods: 1, Streams in first period: 2, Type: VOD)
2024-07-16 18:57:44.636 T:8337 info : Creating Demuxer
2024-07-16 18:57:44.636 T:8337 info : Opening stream: 1001 source: 256
2024-07-16 18:57:44.863 T:8337 info : Creating video codec with codec id: 27
2024-07-16 18:57:44.863 T:8337 info : CDVDVideoCodecFFmpeg::Open() Using codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
2024-07-16 18:57:44.868 T:8337 info : Creating video thread
2024-07-16 18:57:44.869 T:8343 info : running thread: video_thread
2024-07-16 18:57:44.872 T:8337 info : Opening stream: 1002 source: 256
2024-07-16 18:57:45.105 T:8337 info : Finding audio codec for: 86018
2024-07-16 18:57:45.111 T:8337 info : CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac
2024-07-16 18:57:45.111 T:8337 info : OpenStream: Allowing max Out-Of-Sync Value of 10 ms
2024-07-16 18:57:45.111 T:8337 info : Creating audio thread
2024-07-16 18:57:45.112 T:8345 info : running thread: CVideoPlayerAudio::Process()
2024-07-16 18:57:45.114 T:8337 info : Opening stream: 0 source: 1024
2024-07-16 18:57:45.116 T:8337 info : CDVDSubtitlesLibass: Using libass version 1701000
2024-07-16 18:57:45.116 T:8337 info : CDVDSubtitlesLibass: Creating ASS library structure
2024-07-16 18:57:45.116 T:8337 info : CDVDSubtitlesLibass: Initializing ASS Renderer
2024-07-16 18:57:45.117 T:8337 info : CDVDSubtitlesLibass: Initializing ASS library font settings
2024-07-16 18:57:45.170 T:8337 info : CDVDSubtitlesLibass: Creating new ASS track
2024-07-16 18:57:45.540 T:8343 error : libva error: /usr/lib/dri/iHD_drv_video.so init failed
2024-07-16 18:57:45.540 T:8345 info : Creating audio stream (codec id: 86018, channels: 2, sample rate: 48000, no pass-through)
2024-07-16 18:57:45.544 T:8353 info : COutput::OnStartup: Output Thread created
2024-07-16 18:57:45.552 T:1046 info : CActiveAESink::OpenSink - initialize sink
2024-07-16 18:57:45.639 T:1034 info : GLES: Selecting single pass rendering
2024-07-16 18:57:45.639 T:1034 info : GLES: Selecting YUV 2 RGB shader
2024-07-16 18:57:45.752 T:1046 info : CAESinkALSA::Initialize - Attempting to open device "default"
2024-07-16 18:57:45.756 T:1046 info : CAESinkALSA::Initialize - Opened device "default"
2024-07-16 18:57:45.756 T:1046 info : CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
2024-07-16 18:57:45.757 T:1046 info : CAESinkALSA::InitializeHW - Using data format AE_FMT_S24NE4
2024-07-16 18:57:46.174 T:8343 info : CDVDVideoCodecFFmpeg::CDropControl: calculated diff time: 40000
2024-07-16 18:58:09.589 T:8337 info : Opening stream: 1001 source: 256
2024-07-16 18:58:11.088 T:8337 info : Creating video codec with codec id: 27
2024-07-16 18:58:11.088 T:8337 info : AddOnLog: inputstream.adaptive: VideoCodec::Open
2024-07-16 18:58:11.089 T:8337 warning : AddOnLog: inputstream.adaptive: ToCdmVideoCodecProfile: Unknown codec profile 0
2024-07-16 18:58:11.140 T:8337 info : Opening stream: 1002 source: 256
2024-07-16 18:58:11.141 T:8337 info : Opening stream: 0 source: 1024
2024-07-16 18:58:15.160 T:8345 info : ProcessDecoderOutput: Changed max allowed Out-Of-Sync value to 42 ms due self-learning
2024-07-16 18:58:17.859 T:8343 error : AddOnLog: inputstream.adaptive: DecryptAndDecodeVideo: Returned CDM status kNoKey for key E1D924143A8D30D9A59CFBC5B0CC9DAA
2024-07-16 18:58:27.032 T:1034 info : Skipped 442 duplicate messages..

@SirSFL
Copy link

SirSFL commented Jul 16, 2024

@badoneti , I have not the same issue. Everything runs without an issue. I'm using @michaelarnauts api-17 branch: https://github.com/add-ons/plugin.video.vtm.go/tree/api-17 Using OSMC on VeroV.

I’m also running the Michaelarnauts branch without any problems!

@wim63
Copy link
Author

wim63 commented Aug 15, 2024

hallo there again i wanted to say that i recently installed the latest version api17 update but in this update you telling me that qmusic and joe live streams do work but in fact they dont so my question is can you fix the streams again? it just tellls me on both channels that vtmgo doenst find the stream. or jus in shot it says error.

thanks in advance

kind regards wim

@M4stakilla
Copy link

Thanks @davidbe for pointing me to this issue. Manually installing api17 from zip did make it work again.

Can somebody explain me though why this fix is not inserted into a new version v1.4.5 of the plugin so that it can be fixed by the auto-update?

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

No branches or pull requests