Kodi 17 broke multiple TVH client hack
#1
Hey,

I was very happy in Kodi 16 to get multiple instances of the TVH client running by renaming various folders to get 2 x TVH clients in Kodi. This is working great at the moment.

Unfortunately this seems to have been broken in Kodi 17 (also tested a Kodi 18 nightly and I get the same problem). Now when I do the same trick I end up with the channels duplicated twice from one of the TVH backends instead of the full channel listing from both.

I know this is probably unsupported behaviour but wondering if anyone else had luck with getting this working?

Thanks!
Reply
#2
Out of interest, why would you need two instances of TVH on the Kodi front end?
Reply
#3
(2017-09-14, 13:26)t2ffn Wrote: Out of interest, why would you need two instances of TVH on the Kodi front end?

I connect to TVH backends in 2 different countries Wink I have read stuff about combining them on the backend but that doesn't seem to be easy or well documented. I'd also, because of my setup, have to run the traffic from the external TVH over a Powerline-Ethernet connection which I want to avoid if possible.

Actually I'm going to try and play with the pvr.hts code a bit and see if I can get something working with regards to this (I haven't done any C++ for many years but will be fun playing around)
Reply
#4
If your tuners are DVB, you might see about setting up one as a Sat>IP server. Then add the server instance to the other, and use the Tvheadend instance where you added the server as your single backend in Kodi. (Alternatively, you can use something like minisatip as your server to reduce overhead.)
Reply
#5
(2017-09-14, 15:24)rpcameron Wrote: If your tuners are DVB, you might see about setting up one as a Sat>IP server. Then add the server instance to the other, and use the Tvheadend instance where you added the server as your single backend in Kodi. (Alternatively, you can use something like minisatip as your server to reduce overhead.)

Thanks for your reply - I started looking into the Sat>IP stuff but it seemed like a non-trivial workaround. Hacking around with the Kodi hts client is also a non-trivial workaround but is my preferred solution if I can get something working...
Reply
#6
Success!

After some light hacking around with the source code I managed to get 2x TVH clients working in Krypton 17.3 (and 17.4). It seems that the settings are accessed via a global instance / singleton and this was clashing when one has >1 pvr.hts client running (so the first client starts loading, then the second starts and effectively overwrites the first clients settings with it's own, as they share the same singleton. This meant that the guide has the channels duplicated from the last client that was loaded).

For now I've simply renamed the global static settings var (and the GetInstance function, not sure if this second part is necessary), compiled that and used it as the second pvr.hts client. Not a great fix - better would be to refactor the code so this global settings singleton isn't needed. I might look into that a bit when I get some time. But for now, all working Smile

If someone is interested in compiling the client themselves - here's the link to the branch where I made my changes (for pvr.hts version 3.4.24 - Kodi 17.3):
https://github.com/stuartjbrown/pvr.hts/...ple-client

Thanks!
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi 17 broke multiple TVH client hack0