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

updates.py: use update-system script if available #298

Draft
wants to merge 30 commits into
base: master
Choose a base branch
from

Conversation

antonlacon
Copy link
Contributor

This changes the automatic check for updates to use /usr/bin/update-system if it's present. If not, then it falls back to asking the server for update information (current practice). update-system's output to include the checksum of the file intended to be downloaded. The addon doesn't do anything with it yet.

The other minor bits are some cleanups inside the function.

Needs LibreELEC/LibreELEC.tv#7540 to see new behaviour.

Replaces #276.

@CvH CvH added the LE 12.0 label May 19, 2023
@lrusak
Copy link
Member

lrusak commented May 24, 2023

I would rather not call an external script. It should be integrated as a python import instead. Then if you want the cli script you can interface with that also.

@antonlacon
Copy link
Contributor Author

antonlacon commented Oct 3, 2023

This is based on #301, #303, and #307. The relevant commits are 93d4ef1 and 747036a. Draft until other PRs merged.

@antonlacon antonlacon force-pushed the auto-update branch 2 times, most recently from 2df6360 to 1536689 Compare November 13, 2023 20:29
General review and cleanup of issues pointed out by pylint:

unexpected indent
could use f-strings
not inializing variables in init
redefining builtins
too broad exceptions
unneeded elses after returns
unneeded parantheses
== instead of is in evaluating True/False
unused function parameters
unused imports

Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Addon will require Python >=3.9

Signed-off-by: Ian Leonard <antonlacon@gmail.com>
The release channel entry serves as a releases.json selector.

stable: use releases.libreelec.tv/releases.json (stable builds)
testing: use test.libreelec.tv/releases.json (nightly builds)
custom: use a user designated URL for releases.json

The 'custom' setting replaces the Show Custom Channels toggle.

Adds a set_release_channel() function to refresh available build channels.

Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Import /usr/bin/update-system and use it for the system's automated
update check. If there is no such script, it uses the server side
check.

Add an on/off toggle in the GUI with the default set to off.

Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants