Skip to content

Improve login recovery, add experimental native archive streaming, and add Docker build support#14

Open
cheirekov wants to merge 4 commits intonirvana-7777:Omegafrom
cheirekov:Omega
Open

Improve login recovery, add experimental native archive streaming, and add Docker build support#14
cheirekov wants to merge 4 commits intonirvana-7777:Omegafrom
cheirekov:Omega

Conversation

@cheirekov
Copy link
Copy Markdown

Summary

This PR improves three main areas of the addon:

  • more reliable login/channel loading, especially after stale stored device state
  • experimental native archive streaming with much better replay/EPG playback behavior
  • Docker-based build scripts for multiple Linux and Android targets

Login and channel loading fixes

Some installations could fail to load channels even with correct credentials because stored web device state became stale and the addon kept hitting 401 errors on the EON API.

This PR improves the auth flow so the addon can recover more reliably when previously saved device registration is no longer valid.

Result

  • channel loading is more reliable after reinstall / device reuse
  • Linux and Android setups recover better from stale saved auth/device state
  • fewer cases where the addon appears configured correctly but loads no channels

Experimental native archive streaming

This PR adds an experimental native archive streaming mode for replay/archive playback.

The main goal is to improve archive playback from EPG items, because the standard inputstream-based path was limited by the way replay manifests are exposed by the backend.

What this improves

  • finished archive programmes can be played and seeked more reliably
  • seeking inside archive playback is much more accurate
  • EPG -> Play programme for already-started events now behaves as a growing replay window
  • the experimental mode is visible in addon settings and can be enabled explicitly

Notes

  • this path is still experimental by design
  • direct live channel Switch behavior is intentionally left on the normal live playback path
  • the main focus here is archive / replay / EPG programme playback

Build system / packaging

This PR adds Docker-based build support so the addon can be built reproducibly without requiring local system package installation.

Added build coverage

  • Linux x86_64
  • Linux armv7
  • Linux aarch64
  • Android aarch64
  • Android armv7

There is also support for Nexus-compatible packaging/building needed for some older Linux ARM devices.

Compatibility fixes

During testing on several Android and Linux devices, some extra compatibility fixes were needed:

  • derive inputstream.adaptive minimum version from the target Kodi major version
  • pin Android builds to NDK/API combinations that match Kodi 21.2 more reliably
  • remove stringstream-based code paths that caused runtime loading issues on Android ARMv7
  • ignore bogus initial archive seek requests until the native timeline is ready

Testing

Tested on multiple real devices/boxes, including:

  • Linux Kodi 21.x
  • Android Kodi 21.2 aarch64
  • Android Kodi 21.2 armv7
  • Linux Kodi 20.2 / Nexus on ARMv7

Verified scenarios include:

  • login and channel loading
  • finished archive playback from EPG
  • already-started programme playback from EPG
  • archive seeking backward/forward
  • package loading on Android ARMv7

Known limitations

  • direct live channel Switch does not yet use the experimental archive/timeshift path
  • next/previous programme navigation around archive playback can still be inconsistent in some cases
  • the native archive mode should still be treated as experimental

	modified:   pvr.eon/resources/language/resource.language.bg_BG/strings.po
	modified:   pvr.eon/resources/language/resource.language.de_de/strings.po
	modified:   pvr.eon/resources/language/resource.language.en_gb/strings.po
	modified:   pvr.eon/resources/language/resource.language.en_us/strings.po
	modified:   pvr.eon/resources/settings.xml
	modified:   src/PVREon.cpp
	modified:   src/PVREon.h
	modified:   src/Settings.cpp
	modified:   src/Settings.h
	modified:   src/http/Curl.cpp
	modified:   src/http/HttpClient.cpp
	new file:   tools/debug/analyze-eon-har.sh
	new file:   tools/docker/android-aarch64.Dockerfile
	new file:   tools/docker/build-android-aarch64.sh
	new file:   tools/docker/build-linux-amd64.sh
	new file:   tools/docker/container-build-android-aarch64.sh
	new file:   tools/docker/container-build-linux.sh
	new file:   tools/docker/linux-amd64.Dockerfile
The root cause was not the password payload. Vivacom’s live broker brand list changed order, and the addon was still treating the provider setting as a raw array index. In current live data, Vivacom is brand index 2, but the addon setting for Vivacom is still 3, so the addon was resolving Nova’s forthnet API base instead of Vivacom’s. I patched PVREon.cpp (line 206) and PVREon.cpp (line 412) to resolve providers by stable brand identifier (vivacom) instead of current broker position. I also verified live auth against the real Vivacom base: device registration, password token exchange, v1/sp, and v1/households all succeed there, and fail on the wrongly resolved forthnet base.
@cheirekov
Copy link
Copy Markdown
Author

Fixed the auth regression.

@nirvana-7777
Copy link
Copy Markdown
Owner

Oh did not see this one before: Some tests are failing:
-- Build files have been written to: /home/runner/work/pvr.eon/pvr.eon/pvr.eon/build/pvr.eon-prefix/src/pvr.eon-build
[ 82%] Performing forcebuild step for 'pvr.eon'
Force build of pvr.eon
[ 88%] Performing build step for 'pvr.eon'
[ 10%] Building CXX object CMakeFiles/pvr.eon.dir/src/http/Curl.cpp.o
[ 20%] Building CXX object CMakeFiles/pvr.eon.dir/src/http/HttpClient.cpp.o
In file included from /home/runner/work/pvr.eon/pvr.eon/pvr.eon/src/http/HttpClient.cpp:1:
/home/runner/work/pvr.eon/pvr.eon/pvr.eon/src/http/HttpClient.h:9:7: warning: ‘HttpClient’ declared with greater visibility than the type of its field ‘HttpClient::m_settings’ [-Wattributes]
9 | class HttpClient
| ^~~~~~~~~~
[ 30%] Building CXX object CMakeFiles/pvr.eon.dir/src/SHA256.cpp.o
[ 40%] Building CXX object CMakeFiles/pvr.eon.dir/src/Base64.cpp.o
[ 50%] Building C object CMakeFiles/pvr.eon.dir/src/aes.c.o
[ 60%] Building C object CMakeFiles/pvr.eon.dir/src/pkcs7_padding.c.o
[ 70%] Building CXX object CMakeFiles/pvr.eon.dir/src/Utils.cpp.o
[ 80%] Building CXX object CMakeFiles/pvr.eon.dir/src/Settings.cpp.o
[ 90%] Building CXX object CMakeFiles/pvr.eon.dir/src/PVREon.cpp.o
In file included from /home/runner/work/pvr.eon/pvr.eon/pvr.eon/src/PVREon.h:15,
from /home/runner/work/pvr.eon/pvr.eon/pvr.eon/src/PVREon.cpp:9:
/home/runner/work/pvr.eon/pvr.eon/pvr.eon/src/http/HttpClient.h:9:7: warning: ‘HttpClient’ declared with greater visibility than the type of its field ‘HttpClient::m_settings’ [-Wattributes]
9 | class HttpClient
| ^~~~~~~~~~
In file included from /home/runner/work/pvr.eon/pvr.eon/pvr.eon/src/PVREon.cpp:9:
/home/runner/work/pvr.eon/pvr.eon/pvr.eon/src/PVREon.h:184:13: error: ‘PVR_ERROR CPVREon::GetChannelStreamProperties(const kodi::addon::PVRChannel&, std::vectorkodi::addon::PVRStreamProperty&)’ marked ‘override’, but does not override
184 | PVR_ERROR GetChannelStreamProperties(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
make[5]: *** [CMakeFiles/pvr.eon.dir/build.make:191: CMakeFiles/pvr.eon.dir/src/PVREon.cpp.o] Error 1
make[4]: *** [CMakeFiles/Makefile2:120: CMakeFiles/pvr.eon.dir/all] Error 2
make[3]: *** [Makefile:156: all] Error 2
make[2]: *** [CMakeFiles/pvr.eon.dir/build.make:88: pvr.eon-prefix/src/pvr.eon-stamp/pvr.eon-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:148: CMakeFiles/pvr.eon.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
Error: Process completed with exit code 2.

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

Successfully merging this pull request may close these issues.

2 participants