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

Lost manual channel sorting and groups when network is down (kodi 18.9 & 19.1) #125

Closed
popy2k14 opened this issue Aug 25, 2021 · 12 comments
Closed

Comments

@popy2k14
Copy link

popy2k14 commented Aug 25, 2021

I am faced an issue where my manual channel sorting and groups are messed up, everytime kodi is started without network and zattoo addon. Because of lacking groups from my PVR addons i manually sorted and grouped them.
I have the options in kodi:

  • Synchronise channel groups with backend(s): false
  • Use channel order from backend(s): false

My "shitty" Android TV is rebooting every night and after reboot kodi was started (dont kow why but the log is from 04:XX where nobody was watching tv). After reading the log i saw that ethernet was down during start of kodi. Yes my shitty TV is disabling the ethernet interface after 10 min in standby.
On starting from the PVR clients IPTV Simple wanted to download the m3u and Zattoo to login, which both failed.

Then the kodi log states:

...
2021-08-24 19:17:47.818 T:15832   ERROR: AddOnLog: Zattoo PVR Client: Initialize session failed.
2021-08-24 19:17:47.818 T:15832   DEBUG: CAddonCallbacksAddon - QueueNotification - Zattoo PVR Client - Error Message : ''
2021-08-24 19:17:47.818 T:15832   DEBUG: Calling TransferSettings for: Zattoo PVR Client
2021-08-24 19:17:47.819 T:15832  NOTICE: PVR Manager: Starting
2021-08-24 19:17:47.819 T:15868   DEBUG: Thread PVRManager start, auto delete: false
2021-08-24 19:17:47.822 T:15869   DEBUG: Thread PVRGUIProgressHandler start, auto delete: true
2021-08-24 19:17:47.831 T:15868    INFO: Deleted TV channel 'ORF1 HD' from group 'Alle Kanäle'
2021-08-24 19:17:47.831 T:15868    INFO: Deleted TV channel 'ORF2 HD' from group 'Alle Kanäle'
2021-08-24 19:17:47.832 T:15868    INFO: Deleted TV channel 'Orf III HD' from group 'Alle Kanäle'
2021-08-24 19:17:47.832 T:15868    INFO: Deleted TV channel 'ATV HD' from group 'Alle Kanäle'
2021-08-24 19:17:47.832 T:15868    INFO: Deleted TV channel 'ATV 2 HD' from group 'Alle Kanäle'
2021-08-24 19:17:47.832 T:15868    INFO: Deleted TV channel 'Puls4 HD' from group 'Alle Kanäle'
...

After that finding i could reproduce the issue (in kodi 18.9 & 19.1):

  • set settings as above
  • manually sort channels and create goups
  • exit kodi
  • unplug ethernet
  • start kodi
  • wait a while, channels already gone
  • exit kodi
  • plug in ethernet and start kodi
  • the sorting and groups are messed up

Then there was a question from ksooo @ the kodi forums: https://forum.kodi.tv/showthread.php?tid=346324&pid=3056585#pid3056585

in case of network down the add-on should return PVR_ERROR_foo on any call. If it for example does not on GetChannels the result will be that PVR cpre deletes all locally cached channel entries, because the add-on returned no channels with status PVR_ERROR_NO_ERROR. Could you please check the add-on implementation?

Can you please check the result codes like requested?

As stated i can reproduce the issue and can test if you want.

Thank you

@rbuehlma
Copy link
Owner

This should be fixed with v19.7.10. Since Kodi 19 is available for quite some time now, there won't be a fix for Kodi 18.

Could you try if this fixes your issue?

@popy2k14
Copy link
Author

popy2k14 commented Aug 26, 2021

Thanks a lot for fixing the issue.
Sadly, i currently have no Android 19.1 setup which is not heavily in use by family members, all my ATV's are on 18.9, because of other issues in 19.1 (at least on my ATV's).
I have to solve those, before i can switch to 19.1.

But, i have an Windows 19.1 installation (for test purposes).
On this machine, i will try to reproduce the issue with the current release build and then, if it is solved, with your test build.

Another question (yes you answerd it already):
I know, from a developer standpoint, you dont want to hear that question (i am a dev too).
Your standard answer to the following question would be: just take the new version,
but i will ask it anyway :-)

If that issue is solved with your testbuild, is it possible todo an backport and build for kodi 18.9?

Thanks a lot

@popy2k14
Copy link
Author

I tried to reproduce the issue in windows with the older "pvr.zattoo-19.7.9.zip" & "pvr.zattoo-19.7.8.zip" but sadly, cant.
Kodi stucked on PVR manager starting, when windows is offline.
Will try to update one of my ATV kodi 18.9 installation to 19.1 just for this test and come back here.

@popy2k14
Copy link
Author

popy2k14 commented Aug 26, 2021

Here is a log from windows with newest 19.7.10 version when offline: https://paste.kodi.tv/arimumopaj.kodi

It seems that initialization of the plugin completly fails, see:

2021-08-26 20:59:30.454 T:14632   ERROR <general>: AddOnLog: pvr.zattoo: Open URL failed with -2.
2021-08-26 20:59:30.454 T:14632   ERROR <general>: AddOnLog: pvr.zattoo: Initialize session failed.
2021-08-26 20:59:30.454 T:14632   DEBUG <general>: Interface_General::ADDON::Interface_General::queue_notification - Zattoo PVR Client - Warning Message: ''
2021-08-26 20:59:30.454 T:14632   ERROR <general>: IAddonInstanceHandler::ADDON::IAddonInstanceHandler::CreateInstance: pvr.zattoo returned bad status "Lost Connection" during instance creation
2021-08-26 20:59:30.454 T:14632   ERROR <general>: PVR::CPVRClients::UpdateAddons: Failed to create add-on Zattoo PVR Client, status = 1

The test was done with 19.7.8, 19.7.9 & 19.7.10, with the same result (as in the log snippet above).

The good news: channels and groups are not deleted.
But after i am online again. i have to close kodi and restart it to get the addon working again.

I think my main issue was solved the way from 18.9 to 19.1 in the addon in "another" way (as descibed above).
But i think there should be no init error and some retry logic so it get's working after it's online again.

What do you think about this?

PS.: as stated, will try on ATV's as soon as possible.

@ksooo
Copy link
Collaborator

ksooo commented Aug 26, 2021

2021-08-26 20:59:30.454 T:14632 ERROR : IAddonInstanceHandler::ADDON::IAddonInstanceHandler::CreateInstance: pvr.zattoo returned bad status "Lost Connection" during instance creation

But after i am online again. i have to close kodi and restart it to get the addon working again.

It seems that the addon does not support "async connect"? If the addon returns an error upon addon instance creation, pvr core will never ever try to recreate the addon. See for example how pvr.hts handles connection losses.

@popy2k14
Copy link
Author

@rbuehlma
I have tested the new version on one of my andoid TVs and can't reproduce the issue.
So i think it's solved.

As @ksooo stated, an "async connect" would be nice. Is it possible to implement something like this?

@rbuehlma
Copy link
Owner

Thanks for testing and confirming the fix. I currently have no timeline when I will implement this feature but I am open for a PR. Luckily your are a dev as well ;)

@popy2k14
Copy link
Author

popy2k14 commented Aug 29, 2021

Thanks for coming back to me.
Sorry also not much time 😂

I tried to use 19.1 again on my ATVs but the GUI lags really, and not much time hunting it down. So my question, can you please build a 18.9 version with this fix?

Please.

@rbuehlma
Copy link
Owner

@popy2k14 could you try to install and run the version found here and report if this issue has been fixed?

https://jenkins.kodi.tv/view/Matrix%20Binary%20Addons/job/rbuehlma/job/pvr.zattoo/view/change-requests/job/PR-146/1/

The Builds are for Kodi 19 (Matrix)

@popy2k14
Copy link
Author

Sorry, don't have an Kodi setup anymore.

@rbuehlma
Copy link
Owner

Fixed with 19.7.13

@popy2k14
Copy link
Author

Thx, for fixing

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

3 participants