kodi-pvr / pvr.stalker

A PVR Client that connects Kodi to Stalker Middleware
GNU General Public License v2.0
41 stars 64 forks source link

Stalker Client EPG off by one hour #210

Closed StefanRu1 closed 5 months ago

StefanRu1 commented 10 months ago

Hi,

I use the stalker plugin on Omega and it is working fine. I use Kodi on WEBOS.

But my EPG is off by one hour. So 20:15 is in EPG 21:15.

I do not use a seperate XMLTV URL. The timezone is Europe/Kiev, the standard setting.

I read that the timezone setting has no effect. But tried my timezone which is Europe/Berlin. Os Timezone is: CET +0100 But it is still off by 1 hour. Perhaps it is because of DST?

I use this version, which should be the newest delivered with Kodi; <addon id="pvr.stalker" version="21.0.0" name="Stalker Client" provider-name="Jamal Edey"> <requires> <import addon="kodi.binary.global.main" minversion="2.0.0" version="2.0.2"/> <import addon="kodi.binary.global.general" minversion="1.0.4" version="1.0.5"/> <import addon="kodi.binary.global.filesystem" minversion="1.1.7" version="1.1.8"/> <import addon="kodi.binary.global.tools" minversion="1.0.0" version="1.0.4"/> <import addon="kodi.binary.instance.pvr" minversion="8.2.0" version="8.3.0"/> </requires> <extension point="kodi.pvrclient" library_linux="pvr.stalker.so.21.0.0"/> <extension point="xbmc.addon.metadata"> <platform>linux</platform> <license>GPL-2.0-or-later</license> <source>https://github.com/kodi-pvr/pvr.stalker</source> <forum>https://forum.kodi.tv/forumdisplay.php?fid=234</forum>

I hope the timezone can get an effect or there would be a setting to shift EPG in +/- hours.

Thanks and best regards, Stefan

StefanRu1 commented 5 months ago

The problem is still there and i am not sure what to do. I checked the stalker coding and it uses DST.

I checked on my TV on console that the date setting is correct and it is: date Wed Jun 12 19:56:08 CEST 2024

This is the actual time here. So OS time is correct and timezone is CEST which seems fine.

Nevertheless in EPG every think is +1h. So a program which starts at 20:00 is shown at 21:00.

Any ideas what i can do?

Thanks, Stefan

phunkyfish commented 5 months ago

I checked the code and it just takes the epg start and end times directly from the API without modification.

it’s possible your device is adding an hour to the times and sending those I guess.

StefanRu1 commented 5 months ago

Hi, Thank you very much.

What exactly do you mean by my device? I think you do not mean the device KODI runs on, but the device that provides the data? KODI runs on WEBOS.

The source device for the data is my problem, I cannot change anything on the source device. But I have tested different devices and they all cause the same strange time difference.

I understand that it makes no sense to change anything if I am the only one having the problem. But maybe other people have the problem, in which case a value for the adjustment would be nice. If nothing is specified, everything stays as it is. If you use +/- seconds or hours in the UI, the times will be adjusted by that value.

Thanks and best regards, Stefan

phunkyfish commented 5 months ago

I could attempt to code up something to see if it works for you. But bear in mind that I don’t have a stalker device so you would be the sole tester for it.

phunkyfish commented 5 months ago

Please try a testbuild from here: https://jenkins.kodi.tv/blue/organizations/jenkins/kodi-pvr%2Fpvr.stalker/detail/PR-224/1/artifacts

Assuming this works, it will take a but of time to get it merged and released as the add-on is quite outdated. But let's see can we get something functional first.

StefanRu1 commented 5 months ago

Wow, thank you very much. I will test it and report back.

StefanRu1 commented 5 months ago

I am sorry, I tried to install the zip file but I get an error that the zip file cannot be installed because of an invalid file structure.

I have compared the zip file structure to other zips I can install and do not see anything that looks wrong. I chose to download "cmake/addons/build/zips/pvr.stalker+android-armv7/pvr.stalker-21.1.0.zip" because I have

android-armv7 in the addon.xml in the .kodi/addons/pvr.stalker folder. I use Kodi 21 Nightly on WebOS. So I manually replaced the files in .kodi/addons/pvr.stalker but I cannot see any new setting on the configuration UI. Can you help me what am i doing wrong? Thanks again, Stefan
ksooo commented 5 months ago

I chose to download "cmake/addons/build/zips/pvr.stalker+android-armv7/pvr.stalker-21.1.0.zip" because I have android-armv7 in the addon.xml in the .kodi/addons/pvr.stalker folder. I use Kodi 21 Nightly on WebOS

The zip you downloaded is for Android. If you are using WebOS this is the wrong zip.

StefanRu1 commented 5 months ago

Ok, thank you. Since I am not sure which zip to use for my LG WebOS, I installed the zip on my FireTV Stick.

It worked fine and I have the new option in the configuration.

I set the EPG time offset to -1 since my EPG time is +1 compared to real time. I deleted the EPG data from Kodi UI, I even restarted Kodi, I also tried other settings in EPG time shift like +1 and -2, but the time in EPG view does not change. It still is shown with +1 hour.

I also tried switching off the caching, but also no success.

Can you please check again? Can i help somehow?

Thanks a lot, Stefan

StefanRu1 commented 5 months ago

Here is also a screenshot of my settings. If it would help i can provide you also data for a stalker client, for testing. 20240614_134146

phunkyfish commented 5 months ago

So no matter what timeshift value you choose the time on the UI never changes? Even setting it to -10 or +10 hours?

StefanRu1 commented 5 months ago

Yes, exactly. A TV show starts here at 14:10. But Kodi shows me 15:10. That 15:10 is 1 hour too late. It never changes, no matter what EPG time shift I use.

I even disabled Stalker, cleaned up the EPG data, and re-enabled Stalker. Same problem. Somehow the EPG time shift does not seem to be taken into account?

Thanks and best regards, Stefan

phunkyfish commented 5 months ago

Ah, I see the problem. I changed the time in the wrong place. Will post a new build over the weekend.

StefanRu1 commented 5 months ago

Okay, perfect, thanks a lot!

phunkyfish commented 5 months ago

Can you try this build?

https://jenkins.kodi.tv/blue/organizations/jenkins/kodi-pvr%2Fpvr.stalker/detail/PR-224/6/artifacts

StefanRu1 commented 5 months ago

Hi,

Thanks, it works now the times are adjusted correctly. Tested on Fire TV Stick 4k.

Let me test a bit more, I will write a feedback here again.

Any idea which zip to use for WEBOS for LG TV's?

Thanks a lot, Stefan

phunkyfish commented 5 months ago

excellent!

You won’t be able to get this for webos until the change is merged and a new nightly build is ready I’m afraid.

webOs is new, and we don’t yet have a binary addon repo for it yet. Nor does the addon artefact get built like other platforms in Jenkins yet.

StefanRu1 commented 5 months ago

Hi,

Ok, no problem. I will install the next nightly after you merge the change.

Still works like a charm on my FireTV Stick.

Thanks again, Stefan

phunkyfish commented 5 months ago

@StefanRu1 can you try this new build please? https://jenkins.kodi.tv/blue/organizations/jenkins/kodi-pvr%2Fpvr.stalker/detail/PR-224/9/artifacts

The initial way I implemented this was hacky. The important thing about the new way is that the add-on now support multi-instance. So no more 5 portals under settings, you just create a new instance for each portal you have,

Please try it out (create multiple portals, access them all, remove portals etc.) and let me know how you get on. This has had no testing so it may not run at all!

StefanRu1 commented 5 months ago

Hi,

This sounds great and was on my wishlist as well. I will definitely give it a try tonight and post my feedback here.

Thanks a lot. Stefan

phunkyfish commented 5 months ago

Note that it wil only migrate the first portals settings. Any others you will need to configure manually.

StefanRu1 commented 5 months ago

Hi,

Ok I tested a bit. Adding and deleting addon configurations is working fine.

But the client always says "Authentication failed". But the data is working in the older version of the client. And I double checked that I entered the data correctly.

I have the feeling that somehow it is not getting the correct information.

Other small problems are:

Thanks and best regards, Stefan Empty_Einstellungen Authetification-Anmeldedaten Addon-Einstellungen

phunkyfish commented 5 months ago

Ok, first of all the addon settings should be empty, only the instance settings are required as all the values are instance specific. We could move the connection timeout to add-on settings if we choose, if you believe that should be set across instances and we don't require a different value for each instance.

If you can look at your log you should see a line similar to:

2024-06-21 08:41:41.842 T:4104225   error <general>: AddOnLog: pvr.stalker: Get: failed to open reqUrl=http://127.0.0.1/?type=stb&action=handshake|Cookie=mac%3d0%3a1A%3a79%3a00%3a00%3a00%3b%20stb_lang%3den%3b%20timezone%3dEurope%2fKiev&Referer=http%3a%2f%2f127.0.0.1%2f&X-User-Agent=Model%3a%20MAG250%3b%20Link%3a%20WiFi&User-Agent=Mozilla%2f5.0%20%28QtEmbedded%3b%20U%3b%20Linux%3b%20C%29%20AppleWebKit%2f533.3%20%28KHTML%2c%20like%20Gecko%29%20MAG200%20stbapp%20ver%3a%202%20rev%3a%20250%20Safari%2f533.3&Connection-Timeout=1

What you will likely see is all the defaults populated from settings. Just need to figure out why this happening instead of the values for each instance. It's just something I missed. So please confirm if you also see the defaults and then we continue debugging from there.

StefanRu1 commented 5 months ago

Hi,

yes i can confirm it is not using the entered data but default data. See: 2024-06-21 10:05:26.752 T:11142 error <general>: AddOnLog: pvr.stalker: Get: failed to open reqUrl=http://127.0.0.1/?type=stb&action=handshake|Cookie=mac%3d0%3a1A%3a79%3a00%3a00%3a00%3b%20stb_lang%3den%3b%20timezone%3dEurope%2fKiev&Referer=http%3a%2f%2f127.0.0.1%2f&X-User-Agent=Model%3a%20MAG250%3b%20Link%3a%20WiFi&User-Agent=Mozilla%2f5.0%20%28QtEmbedded%3b%20U%3b%20Linux%3b%20C%29%20AppleWebKit%2f533.3%20%28KHTML%2c%20like%20Gecko%29%20MAG200%20stbapp%20ver%3a%202%20rev%3a%20250%20Safari%2f533.3&Connection-Timeout=1 2024-06-21 10:05:26.752 T:11142 error <general>: AddOnLog: pvr.stalker: Execute: request failed 2024-06-21 10:05:26.752 T:11142 error <general>: AddOnLog: pvr.stalker: StalkerCall: api call failed 2024-06-21 10:05:26.752 T:11142 error <general>: AddOnLog: pvr.stalker: DoHandshake: STBHandshake failed

phunkyfish commented 5 months ago

Ok, think I have it fixed. Please try these builds: https://jenkins.kodi.tv/blue/organizations/jenkins/kodi-pvr%2Fpvr.stalker/detail/PR-224/10/artifacts

StefanRu1 commented 5 months ago

Hi,

Yes, you fixed it. I did a lot of testing now and it seems to work fine. It is great, it even works with more than one client enabled just fine.

I never had a problem with the connection time and I always leave it at the default of 5 seconds. So it does not matter to me, but maybe it is good to have the flexibility.

There is still the long text for the "Authentification Anmeldedaten" button. I would suggest to just write "Anmeldedaten". Or is this a translation error?

Would be fantastic if this makes it to the main branch so I can use it on my TV. Thanks a lot for all the improvements and please contact me if I can help by testing more things.

Best regards, Stefan

phunkyfish commented 5 months ago

Excellent, I’ll still need to do some cleanup on the PR so will give you another build in a few days to test.

I can’t update that translation string, only the English version which I have done now. If you want to update the translation you can do so via the kodi weblate. Connection timeout (seconds) should also be updated to Connection timeout as that now has the unit as part of the slider control.

StefanRu1 commented 5 months ago

Perfect, I suggested some translations in the Kodi weblate. I will also check all of them when I find some time. P.S.: Ok, i checked all texts and suggested some corrections.

Sure I will test again once you have done the cleanup.

Thanks again, Stefan

phunkyfish commented 5 months ago

Ok, this PR is ready for merge now. Can you test one last time to make sure everything is in order? It would be a good idea to delete `addon_data/pvr.stalker/instance-settings-*", confirm the first portal is correctly migrated and then setup the others.

https://jenkins.kodi.tv/blue/organizations/jenkins/kodi-pvr%2Fpvr.stalker/detail/PR-224/18/artifacts

I'll post on the forum too so users undersrtand they will need to manually configure portals other than the first one.

StefanRu1 commented 5 months ago

Hi,

I tested it and it works perfectly. Really great. I look forward to having it on my TV ;-)

If you need any help with testing in the future, please feel free to contact me.

Thanks again, Stefan

phunkyfish commented 5 months ago

Merged and released, thanks for all the testing!