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

MythTV V34-Pre incompatibility #209

Open
bennettpeter opened this issue Jul 26, 2023 · 9 comments
Open

MythTV V34-Pre incompatibility #209

bennettpeter opened this issue Jul 26, 2023 · 9 comments
Assignees

Comments

@bennettpeter
Copy link

We have rewritten the web server and service APIS in MythTV on port 6544. The service APIS have the same parameters and responses as before. There are small enhancements but nothing that should make them incompatible.

With the latest master of MythTV, Kodi successfully connects to mythbackend. However it does not retrieve any channels or guide. It does retrieve the recordings and can play them.

Kodi displays a message saying that it is retrieving channels but does not get any.

It calls Channel/GetVideoSourceList followed by Channel/GetChannelInfoList twice, then makes these three calls again many times. I assume that there is something in the response that it cannot handle. All of these calls are successful on the mythbackend side.

The old web server code is temporarily still available in the code at port 6550. This will stop working at some time in the future, probably before we release v34. Kodi connects correctly and gets the channels if you specify the port as 6550.

I can work with you to identify the problem and if necessary I will fix any errors in the mythbackend API code that may the cause.

Let me know if there is any way I can help with the debugging and fixing.

@janbar
Copy link
Owner

janbar commented Aug 9, 2023

To be investigated. Soon I will upgrade my mythtv source to see what happens ... Thanks for the report.

@janbar
Copy link
Owner

janbar commented Aug 12, 2023

I started to investigate and I found an incompatibility with the service v2 (using JSON content). Previously from service v1 all data are returned as "string" type, even number or boolean; Now service v2 provides the right type of the data.

V1:
"MplexId": "0", "ServiceId": "0", "ATSCMajorChan": "0", "ATSCMinorChan": "0", "Format": "", "FrequencyId": "", "FineTune": "0", "ChanFilters": "", "SourceId": "0", "InputId": "0", "CommFree": "false", "UseEIT": "false", "Visible": "true",

V2:
"MplexId": 0, "ServiceId": 0, "ATSCMajorChan": 0, "ATSCMinorChan": 0, "Format": null, "FrequencyId": null, "FineTune": 0, "ChanFilters": null, "SourceId": 0, "InputId": 0, "CommFree": false, "UseEIT": false, "Visible": true,

For now the code check the type for "string" as expected for all fields from service v1.

The service v2 seems to be more compliant providing data with the expected type. But the compatibility is broken. I will make the required changes to handle this in the next release ...

@janbar
Copy link
Owner

janbar commented Aug 13, 2023

I fixed code parsing JSON values and now the data type check is done. Service v1 still working because the old behavior is used when JSON values are strings (in this case data values are converted to the right type according to the wsdl).
The targeted release is 20.4.0, and it will be released when I will complete testing at home.

@janbar
Copy link
Owner

janbar commented Aug 15, 2023

The fixes have been released by the version 20.4.0.

@angelaschmid
Copy link

I updated MythTV with a December 1th 2023 commit: MythTV/mythtv@b47e464

With 21.0.2 installed I do not receive guide and channel information, with both port 6544 and 6550.
Recordings and timers are working.

With MythTV "http" logging I see the incoming requests (port 6550):
GetChannelInfoList : GET /Channel/GetChannelInfoList?Details=true&OnlyVisible=true&SourceID=1
GetChannelInfoList : GET /Channel/GetChannelInfoList?Details=true&OnlyVisible=true&SourceID=3
ServiceHost::ProcessRequest: version : GET /Guide/version HTTP/1.1
But no further Guide requests, maybe they do not get debugged.
GET /Guide/version, returns: "2.4"

I was unable to upgrade to 21.0.2 from 20.x, so I reinstalled Kodi. Strange enough, in the Kodi Information it shows that some 200 channels exist.

The fixes have been released by the version 20.4.0.
Which of the two ports is preferred and/or supported?

Up to which version MythTV version (or better commit) is 21.0.2 tested?

Has somebody have it working, with which Plugin version and MythTV version/commit.

@janbar
Copy link
Owner

janbar commented Dec 16, 2023

The last test was made using the commit 29e5a97b6593537d05b01d4573954687a5d32efc. (Oct 25 2023).

I guess the structure of the guide response has been changed enough to break the client.

@angelaschmid
Copy link

Thanks for your quick response.

It's working on port 6544.

As I reinstalled Kodi, due to the updating problem, for sure I restarted Kodi some 20 times and another 7 times after I wrote my comment, as I was searching to disable the notifications. I was really astonished it started loading the guide data (and channels).

During that searching I also moved the port back from 6550 to 6544, maybe that kicked the loading at one time.

@janbar
Copy link
Owner

janbar commented Dec 16, 2023

I tested with the latest master of MythTV, and it works as expected, even on port 6550.
There is an issue elsewhere ... Could be a buffer overflow ; How many channel are configured ?

For now, I use Kodi 20 to validate the addons. The source code is the same for Kodi 21, therefore no need to upgrade Kodi at this time.

@angelaschmid
Copy link

Kodi is/was 20.2 I upgraded Kodi Myth plugin from 20.x to 21.0.2.

I have a total of 270 channels, 212 channels visible. 141 DVB channels.
I have 71 IPTV channels which I added a couple of months ago, to have a look in MythFrontend how it works.
Maybe it already didn't work from that time. Are they cached and survive a restart from Kodi, or do they have to be freshly loaded at start?
I mostly use the "recently played channels", so I have not used channels list explicitly for a longer time.

I am not sure if I had the last couple of months guide data, as I do barely use it. The IPTV channels do not carry guide data.
Is the guide data only loaded for the channels which are successfully loaded?

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

No branches or pull requests

3 participants