aboutsummaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
Diffstat (limited to 'addons')
-rw-r--r--addons/service.xbmc.versioncheck/LICENSES/Apache-2.0.txt202
-rw-r--r--addons/service.xbmc.versioncheck/LICENSES/GPL-2.0-or-later.txt (renamed from addons/service.xbmc.versioncheck/LICENSE.txt)0
-rw-r--r--addons/service.xbmc.versioncheck/LICENSES/GPL-3.0-or-later.txt674
-rw-r--r--addons/service.xbmc.versioncheck/README.md6
-rw-r--r--addons/service.xbmc.versioncheck/addon.xml201
-rw-r--r--addons/service.xbmc.versioncheck/changelog.txt150
-rw-r--r--addons/service.xbmc.versioncheck/lib/__init__.py1
-rw-r--r--addons/service.xbmc.versioncheck/lib/aptdaemonhandler.py109
-rw-r--r--addons/service.xbmc.versioncheck/lib/common.py205
-rw-r--r--addons/service.xbmc.versioncheck/lib/jsoninterface.py59
-rw-r--r--addons/service.xbmc.versioncheck/lib/shellhandlerapt.py125
-rw-r--r--addons/service.xbmc.versioncheck/lib/versions.py127
-rw-r--r--addons/service.xbmc.versioncheck/lib/viewer.py103
-rw-r--r--addons/service.xbmc.versioncheck/resources/gotham-alpha_notice.txt7
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/Asturian/strings.po21
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/Georgian/strings.po21
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.af_za/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Afrikaans/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.am_et/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Amharic/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.ar_sa/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Arabic/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.be_by/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Belarusian/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.bg_bg/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Bulgarian/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.bs_ba/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Bosnian/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.ca_es/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Catalan/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.cs_cz/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Czech/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.cy_gb/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Welsh/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.da_dk/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Danish/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.de_de/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/German/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.el_gr/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Greek/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.en_au/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/English (Australia)/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.en_gb/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/English/strings.po)8
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.en_nz/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/English (New Zealand)/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.en_us/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/English (US)/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.eo/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Esperanto/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.es_ar/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Spanish (Argentina)/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.es_es/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Spanish/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.es_mx/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Spanish (Mexico)/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.et_ee/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Estonian/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.eu_es/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Basque/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.fa_af/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Persian/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.fa_ir/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Persian (Iran)/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.fi_fi/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Finnish/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.fo_fo/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Faroese/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.fr_ca/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/French (Canada)/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.fr_fr/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/French/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.gl_es/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Galician/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.he_il/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Hebrew/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.hi_in/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Hindi (Devanagiri)/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.hr_hr/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Croatian/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.hu_hu/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Hungarian/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.hy_am/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Armenian/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.id_id/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Indonesian/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.is_is/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Icelandic/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.it_it/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Italian/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.ja_jp/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Japanese/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.ko_kr/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Korean/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.lt_lt/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Lithuanian/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.lv_lv/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Latvian/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.mk_mk/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Macedonian/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.ml_in/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Malayalam/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.mn_mn/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Mongolian (Mongolia)/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.ms_my/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Malay/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.mt_mt/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Maltese/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.my_mm/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Burmese/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.nb_no/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Norwegian/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.nl_nl/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Dutch/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.pl_pl/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Polish/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.pt_br/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Portuguese (Brazil)/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.pt_pt/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Portuguese/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.ro_ro/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Romanian/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.ru_ru/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Russian/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.sk_sk/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Slovak/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.sl_si/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Slovenian/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.sq_al/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Albanian/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.sr_rs/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Serbian (Cyrillic)/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.sr_rs@latin/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Serbian/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.sv_se/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Swedish/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.ta_in/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Tamil (India)/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.th_th/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Thai/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.tr_tr/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Turkish/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.uk_ua/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Ukrainian/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.uz_uz/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Uzbek/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.vi_vn/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Vietnamese/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.zh_cn/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Chinese (Simple)/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/language/resource.language.zh_tw/strings.po (renamed from addons/service.xbmc.versioncheck/resources/language/Chinese (Traditional)/strings.po)0
-rw-r--r--addons/service.xbmc.versioncheck/resources/lib/__init__.py14
-rw-r--r--addons/service.xbmc.versioncheck/resources/lib/runner.py16
-rw-r--r--addons/service.xbmc.versioncheck/resources/lib/version_check/__init__.py16
-rw-r--r--addons/service.xbmc.versioncheck/resources/lib/version_check/apt_daemon_handler.py120
-rw-r--r--addons/service.xbmc.versioncheck/resources/lib/version_check/common.py288
-rw-r--r--addons/service.xbmc.versioncheck/resources/lib/version_check/distro/__init__.py10
-rw-r--r--addons/service.xbmc.versioncheck/resources/lib/version_check/distro/distro.py1216
-rw-r--r--addons/service.xbmc.versioncheck/resources/lib/version_check/handler.py95
-rw-r--r--addons/service.xbmc.versioncheck/resources/lib/version_check/json_interface.py67
-rw-r--r--addons/service.xbmc.versioncheck/resources/lib/version_check/service.py162
-rw-r--r--addons/service.xbmc.versioncheck/resources/lib/version_check/shell_handler_apt.py132
-rw-r--r--addons/service.xbmc.versioncheck/resources/lib/version_check/versions.py216
-rw-r--r--addons/service.xbmc.versioncheck/resources/lib/version_check/viewer.py159
-rw-r--r--addons/service.xbmc.versioncheck/resources/polkit/10-allow-update.pkla2
-rw-r--r--addons/service.xbmc.versioncheck/resources/polkit/README11
-rw-r--r--addons/service.xbmc.versioncheck/resources/settings.xml30
-rw-r--r--addons/service.xbmc.versioncheck/resources/versions.schema.txt214
-rw-r--r--addons/service.xbmc.versioncheck/resources/versions.txt134
-rw-r--r--addons/service.xbmc.versioncheck/service.py131
103 files changed, 3871 insertions, 1181 deletions
diff --git a/addons/service.xbmc.versioncheck/LICENSES/Apache-2.0.txt b/addons/service.xbmc.versioncheck/LICENSES/Apache-2.0.txt
new file mode 100644
index 0000000000..e06d208186
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/LICENSES/Apache-2.0.txt
@@ -0,0 +1,202 @@
+Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright {yyyy} {name of copyright owner}
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/addons/service.xbmc.versioncheck/LICENSE.txt b/addons/service.xbmc.versioncheck/LICENSES/GPL-2.0-or-later.txt
index ab123ffca1..ab123ffca1 100644
--- a/addons/service.xbmc.versioncheck/LICENSE.txt
+++ b/addons/service.xbmc.versioncheck/LICENSES/GPL-2.0-or-later.txt
diff --git a/addons/service.xbmc.versioncheck/LICENSES/GPL-3.0-or-later.txt b/addons/service.xbmc.versioncheck/LICENSES/GPL-3.0-or-later.txt
new file mode 100644
index 0000000000..f288702d2f
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/LICENSES/GPL-3.0-or-later.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<https://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<https://www.gnu.org/licenses/why-not-lgpl.html>.
diff --git a/addons/service.xbmc.versioncheck/README.md b/addons/service.xbmc.versioncheck/README.md
deleted file mode 100644
index fb153e0292..0000000000
--- a/addons/service.xbmc.versioncheck/README.md
+++ /dev/null
@@ -1,6 +0,0 @@
-Kodi Version Check service addon
-=========================
-
-This service checks the installed Kodi/XBMC version against the next available one and notifies you if there is a new version available.
-When a new version comes out the versions.txt should be updated to reflect the latest version available.
-When updating the version.txt always put latest release at the top since the list is read in chronological order.
diff --git a/addons/service.xbmc.versioncheck/addon.xml b/addons/service.xbmc.versioncheck/addon.xml
index 85f7081bdd..9d4114f153 100644
--- a/addons/service.xbmc.versioncheck/addon.xml
+++ b/addons/service.xbmc.versioncheck/addon.xml
@@ -1,119 +1,122 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="service.xbmc.versioncheck"
- name="Version Check"
- version="0.4.6"
- provider-name="Team Kodi">
+<addon id="service.xbmc.versioncheck" name="Version Check" version="0.5.9+matrix.1" provider-name="Team Kodi">
<requires>
- <import addon="xbmc.python" version="2.1.0"/>
+ <import addon="xbmc.python" version="3.0.0"/>
</requires>
- <extension point="xbmc.service" library="service.py" start="login"/>
+ <extension point="xbmc.service" library="resources/lib/runner.py"/>
<extension point="xbmc.addon.metadata">
- <summary lang="be">Kodi Version Check checks if you are running latest released version.</summary>
- <summary lang="bg">Проверява дали ползвате най-новата версия на Kodi.</summary>
- <summary lang="ca">Kodi Version Check comprova si està utilitzant la última versió publicada.</summary>
- <summary lang="cs">Kontrola verze Kodi, zkontroluje, zda používáte nejnovější vydanou verzi.</summary>
- <summary lang="da">Kodi undersøger om du benytter den nyeste version.</summary>
- <summary lang="de">Kodi Versionsprüfung prüft, ob die neuste Version von Kodi installiert ist.</summary>
- <summary lang="el">Ο Έλεγχος Έκδοσης Kodi εξετάζει αν έχετε την πιο πρόσφατη έκδοση του προγράμματος.</summary>
- <summary lang="en">Kodi Version Check checks if you are running latest released version.</summary>
+ <news>
+- add Kodi 18.9 release
+- fixup Kodi 19 pre alpha2 translatePath
+ </news>
+ <assets>
+ <icon>icon.png</icon>
+ </assets>
+ <summary lang="be_BY">Kodi Version Check checks if you are running latest released version.</summary>
+ <summary lang="bg_BG">Проверява дали ползвате най-новата версия на Kodi.</summary>
+ <summary lang="ca_ES">Kodi Version Check comprova si està utilitzant la última versió publicada.</summary>
+ <summary lang="cs_CZ">Kontrola verze Kodi, zkontroluje, zda používáte nejnovější vydanou verzi.</summary>
+ <summary lang="da_DK">Kodi undersøger om du benytter den nyeste version.</summary>
+ <summary lang="de_DE">Kodi Versionsprüfung prüft, ob die neuste Version von Kodi installiert ist.</summary>
+ <summary lang="el_GR">Ο Έλεγχος Έκδοσης Kodi εξετάζει αν έχετε την πιο πρόσφατη έκδοση του προγράμματος.</summary>
+ <summary lang="en_GB">Kodi Version Check checks if you are running latest released version.</summary>
<summary lang="en_NZ">Kodi Version Check checks if you are running latest released version.</summary>
<summary lang="en_US">Kodi Version Check checks if you are running latest released version.</summary>
- <summary lang="es">Kodi Version Check comprueba si está ejecutando la última versión de Kodi.</summary>
- <summary lang="es_MX">Comprobador de Version de Kodi comprueba si se esta ejecutando ultima version publicada.</summary>
- <summary lang="fi">Kodi Version Check tarkistaa onko käyttämäsi uusin versio.</summary>
- <summary lang="fr">Le contrôle de version de Kodi vérifie si la dernière version sortie est utilisée.</summary>
+ <summary lang="es_ES">Kodi Version Check comprueba si está ejecutando la última versión de Kodi.</summary>
+ <summary lang="es_MX">Comprobador de Version de Kodi comprueba si se esta ejecutando ultima version publicada.</summary>
+ <summary lang="fi_FI">Kodi Version Check tarkistaa onko käyttämäsi uusin versio.</summary>
+ <summary lang="fr_FR">Le contrôle de version de Kodi vérifie si la dernière version sortie est utilisée.</summary>
<summary lang="fr_CA">Le contrôleur de version Kodi vérifie si vous utilisez la dernière version parue.</summary>
- <summary lang="gl">Kodi Version Check verifica se está a executar a última versión.</summary>
- <summary lang="he">בודק גרסת Kodi מוודא אם אתה מריץ את הגרסה הרשמית האחרונה.</summary>
- <summary lang="hr">Kodi provjeritelj inačice provjerava imate li posljednju inačicu izdanja.</summary>
- <summary lang="hu">Az Kodi verzió ellenőrző megvizsgálja, hogy a legújabb kiadást futtatja-e.</summary>
- <summary lang="id">Kodi Version Check mengecek apakah Anda menggunakan versi rilis terbaru.</summary>
- <summary lang="is">Kodi Version Check athugar hvort þú sért að keyra nýjustu viðurkennda útgáfu.</summary>
- <summary lang="it">Kodi Version Check verifica se hai l'ultima versione rilasciata</summary>
- <summary lang="ko">Kodi Version Checks는 최신 정식 릴리즈 버전을 사용중인지 검사해줍니다.</summary>
- <summary lang="lt">Kodi Version Check patikrina ar naudojate naujausią versiją.</summary>
- <summary lang="nl">Kodi versie-check controleert of je de laatst beschikbare versie hebt.</summary>
- <summary lang="no">Kodi Versjonsettersyn sjekker om du kjører den sist utgitte versjonen.</summary>
- <summary lang="pl">Dodatek Version Check sprawdza czy używasz najnowszej wersji Kodi.</summary>
- <summary lang="pt">O Kodi Version Check verifica se a sua versão de lançamento do Kodi está actualizada.</summary>
+ <summary lang="gl_ES">Kodi Version Check verifica se está a executar a última versión.</summary>
+ <summary lang="he_IL">בודק גרסת Kodi מוודא אם אתה מריץ את הגרסה הרשמית האחרונה.</summary>
+ <summary lang="hr_HR">Kodi provjeritelj inačice provjerava imate li posljednju inačicu izdanja.</summary>
+ <summary lang="hu_HU">Az Kodi verzió ellenőrző megvizsgálja, hogy a legújabb kiadást futtatja-e.</summary>
+ <summary lang="id_ID">Kodi Version Check mengecek apakah Anda menggunakan versi rilis terbaru.</summary>
+ <summary lang="is_IS">Kodi Version Check athugar hvort þú sért að keyra nýjustu viðurkennda útgáfu.</summary>
+ <summary lang="it_IT">Kodi Version Check verifica se hai l'ultima versione rilasciata</summary>
+ <summary lang="ko_KR">Kodi Version Checks는 최신 정식 릴리즈 버전을 사용중인지 검사해줍니다.</summary>
+ <summary lang="lt_LT">Kodi Version Check patikrina ar naudojate naujausią versiją.</summary>
+ <summary lang="nl_NL">Kodi versie-check controleert of je de laatst beschikbare versie hebt.</summary>
+ <summary lang="nb_NO">Kodi Versjonsettersyn sjekker om du kjører den sist utgitte versjonen.</summary>
+ <summary lang="pl_PL">Dodatek Version Check sprawdza czy używasz najnowszej wersji Kodi.</summary>
+ <summary lang="pt_PT">O Kodi Version Check verifica se a sua versão de lançamento do Kodi está actualizada.</summary>
<summary lang="pt_BR">Kodi Version Check verifica se você está executando a versão mais recente.</summary>
- <summary lang="ro">Verificare versiune Kodi verifică dacă folosiți ultima versiune lansată.</summary>
- <summary lang="ru">Kodi Version Check проверяет если вы используете последнюю версию</summary>
- <summary lang="sk">Kodi Kontrola verzií overuje, či používate najnovšiu vydanú verziu.</summary>
- <summary lang="sl">Preverjanje različice Kodi preveri, če imate nameščeno nazadnje izdano različico.</summary>
- <summary lang="sv">Kodi Version Check kontrollerar om du använder den senaste versionen.</summary>
- <summary lang="tr">Kodi Sürüm Kontrol yayınlanmış son sürümü kullanıp kullanmadığınızı kontrol eder.</summary>
- <summary lang="zh">Kodi 版本检查检查你使用的是否为最新发布的版本。</summary>
- <description lang="be">Kodi Version Check only supports a number of platforms/distros as releases may differ between them. For more information visit the kodi.tv website.</description>
- <description lang="bg">Kodi Version Check поддържа няколко платформи/дистрибуции. За повече информация посетете страницата www.kodi.tv</description>
- <description lang="ca">Kodi Version Check només és compatible amb una sèrie de plataformes / distribucions ja que les ultimes versions poden ser diferents entre elles. Per obtenir més informació, visiteu el lloc web kodi.tv.</description>
- <description lang="cs">Kontrola verze Kodi podporuje pouze několik platforem/distribucí a verze mezi nimi se můžou lišit. Pro více informací navštivte webové stránky kodi.tv.</description>
- <description lang="da">Kodi kan kun undersøge for opdateringer for visse platforme/udgaver, da der kan være forskel. For mere information, besøg kodi.tv.</description>
- <description lang="de">Kodi Versionsprüfung unterstützt nur ein paar Plattformen/Distributionen, da sich die jeweiligen Veröffentlichungen unterscheiden können. Für weitere Informationen besuchen Sie die kodi.tv-Webseite.</description>
- <description lang="el">Ο Έλεγχος Έκδοσης Kodi υποστηρίζει μόνο ορισμένα λειτουργικά συστήματα/διανομές, καθώς οι εκδόσεις διαφέρουν για το καθένα. Για περισσότερες πληροφορίες επισκεφθείτε το kodi.tv</description>
- <description lang="en">Kodi Version Check only supports a number of platforms/distros as releases may differ between them. For more information visit the kodi.tv website.</description>
+ <summary lang="ro_RO">Verificare versiune Kodi verifică dacă folosiți ultima versiune lansată.</summary>
+ <summary lang="ru_RU">Kodi Version Check проверяет если вы используете последнюю версию</summary>
+ <summary lang="sk_SK">Kodi Kontrola verzií overuje, či používate najnovšiu vydanú verziu.</summary>
+ <summary lang="sl_SI">Preverjanje različice Kodi preveri, če imate nameščeno nazadnje izdano različico.</summary>
+ <summary lang="sv_SE">Kodi Version Check kontrollerar om du använder den senaste versionen.</summary>
+ <summary lang="tr_TR">Kodi Sürüm Kontrol yayınlanmış son sürümü kullanıp kullanmadığınızı kontrol eder.</summary>
+ <summary lang="zh_CN">Kodi 版本检查检查你使用的是否为最新发布的版本。</summary>
+ <description lang="be_BY">Kodi Version Check only supports a number of platforms/distros as releases may differ between them. For more information visit the kodi.tv website.</description>
+ <description lang="bg_BG">Kodi Version Check поддържа няколко платформи/дистрибуции. За повече информация посетете страницата www.kodi.tv</description>
+ <description lang="ca_ES">Kodi Version Check només és compatible amb una sèrie de plataformes / distribucions ja que les ultimes versions poden ser diferents entre elles. Per obtenir més informació, visiteu el lloc web kodi.tv.</description>
+ <description lang="cs_CZ">Kontrola verze Kodi podporuje pouze několik platforem/distribucí a verze mezi nimi se můžou lišit. Pro více informací navštivte webové stránky kodi.tv.</description>
+ <description lang="da_DK">Kodi kan kun undersøge for opdateringer for visse platforme/udgaver, da der kan være forskel. For mere information, besøg kodi.tv.</description>
+ <description lang="de_DE">Kodi Versionsprüfung unterstützt nur ein paar Plattformen/Distributionen, da sich die jeweiligen Veröffentlichungen unterscheiden können. Für weitere Informationen besuchen Sie die kodi.tv-Webseite.</description>
+ <description lang="el_GR">Ο Έλεγχος Έκδοσης Kodi υποστηρίζει μόνο ορισμένα λειτουργικά συστήματα/διανομές, καθώς οι εκδόσεις διαφέρουν για το καθένα. Για περισσότερες πληροφορίες επισκεφθείτε το kodi.tv</description>
+ <description lang="en_GB">Kodi Version Check only supports a number of platforms/distros as releases may differ between them. For more information visit the kodi.tv website.</description>
<description lang="en_NZ">Kodi Version Check only supports a number of platforms/distros as releases may differ between them. For more information visit the kodi.tv website.</description>
<description lang="en_US">Kodi Version Check only supports a number of platforms/distros as releases may differ between them. For more information visit the kodi.tv website.</description>
- <description lang="es">Kodi Version Check solo soporta un número limitado de plataformas/distribuciones, ya que los lanzamientos pueden diferir entre ellos. Para más información, visite la web de kodi.tv.</description>
- <description lang="fi">Kodi Version Check tukee vain joitain alustoja/distroja koska julkaisut saattavat poiketa toisistaan. Saadaksesi lisätietoa, vieraile kodi.tv:ssä.</description>
- <description lang="fr">Le contrôle de version de Kodi ne prend en charge qu'un certain nombre de plate-formes/distributions car les versions peuvent varier entre elles. Pour plus d'informations, consulter le site Web kodi.tv.</description>
+ <description lang="es_ES">Kodi Version Check solo soporta un número limitado de plataformas/distribuciones, ya que los lanzamientos pueden diferir entre ellos. Para más información, visite la web de kodi.tv.</description>
+ <description lang="fi_FI">Kodi Version Check tukee vain joitain alustoja/distroja koska julkaisut saattavat poiketa toisistaan. Saadaksesi lisätietoa, vieraile kodi.tv:ssä.</description>
+ <description lang="fr_FR">Le contrôle de version de Kodi ne prend en charge qu'un certain nombre de plate-formes/distributions car les versions peuvent varier entre elles. Pour plus d'informations, consulter le site Web kodi.tv.</description>
<description lang="fr_CA">Le contrôleur de version Kodi ne prend en charge qu'un certain nombre de plate-formes/distributions car les versions peuvent varier entre elles. Pour plus d'informations, visitez le site Web kodi.tv.</description>
- <description lang="gl">Kodi Version Check só soporta un número limitado de plataformas/distribucións, xa que os lanzamentos poden diferir entre eles. Para máis información visitar o sitio web de kodi.tv.</description>
- <description lang="he">בודק גרסת Kodi תומך רק במספר פלטפורמות/הפצות מאחר שסימון הגרסאות שונה בין אחת לשניה. למידע נוסף בקר באתר kodi.tv.</description>
- <description lang="hr">Kodi provjeritelj inačice samo podržava broj platformi/distribucija koliko to dopuštaju pojedina izdanja. Za više informacija posjetite kodi.tv web stranicu.</description>
- <description lang="hu">Az Kodi verzió-ellenőrző csak néhány platformot / disztribúciót támogat, mert a kiadások között különbségek lehetnek. További információkért keresse fel az kodi.tv oldalt.</description>
- <description lang="id">Kodi Version Check hanya mendukung beberapa platform/distro karena rilisnya mungkin berbeda-beda. Untuk informasi lebih lanjut kunjungi situs kodi.tv.</description>
- <description lang="it">Kodi Version Check supporta un numero di piattaforme e distribuzioni diverse tra loro. Per più informazioni visita il sito kodi.tv</description>
- <description lang="ko">Kodi Versio Check는 일부 플랫폼/배포본만을 지원합니다. 자세한 정보는 kodi.tv 웹사이트에서 확인하세요</description>
- <description lang="lt">Kodi Version Check palaiko tik kelias platformas/distribucijas, nes leidimai tarp jų gali skirtis. Norėdami gauti daugiau informacijos, apsilankykite Kodi.tv puslapyje.</description>
- <description lang="nl">Kodi versie check ondersteunt alleen een aantal platforms/distro`s omdat uitgaven verschillen tussen hen. Voor meer informatie bezoek de kodi.tv website.</description>
- <description lang="no">Kodi Versjonsettersyn støtter kun noen plattformer/distribusjoner fordi utgivelser kan være forskjellige mellom dem. Besøk kodi.tv for mer informasjon.</description>
- <description lang="pl">Dodatek Version Check wspiera tylko część platform i dystrybucji. Więcej informacji na stronie kodi.tv</description>
- <description lang="pt">O Kodi Version Check suporta apenas algumas plataformas/distribuições, porque os lançamentos podem não ser sempre idênticos. Para mais informação, visite o site kodi.tv.</description>
+ <description lang="gl_ES">Kodi Version Check só soporta un número limitado de plataformas/distribucións, xa que os lanzamentos poden diferir entre eles. Para máis información visitar o sitio web de kodi.tv.</description>
+ <description lang="he_IL">בודק גרסת Kodi תומך רק במספר פלטפורמות/הפצות מאחר שסימון הגרסאות שונה בין אחת לשניה. למידע נוסף בקר באתר kodi.tv.</description>
+ <description lang="hr_HR">Kodi provjeritelj inačice samo podržava broj platformi/distribucija koliko to dopuštaju pojedina izdanja. Za više informacija posjetite kodi.tv web stranicu.</description>
+ <description lang="hu_HU">Az Kodi verzió-ellenőrző csak néhány platformot / disztribúciót támogat, mert a kiadások között különbségek lehetnek. További információkért keresse fel az kodi.tv oldalt.</description>
+ <description lang="id_ID">Kodi Version Check hanya mendukung beberapa platform/distro karena rilisnya mungkin berbeda-beda. Untuk informasi lebih lanjut kunjungi situs kodi.tv.</description>
+ <description lang="it_IT">Kodi Version Check supporta un numero di piattaforme e distribuzioni diverse tra loro. Per più informazioni visita il sito kodi.tv</description>
+ <description lang="ko_KR">Kodi Versio Check는 일부 플랫폼/배포본만을 지원합니다. 자세한 정보는 kodi.tv 웹사이트에서 확인하세요</description>
+ <description lang="lt_LT">Kodi Version Check palaiko tik kelias platformas/distribucijas, nes leidimai tarp jų gali skirtis. Norėdami gauti daugiau informacijos, apsilankykite Kodi.tv puslapyje.</description>
+ <description lang="nl_NL">Kodi versie check ondersteunt alleen een aantal platforms/distro`s omdat uitgaven verschillen tussen hen. Voor meer informatie bezoek de kodi.tv website.</description>
+ <description lang="nb_NO">Kodi Versjonsettersyn støtter kun noen plattformer/distribusjoner fordi utgivelser kan være forskjellige mellom dem. Besøk kodi.tv for mer informasjon.</description>
+ <description lang="pl_PL">Dodatek Version Check wspiera tylko część platform i dystrybucji. Więcej informacji na stronie kodi.tv</description>
+ <description lang="pt_PT">O Kodi Version Check suporta apenas algumas plataformas/distribuições, porque os lançamentos podem não ser sempre idênticos. Para mais informação, visite o site kodi.tv.</description>
<description lang="pt_BR">Verificador de versões do Kodi somente suporta algumas plataformas/distros em que os lançamentos podem diferenciar entre si. Para maiores informações visite o website kodi.tv.</description>
- <description lang="ru">Проверка новых версий Kodi поддерживается только на ряде платформ/дистрибутивов и они могут различаться между собой. Для получения доп. информации посетите сайт kodi.tv</description>
- <description lang="sl">Preverjanje različice Kodi podpira le nekatere platforme/distribucije, saj se izdaje med njimi lahko zelo razlikujejo. Za več informacij obiščite spletišče kodi.tv</description>
- <description lang="sv">Kodi Version Check stöder endeast ett antal plattformar/distributioner eftersom utgivningar kan skilja mellan dessa. För mer information besök kodi.tv webplatsen.</description>
- <description lang="tr">Kodi Sürüm Kontrol sürümler arasında değişiklik olduğu için sadece birkaç platform/dağıtım destekler. Daha fazla bilgi için kodi.tv web sitesini ziyaret edin.</description>
- <description lang="zh">Kodi 版本检查只支持部分平台/发行版,它们之间的版本可能会有所不同。欲了解更多信息,请访问 kodi.tv 网站。</description>
- <disclaimer lang="be">Feel free to use this script. For information visit kodi.tv</disclaimer>
- <disclaimer lang="bg">Ползвайте скрипта свободно. За повече информация посетете www.kodi.tv</disclaimer>
- <disclaimer lang="ca">Sigues lliure d'utilitzar aquest script. Per més informació visita kodi.tv</disclaimer>
- <disclaimer lang="cs">Neváhejte použít tento skript. Pro více informací navštivte kodi.tv</disclaimer>
- <disclaimer lang="da">Du er velkommen til at bruge dette script. For information, besøg kodi.tv</disclaimer>
- <disclaimer lang="de">Zögern Sie nicht, dieses Skript zu verwenden. Für Informationen besuchen Sie kodi.tv</disclaimer>
- <disclaimer lang="el">Χρησιμοποιήστε αυτό το script ελεύθερα. Για πληροφορίες επισκεφθείτε το kodi.tv</disclaimer>
- <disclaimer lang="en">Feel free to use this script. For information visit kodi.tv</disclaimer>
+ <description lang="ru_RU">Проверка новых версий Kodi поддерживается только на ряде платформ/дистрибутивов и они могут различаться между собой. Для получения доп. информации посетите сайт kodi.tv</description>
+ <description lang="sl_SI">Preverjanje različice Kodi podpira le nekatere platforme/distribucije, saj se izdaje med njimi lahko zelo razlikujejo. Za več informacij obiščite spletišče kodi.tv</description>
+ <description lang="sv_SE">Kodi Version Check stöder endeast ett antal plattformar/distributioner eftersom utgivningar kan skilja mellan dessa. För mer information besök kodi.tv webplatsen.</description>
+ <description lang="tr_TR">Kodi Sürüm Kontrol sürümler arasında değişiklik olduğu için sadece birkaç platform/dağıtım destekler. Daha fazla bilgi için kodi.tv web sitesini ziyaret edin.</description>
+ <description lang="zh_CN">Kodi 版本检查只支持部分平台/发行版,它们之间的版本可能会有所不同。欲了解更多信息,请访问 kodi.tv 网站。</description>
+ <disclaimer lang="be_BY">Feel free to use this script. For information visit kodi.tv</disclaimer>
+ <disclaimer lang="bg_BG">Ползвайте скрипта свободно. За повече информация посетете www.kodi.tv</disclaimer>
+ <disclaimer lang="ca_ES">Sigues lliure d'utilitzar aquest script. Per més informació visita kodi.tv</disclaimer>
+ <disclaimer lang="cs_CZ">Neváhejte použít tento skript. Pro více informací navštivte kodi.tv</disclaimer>
+ <disclaimer lang="da_DK">Du er velkommen til at bruge dette script. For information, besøg kodi.tv</disclaimer>
+ <disclaimer lang="de_DE">Zögern Sie nicht, dieses Skript zu verwenden. Für Informationen besuchen Sie kodi.tv</disclaimer>
+ <disclaimer lang="el_GR">Χρησιμοποιήστε αυτό το script ελεύθερα. Για πληροφορίες επισκεφθείτε το kodi.tv</disclaimer>
+ <disclaimer lang="en_GB">Feel free to use this script. For information visit kodi.tv</disclaimer>
<disclaimer lang="en_NZ">Feel free to use this script. For information visit kodi.tv</disclaimer>
<disclaimer lang="en_US">Feel free to use this script. For information visit kodi.tv</disclaimer>
- <disclaimer lang="es">Puede usar libremente este programa. Para más información, visite kodi.tv</disclaimer>
+ <disclaimer lang="es_ES">Puede usar libremente este programa. Para más información, visite kodi.tv</disclaimer>
<disclaimer lang="es_MX">Sientase libre de utilizar este script. Para mas información visita kodi.tv</disclaimer>
- <disclaimer lang="fr">Utiliser ce script si désiré. Pour plus d'informations, consulter le site kodi.tv</disclaimer>
+ <disclaimer lang="fr_FR">Utiliser ce script si désiré. Pour plus d'informations, consulter le site kodi.tv</disclaimer>
<disclaimer lang="fr_CA">N'hésitez pas à utiliser ce script. Pour plus d'informations visitez kodi.tv</disclaimer>
- <disclaimer lang="gl">Síntase libre de usar este script, para máis información visitar kodi.tv.</disclaimer>
- <disclaimer lang="he">תרגיש חופשי להשתמש בסקריפט זה. למידע נוסף בקר ב-kodi.tv</disclaimer>
- <disclaimer lang="hr">Slobodno koristite ovu skriptu. Za više informacija posjetite kodi.tv</disclaimer>
- <disclaimer lang="hu">Használja bátran ezt a szkriptet! Információkért keresse fel az kodi.tv oldalt!</disclaimer>
- <disclaimer lang="id">Jangan sungkan menggunakan script ini. Untuk informasi hubungi kodi.tv</disclaimer>
- <disclaimer lang="it">Usa liberamente lo script. Per informazioni visita kodi.tv</disclaimer>
- <disclaimer lang="ko">이 스크립트를 자유롭게 사용하세요. 관련 정보는 kodi.tv를 방문하세요.</disclaimer>
- <disclaimer lang="lt">Galite laisvai naudoti šį scenarijų. Apsilankykite kodi.tv, norėdami gauti daugiau informacijos.</disclaimer>
- <disclaimer lang="nl">Gebruik dit script vrijblijvend. Voor meer informatie bezoek kodi.tv</disclaimer>
- <disclaimer lang="no">Du har fri tillatelse til å benytte dette skriptet. Besøk kodi.tv for informasjon</disclaimer>
- <disclaimer lang="pl">Zapraszamy do używania tego dodatku. Więcej informacji na stronie kodi.tv</disclaimer>
- <disclaimer lang="pt">Esteja à vontade para usar este script. Para mais informação, visite kodi.tv.</disclaimer>
+ <disclaimer lang="gl_ES">Síntase libre de usar este script, para máis información visitar kodi.tv.</disclaimer>
+ <disclaimer lang="he_IL">תרגיש חופשי להשתמש בסקריפט זה. למידע נוסף בקר ב-kodi.tv</disclaimer>
+ <disclaimer lang="hr_HR">Slobodno koristite ovu skriptu. Za više informacija posjetite kodi.tv</disclaimer>
+ <disclaimer lang="hu_HU">Használja bátran ezt a szkriptet! Információkért keresse fel az kodi.tv oldalt!</disclaimer>
+ <disclaimer lang="id_ID">Jangan sungkan menggunakan script ini. Untuk informasi hubungi kodi.tv</disclaimer>
+ <disclaimer lang="it_IT">Usa liberamente lo script. Per informazioni visita kodi.tv</disclaimer>
+ <disclaimer lang="ko_KR">이 스크립트를 자유롭게 사용하세요. 관련 정보는 kodi.tv를 방문하세요.</disclaimer>
+ <disclaimer lang="lt_LT">Galite laisvai naudoti šį scenarijų. Apsilankykite kodi.tv, norėdami gauti daugiau informacijos.</disclaimer>
+ <disclaimer lang="nl_NL">Gebruik dit script vrijblijvend. Voor meer informatie bezoek kodi.tv</disclaimer>
+ <disclaimer lang="nb_NO">Du har fri tillatelse til å benytte dette skriptet. Besøk kodi.tv for informasjon</disclaimer>
+ <disclaimer lang="pl_PL">Zapraszamy do używania tego dodatku. Więcej informacji na stronie kodi.tv</disclaimer>
+ <disclaimer lang="pt_PT">Esteja à vontade para usar este script. Para mais informação, visite kodi.tv.</disclaimer>
<disclaimer lang="pt_BR">Sinta-se livre para usar este script. Para maiores informações visite kodi.tv</disclaimer>
- <disclaimer lang="ro">Simțiți-vă liberi să folosiți acest script. Pentru informații vizitați kodi.tv</disclaimer>
- <disclaimer lang="ru">Используйте этот скрипт на свое усмотрение. Для информации посетите kodi.tv</disclaimer>
- <disclaimer lang="sl">Izvolite uporabiti ta skript. Za dodatne informacije obiščite kodi.tv</disclaimer>
- <disclaimer lang="sv">Använd gärna detta skript. För information, besök kodi.tv</disclaimer>
- <disclaimer lang="tr">Bu betiği kullanmaktan çekinmeyin. Daha fazla bilgi için kodi.tv adresini ziyaret edin</disclaimer>
- <disclaimer lang="zh">可放心使用此脚本,更多信息访问 kodi.tv</disclaimer>
+ <disclaimer lang="ro_RO">Simțiți-vă liberi să folosiți acest script. Pentru informații vizitați kodi.tv</disclaimer>
+ <disclaimer lang="ru_RU">Используйте этот скрипт на свое усмотрение. Для информации посетите kodi.tv</disclaimer>
+ <disclaimer lang="sl_SI">Izvolite uporabiti ta skript. Za dodatne informacije obiščite kodi.tv</disclaimer>
+ <disclaimer lang="sv_SE">Använd gärna detta skript. För information, besök kodi.tv</disclaimer>
+ <disclaimer lang="tr_TR">Bu betiği kullanmaktan çekinmeyin. Daha fazla bilgi için kodi.tv adresini ziyaret edin</disclaimer>
+ <disclaimer lang="zh_CN">可放心使用此脚本,更多信息访问 kodi.tv</disclaimer>
<platform>all</platform>
- <license>GNU GENERAL PUBLIC LICENSE. Version 2, June 1991</license>
- <forum>http://forum.xbmc.org/showthread.php?tid=160228</forum>
- <website>http://xbmc.org</website>
- <email></email>
+ <license>GPL-2.0-or-later, GPL-3.0-or-later, Apache-2.0</license>
+ <forum>https://forum.kodi.tv/showthread.php?tid=160228</forum>
+ <website>https://kodi.tv</website>
<source>https://github.com/XBMC-Addons/service.xbmc.versioncheck</source>
</extension>
-</addon>
+</addon> \ No newline at end of file
diff --git a/addons/service.xbmc.versioncheck/changelog.txt b/addons/service.xbmc.versioncheck/changelog.txt
deleted file mode 100644
index eefbdcfd43..0000000000
--- a/addons/service.xbmc.versioncheck/changelog.txt
+++ /dev/null
@@ -1,150 +0,0 @@
-v0.3.26 to v0.4.5
-- Update version list
-
-v0.3.25
-- fix issue with the older python2.6
-
-v0.3.5 to v0.3.24
-- Update version list
-
-v0.3.14
-- Updated language files from Transifex
-- Cosmetics
-- Update version list
-
-v0.3.12 to 0.3.4
-- Update version list
-
-v0.3.3
-- Updated language files from Transifex
-- Update version list
-
-v0.3.2
-- Don't notify on newer unreleased builds
-
-v0.3.1
-- Don't notify on newer unreleased builds
-
-v0.3.0
-- Update with 14.0 Helix
-
-v0.2.7
-- Fix popup on Kodi 15.0 builds
-
-v0.2.6
-- Update with 14.0 Helix rc 3
-
-v0.2.5
-- Update with 14.0 Helix rc 2
-
-v0.2.4
-- Fix error or unicode
-
-v0.2.3
-- Updated language files from Transifex
-- Update with 14.0 Helix rc 1
-
-v0.2.2
-- New Kodi logo as icon
-- Update with 14.0 Helix beta 4
-- Update with 14.0 Helix beta 5
-
-v0.2.1
-- Updated language files from Transifex
-- Don't exclude OpenELEC any more for version check
-- Update with 14.0 Helix beta 3
-
-v0.2.0
-- Only notify when the available version of Kodi changes, not when add-on is updated
-- Update with 14.0 Helix alpha3
-- Update with 14.0 Helix alpha4
-- Update with 14.0 Helix beta 1
-- Update with 14.0 Helix beta 2
-
-v0.1.24
-- Reworked notification logic
-- Updated with recent builds
-
-v0.1.23
-- Update with 13.2 Gotham
-- Update with 13.2 Gotham rc1
-- Update with 13.2 Gotham beta3
-- Update with 13.2 Gotham beta2
-- Update with 13.2 Gotham beta1
-- Update with 14.0 Helix alpha2
-
-v0.1.22
-- Updated language files from Transifex
-- Update with 13.1 Gotham rc1
-- Update with 13.1 Gotham beta2
-- Update with 13.1 Gotham beta1
-- Update with 13.0 Gotham
-
-v0.1.21
-- Update with 13.0 Gotham rc1
-- Update with 13.0 Gotham beta4
-
-v0.1.20
-- Fix missing apt option for Linux
-- Update with 13.0 Gotham beta3
-- Update with 13.0 Gotham beta2
-- Update with 13.0 Gotham beta1
-
-v0.1.19
-- Added Gotham alpha user notice
-
-v0.1.17
-- Update with 13.0 Gotham alpha11
-
-v0.1.16
-- Update with 12.3 Frodo stable
-
-v0.1.15
-- Add option for linux to disable check through "apt"
-
-v0.1.14
-- Update with 13.0 Gotham alpha10
-
-v0.1.13
-- Update with 13.0 Gotham alpha9
-
-v0.1.12
-- Fix encoding text encoding error for some languages
-- Update language files
-
-v0.1.11
-- Updated language files from Transifex
-- Fix problems with python2.7.5
-- Update with 13.0 Gotham alpha8
-
-v0.1.11
-- Update with 13.0 Gotham alpha7
-
-v0.1.9
-- Update with 13.0 Gotham alpha6
-- Updated language files from Transifex
-
-v0.1.7
-- Update with 13.0 Gotham alpha5
-
-v0.1.7
-- Update with 13.0 Gotham alpha4
-
-v0.1.6
-- Update with 12.2 Frodo stable
-- Added Linux full system upgrade
-
-v0.1.5
-- Update with 13.0 Gotham alpha3
-
-v0.1.4
-- We can now upgrade xbmc on Linux. This works either via polkit or shell wrapper as fallback
-
-v0.1.3
-- Update with 13.0 Gotham alpha2
-
-v0.1.2
-- Add notification for Ubuntu users checking through apt command
-
-v0.1.1
-- Initial version
diff --git a/addons/service.xbmc.versioncheck/lib/__init__.py b/addons/service.xbmc.versioncheck/lib/__init__.py
deleted file mode 100644
index 55e5f844b4..0000000000
--- a/addons/service.xbmc.versioncheck/lib/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from .common import *
diff --git a/addons/service.xbmc.versioncheck/lib/aptdaemonhandler.py b/addons/service.xbmc.versioncheck/lib/aptdaemonhandler.py
deleted file mode 100644
index 1e09b56100..0000000000
--- a/addons/service.xbmc.versioncheck/lib/aptdaemonhandler.py
+++ /dev/null
@@ -1,109 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2013 Team-XBMC
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-import xbmc
-from .common import *
-
-try:
- #import apt
- import apt
- from aptdaemon import client
- from aptdaemon import errors
-except:
- log('python apt import error')
-
-class AptdaemonHandler:
-
- def __init__(self):
- self.aptclient = client.AptClient()
-
- def _check_versions(self, package):
- if not self._update_cache():
- return False, False
- try:
- trans = self.aptclient.upgrade_packages([package])
- #trans = self.aptclient.upgrade_packages("bla")
- trans.simulate(reply_handler=self._apttransstarted, error_handler=self._apterrorhandler)
- pkg = trans.packages[4][0]
- if pkg == package:
- cache=apt.Cache()
- cache.open(None)
- cache.upgrade()
- if cache[pkg].installed:
- return cache[pkg].installed.version, cache[pkg].candidate.version
-
- return False, False
-
- except Exception as error:
- log("Exception while checking versions: %s" %error)
- return False, False
-
- def _update_cache(self):
- try:
- if self.aptclient.update_cache(wait=True) == "exit-success":
- return True
- else:
- return False
- except errors.NotAuthorizedError:
- log("You are not allowed to update the cache")
- return False
-
- def check_upgrade_available(self, package):
- '''returns True if newer package is available in the repositories'''
- installed, candidate = self._check_versions(package)
- if installed and candidate:
- if installed != candidate:
- log("Version installed %s" %installed)
- log("Version available %s" %candidate)
- return True
- else:
- log("Already on newest version")
- elif not installed:
- log("No installed package found")
- return False
- else:
- return False
-
- def upgrade_package(self, package):
- try:
- log("Installing new version")
- if self.aptclient.upgrade_packages([package], wait=True) == "exit-success":
- log("Upgrade successful")
- return True
- except Exception as error:
- log("Exception during upgrade: %s" %error)
- return False
-
- def upgrade_system(self):
- try:
- log("Upgrading system")
- if self.aptclient.upgrade_system(wait=True) == "exit-success":
- return True
- except Exception as error:
- log("Exception during system upgrade: %s" %error)
- return False
-
- def _getpassword(self):
- if len(self._pwd) == 0:
- self._pwd = get_password_from_user()
- return self._pwd
-
- def _apttransstarted(self):
- pass
-
- def _apterrorhandler(self, error):
- log("Apt Error %s" %error) \ No newline at end of file
diff --git a/addons/service.xbmc.versioncheck/lib/common.py b/addons/service.xbmc.versioncheck/lib/common.py
deleted file mode 100644
index 97f4a6442a..0000000000
--- a/addons/service.xbmc.versioncheck/lib/common.py
+++ /dev/null
@@ -1,205 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2013 Team-XBMC
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-import sys
-
-import os
-import xbmc
-import xbmcaddon
-import xbmcgui
-import xbmcvfs
-
-ADDON = xbmcaddon.Addon()
-ADDONVERSION = ADDON.getAddonInfo('version')
-ADDONNAME = ADDON.getAddonInfo('name')
-if sys.version_info[0] >= 3:
- ADDONPATH = ADDON.getAddonInfo('path')
- ADDONPROFILE = xbmc.translatePath( ADDON.getAddonInfo('profile') )
-else:
- ADDONPATH = ADDON.getAddonInfo('path').decode('utf-8')
- ADDONPROFILE = xbmc.translatePath( ADDON.getAddonInfo('profile') ).decode('utf-8')
-ICON = ADDON.getAddonInfo('icon')
-KODI_VERSION_MAJOR = int(xbmc.getInfoLabel('System.BuildVersion')[0:2])
-
-monitor = xbmc.Monitor()
-
-# Fixes unicode problems
-def string_unicode(text, encoding='utf-8'):
- try:
- if sys.version_info[0] >= 3:
- text = str( text )
- else:
- text = unicode( text, encoding )
- except:
- pass
- return text
-
-def normalize_string(text):
- try:
- text = unicodedata.normalize('NFKD', string_unicode(text)).encode('ascii', 'ignore')
- except:
- pass
- return text
-
-def localise(id):
- string = normalize_string(ADDON.getLocalizedString(id))
- return string
-
-def log(txt):
- if sys.version_info[0] >= 3:
- message = '%s: %s' % ("Version Check", txt.encode('utf-8'))
- else:
- if isinstance (txt,str):
- txt = txt.decode("utf-8")
- message = (u'%s: %s' % ("Version Check", txt)).encode("utf-8")
- xbmc.log(msg=message, level=xbmc.LOGDEBUG)
-
-def get_password_from_user():
- keyboard = xbmc.Keyboard("", ADDONNAME + "," +localise(32022), True)
- keyboard.doModal()
- if (keyboard.isConfirmed()):
- pwd = keyboard.getText()
- return pwd
-
-def message_upgrade_success():
- xbmc.executebuiltin("Notification(%s, %s, %d, %s)" %(ADDONNAME,
- localise(32013),
- 15000,
- ICON))
-
-def message_restart():
- if dialog_yesno(32014):
- xbmc.executebuiltin("RestartApp")
-
-def dialog_yesno(line1 = 0, line2 = 0):
- return xbmcgui.Dialog().yesno(ADDONNAME,
- localise(line1),
- localise(line2))
-
-def upgrade_message(msg, oldversion, upgrade, msg_current, msg_available):
- wait_for_end_of_video()
-
- if ADDON.getSetting("lastnotified_version") < ADDONVERSION:
- xbmcgui.Dialog().ok(ADDONNAME,
- localise(msg),
- localise(32001),
- localise(32002))
- #ADDON.setSetting("lastnotified_version", ADDONVERSION)
- else:
- log("Already notified one time for upgrading.")
-
-def upgrade_message2( version_installed, version_available, version_stable, oldversion, upgrade,):
- # shorten releasecandidate to rc
- if version_installed['tag'] == 'releasecandidate':
- version_installed['tag'] = 'rc'
- if version_available['tag'] == 'releasecandidate':
- version_available['tag'] = 'rc'
- # convert json-rpc result to strings for usage
- msg_current = '%i.%i %s%s' %(version_installed['major'],
- version_installed['minor'],
- version_installed['tag'],
- version_installed.get('tagversion',''))
- msg_available = version_available['major'] + '.' + version_available['minor'] + ' ' + version_available['tag'] + version_available.get('tagversion','')
- msg_stable = version_stable['major'] + '.' + version_stable['minor'] + ' ' + version_stable['tag'] + version_stable.get('tagversion','')
- msg = localise(32034) %(msg_current, msg_available)
-
- wait_for_end_of_video()
-
- # hack: convert current version number to stable string
- # so users don't get notified again. remove in future
- if ADDON.getSetting("lastnotified_version") == '0.1.24':
- ADDON.setSetting("lastnotified_stable", msg_stable)
-
- # Show different dialogs depending if there's a newer stable available.
- # Also split them between xbmc and kodi notifications to reduce possible confusion.
- # People will find out once they visit the website.
- # For stable only notify once and when there's a newer stable available.
- # Ignore any add-on updates as those only count for != stable
- if oldversion == 'stable' and ADDON.getSetting("lastnotified_stable") != msg_stable:
- if xbmcaddon.Addon('xbmc.addon').getAddonInfo('version') < "13.9.0":
- xbmcgui.Dialog().ok(ADDONNAME,
- msg,
- localise(32030),
- localise(32031))
- else:
- xbmcgui.Dialog().ok(ADDONNAME,
- msg,
- localise(32032),
- localise(32033))
- ADDON.setSetting("lastnotified_stable", msg_stable)
-
- elif oldversion != 'stable' and ADDON.getSetting("lastnotified_version") != msg_available:
- if xbmcaddon.Addon('xbmc.addon').getAddonInfo('version') < "13.9.0":
- # point them to xbmc.org
- xbmcgui.Dialog().ok(ADDONNAME,
- msg,
- localise(32035),
- localise(32031))
- else:
- #use kodi.tv
- xbmcgui.Dialog().ok(ADDONNAME,
- msg,
- localise(32035),
- localise(32033))
-
- # older skins don't support a text field in the OK dialog.
- # let's use split lines for now. see code above.
- '''
- msg = localise(32034) %(msg_current, msg_available)
- if oldversion == 'stable':
- msg = msg + ' ' + localise(32030)
- else:
- msg = msg + ' ' + localise(32035)
- msg = msg + ' ' + localise(32031)
- xbmcgui.Dialog().ok(ADDONNAME, msg)
- #ADDON.setSetting("lastnotified_version", ADDONVERSION)
- '''
- ADDON.setSetting("lastnotified_version", msg_available)
-
- else:
- log("Already notified one time for upgrading.")
-
-
-def abortRequested():
- if KODI_VERSION_MAJOR > 13:
- return monitor.abortRequested()
- else:
- return xbmc.abortRequested
-
-
-def waitForAbort(seconds):
- if KODI_VERSION_MAJOR > 13:
- return monitor.waitForAbort(seconds)
- else:
- for _ in range(0, seconds*1000/200):
- if xbmc.abortRequested:
- return True
- xbmc.sleep(200)
-
-
-def wait_for_end_of_video():
- # Don't show notify while watching a video
- while xbmc.Player().isPlayingVideo() and not abortRequested():
- if waitForAbort(1):
- # Abort was requested while waiting. We should exit
- break
- i = 0
- while i < 10 and not abortRequested():
- if waitForAbort(1):
- # Abort was requested while waiting. We should exit
- break
- i += 1
diff --git a/addons/service.xbmc.versioncheck/lib/jsoninterface.py b/addons/service.xbmc.versioncheck/lib/jsoninterface.py
deleted file mode 100644
index 6f0f7acb91..0000000000
--- a/addons/service.xbmc.versioncheck/lib/jsoninterface.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2013 Team-XBMC
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-import os
-import sys
-import xbmc
-import xbmcaddon
-import xbmcvfs
-import lib.common
-from lib.common import log
-
-ADDONPATH = lib.common.ADDONPATH
-
-import json as jsoninterface
-
-def get_installedversion():
- # retrieve current installed version
- json_query = xbmc.executeJSONRPC('{ "jsonrpc": "2.0", "method": "Application.GetProperties", "params": {"properties": ["version", "name"]}, "id": 1 }')
- if sys.version_info[0] >= 3:
- json_query = str(json_query)
- else:
- json_query = unicode(json_query, 'utf-8', errors='ignore')
- json_query = jsoninterface.loads(json_query)
- version_installed = []
- if 'result' in json_query and 'version' in json_query['result']:
- version_installed = json_query['result']['version']
- return version_installed
-
-def get_versionfilelist():
- # retrieve versionlists from supplied version file
- version_file = os.path.join(ADDONPATH, 'resources/versions.txt')
- # Eden didn't have xbmcvfs.File()
- if xbmcaddon.Addon('xbmc.addon').getAddonInfo('version') < "11.9.3":
- file = open(version_file, 'r')
- else:
- file = xbmcvfs.File(version_file)
- data = file.read()
- file.close()
- if sys.version_info[0] >= 3:
- version_query = str(data)
- else:
- version_query = unicode(data, 'utf-8', errors='ignore')
- version_query = jsoninterface.loads(version_query)
- return version_query
diff --git a/addons/service.xbmc.versioncheck/lib/shellhandlerapt.py b/addons/service.xbmc.versioncheck/lib/shellhandlerapt.py
deleted file mode 100644
index 9fbb0b5e5b..0000000000
--- a/addons/service.xbmc.versioncheck/lib/shellhandlerapt.py
+++ /dev/null
@@ -1,125 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2013 Team-XBMC
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-import xbmc
-from .common import *
-
-try:
- from subprocess import check_output
- from subprocess import call
-except:
- log('subprocess import error')
-
-
-class ShellHandlerApt:
-
- _pwd = ""
-
- def __init__(self, usesudo=False):
- self.sudo = usesudo
- installed, candidate = self._check_versions("xbmc", False)
- if not installed:
- # there is no package installed via repo, so we exit here
- log("No installed package found, exiting")
- import sys
- sys.exit(0)
-
- def _check_versions(self, package, update=True):
- _cmd = "apt-cache policy " + package
-
- if update and not self._update_cache():
- return False, False
-
- try:
- result = check_output([_cmd], shell=True).split("\n")
- except Exception as error:
- log("ShellHandlerApt: exception while executing shell command %s: %s" %(_cmd, error))
- return False, False
-
- if result[0].replace(":", "") == package:
- installed = result[1].split()[1]
- candidate = result[2].split()[1]
- if installed == "(none)":
- installed = False
- if candidate == "(none)":
- candidate = False
- return installed, candidate
- else:
- log("ShellHandlerApt: error during version check")
- return False, False
-
- def _update_cache(self):
- _cmd = 'apt-get update'
- try:
- if self.sudo:
- x = check_output('echo \'%s\' | sudo -S %s' %(self._getpassword(), _cmd), shell=True)
- else:
- x = check_output(_cmd.split())
- except Exception as error:
- log("Exception while executing shell command %s: %s" %(_cmd, error))
- return False
-
- return True
-
- def check_upgrade_available(self, package):
- '''returns True if newer package is available in the repositories'''
- installed, candidate = self._check_versions(package)
- if installed and candidate:
- if installed != candidate:
- log("Version installed %s" %installed)
- log("Version available %s" %candidate)
- return True
- else:
- log("Already on newest version")
- elif not installed:
- log("No installed package found")
- return False
- else:
- return False
-
- def upgrade_package(self, package):
- _cmd = "apt-get install -y " + package
- try:
- if self.sudo:
- x = check_output('echo \'%s\' | sudo -S %s' %(self._getpassword(), _cmd), shell=True)
- else:
- x = check_output(_cmd.split())
- log("Upgrade successful")
- except Exception as error:
- log("Exception while executing shell command %s: %s" %(_cmd, error))
- return False
-
- return True
-
- def upgrade_system(self):
- _cmd = "apt-get upgrade -y"
- try:
- log("Upgrading system")
- if self.sudo:
- x = check_output('echo \'%s\' | sudo -S %s' %(self._getpassword(), _cmd), shell=True)
- else:
- x = check_output(_cmd.split())
- except Exception as error:
- log("Exception while executing shell command %s: %s" %(_cmd, error))
- return False
-
- return True
-
- def _getpassword(self):
- if len(self._pwd) == 0:
- self._pwd = get_password_from_user()
- return self._pwd
diff --git a/addons/service.xbmc.versioncheck/lib/versions.py b/addons/service.xbmc.versioncheck/lib/versions.py
deleted file mode 100644
index 514136e5fe..0000000000
--- a/addons/service.xbmc.versioncheck/lib/versions.py
+++ /dev/null
@@ -1,127 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2013 Team-XBMC
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-from lib.common import log
-
-def compare_version(version_installed, versionlist):
- # Create separate version lists
- versionlist_stable = versionlist['releases']['stable']
- versionlist_rc = versionlist['releases']['releasecandidate']
- versionlist_beta = versionlist['releases']['beta']
- versionlist_alpha = versionlist['releases']['alpha']
- versionlist_prealpha = versionlist['releases']['prealpha']
- log('Version installed %s' %version_installed)
- ### Check to upgrade to newest available stable version
- # check on smaller major version. Smaller version than available always notify
- oldversion = False
- version_available = ''
- # check if installed major version is smaller than available major stable
- # here we don't care if running non stable
- if version_installed['major'] < int(versionlist_stable[0]['major']):
- version_available = versionlist_stable[0]
- oldversion = 'stable'
- log('Version available %s' %versionlist_stable[0])
- log('You are running an older version')
-
-
- # check if installed major version is equal than available major stable
- # however also check on minor version and still don't care about non stable
- elif version_installed['major'] == int(versionlist_stable[0]['major']):
- if version_installed['minor'] < int(versionlist_stable[0]['minor']):
- version_available = versionlist_stable[0]
- oldversion = 'stable'
- log('Version available %s' %versionlist_stable[0])
- log('You are running an older minor version')
- # check for <= minor !stable
- elif version_installed['tag'] != 'stable' and version_installed['minor'] <= int(versionlist_stable[0]['minor']):
- version_available = versionlist_stable[0]
- oldversion = True
- log('Version available %s' %versionlist_stable[0])
- log('You are running an older non stable minor version')
- else:
- log('Version available %s' %versionlist_stable[0])
- log('There is no newer stable available')
-
- # Already skipped a possible newer stable build. Let's continue with non stable builds.
- # Check also 'oldversion' hasn't been set to 'stable' or true by previous checks because if so,
- # those part need to be skipped
-
- #check for RC builds
- if not oldversion and version_installed['tag'] in ['releasecandidate']:
- # check if you are using a RC build lower than current available RC
- # then check if you are using a beta/alpha lower than current available RC
- # 14.0rc3 is newer than: 14.0rc1, 14.0b9, 14.0a15
- if version_installed['major'] <= int(versionlist_rc[0]['major']):
- if version_installed['minor'] <= int(versionlist_rc[0]['minor']):
- if version_installed.get('tagversion','') < versionlist_rc[0]['tagversion']:
- version_available = versionlist_rc[0]
- oldversion = True
- log('Version available %s' %versionlist_rc[0])
- log('You are running an older RC version')
- # now check if installed !=rc
- elif not oldversion and version_installed['tag'] in ['beta','alpha','prealpha']:
- if version_installed['major'] <= int(versionlist_rc[0]['major']):
- if version_installed['minor'] <= int(versionlist_beta[0]['minor']):
- version_available = versionlist_rc[0]
- oldversion = True
- log('Version available %s' %versionlist_rc[0])
- log('You are running an older non RC version')
-
- #check for beta builds
- if not oldversion and version_installed['tag'] == 'beta':
- # check if you are using a RC build lower than current available RC
- # then check if you are using a beta/alpha lower than current available RC
- # 14.0b3 is newer than: 14.0b1, 14.0a15
- if version_installed['major'] <= int(versionlist_beta[0]['major']):
- if version_installed['minor'] <= int(versionlist_beta[0]['minor']):
- if version_installed.get('tagversion','') < versionlist_beta[0]['tagversion']:
- version_available = versionlist_beta[0]
- oldversion = True
- log('Version available %s' %versionlist_beta[0])
- log('You are running an older beta version')
- # now check if installed !=beta
- elif not oldversion and version_installed['tag'] in ['alpha','prealpha']:
- if version_installed['major'] <= int(versionlist_beta[0]['major']):
- if version_installed['minor'] <= int(versionlist_beta[0]['minor']):
- version_available = versionlist_beta[0]
- oldversion = True
- log('Version available %s' %versionlist_beta[0])
- log('You are running an older non beta version')
-
- #check for alpha builds and older
- if not oldversion and version_installed['tag'] == 'alpha':
- # check if you are using a RC build lower than current available RC
- # then check if you are using a beta/alpha lower than current available RC
- # 14.0a3 is newer than: 14.0a1 or pre-alpha
- if version_installed['major'] <= int(versionlist_alpha[0]['major']):
- if version_installed['minor'] <= int(versionlist_alpha[0]['minor']):
- if version_installed.get('tagversion','') < versionlist_alpha[0]['tagversion']:
- version_available = versionlist_alpha[0]
- oldversion = True
- log('Version available %s' %versionlist_alpha[0])
- log('You are running an older alpha version')
- # now check if installed !=alpha
- elif not oldversion and version_installed['tag'] in ['prealpha']:
- if version_installed['major'] <= int(versionlist_alpha[0]['major']):
- if version_installed['minor'] <= int(versionlist_alpha[0]['minor']):
- version_available = versionlist_alpha[0]
- oldversion = True
- log('Version available %s' %versionlist_alpha[0])
- log('You are running an older non alpha version')
- version_stable = versionlist_stable[0]
- return oldversion, version_installed, version_available, version_stable \ No newline at end of file
diff --git a/addons/service.xbmc.versioncheck/lib/viewer.py b/addons/service.xbmc.versioncheck/lib/viewer.py
deleted file mode 100644
index 4a43156a33..0000000000
--- a/addons/service.xbmc.versioncheck/lib/viewer.py
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2011-2013 Martijn Kaijser
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-#import modules
-import os
-import sys
-import xbmc
-import xbmcgui
-import xbmcaddon
-
-### get addon info
-ADDON = xbmcaddon.Addon('service.xbmc.versioncheck')
-ADDONVERSION = ADDON.getAddonInfo('version')
-ADDONNAME = ADDON.getAddonInfo('name')
-if sys.version_info[0] >= 3:
- ADDONPATH = ADDON.getAddonInfo('path')
- ADDONPROFILE = xbmc.translatePath( ADDON.getAddonInfo('profile') )
-else:
- ADDONPATH = ADDON.getAddonInfo('path').decode('utf-8')
- ADDONPROFILE = xbmc.translatePath( ADDON.getAddonInfo('profile') ).decode('utf-8')
-ICON = ADDON.getAddonInfo('icon')
-
-class Viewer:
- # constants
- WINDOW = 10147
- CONTROL_LABEL = 1
- CONTROL_TEXTBOX = 5
-
- def __init__(self, *args, **kwargs):
- # activate the text viewer window
- xbmc.executebuiltin("ActivateWindow(%d)" % (self.WINDOW,))
- # get window
- self.window = xbmcgui.Window(self.WINDOW)
- # give window time to initialize
- xbmc.sleep(100)
- # set controls
- self.setControls()
-
- def setControls(self):
- #get header, text
- heading, text = self.getText()
- # set heading
- self.window.getControl(self.CONTROL_LABEL).setLabel("%s : %s" % (ADDONNAME, heading, ))
- # set text
- self.window.getControl(self.CONTROL_TEXTBOX).setText(text)
- xbmc.sleep(2000)
-
- def getText(self):
- try:
- if sys.argv[ 1 ] == "gotham-alpha_notice":
- return "Call to Gotham alpha users", self.readFile(os.path.join(ADDONPATH , "resources/gotham-alpha_notice.txt"))
- except Exception as e:
- xbmc.log(ADDONNAME + ': ' + str(e), xbmc.LOGERROR)
- return "", ""
-
- def readFile(self, filename):
- return open(filename).read()
-
-class WebBrowser:
- """ Display url using the default browser. """
-
- def __init__(self, *args, **kwargs):
- try:
- url = sys.argv[2]
- # notify user
- notification(ADDONNAME, url)
- xbmc.sleep(100)
- # launch url
- self.launchUrl(url)
- except Exception as e:
- xbmc.log(ADDONNAME + ': ' + str(e), xbmc.LOGERROR)
-
- def launchUrl(self, url):
- import webbrowser
- webbrowser.open(url)
-
-def Main():
- try:
- if sys.argv[ 1 ] == "webbrowser":
- WebBrowser()
- else:
- Viewer()
- except Exception as e:
- xbmc.log(ADDONNAME + ': ' + str(e), xbmc.LOGERROR)
-
-if (__name__ == "__main__"):
- Main()
diff --git a/addons/service.xbmc.versioncheck/resources/gotham-alpha_notice.txt b/addons/service.xbmc.versioncheck/resources/gotham-alpha_notice.txt
deleted file mode 100644
index b905baaae4..0000000000
--- a/addons/service.xbmc.versioncheck/resources/gotham-alpha_notice.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-[B]Call to Gotham alpha users[/B]
-[I]For more information visit http://xbmc.org [/I]
-
-In the last blog post which you can read at http://xbmc.org we already told you we are working hard towards a Beta release. There are still some things that need to be improved before we are confident on releasing a Beta. We will of course keep you posted when that time comes. Work continues by the developers to iron out the know remaining issues as much as possible. Thanks to the users who install our latest development builds, the remaining problems become known and we try to address these. Do note we may not be able to address all issues reported, as time and available developers are limited. We all try our best but we hope all of you will understand this and we need to accept that some issues will remain.
-If you are a developer and you are confident enough to dive into our source code and fix it, we would appreciate it very much if you would create a so called pull-request on our github page for code review so it might be included.
-
-As it stands now it’s highly unlikely there will be another monthly release before Beta release as there isn’t a merge window any more like we had in the previous months. The monthly builds were done at the end of the month to mark the most stable Gotham version. However now we only do bug fixing, each build we create daily should become better and better. This also means you can download and install the most recent nightly build quite safely to have the most up to date version running. Because of this we would like to ask if possible to upgrade to the last available “nightly build” (the links can be found at the end). As I just mentioned these builds should be considered more stable than any previous monthly Gotham release. There should be no reason to keep using any older monthly build. This would also help to identify any remaining issues left and helps us make the upcoming Gotham release a great one. \ No newline at end of file
diff --git a/addons/service.xbmc.versioncheck/resources/language/Asturian/strings.po b/addons/service.xbmc.versioncheck/resources/language/Asturian/strings.po
deleted file mode 100644
index 0c00a68df0..0000000000
--- a/addons/service.xbmc.versioncheck/resources/language/Asturian/strings.po
+++ /dev/null
@@ -1,21 +0,0 @@
-# Kodi Media Center language file
-# Addon Name: Version Check
-# Addon id: service.xbmc.versioncheck
-# Addon Provider: Team Kodi
-msgid ""
-msgstr ""
-"Project-Id-Version: XBMC Addons\n"
-"Report-Msgid-Bugs-To: alanwww1@xbmc.org\n"
-"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: Kodi Translation Team\n"
-"Language-Team: Asturian (http://www.transifex.com/projects/p/xbmc-addons/language/ast/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: ast\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-msgctxt "#32020"
-msgid "General"
-msgstr "Xeneral"
diff --git a/addons/service.xbmc.versioncheck/resources/language/Georgian/strings.po b/addons/service.xbmc.versioncheck/resources/language/Georgian/strings.po
deleted file mode 100644
index 89e4e828b1..0000000000
--- a/addons/service.xbmc.versioncheck/resources/language/Georgian/strings.po
+++ /dev/null
@@ -1,21 +0,0 @@
-# Kodi Media Center language file
-# Addon Name: Version Check
-# Addon id: service.xbmc.versioncheck
-# Addon Provider: Team Kodi
-msgid ""
-msgstr ""
-"Project-Id-Version: XBMC Addons\n"
-"Report-Msgid-Bugs-To: alanwww1@xbmc.org\n"
-"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: Kodi Translation Team\n"
-"Language-Team: Georgian (http://www.transifex.com/projects/p/xbmc-addons/language/ka/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: ka\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-msgctxt "#32020"
-msgid "General"
-msgstr "მთავარი"
diff --git a/addons/service.xbmc.versioncheck/resources/language/Afrikaans/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.af_za/strings.po
index 95f99d4405..95f99d4405 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Afrikaans/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.af_za/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Amharic/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.am_et/strings.po
index 192cddf5df..192cddf5df 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Amharic/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.am_et/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Arabic/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.ar_sa/strings.po
index ad8cf641d3..ad8cf641d3 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Arabic/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.ar_sa/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Belarusian/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.be_by/strings.po
index 8fae033bca..8fae033bca 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Belarusian/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.be_by/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Bulgarian/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.bg_bg/strings.po
index 13ae10ddc2..13ae10ddc2 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Bulgarian/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.bg_bg/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Bosnian/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.bs_ba/strings.po
index a3e9d425a1..a3e9d425a1 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Bosnian/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.bs_ba/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Catalan/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.ca_es/strings.po
index ddae20e81d..ddae20e81d 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Catalan/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.ca_es/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Czech/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.cs_cz/strings.po
index 3486f1414e..3486f1414e 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Czech/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.cs_cz/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Welsh/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.cy_gb/strings.po
index a7ba85f209..a7ba85f209 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Welsh/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.cy_gb/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Danish/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.da_dk/strings.po
index ed58344e6d..ed58344e6d 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Danish/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.da_dk/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/German/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.de_de/strings.po
index dfff922145..dfff922145 100644
--- a/addons/service.xbmc.versioncheck/resources/language/German/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.de_de/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Greek/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.el_gr/strings.po
index 0b90fc5dbf..0b90fc5dbf 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Greek/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.el_gr/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/English (Australia)/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.en_au/strings.po
index f5c64dae14..f5c64dae14 100644
--- a/addons/service.xbmc.versioncheck/resources/language/English (Australia)/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.en_au/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/English/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.en_gb/strings.po
index 6746418c5c..7aab68ec9a 100644
--- a/addons/service.xbmc.versioncheck/resources/language/English/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.en_gb/strings.po
@@ -24,7 +24,7 @@ msgctxt "#32002"
msgid "Visit Kodi.tv for more information."
msgstr ""
-#empty strings from id 32003 to 32008
+# empty strings from id 32003 to 32008
msgctxt "#32009"
msgid "Would you like to remove this reminder?"
@@ -58,7 +58,7 @@ msgctxt "#32016"
msgid "There is a newer stable Kodi version available."
msgstr ""
-#empty strings from id 32017 to 32019
+# empty strings from id 32017 to 32019
msgctxt "#32020"
msgid "General"
@@ -80,7 +80,7 @@ msgctxt "#32024"
msgid "Linux: Upgrade using apt"
msgstr ""
-#empty strings from id 32025 to 32029
+# empty strings from id 32025 to 32029
#. Used in OK dialog
msgctxt "#32030"
@@ -112,7 +112,7 @@ msgctxt "#32035"
msgid "It is recommended that you to upgrade to a newer version."
msgstr ""
-#empty strings from id 32036 to 32039
+# empty strings from id 32036 to 32039
msgctxt "#32040"
msgid "Your version %s of the Python cryptography module is too old. You need at least version 1.7."
diff --git a/addons/service.xbmc.versioncheck/resources/language/English (New Zealand)/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.en_nz/strings.po
index f5eedbc97c..f5eedbc97c 100644
--- a/addons/service.xbmc.versioncheck/resources/language/English (New Zealand)/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.en_nz/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/English (US)/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.en_us/strings.po
index 63f4a600d9..63f4a600d9 100644
--- a/addons/service.xbmc.versioncheck/resources/language/English (US)/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.en_us/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Esperanto/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.eo/strings.po
index aa40076f7c..aa40076f7c 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Esperanto/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.eo/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Spanish (Argentina)/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.es_ar/strings.po
index c0d26db1d5..c0d26db1d5 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Spanish (Argentina)/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.es_ar/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Spanish/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.es_es/strings.po
index 596578e9a0..596578e9a0 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Spanish/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.es_es/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Spanish (Mexico)/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.es_mx/strings.po
index a737594b58..a737594b58 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Spanish (Mexico)/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.es_mx/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Estonian/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.et_ee/strings.po
index fc6ef2c854..fc6ef2c854 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Estonian/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.et_ee/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Basque/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.eu_es/strings.po
index b38edba1fb..b38edba1fb 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Basque/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.eu_es/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Persian/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.fa_af/strings.po
index eed149539d..eed149539d 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Persian/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.fa_af/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Persian (Iran)/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.fa_ir/strings.po
index 31075a0c5a..31075a0c5a 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Persian (Iran)/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.fa_ir/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Finnish/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.fi_fi/strings.po
index b44b2db916..b44b2db916 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Finnish/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.fi_fi/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Faroese/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.fo_fo/strings.po
index 04d7e9c4c5..04d7e9c4c5 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Faroese/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.fo_fo/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/French (Canada)/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.fr_ca/strings.po
index cd676c4c62..cd676c4c62 100644
--- a/addons/service.xbmc.versioncheck/resources/language/French (Canada)/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.fr_ca/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/French/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.fr_fr/strings.po
index 51c48d4662..51c48d4662 100644
--- a/addons/service.xbmc.versioncheck/resources/language/French/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.fr_fr/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Galician/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.gl_es/strings.po
index 4a47329e07..4a47329e07 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Galician/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.gl_es/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Hebrew/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.he_il/strings.po
index 704289a898..704289a898 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Hebrew/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.he_il/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Hindi (Devanagiri)/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.hi_in/strings.po
index 8b3a6e1114..8b3a6e1114 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Hindi (Devanagiri)/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.hi_in/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Croatian/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.hr_hr/strings.po
index d169766f2f..d169766f2f 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Croatian/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.hr_hr/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Hungarian/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.hu_hu/strings.po
index 66ee97bb44..66ee97bb44 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Hungarian/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.hu_hu/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Armenian/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.hy_am/strings.po
index 178f62f063..178f62f063 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Armenian/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.hy_am/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Indonesian/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.id_id/strings.po
index 8f8292c346..8f8292c346 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Indonesian/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.id_id/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Icelandic/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.is_is/strings.po
index fa9388742d..fa9388742d 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Icelandic/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.is_is/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Italian/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.it_it/strings.po
index ea87a62e22..ea87a62e22 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Italian/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.it_it/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Japanese/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.ja_jp/strings.po
index e2f6770021..e2f6770021 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Japanese/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.ja_jp/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Korean/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.ko_kr/strings.po
index 6fb8be9140..6fb8be9140 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Korean/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.ko_kr/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Lithuanian/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.lt_lt/strings.po
index 7fa3579d43..7fa3579d43 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Lithuanian/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.lt_lt/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Latvian/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.lv_lv/strings.po
index ca52f51807..ca52f51807 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Latvian/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.lv_lv/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Macedonian/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.mk_mk/strings.po
index 439a433149..439a433149 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Macedonian/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.mk_mk/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Malayalam/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.ml_in/strings.po
index cc00a0289c..cc00a0289c 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Malayalam/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.ml_in/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Mongolian (Mongolia)/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.mn_mn/strings.po
index 51c68ec3d6..51c68ec3d6 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Mongolian (Mongolia)/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.mn_mn/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Malay/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.ms_my/strings.po
index 0ea4776616..0ea4776616 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Malay/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.ms_my/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Maltese/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.mt_mt/strings.po
index d4cdc60f4e..d4cdc60f4e 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Maltese/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.mt_mt/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Burmese/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.my_mm/strings.po
index b2d650117d..b2d650117d 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Burmese/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.my_mm/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Norwegian/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.nb_no/strings.po
index cefb39d652..cefb39d652 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Norwegian/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.nb_no/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Dutch/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.nl_nl/strings.po
index 2d7cd506f0..2d7cd506f0 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Dutch/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.nl_nl/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Polish/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.pl_pl/strings.po
index 3fc994317f..3fc994317f 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Polish/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.pl_pl/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Portuguese (Brazil)/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.pt_br/strings.po
index 296ee05939..296ee05939 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Portuguese (Brazil)/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.pt_br/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Portuguese/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.pt_pt/strings.po
index b9a2a4b890..b9a2a4b890 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Portuguese/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.pt_pt/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Romanian/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.ro_ro/strings.po
index d7363d30a5..d7363d30a5 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Romanian/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.ro_ro/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Russian/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.ru_ru/strings.po
index efc608edf2..efc608edf2 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Russian/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.ru_ru/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Slovak/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.sk_sk/strings.po
index b4f7825ff9..b4f7825ff9 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Slovak/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.sk_sk/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Slovenian/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.sl_si/strings.po
index 051b85fe35..051b85fe35 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Slovenian/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.sl_si/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Albanian/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.sq_al/strings.po
index 08f3c9cdf1..08f3c9cdf1 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Albanian/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.sq_al/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Serbian (Cyrillic)/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.sr_rs/strings.po
index de861fec96..de861fec96 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Serbian (Cyrillic)/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.sr_rs/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Serbian/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.sr_rs@latin/strings.po
index 922d46f94d..922d46f94d 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Serbian/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.sr_rs@latin/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Swedish/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.sv_se/strings.po
index 3e52d1c1bc..3e52d1c1bc 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Swedish/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.sv_se/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Tamil (India)/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.ta_in/strings.po
index 8a7007685c..8a7007685c 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Tamil (India)/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.ta_in/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Thai/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.th_th/strings.po
index c76bc3bdc7..c76bc3bdc7 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Thai/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.th_th/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Turkish/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.tr_tr/strings.po
index a6ee608f32..a6ee608f32 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Turkish/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.tr_tr/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Ukrainian/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.uk_ua/strings.po
index 7031ed8949..7031ed8949 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Ukrainian/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.uk_ua/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Uzbek/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.uz_uz/strings.po
index ef286dc13d..ef286dc13d 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Uzbek/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.uz_uz/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Vietnamese/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.vi_vn/strings.po
index 03a22cfcd9..03a22cfcd9 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Vietnamese/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.vi_vn/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Chinese (Simple)/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.zh_cn/strings.po
index 29109b4bbe..29109b4bbe 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Chinese (Simple)/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.zh_cn/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/language/Chinese (Traditional)/strings.po b/addons/service.xbmc.versioncheck/resources/language/resource.language.zh_tw/strings.po
index 1094ebda6f..1094ebda6f 100644
--- a/addons/service.xbmc.versioncheck/resources/language/Chinese (Traditional)/strings.po
+++ b/addons/service.xbmc.versioncheck/resources/language/resource.language.zh_tw/strings.po
diff --git a/addons/service.xbmc.versioncheck/resources/lib/__init__.py b/addons/service.xbmc.versioncheck/resources/lib/__init__.py
new file mode 100644
index 0000000000..978a8fe75f
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/resources/lib/__init__.py
@@ -0,0 +1,14 @@
+# -*- coding: utf-8 -*-
+
+"""
+
+ Copyright (C) 2019 Team Kodi
+
+ This file is part of service.xbmc.versioncheck
+
+ SPDX-License-Identifier: GPL-3.0-or-later
+ See LICENSES/GPL-3.0-or-later.txt for more information.
+
+"""
+
+__all__ = ['runner', 'version_check']
diff --git a/addons/service.xbmc.versioncheck/resources/lib/runner.py b/addons/service.xbmc.versioncheck/resources/lib/runner.py
new file mode 100644
index 0000000000..21e8e8a181
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/resources/lib/runner.py
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+
+"""
+
+ Copyright (C) 2019 Team Kodi
+
+ This file is part of service.xbmc.versioncheck
+
+ SPDX-License-Identifier: GPL-3.0-or-later
+ See LICENSES/GPL-3.0-or-later.txt for more information.
+
+"""
+
+from version_check import service # pylint: disable=import-error
+
+service.run()
diff --git a/addons/service.xbmc.versioncheck/resources/lib/version_check/__init__.py b/addons/service.xbmc.versioncheck/resources/lib/version_check/__init__.py
new file mode 100644
index 0000000000..72aa8c7c5f
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/resources/lib/version_check/__init__.py
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+
+"""
+
+ Copyright (C) 2013-2014 Team-XBMC
+ Copyright (C) 2014-2019 Team Kodi
+
+ This file is part of service.xbmc.versioncheck
+
+ SPDX-License-Identifier: GPL-3.0-or-later
+ See LICENSES/GPL-3.0-or-later.txt for more information.
+
+"""
+
+__all__ = ['apt_daemon_handler', 'common', 'handler', 'json_interface', 'service',
+ 'shell_handler_apt', 'versions', 'viewer']
diff --git a/addons/service.xbmc.versioncheck/resources/lib/version_check/apt_daemon_handler.py b/addons/service.xbmc.versioncheck/resources/lib/version_check/apt_daemon_handler.py
new file mode 100644
index 0000000000..93a6e6243f
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/resources/lib/version_check/apt_daemon_handler.py
@@ -0,0 +1,120 @@
+# -*- coding: utf-8 -*-
+
+"""
+
+ Copyright (C) 2013-2014 Team-XBMC
+ Copyright (C) 2014-2019 Team Kodi
+
+ This file is part of service.xbmc.versioncheck
+
+ SPDX-License-Identifier: GPL-3.0-or-later
+ See LICENSES/GPL-3.0-or-later.txt for more information.
+
+"""
+
+from .common import log
+from .handler import Handler
+
+try:
+ import apt
+ from aptdaemon import client
+ from aptdaemon import errors
+except ImportError:
+ apt = None
+ client = None
+ errors = None
+ log('ImportError: apt, aptdaemon')
+
+
+class AptDaemonHandler(Handler):
+ """ Apt daemon handler
+ """
+
+ def __init__(self):
+ Handler.__init__(self)
+ self.apt_client = client.AptClient()
+
+ def _check_versions(self, package):
+ """ Check apt package versions
+
+ :param package: package to check
+ :type package: str
+ :return: installed version, candidate version
+ :rtype: str, str / False, False
+ """
+ if self.update and not self._update_cache():
+ return False, False
+ try:
+ trans = self.apt_client.upgrade_packages([package])
+ # trans = self.apt_client.upgrade_packages('bla')
+ trans.simulate(reply_handler=self._apt_trans_started,
+ error_handler=self._apt_error_handler)
+ pkg = trans.packages[4][0]
+ if pkg == package:
+ cache = apt.Cache()
+ cache.open(None)
+ cache.upgrade()
+ if cache[pkg].installed:
+ return cache[pkg].installed.version, cache[pkg].candidate.version
+
+ return False, False
+
+ except Exception as error: # pylint: disable=broad-except
+ log('Exception while checking versions: %s' % error)
+ return False, False
+
+ def _update_cache(self):
+ """ Update apt client cache
+
+ :return: success of updating apt cache
+ :rtype: bool
+ """
+ try:
+ return self.apt_client.update_cache(wait=True) == 'exit-success'
+ except errors.NotAuthorizedError:
+ log('You are not allowed to update the cache')
+ return False
+
+ def upgrade_package(self, package):
+ """ Upgrade apt package
+
+ :param package: package to upgrade
+ :type package: str
+ :return: success of apt package upgrade
+ :rtype: bool
+ """
+ try:
+ log('Installing new version')
+ if self.apt_client.upgrade_packages([package], wait=True) == 'exit-success':
+ log('Upgrade successful')
+ return True
+ except Exception as error: # pylint: disable=broad-except
+ log('Exception during upgrade: %s' % error)
+ return False
+
+ def upgrade_system(self):
+ """ Upgrade system
+
+ :return: success of system upgrade
+ :rtype: bool
+ """
+ try:
+ log('Upgrading system')
+ if self.apt_client.upgrade_system(wait=True) == 'exit-success':
+ return True
+ except Exception as error: # pylint: disable=broad-except
+ log('Exception during system upgrade: %s' % error)
+ return False
+
+ def _apt_trans_started(self):
+ """ Apt transfer reply handler
+ """
+
+ @staticmethod
+ def _apt_error_handler(error):
+ """ Apt transfer error handler
+
+ :param error: apt error message
+ :type error: str
+ """
+ log('Apt Error %s' % error)
diff --git a/addons/service.xbmc.versioncheck/resources/lib/version_check/common.py b/addons/service.xbmc.versioncheck/resources/lib/version_check/common.py
new file mode 100644
index 0000000000..74bb0f42b1
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/resources/lib/version_check/common.py
@@ -0,0 +1,288 @@
+# -*- coding: utf-8 -*-
+
+"""
+
+ Copyright (C) 2013-2014 Team-XBMC
+ Copyright (C) 2014-2019 Team Kodi
+
+ This file is part of service.xbmc.versioncheck
+
+ SPDX-License-Identifier: GPL-3.0-or-later
+ See LICENSES/GPL-3.0-or-later.txt for more information.
+
+"""
+
+import sys
+
+import xbmc # pylint: disable=import-error
+import xbmcaddon # pylint: disable=import-error
+import xbmcgui # pylint: disable=import-error
+import xbmcvfs # pylint: disable=import-error
+
+try:
+ xbmc.translatePath = xbmcvfs.translatePath
+except AttributeError:
+ pass
+
+ADDON = xbmcaddon.Addon('service.xbmc.versioncheck')
+ADDON_VERSION = ADDON.getAddonInfo('version')
+ADDON_NAME = ADDON.getAddonInfo('name')
+if sys.version_info[0] >= 3:
+ ADDON_PATH = ADDON.getAddonInfo('path')
+ ADDON_PROFILE = xbmc.translatePath(ADDON.getAddonInfo('profile'))
+else:
+ ADDON_PATH = ADDON.getAddonInfo('path').decode('utf-8')
+ ADDON_PROFILE = xbmc.translatePath(ADDON.getAddonInfo('profile')).decode('utf-8')
+ICON = ADDON.getAddonInfo('icon')
+KODI_VERSION_MAJOR = int(xbmc.getInfoLabel('System.BuildVersion')[0:2])
+
+MONITOR = xbmc.Monitor()
+
+
+# Fixes unicode problems
+def string_unicode(text, encoding='utf-8'):
+ """ Python 2/3 -> unicode/str
+
+ :param text: text to convert
+ :type text: unicode (py2) / str (py3) / bytes (py3)
+ :param encoding: text encoding
+ :type encoding: str
+ :return: converted text
+ :rtype: unicode (py2) / str (py3)
+ """
+ try:
+ if sys.version_info[0] >= 3:
+ text = str(text)
+ else:
+ text = unicode(text, encoding) # pylint: disable=undefined-variable
+ except: # pylint: disable=bare-except
+ pass
+ return text
+
+
+def normalize_string(text):
+ """ Normalize string
+
+ :param text: text to normalize
+ :type text: unicode (py2) / str (py3) / bytes (py3)
+ :return: normalized text
+ :rtype: unicode (py2) / str (py3)
+ """
+ try:
+ text = unicodedata.normalize('NFKD', string_unicode(text)).encode('ascii', 'ignore') # pylint: disable=undefined-variable
+ except: # pylint: disable=bare-except
+ pass
+ return text
+
+
+def localise(string_id):
+ """ Localise string id
+
+ :param string_id: id of the string to localise
+ :type string_id: int
+ :return: localised string
+ :rtype: unicode (py2) / str (py3)
+ """
+ string = normalize_string(ADDON.getLocalizedString(string_id))
+ return string
+
+
+def log(txt):
+ """ Log text at xbmc.LOGDEBUG level
+
+ :param txt: text to log
+ :type txt: str / unicode / bytes (py3)
+ """
+ if sys.version_info[0] >= 3:
+ if isinstance(txt, bytes):
+ txt = txt.decode('utf-8')
+ message = '%s: %s' % (ADDON_NAME, txt)
+ else:
+ if isinstance(txt, str):
+ txt = txt.decode('utf-8')
+ message = (u'%s: %s' % (ADDON_NAME, txt)).encode('utf-8')
+ xbmc.log(msg=message, level=xbmc.LOGDEBUG)
+
+
+def notification(heading, message, icon=None, time=15000, sound=True):
+ """ Create a notification
+
+ :param heading: notification heading
+ :type heading: str
+ :param message: notification message
+ :type message: str
+ :param icon: path and filename for the notification icon
+ :type icon: str
+ :param time: time to display notification
+ :type time: int
+ :param sound: is notification audible
+ :type sound: bool
+ """
+ if not icon:
+ icon = ICON
+ xbmcgui.Dialog().notification(heading, message, icon, time, sound)
+
+
+def get_password_from_user():
+ """ Prompt user to input password
+
+ :return: password
+ :rtype: str
+ """
+ pwd = ''
+ keyboard = xbmc.Keyboard('', ADDON_NAME + ': ' + localise(32022), True)
+ keyboard.doModal()
+ if keyboard.isConfirmed():
+ pwd = keyboard.getText()
+ return pwd
+
+
+def message_upgrade_success():
+ """ Upgrade success notification
+ """
+ notification(ADDON_NAME, localise(32013))
+
+
+def message_restart():
+ """ Prompt user to restart Kodi
+ """
+ if dialog_yes_no(32014):
+ xbmc.executebuiltin('RestartApp')
+
+
+def dialog_yes_no(line1=0, line2=0):
+ """ Prompt user with yes/no dialog
+
+ :param line1: string id for the first line of the dialog
+ :type line1: int
+ :param line2: string id for the second line of the dialog
+ :type line2: int
+ :return: users selection (yes / no)
+ :rtype: bool
+ """
+ return xbmcgui.Dialog().yesno(ADDON_NAME, '[CR]'.join([localise(line1), localise(line2)]))
+
+
+def upgrade_message(msg):
+ """ Prompt user with upgrade suggestion message
+
+ :param msg: string id for prompt message
+ :type msg: int
+ """
+ wait_for_end_of_video()
+
+ if ADDON.getSetting('lastnotified_version') < ADDON_VERSION:
+ xbmcgui.Dialog().ok(
+ ADDON_NAME,
+ '[CR]'.join([localise(msg), localise(32001), localise(32002)])
+ )
+ else:
+ log('Already notified one time for upgrading.')
+
+
+def upgrade_message2(version_installed, version_available, version_stable, old_version):
+ """ Prompt user with upgrade suggestion message
+
+ :param version_installed: currently installed version
+ :type version_installed: dict
+ :param version_available: available version
+ :type version_available: dict
+ :param version_stable: latest stable version
+ :type version_stable: dict
+ :param old_version: whether using an old version
+ :type old_version: bool / 'stable'
+ """
+ # shorten releasecandidate to rc
+ if version_installed['tag'] == 'releasecandidate':
+ version_installed['tag'] = 'rc'
+ if version_available['tag'] == 'releasecandidate':
+ version_available['tag'] = 'rc'
+ # convert json-rpc result to strings for usage
+ msg_current = '%i.%i %s%s' % (version_installed['major'],
+ version_installed['minor'],
+ version_installed['tag'],
+ version_installed.get('tagversion', ''))
+ msg_available = version_available['major'] + '.' + version_available['minor'] + ' ' + \
+ version_available['tag'] + version_available.get('tagversion', '')
+ msg_stable = version_stable['major'] + '.' + version_stable['minor'] + ' ' + \
+ version_stable['tag'] + version_stable.get('tagversion', '')
+ msg = localise(32034) % (msg_current, msg_available)
+
+ wait_for_end_of_video()
+
+ # hack: convert current version number to stable string
+ # so users don't get notified again. remove in future
+ if ADDON.getSetting('lastnotified_version') == '0.1.24':
+ ADDON.setSetting('lastnotified_stable', msg_stable)
+
+ # Show different dialogs depending if there's a newer stable available.
+ # Also split them between xbmc and kodi notifications to reduce possible confusion.
+ # People will find out once they visit the website.
+ # For stable only notify once and when there's a newer stable available.
+ # Ignore any add-on updates as those only count for != stable
+ if old_version == 'stable' and ADDON.getSetting('lastnotified_stable') != msg_stable:
+ if xbmcaddon.Addon('xbmc.addon').getAddonInfo('version') < '13.9.0':
+ xbmcgui.Dialog().ok(ADDON_NAME, '[CR]'.join([msg, localise(32030), localise(32031)]))
+ else:
+ xbmcgui.Dialog().ok(ADDON_NAME, '[CR]'.join([msg, localise(32032), localise(32033)]))
+ ADDON.setSetting('lastnotified_stable', msg_stable)
+
+ elif old_version != 'stable' and ADDON.getSetting('lastnotified_version') != msg_available:
+ if xbmcaddon.Addon('xbmc.addon').getAddonInfo('version') < '13.9.0':
+ # point them to xbmc.org
+ xbmcgui.Dialog().ok(ADDON_NAME, '[CR]'.join([msg, localise(32035), localise(32031)]))
+ else:
+ # use kodi.tv
+ xbmcgui.Dialog().ok(ADDON_NAME, '[CR]'.join([msg, localise(32035), localise(32033)]))
+
+ ADDON.setSetting('lastnotified_version', msg_available)
+
+ else:
+ log('Already notified one time for upgrading.')
+
+
+def abort_requested():
+ """ Kodi 13+ compatible xbmc.Monitor().abortRequested()
+
+ :return: whether abort requested
+ :rtype: bool
+ """
+ if KODI_VERSION_MAJOR > 13:
+ return MONITOR.abortRequested()
+
+ return xbmc.abortRequested
+
+
+def wait_for_abort(seconds):
+ """ Kodi 13+ compatible xbmc.Monitor().waitForAbort()
+
+ :param seconds: seconds to wait for abort
+ :type seconds: int / float
+ :return: whether abort was requested
+ :rtype: bool
+ """
+ if KODI_VERSION_MAJOR > 13:
+ return MONITOR.waitForAbort(seconds)
+
+ for _ in range(0, seconds * 1000 / 200):
+ if xbmc.abortRequested:
+ return True
+ xbmc.sleep(200)
+
+ return False
+
+
+def wait_for_end_of_video():
+ """ Wait for video playback to end
+ """
+ # Don't show notify while watching a video
+ while xbmc.Player().isPlayingVideo() and not abort_requested():
+ if wait_for_abort(1):
+ # Abort was requested while waiting. We should exit
+ break
+ i = 0
+ while i < 10 and not abort_requested():
+ if wait_for_abort(1):
+ # Abort was requested while waiting. We should exit
+ break
+ i += 1
diff --git a/addons/service.xbmc.versioncheck/resources/lib/version_check/distro/__init__.py b/addons/service.xbmc.versioncheck/resources/lib/version_check/distro/__init__.py
new file mode 100644
index 0000000000..e08322aacc
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/resources/lib/version_check/distro/__init__.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+
+"""
+
+ SPDX-License-Identifier: Apache-2.0
+ See LICENSES/Apache-2.0.txt for more information.
+
+"""
+
+__all__ = ['distro']
diff --git a/addons/service.xbmc.versioncheck/resources/lib/version_check/distro/distro.py b/addons/service.xbmc.versioncheck/resources/lib/version_check/distro/distro.py
new file mode 100644
index 0000000000..33061633ef
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/resources/lib/version_check/distro/distro.py
@@ -0,0 +1,1216 @@
+# Copyright 2015,2016,2017 Nir Cohen
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""
+The ``distro`` package (``distro`` stands for Linux Distribution) provides
+information about the Linux distribution it runs on, such as a reliable
+machine-readable distro ID, or version information.
+
+It is the recommended replacement for Python's original
+:py:func:`platform.linux_distribution` function, but it provides much more
+functionality. An alternative implementation became necessary because Python
+3.5 deprecated this function, and Python 3.8 will remove it altogether.
+Its predecessor function :py:func:`platform.dist` was already
+deprecated since Python 2.6 and will also be removed in Python 3.8.
+Still, there are many cases in which access to OS distribution information
+is needed. See `Python issue 1322 <https://bugs.python.org/issue1322>`_ for
+more information.
+"""
+
+import os
+import re
+import sys
+import json
+import shlex
+import logging
+import argparse
+import subprocess
+
+
+_UNIXCONFDIR = os.environ.get('UNIXCONFDIR', '/etc')
+_OS_RELEASE_BASENAME = 'os-release'
+
+#: Translation table for normalizing the "ID" attribute defined in os-release
+#: files, for use by the :func:`distro.id` method.
+#:
+#: * Key: Value as defined in the os-release file, translated to lower case,
+#: with blanks translated to underscores.
+#:
+#: * Value: Normalized value.
+NORMALIZED_OS_ID = {
+ 'ol': 'oracle', # Oracle Enterprise Linux
+}
+
+#: Translation table for normalizing the "Distributor ID" attribute returned by
+#: the lsb_release command, for use by the :func:`distro.id` method.
+#:
+#: * Key: Value as returned by the lsb_release command, translated to lower
+#: case, with blanks translated to underscores.
+#:
+#: * Value: Normalized value.
+NORMALIZED_LSB_ID = {
+ 'enterpriseenterprise': 'oracle', # Oracle Enterprise Linux
+ 'redhatenterpriseworkstation': 'rhel', # RHEL 6, 7 Workstation
+ 'redhatenterpriseserver': 'rhel', # RHEL 6, 7 Server
+}
+
+#: Translation table for normalizing the distro ID derived from the file name
+#: of distro release files, for use by the :func:`distro.id` method.
+#:
+#: * Key: Value as derived from the file name of a distro release file,
+#: translated to lower case, with blanks translated to underscores.
+#:
+#: * Value: Normalized value.
+NORMALIZED_DISTRO_ID = {
+ 'redhat': 'rhel', # RHEL 6.x, 7.x
+}
+
+# Pattern for content of distro release file (reversed)
+_DISTRO_RELEASE_CONTENT_REVERSED_PATTERN = re.compile(
+ r'(?:[^)]*\)(.*)\()? *(?:STL )?([\d.+\-a-z]*\d) *(?:esaeler *)?(.+)')
+
+# Pattern for base file name of distro release file
+_DISTRO_RELEASE_BASENAME_PATTERN = re.compile(
+ r'(\w+)[-_](release|version)$')
+
+# Base file names to be ignored when searching for distro release file
+_DISTRO_RELEASE_IGNORE_BASENAMES = (
+ 'debian_version',
+ 'lsb-release',
+ 'oem-release',
+ _OS_RELEASE_BASENAME,
+ 'system-release'
+)
+
+
+def linux_distribution(full_distribution_name=True):
+ """
+ Return information about the current OS distribution as a tuple
+ ``(id_name, version, codename)`` with items as follows:
+
+ * ``id_name``: If *full_distribution_name* is false, the result of
+ :func:`distro.id`. Otherwise, the result of :func:`distro.name`.
+
+ * ``version``: The result of :func:`distro.version`.
+
+ * ``codename``: The result of :func:`distro.codename`.
+
+ The interface of this function is compatible with the original
+ :py:func:`platform.linux_distribution` function, supporting a subset of
+ its parameters.
+
+ The data it returns may not exactly be the same, because it uses more data
+ sources than the original function, and that may lead to different data if
+ the OS distribution is not consistent across multiple data sources it
+ provides (there are indeed such distributions ...).
+
+ Another reason for differences is the fact that the :func:`distro.id`
+ method normalizes the distro ID string to a reliable machine-readable value
+ for a number of popular OS distributions.
+ """
+ return _distro.linux_distribution(full_distribution_name)
+
+
+def id():
+ """
+ Return the distro ID of the current distribution, as a
+ machine-readable string.
+
+ For a number of OS distributions, the returned distro ID value is
+ *reliable*, in the sense that it is documented and that it does not change
+ across releases of the distribution.
+
+ This package maintains the following reliable distro ID values:
+
+ ============== =========================================
+ Distro ID Distribution
+ ============== =========================================
+ "ubuntu" Ubuntu
+ "debian" Debian
+ "rhel" RedHat Enterprise Linux
+ "centos" CentOS
+ "fedora" Fedora
+ "sles" SUSE Linux Enterprise Server
+ "opensuse" openSUSE
+ "amazon" Amazon Linux
+ "arch" Arch Linux
+ "cloudlinux" CloudLinux OS
+ "exherbo" Exherbo Linux
+ "gentoo" GenToo Linux
+ "ibm_powerkvm" IBM PowerKVM
+ "kvmibm" KVM for IBM z Systems
+ "linuxmint" Linux Mint
+ "mageia" Mageia
+ "mandriva" Mandriva Linux
+ "parallels" Parallels
+ "pidora" Pidora
+ "raspbian" Raspbian
+ "oracle" Oracle Linux (and Oracle Enterprise Linux)
+ "scientific" Scientific Linux
+ "slackware" Slackware
+ "xenserver" XenServer
+ "openbsd" OpenBSD
+ "netbsd" NetBSD
+ "freebsd" FreeBSD
+ ============== =========================================
+
+ If you have a need to get distros for reliable IDs added into this set,
+ or if you find that the :func:`distro.id` function returns a different
+ distro ID for one of the listed distros, please create an issue in the
+ `distro issue tracker`_.
+
+ **Lookup hierarchy and transformations:**
+
+ First, the ID is obtained from the following sources, in the specified
+ order. The first available and non-empty value is used:
+
+ * the value of the "ID" attribute of the os-release file,
+
+ * the value of the "Distributor ID" attribute returned by the lsb_release
+ command,
+
+ * the first part of the file name of the distro release file,
+
+ The so determined ID value then passes the following transformations,
+ before it is returned by this method:
+
+ * it is translated to lower case,
+
+ * blanks (which should not be there anyway) are translated to underscores,
+
+ * a normalization of the ID is performed, based upon
+ `normalization tables`_. The purpose of this normalization is to ensure
+ that the ID is as reliable as possible, even across incompatible changes
+ in the OS distributions. A common reason for an incompatible change is
+ the addition of an os-release file, or the addition of the lsb_release
+ command, with ID values that differ from what was previously determined
+ from the distro release file name.
+ """
+ return _distro.id()
+
+
+def name(pretty=False):
+ """
+ Return the name of the current OS distribution, as a human-readable
+ string.
+
+ If *pretty* is false, the name is returned without version or codename.
+ (e.g. "CentOS Linux")
+
+ If *pretty* is true, the version and codename are appended.
+ (e.g. "CentOS Linux 7.1.1503 (Core)")
+
+ **Lookup hierarchy:**
+
+ The name is obtained from the following sources, in the specified order.
+ The first available and non-empty value is used:
+
+ * If *pretty* is false:
+
+ - the value of the "NAME" attribute of the os-release file,
+
+ - the value of the "Distributor ID" attribute returned by the lsb_release
+ command,
+
+ - the value of the "<name>" field of the distro release file.
+
+ * If *pretty* is true:
+
+ - the value of the "PRETTY_NAME" attribute of the os-release file,
+
+ - the value of the "Description" attribute returned by the lsb_release
+ command,
+
+ - the value of the "<name>" field of the distro release file, appended
+ with the value of the pretty version ("<version_id>" and "<codename>"
+ fields) of the distro release file, if available.
+ """
+ return _distro.name(pretty)
+
+
+def version(pretty=False, best=False):
+ """
+ Return the version of the current OS distribution, as a human-readable
+ string.
+
+ If *pretty* is false, the version is returned without codename (e.g.
+ "7.0").
+
+ If *pretty* is true, the codename in parenthesis is appended, if the
+ codename is non-empty (e.g. "7.0 (Maipo)").
+
+ Some distributions provide version numbers with different precisions in
+ the different sources of distribution information. Examining the different
+ sources in a fixed priority order does not always yield the most precise
+ version (e.g. for Debian 8.2, or CentOS 7.1).
+
+ The *best* parameter can be used to control the approach for the returned
+ version:
+
+ If *best* is false, the first non-empty version number in priority order of
+ the examined sources is returned.
+
+ If *best* is true, the most precise version number out of all examined
+ sources is returned.
+
+ **Lookup hierarchy:**
+
+ In all cases, the version number is obtained from the following sources.
+ If *best* is false, this order represents the priority order:
+
+ * the value of the "VERSION_ID" attribute of the os-release file,
+ * the value of the "Release" attribute returned by the lsb_release
+ command,
+ * the version number parsed from the "<version_id>" field of the first line
+ of the distro release file,
+ * the version number parsed from the "PRETTY_NAME" attribute of the
+ os-release file, if it follows the format of the distro release files.
+ * the version number parsed from the "Description" attribute returned by
+ the lsb_release command, if it follows the format of the distro release
+ files.
+ """
+ return _distro.version(pretty, best)
+
+
+def version_parts(best=False):
+ """
+ Return the version of the current OS distribution as a tuple
+ ``(major, minor, build_number)`` with items as follows:
+
+ * ``major``: The result of :func:`distro.major_version`.
+
+ * ``minor``: The result of :func:`distro.minor_version`.
+
+ * ``build_number``: The result of :func:`distro.build_number`.
+
+ For a description of the *best* parameter, see the :func:`distro.version`
+ method.
+ """
+ return _distro.version_parts(best)
+
+
+def major_version(best=False):
+ """
+ Return the major version of the current OS distribution, as a string,
+ if provided.
+ Otherwise, the empty string is returned. The major version is the first
+ part of the dot-separated version string.
+
+ For a description of the *best* parameter, see the :func:`distro.version`
+ method.
+ """
+ return _distro.major_version(best)
+
+
+def minor_version(best=False):
+ """
+ Return the minor version of the current OS distribution, as a string,
+ if provided.
+ Otherwise, the empty string is returned. The minor version is the second
+ part of the dot-separated version string.
+
+ For a description of the *best* parameter, see the :func:`distro.version`
+ method.
+ """
+ return _distro.minor_version(best)
+
+
+def build_number(best=False):
+ """
+ Return the build number of the current OS distribution, as a string,
+ if provided.
+ Otherwise, the empty string is returned. The build number is the third part
+ of the dot-separated version string.
+
+ For a description of the *best* parameter, see the :func:`distro.version`
+ method.
+ """
+ return _distro.build_number(best)
+
+
+def like():
+ """
+ Return a space-separated list of distro IDs of distributions that are
+ closely related to the current OS distribution in regards to packaging
+ and programming interfaces, for example distributions the current
+ distribution is a derivative from.
+
+ **Lookup hierarchy:**
+
+ This information item is only provided by the os-release file.
+ For details, see the description of the "ID_LIKE" attribute in the
+ `os-release man page
+ <http://www.freedesktop.org/software/systemd/man/os-release.html>`_.
+ """
+ return _distro.like()
+
+
+def codename():
+ """
+ Return the codename for the release of the current OS distribution,
+ as a string.
+
+ If the distribution does not have a codename, an empty string is returned.
+
+ Note that the returned codename is not always really a codename. For
+ example, openSUSE returns "x86_64". This function does not handle such
+ cases in any special way and just returns the string it finds, if any.
+
+ **Lookup hierarchy:**
+
+ * the codename within the "VERSION" attribute of the os-release file, if
+ provided,
+
+ * the value of the "Codename" attribute returned by the lsb_release
+ command,
+
+ * the value of the "<codename>" field of the distro release file.
+ """
+ return _distro.codename()
+
+
+def info(pretty=False, best=False):
+ """
+ Return certain machine-readable information items about the current OS
+ distribution in a dictionary, as shown in the following example:
+
+ .. sourcecode:: python
+
+ {
+ 'id': 'rhel',
+ 'version': '7.0',
+ 'version_parts': {
+ 'major': '7',
+ 'minor': '0',
+ 'build_number': ''
+ },
+ 'like': 'fedora',
+ 'codename': 'Maipo'
+ }
+
+ The dictionary structure and keys are always the same, regardless of which
+ information items are available in the underlying data sources. The values
+ for the various keys are as follows:
+
+ * ``id``: The result of :func:`distro.id`.
+
+ * ``version``: The result of :func:`distro.version`.
+
+ * ``version_parts -> major``: The result of :func:`distro.major_version`.
+
+ * ``version_parts -> minor``: The result of :func:`distro.minor_version`.
+
+ * ``version_parts -> build_number``: The result of
+ :func:`distro.build_number`.
+
+ * ``like``: The result of :func:`distro.like`.
+
+ * ``codename``: The result of :func:`distro.codename`.
+
+ For a description of the *pretty* and *best* parameters, see the
+ :func:`distro.version` method.
+ """
+ return _distro.info(pretty, best)
+
+
+def os_release_info():
+ """
+ Return a dictionary containing key-value pairs for the information items
+ from the os-release file data source of the current OS distribution.
+
+ See `os-release file`_ for details about these information items.
+ """
+ return _distro.os_release_info()
+
+
+def lsb_release_info():
+ """
+ Return a dictionary containing key-value pairs for the information items
+ from the lsb_release command data source of the current OS distribution.
+
+ See `lsb_release command output`_ for details about these information
+ items.
+ """
+ return _distro.lsb_release_info()
+
+
+def distro_release_info():
+ """
+ Return a dictionary containing key-value pairs for the information items
+ from the distro release file data source of the current OS distribution.
+
+ See `distro release file`_ for details about these information items.
+ """
+ return _distro.distro_release_info()
+
+
+def uname_info():
+ """
+ Return a dictionary containing key-value pairs for the information items
+ from the distro release file data source of the current OS distribution.
+ """
+ return _distro.uname_info()
+
+
+def os_release_attr(attribute):
+ """
+ Return a single named information item from the os-release file data source
+ of the current OS distribution.
+
+ Parameters:
+
+ * ``attribute`` (string): Key of the information item.
+
+ Returns:
+
+ * (string): Value of the information item, if the item exists.
+ The empty string, if the item does not exist.
+
+ See `os-release file`_ for details about these information items.
+ """
+ return _distro.os_release_attr(attribute)
+
+
+def lsb_release_attr(attribute):
+ """
+ Return a single named information item from the lsb_release command output
+ data source of the current OS distribution.
+
+ Parameters:
+
+ * ``attribute`` (string): Key of the information item.
+
+ Returns:
+
+ * (string): Value of the information item, if the item exists.
+ The empty string, if the item does not exist.
+
+ See `lsb_release command output`_ for details about these information
+ items.
+ """
+ return _distro.lsb_release_attr(attribute)
+
+
+def distro_release_attr(attribute):
+ """
+ Return a single named information item from the distro release file
+ data source of the current OS distribution.
+
+ Parameters:
+
+ * ``attribute`` (string): Key of the information item.
+
+ Returns:
+
+ * (string): Value of the information item, if the item exists.
+ The empty string, if the item does not exist.
+
+ See `distro release file`_ for details about these information items.
+ """
+ return _distro.distro_release_attr(attribute)
+
+
+def uname_attr(attribute):
+ """
+ Return a single named information item from the distro release file
+ data source of the current OS distribution.
+
+ Parameters:
+
+ * ``attribute`` (string): Key of the information item.
+
+ Returns:
+
+ * (string): Value of the information item, if the item exists.
+ The empty string, if the item does not exist.
+ """
+ return _distro.uname_attr(attribute)
+
+
+class cached_property(object):
+ """A version of @property which caches the value. On access, it calls the
+ underlying function and sets the value in `__dict__` so future accesses
+ will not re-call the property.
+ """
+ def __init__(self, f):
+ self._fname = f.__name__
+ self._f = f
+
+ def __get__(self, obj, owner):
+ assert obj is not None, 'call {} on an instance'.format(self._fname)
+ ret = obj.__dict__[self._fname] = self._f(obj)
+ return ret
+
+
+class LinuxDistribution(object):
+ """
+ Provides information about a OS distribution.
+
+ This package creates a private module-global instance of this class with
+ default initialization arguments, that is used by the
+ `consolidated accessor functions`_ and `single source accessor functions`_.
+ By using default initialization arguments, that module-global instance
+ returns data about the current OS distribution (i.e. the distro this
+ package runs on).
+
+ Normally, it is not necessary to create additional instances of this class.
+ However, in situations where control is needed over the exact data sources
+ that are used, instances of this class can be created with a specific
+ distro release file, or a specific os-release file, or without invoking the
+ lsb_release command.
+ """
+
+ def __init__(self,
+ include_lsb=True,
+ os_release_file='',
+ distro_release_file='',
+ include_uname=True):
+ """
+ The initialization method of this class gathers information from the
+ available data sources, and stores that in private instance attributes.
+ Subsequent access to the information items uses these private instance
+ attributes, so that the data sources are read only once.
+
+ Parameters:
+
+ * ``include_lsb`` (bool): Controls whether the
+ `lsb_release command output`_ is included as a data source.
+
+ If the lsb_release command is not available in the program execution
+ path, the data source for the lsb_release command will be empty.
+
+ * ``os_release_file`` (string): The path name of the
+ `os-release file`_ that is to be used as a data source.
+
+ An empty string (the default) will cause the default path name to
+ be used (see `os-release file`_ for details).
+
+ If the specified or defaulted os-release file does not exist, the
+ data source for the os-release file will be empty.
+
+ * ``distro_release_file`` (string): The path name of the
+ `distro release file`_ that is to be used as a data source.
+
+ An empty string (the default) will cause a default search algorithm
+ to be used (see `distro release file`_ for details).
+
+ If the specified distro release file does not exist, or if no default
+ distro release file can be found, the data source for the distro
+ release file will be empty.
+
+ * ``include_name`` (bool): Controls whether uname command output is
+ included as a data source. If the uname command is not available in
+ the program execution path the data source for the uname command will
+ be empty.
+
+ Public instance attributes:
+
+ * ``os_release_file`` (string): The path name of the
+ `os-release file`_ that is actually used as a data source. The
+ empty string if no distro release file is used as a data source.
+
+ * ``distro_release_file`` (string): The path name of the
+ `distro release file`_ that is actually used as a data source. The
+ empty string if no distro release file is used as a data source.
+
+ * ``include_lsb`` (bool): The result of the ``include_lsb`` parameter.
+ This controls whether the lsb information will be loaded.
+
+ * ``include_uname`` (bool): The result of the ``include_uname``
+ parameter. This controls whether the uname information will
+ be loaded.
+
+ Raises:
+
+ * :py:exc:`IOError`: Some I/O issue with an os-release file or distro
+ release file.
+
+ * :py:exc:`subprocess.CalledProcessError`: The lsb_release command had
+ some issue (other than not being available in the program execution
+ path).
+
+ * :py:exc:`UnicodeError`: A data source has unexpected characters or
+ uses an unexpected encoding.
+ """
+ self.os_release_file = os_release_file or \
+ os.path.join(_UNIXCONFDIR, _OS_RELEASE_BASENAME)
+ self.distro_release_file = distro_release_file or '' # updated later
+ self.include_lsb = include_lsb
+ self.include_uname = include_uname
+
+ def __repr__(self):
+ """Return repr of all info
+ """
+ return \
+ "LinuxDistribution(" \
+ "os_release_file={self.os_release_file!r}, " \
+ "distro_release_file={self.distro_release_file!r}, " \
+ "include_lsb={self.include_lsb!r}, " \
+ "include_uname={self.include_uname!r}, " \
+ "_os_release_info={self._os_release_info!r}, " \
+ "_lsb_release_info={self._lsb_release_info!r}, " \
+ "_distro_release_info={self._distro_release_info!r}, " \
+ "_uname_info={self._uname_info!r})".format(
+ self=self)
+
+ def linux_distribution(self, full_distribution_name=True):
+ """
+ Return information about the OS distribution that is compatible
+ with Python's :func:`platform.linux_distribution`, supporting a subset
+ of its parameters.
+
+ For details, see :func:`distro.linux_distribution`.
+ """
+ return (
+ self.name() if full_distribution_name else self.id(),
+ self.version(),
+ self.codename()
+ )
+
+ def id(self):
+ """Return the distro ID of the OS distribution, as a string.
+
+ For details, see :func:`distro.id`.
+ """
+ def normalize(distro_id, table):
+ distro_id = distro_id.lower().replace(' ', '_')
+ return table.get(distro_id, distro_id)
+
+ distro_id = self.os_release_attr('id')
+ if distro_id:
+ return normalize(distro_id, NORMALIZED_OS_ID)
+
+ distro_id = self.lsb_release_attr('distributor_id')
+ if distro_id:
+ return normalize(distro_id, NORMALIZED_LSB_ID)
+
+ distro_id = self.distro_release_attr('id')
+ if distro_id:
+ return normalize(distro_id, NORMALIZED_DISTRO_ID)
+
+ distro_id = self.uname_attr('id')
+ if distro_id:
+ return normalize(distro_id, NORMALIZED_DISTRO_ID)
+
+ return ''
+
+ def name(self, pretty=False):
+ """
+ Return the name of the OS distribution, as a string.
+
+ For details, see :func:`distro.name`.
+ """
+ name = self.os_release_attr('name') \
+ or self.lsb_release_attr('distributor_id') \
+ or self.distro_release_attr('name') \
+ or self.uname_attr('name')
+ if pretty:
+ name = self.os_release_attr('pretty_name') \
+ or self.lsb_release_attr('description')
+ if not name:
+ name = self.distro_release_attr('name') \
+ or self.uname_attr('name')
+ version = self.version(pretty=True)
+ if version:
+ name = name + ' ' + version
+ return name or ''
+
+ def version(self, pretty=False, best=False):
+ """
+ Return the version of the OS distribution, as a string.
+
+ For details, see :func:`distro.version`.
+ """
+ versions = [
+ self.os_release_attr('version_id'),
+ self.lsb_release_attr('release'),
+ self.distro_release_attr('version_id'),
+ self._parse_distro_release_content(
+ self.os_release_attr('pretty_name')).get('version_id', ''),
+ self._parse_distro_release_content(
+ self.lsb_release_attr('description')).get('version_id', ''),
+ self.uname_attr('release')
+ ]
+ version = ''
+ if best:
+ # This algorithm uses the last version in priority order that has
+ # the best precision. If the versions are not in conflict, that
+ # does not matter; otherwise, using the last one instead of the
+ # first one might be considered a surprise.
+ for v in versions:
+ if v.count(".") > version.count(".") or version == '':
+ version = v
+ else:
+ for v in versions:
+ if v != '':
+ version = v
+ break
+ if pretty and version and self.codename():
+ version = u'{0} ({1})'.format(version, self.codename())
+ return version
+
+ def version_parts(self, best=False):
+ """
+ Return the version of the OS distribution, as a tuple of version
+ numbers.
+
+ For details, see :func:`distro.version_parts`.
+ """
+ version_str = self.version(best=best)
+ if version_str:
+ version_regex = re.compile(r'(\d+)\.?(\d+)?\.?(\d+)?')
+ matches = version_regex.match(version_str)
+ if matches:
+ major, minor, build_number = matches.groups()
+ return major, minor or '', build_number or ''
+ return '', '', ''
+
+ def major_version(self, best=False):
+ """
+ Return the major version number of the current distribution.
+
+ For details, see :func:`distro.major_version`.
+ """
+ return self.version_parts(best)[0]
+
+ def minor_version(self, best=False):
+ """
+ Return the minor version number of the current distribution.
+
+ For details, see :func:`distro.minor_version`.
+ """
+ return self.version_parts(best)[1]
+
+ def build_number(self, best=False):
+ """
+ Return the build number of the current distribution.
+
+ For details, see :func:`distro.build_number`.
+ """
+ return self.version_parts(best)[2]
+
+ def like(self):
+ """
+ Return the IDs of distributions that are like the OS distribution.
+
+ For details, see :func:`distro.like`.
+ """
+ return self.os_release_attr('id_like') or ''
+
+ def codename(self):
+ """
+ Return the codename of the OS distribution.
+
+ For details, see :func:`distro.codename`.
+ """
+ try:
+ # Handle os_release specially since distros might purposefully set
+ # this to empty string to have no codename
+ return self._os_release_info['codename']
+ except KeyError:
+ return self.lsb_release_attr('codename') \
+ or self.distro_release_attr('codename') \
+ or ''
+
+ def info(self, pretty=False, best=False):
+ """
+ Return certain machine-readable information about the OS
+ distribution.
+
+ For details, see :func:`distro.info`.
+ """
+ return dict(
+ id=self.id(),
+ version=self.version(pretty, best),
+ version_parts=dict(
+ major=self.major_version(best),
+ minor=self.minor_version(best),
+ build_number=self.build_number(best)
+ ),
+ like=self.like(),
+ codename=self.codename(),
+ )
+
+ def os_release_info(self):
+ """
+ Return a dictionary containing key-value pairs for the information
+ items from the os-release file data source of the OS distribution.
+
+ For details, see :func:`distro.os_release_info`.
+ """
+ return self._os_release_info
+
+ def lsb_release_info(self):
+ """
+ Return a dictionary containing key-value pairs for the information
+ items from the lsb_release command data source of the OS
+ distribution.
+
+ For details, see :func:`distro.lsb_release_info`.
+ """
+ return self._lsb_release_info
+
+ def distro_release_info(self):
+ """
+ Return a dictionary containing key-value pairs for the information
+ items from the distro release file data source of the OS
+ distribution.
+
+ For details, see :func:`distro.distro_release_info`.
+ """
+ return self._distro_release_info
+
+ def uname_info(self):
+ """
+ Return a dictionary containing key-value pairs for the information
+ items from the uname command data source of the OS distribution.
+
+ For details, see :func:`distro.uname_info`.
+ """
+ return self._uname_info
+
+ def os_release_attr(self, attribute):
+ """
+ Return a single named information item from the os-release file data
+ source of the OS distribution.
+
+ For details, see :func:`distro.os_release_attr`.
+ """
+ return self._os_release_info.get(attribute, '')
+
+ def lsb_release_attr(self, attribute):
+ """
+ Return a single named information item from the lsb_release command
+ output data source of the OS distribution.
+
+ For details, see :func:`distro.lsb_release_attr`.
+ """
+ return self._lsb_release_info.get(attribute, '')
+
+ def distro_release_attr(self, attribute):
+ """
+ Return a single named information item from the distro release file
+ data source of the OS distribution.
+
+ For details, see :func:`distro.distro_release_attr`.
+ """
+ return self._distro_release_info.get(attribute, '')
+
+ def uname_attr(self, attribute):
+ """
+ Return a single named information item from the uname command
+ output data source of the OS distribution.
+
+ For details, see :func:`distro.uname_release_attr`.
+ """
+ return self._uname_info.get(attribute, '')
+
+ @cached_property
+ def _os_release_info(self):
+ """
+ Get the information items from the specified os-release file.
+
+ Returns:
+ A dictionary containing all information items.
+ """
+ if os.path.isfile(self.os_release_file):
+ with open(self.os_release_file) as release_file:
+ return self._parse_os_release_content(release_file)
+ return {}
+
+ @staticmethod
+ def _parse_os_release_content(lines):
+ """
+ Parse the lines of an os-release file.
+
+ Parameters:
+
+ * lines: Iterable through the lines in the os-release file.
+ Each line must be a unicode string or a UTF-8 encoded byte
+ string.
+
+ Returns:
+ A dictionary containing all information items.
+ """
+ props = {}
+ lexer = shlex.shlex(lines, posix=True)
+ lexer.whitespace_split = True
+
+ # The shlex module defines its `wordchars` variable using literals,
+ # making it dependent on the encoding of the Python source file.
+ # In Python 2.6 and 2.7, the shlex source file is encoded in
+ # 'iso-8859-1', and the `wordchars` variable is defined as a byte
+ # string. This causes a UnicodeDecodeError to be raised when the
+ # parsed content is a unicode object. The following fix resolves that
+ # (... but it should be fixed in shlex...):
+ if sys.version_info[0] == 2 and isinstance(lexer.wordchars, bytes):
+ lexer.wordchars = lexer.wordchars.decode('iso-8859-1')
+
+ tokens = list(lexer)
+ for token in tokens:
+ # At this point, all shell-like parsing has been done (i.e.
+ # comments processed, quotes and backslash escape sequences
+ # processed, multi-line values assembled, trailing newlines
+ # stripped, etc.), so the tokens are now either:
+ # * variable assignments: var=value
+ # * commands or their arguments (not allowed in os-release)
+ if '=' in token:
+ k, v = token.split('=', 1)
+ if isinstance(v, bytes):
+ v = v.decode('utf-8')
+ props[k.lower()] = v
+ else:
+ # Ignore any tokens that are not variable assignments
+ pass
+
+ if 'version_codename' in props:
+ # os-release added a version_codename field. Use that in
+ # preference to anything else Note that some distros purposefully
+ # do not have code names. They should be setting
+ # version_codename=""
+ props['codename'] = props['version_codename']
+ elif 'ubuntu_codename' in props:
+ # Same as above but a non-standard field name used on older Ubuntus
+ props['codename'] = props['ubuntu_codename']
+ elif 'version' in props:
+ # If there is no version_codename, parse it from the version
+ codename = re.search(r'(\(\D+\))|,(\s+)?\D+', props['version'])
+ if codename:
+ codename = codename.group()
+ codename = codename.strip('()')
+ codename = codename.strip(',')
+ codename = codename.strip()
+ # codename appears within paranthese.
+ props['codename'] = codename
+
+ return props
+
+ @cached_property
+ def _lsb_release_info(self):
+ """
+ Get the information items from the lsb_release command output.
+
+ Returns:
+ A dictionary containing all information items.
+ """
+ if not self.include_lsb:
+ return {}
+ with open(os.devnull, 'w') as devnull:
+ try:
+ cmd = ('lsb_release', '-a')
+ stdout = subprocess.check_output(cmd, stderr=devnull)
+ except OSError: # Command not found
+ return {}
+ content = stdout.decode(sys.getfilesystemencoding()).splitlines()
+ return self._parse_lsb_release_content(content)
+
+ @staticmethod
+ def _parse_lsb_release_content(lines):
+ """
+ Parse the output of the lsb_release command.
+
+ Parameters:
+
+ * lines: Iterable through the lines of the lsb_release output.
+ Each line must be a unicode string or a UTF-8 encoded byte
+ string.
+
+ Returns:
+ A dictionary containing all information items.
+ """
+ props = {}
+ for line in lines:
+ kv = line.strip('\n').split(':', 1)
+ if len(kv) != 2:
+ # Ignore lines without colon.
+ continue
+ k, v = kv
+ props.update({k.replace(' ', '_').lower(): v.strip()})
+ return props
+
+ @cached_property
+ def _uname_info(self):
+ with open(os.devnull, 'w') as devnull:
+ try:
+ cmd = ('uname', '-rs')
+ stdout = subprocess.check_output(cmd, stderr=devnull)
+ except OSError:
+ return {}
+ content = stdout.decode(sys.getfilesystemencoding()).splitlines()
+ return self._parse_uname_content(content)
+
+ @staticmethod
+ def _parse_uname_content(lines):
+ props = {}
+ match = re.search(r'^([^\s]+)\s+([\d\.]+)', lines[0].strip())
+ if match:
+ name, version = match.groups()
+
+ # This is to prevent the Linux kernel version from
+ # appearing as the 'best' version on otherwise
+ # identifiable distributions.
+ if name == 'Linux':
+ return {}
+ props['id'] = name.lower()
+ props['name'] = name
+ props['release'] = version
+ return props
+
+ @cached_property
+ def _distro_release_info(self):
+ """
+ Get the information items from the specified distro release file.
+
+ Returns:
+ A dictionary containing all information items.
+ """
+ if self.distro_release_file:
+ # If it was specified, we use it and parse what we can, even if
+ # its file name or content does not match the expected pattern.
+ distro_info = self._parse_distro_release_file(
+ self.distro_release_file)
+ basename = os.path.basename(self.distro_release_file)
+ # The file name pattern for user-specified distro release files
+ # is somewhat more tolerant (compared to when searching for the
+ # file), because we want to use what was specified as best as
+ # possible.
+ match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
+ if 'name' in distro_info \
+ and 'cloudlinux' in distro_info['name'].lower():
+ distro_info['id'] = 'cloudlinux'
+ elif match:
+ distro_info['id'] = match.group(1)
+ return distro_info
+ else:
+ try:
+ basenames = os.listdir(_UNIXCONFDIR)
+ # We sort for repeatability in cases where there are multiple
+ # distro specific files; e.g. CentOS, Oracle, Enterprise all
+ # containing `redhat-release` on top of their own.
+ basenames.sort()
+ except OSError:
+ # This may occur when /etc is not readable but we can't be
+ # sure about the *-release files. Check common entries of
+ # /etc for information. If they turn out to not be there the
+ # error is handled in `_parse_distro_release_file()`.
+ basenames = ['SuSE-release',
+ 'arch-release',
+ 'base-release',
+ 'centos-release',
+ 'fedora-release',
+ 'gentoo-release',
+ 'mageia-release',
+ 'mandrake-release',
+ 'mandriva-release',
+ 'mandrivalinux-release',
+ 'manjaro-release',
+ 'oracle-release',
+ 'redhat-release',
+ 'sl-release',
+ 'slackware-version']
+ for basename in basenames:
+ if basename in _DISTRO_RELEASE_IGNORE_BASENAMES:
+ continue
+ match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
+ if match:
+ filepath = os.path.join(_UNIXCONFDIR, basename)
+ distro_info = self._parse_distro_release_file(filepath)
+ if 'name' in distro_info:
+ # The name is always present if the pattern matches
+ self.distro_release_file = filepath
+ distro_info['id'] = match.group(1)
+ if 'cloudlinux' in distro_info['name'].lower():
+ distro_info['id'] = 'cloudlinux'
+ return distro_info
+ return {}
+
+ def _parse_distro_release_file(self, filepath):
+ """
+ Parse a distro release file.
+
+ Parameters:
+
+ * filepath: Path name of the distro release file.
+
+ Returns:
+ A dictionary containing all information items.
+ """
+ try:
+ with open(filepath) as fp:
+ # Only parse the first line. For instance, on SLES there
+ # are multiple lines. We don't want them...
+ return self._parse_distro_release_content(fp.readline())
+ except (OSError, IOError):
+ # Ignore not being able to read a specific, seemingly version
+ # related file.
+ # See https://github.com/nir0s/distro/issues/162
+ return {}
+
+ @staticmethod
+ def _parse_distro_release_content(line):
+ """
+ Parse a line from a distro release file.
+
+ Parameters:
+ * line: Line from the distro release file. Must be a unicode string
+ or a UTF-8 encoded byte string.
+
+ Returns:
+ A dictionary containing all information items.
+ """
+ if isinstance(line, bytes):
+ line = line.decode('utf-8')
+ matches = _DISTRO_RELEASE_CONTENT_REVERSED_PATTERN.match(
+ line.strip()[::-1])
+ distro_info = {}
+ if matches:
+ # regexp ensures non-None
+ distro_info['name'] = matches.group(3)[::-1]
+ if matches.group(2):
+ distro_info['version_id'] = matches.group(2)[::-1]
+ if matches.group(1):
+ distro_info['codename'] = matches.group(1)[::-1]
+ elif line:
+ distro_info['name'] = line.strip()
+ return distro_info
+
+
+_distro = LinuxDistribution()
+
+
+def main():
+ logger = logging.getLogger(__name__)
+ logger.setLevel(logging.DEBUG)
+ logger.addHandler(logging.StreamHandler(sys.stdout))
+
+ parser = argparse.ArgumentParser(description="OS distro info tool")
+ parser.add_argument(
+ '--json',
+ '-j',
+ help="Output in machine readable format",
+ action="store_true")
+ args = parser.parse_args()
+
+ if args.json:
+ logger.info(json.dumps(info(), indent=4, sort_keys=True))
+ else:
+ logger.info('Name: %s', name(pretty=True))
+ distribution_version = version(pretty=True)
+ logger.info('Version: %s', distribution_version)
+ distribution_codename = codename()
+ logger.info('Codename: %s', distribution_codename)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/addons/service.xbmc.versioncheck/resources/lib/version_check/handler.py b/addons/service.xbmc.versioncheck/resources/lib/version_check/handler.py
new file mode 100644
index 0000000000..b2ce3a4dcd
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/resources/lib/version_check/handler.py
@@ -0,0 +1,95 @@
+# -*- coding: utf-8 -*-
+
+"""
+
+ Copyright (C) 2019 Team Kodi
+
+ This file is part of service.xbmc.versioncheck
+
+ SPDX-License-Identifier: GPL-3.0-or-later
+ See LICENSES/GPL-3.0-or-later.txt for more information.
+
+"""
+
+from .common import get_password_from_user
+from .common import log
+
+
+class Handler:
+ """ Base handler class for apt_daemon_handler, and shell_handler_apt
+ """
+
+ def __init__(self):
+ self._pwd = ''
+ self._update = True
+
+ @property
+ def pwd(self):
+ """ password property
+
+ :return: password
+ :rtype: str
+ """
+ return self._pwd
+
+ @pwd.setter
+ def pwd(self, value):
+ """ password setter
+
+ :param value: password
+ :type value: str
+ """
+ self._pwd = value
+
+ @property
+ def update(self):
+ """ update apt-cache property
+
+ :return: whether to update apt-cache or not when checking for upgrades
+ :rtype: bool
+ """
+ return self._update
+
+ @update.setter
+ def update(self, value):
+ """ update apt-cache setter
+
+ :param value: whether to update apt-cache or not when checking for upgrades
+ :type value: bool
+ """
+ self._update = value
+
+ def _check_versions(self, package):
+ raise NotImplementedError
+
+ def check_upgrade_available(self, package):
+ """ Check if package upgrade is available
+
+ :param package: package to check for upgrade availability
+ :type package: str
+ :return: whether an upgrade exists for the provided package
+ :rtype: bool
+ """
+ installed, candidate = self._check_versions(package)
+ if installed and candidate:
+ if installed != candidate:
+ log('Version installed %s' % installed)
+ log('Version available %s' % candidate)
+ return True
+ log('Already on newest version')
+ return False
+
+ if not installed:
+ log('No installed package found')
+
+ return False
+
+ def _get_password(self):
+ """ Get password, ask user for password if not known
+
+ :return: password
+ :rtype: str
+ """
+ if not self.pwd:
+ self.pwd = get_password_from_user()
+ return self.pwd
diff --git a/addons/service.xbmc.versioncheck/resources/lib/version_check/json_interface.py b/addons/service.xbmc.versioncheck/resources/lib/version_check/json_interface.py
new file mode 100644
index 0000000000..e09618f900
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/resources/lib/version_check/json_interface.py
@@ -0,0 +1,67 @@
+# -*- coding: utf-8 -*-
+
+"""
+
+ Copyright (C) 2013-2014 Team-XBMC
+ Copyright (C) 2014-2019 Team Kodi
+
+ This file is part of service.xbmc.versioncheck
+
+ SPDX-License-Identifier: GPL-3.0-or-later
+ See LICENSES/GPL-3.0-or-later.txt for more information.
+
+"""
+
+from contextlib import closing
+import json
+import os
+import sys
+
+import xbmc # pylint: disable=import-error
+import xbmcvfs # pylint: disable=import-error
+
+from .common import ADDON_PATH
+
+
+def get_installed_version():
+ """ Retrieve the currently installed version
+
+ :return: currently installed version
+ :rtype: dict
+ """
+ query = {
+ "jsonrpc": "2.0",
+ "method": "Application.GetProperties",
+ "params": {
+ "properties": ["version", "name"]
+ },
+ "id": 1
+ }
+ json_query = xbmc.executeJSONRPC(json.dumps(query))
+ if sys.version_info[0] >= 3:
+ json_query = str(json_query)
+ else:
+ json_query = unicode(json_query, 'utf-8', errors='ignore') # pylint: disable=undefined-variable
+ json_query = json.loads(json_query)
+ version_installed = []
+ if 'result' in json_query and 'version' in json_query['result']:
+ version_installed = json_query['result']['version']
+ return version_installed
+
+
+def get_version_file_list():
+ """ Retrieve version lists from supplied version file (resources/versions.txt)
+
+ :return: all provided versions
+ :rtype: dict
+ """
+ version_file = os.path.join(ADDON_PATH, 'resources/versions.txt')
+ with closing(xbmcvfs.File(version_file)) as open_file:
+ data = open_file.read()
+
+ if sys.version_info[0] >= 3:
+ version_query = str(data)
+ else:
+ version_query = unicode(data, 'utf-8', errors='ignore') # pylint: disable=undefined-variable
+ version_query = json.loads(version_query)
+ return version_query
diff --git a/addons/service.xbmc.versioncheck/resources/lib/version_check/service.py b/addons/service.xbmc.versioncheck/resources/lib/version_check/service.py
new file mode 100644
index 0000000000..32b7322258
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/resources/lib/version_check/service.py
@@ -0,0 +1,162 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+"""
+
+ Copyright (C) 2013-2014 Team-XBMC
+ Copyright (C) 2014-2019 Team Kodi
+
+ This file is part of service.xbmc.versioncheck
+
+ SPDX-License-Identifier: GPL-3.0-or-later
+ See LICENSES/GPL-3.0-or-later.txt for more information.
+
+"""
+
+import platform
+import sys
+
+import xbmc # pylint: disable=import-error
+import xbmcgui # pylint: disable=import-error
+
+from .common import ADDON
+from .common import ADDON_NAME
+from .common import ADDON_VERSION
+from .common import dialog_yes_no
+from .common import localise
+from .common import log
+from .common import wait_for_abort
+from .common import message_restart
+from .common import message_upgrade_success
+from .common import upgrade_message
+from .common import upgrade_message2
+from .json_interface import get_version_file_list
+from .json_interface import get_installed_version
+from .versions import compare_version
+
+if sys.version_info[0] == 3 and sys.version_info[1] >= 8:
+ try:
+ from .distro import distro
+
+ DISTRIBUTION = distro.linux_distribution(full_distribution_name=False)[0].lower()
+
+ except (AttributeError, ImportError):
+ DISTRIBUTION = ''
+
+else:
+ DISTRIBUTION = platform.linux_distribution(full_distribution_name=0)[0].lower() # pylint: disable=deprecated-method
+
+if not DISTRIBUTION:
+ DISTRIBUTION = platform.uname()[0].lower()
+
+
+def _version_check():
+ """ Check versions (non-linux)
+
+ :return: old, current, available, and stable versions
+ :rtype: bool / 'stable', dict, dict, dict
+ """
+ # retrieve version_lists from supplied version file
+ version_list = get_version_file_list()
+ # retrieve version installed
+ version_installed = get_installed_version()
+ # compare installed and available
+ old_version, version_installed, version_available, version_stable = \
+ compare_version(version_installed, version_list)
+ return old_version, version_installed, version_available, version_stable
+
+
+def _version_check_linux(packages):
+ """ Check package version on linux
+
+ :param packages: list of packages to check
+ :type packages: list of str
+ """
+ if DISTRIBUTION in ['ubuntu', 'debian', 'linuxmint']:
+ try:
+ # try aptdaemon first
+ # pylint: disable=import-outside-toplevel
+ from .apt_daemon_handler import AptDaemonHandler
+ handler = AptDaemonHandler()
+ except: # pylint: disable=bare-except
+ # fallback to shell
+ # since we need the user password, ask to check for new version first
+ # pylint: disable=import-outside-toplevel
+ from .shell_handler_apt import ShellHandlerApt
+ handler = ShellHandlerApt(use_sudo=True)
+ if dialog_yes_no(32015):
+ pass
+ elif dialog_yes_no(32009, 32010):
+ log('disabling addon by user request')
+ ADDON.setSetting('versioncheck_enable', 'false')
+ return
+
+ if handler:
+ if handler.check_upgrade_available(packages[0]):
+ if upgrade_message(32012):
+ if ADDON.getSetting('upgrade_system') == 'false':
+ result = handler.upgrade_package(packages[0])
+ else:
+ result = handler.upgrade_system()
+ if result:
+ message_upgrade_success()
+ message_restart()
+ else:
+ log('Error during upgrade')
+ return
+
+ log('No upgrade available')
+ return
+
+ log('Error: no handler found')
+ return
+
+ log('Unsupported platform %s' % DISTRIBUTION)
+ sys.exit(0)
+
+
+def _check_cryptography():
+ """ Check for cryptography package, and version
+
+ Python cryptography < 1.7 (still shipped with Ubuntu 16.04) has issues with
+ pyOpenSSL integration, leading to all sorts of weird bugs - check here to save
+ on some troubleshooting. This check may be removed in the future (when switching
+ to Python3?)
+ See https://github.com/pyca/pyopenssl/issues/542
+ """
+ try:
+ import cryptography # pylint: disable=import-outside-toplevel
+ ver = cryptography.__version__
+ except ImportError:
+ # If the module is not found - no problem
+ return
+
+ ver_parts = list(map(int, ver.split('.')))
+ if len(ver_parts) < 2 or ver_parts[0] < 1 or (ver_parts[0] == 1 and ver_parts[1] < 7):
+ log('Python cryptography module version %s is too old, at least version 1.7 needed' % ver)
+ xbmcgui.Dialog().ok(
+ ADDON_NAME,
+ '[CR]'.join([localise(32040) % ver, localise(32041), localise(32042)])
+ )
+
+
+def run():
+ """ Service entry-point
+ """
+ _check_cryptography()
+
+ if ADDON.getSetting('versioncheck_enable') == 'false':
+ log('Disabled')
+ else:
+ log('Version %s started' % ADDON_VERSION)
+
+ if wait_for_abort(5):
+ sys.exit(0)
+
+ if (xbmc.getCondVisibility('System.Platform.Linux') and
+ ADDON.getSetting('upgrade_apt') == 'true'):
+ _version_check_linux(['kodi'])
+ else:
+ old_version, version_installed, version_available, version_stable = _version_check()
+ if old_version:
+ upgrade_message2(version_installed, version_available, version_stable, old_version)
diff --git a/addons/service.xbmc.versioncheck/resources/lib/version_check/shell_handler_apt.py b/addons/service.xbmc.versioncheck/resources/lib/version_check/shell_handler_apt.py
new file mode 100644
index 0000000000..1f7307c3e7
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/resources/lib/version_check/shell_handler_apt.py
@@ -0,0 +1,132 @@
+# -*- coding: utf-8 -*-
+
+"""
+
+ Copyright (C) 2013-2014 Team-XBMC
+ Copyright (C) 2014-2019 Team Kodi
+
+ This file is part of service.xbmc.versioncheck
+
+ SPDX-License-Identifier: GPL-3.0-or-later
+ See LICENSES/GPL-3.0-or-later.txt for more information.
+
+"""
+
+import sys
+
+from .common import log
+from .handler import Handler
+
+try:
+ from subprocess import check_output
+except ImportError:
+ check_output = None
+ log('ImportError: subprocess')
+
+
+class ShellHandlerApt(Handler):
+ """ Apt shell handler
+ """
+
+ def __init__(self, use_sudo=False):
+ Handler.__init__(self)
+ self.sudo = use_sudo
+ self._update = False
+ installed, _ = self._check_versions('kodi')
+ if not installed:
+ # there is no package installed via repo, so we exit here
+ log('No installed package found, exiting')
+ sys.exit(0)
+ self._update = True
+
+ def _check_versions(self, package):
+ """ Check apt package versions
+
+ :param package: package to check
+ :type package: str
+ :return: installed version, candidate version
+ :rtype: str, str / False, False
+ """
+ _cmd = 'apt-cache policy ' + package
+
+ if self.update and not self._update_cache():
+ return False, False
+
+ try:
+ result = check_output([_cmd], shell=True).split('\n')
+ except Exception as error: # pylint: disable=broad-except
+ log('ShellHandlerApt: exception while executing shell command %s: %s' % (_cmd, error))
+ return False, False
+
+ if result[0].replace(':', '') == package:
+ installed = result[1].split()[1]
+ candidate = result[2].split()[1]
+ if installed == '(none)':
+ installed = False
+ if candidate == '(none)':
+ candidate = False
+ return installed, candidate
+
+ log('ShellHandlerApt: error during version check')
+ return False, False
+
+ def _update_cache(self):
+ """ Update apt cache
+
+ :return: success of updating apt cache
+ :rtype: bool
+ """
+ _cmd = 'apt-get update'
+ try:
+ if self.sudo:
+ _ = check_output('echo \'%s\' | sudo -S %s' %
+ (self._get_password(), _cmd), shell=True)
+ else:
+ _ = check_output(_cmd.split())
+ except Exception as error: # pylint: disable=broad-except
+ log('Exception while executing shell command %s: %s' % (_cmd, error))
+ return False
+
+ return True
+
+ def upgrade_package(self, package):
+ """ Upgrade apt package
+
+ :param package: package to upgrade
+ :type package: str
+ :return: success of apt package upgrade
+ :rtype: bool
+ """
+ _cmd = 'apt-get install -y ' + package
+ try:
+ if self.sudo:
+ _ = check_output('echo \'%s\' | sudo -S %s' %
+ (self._get_password(), _cmd), shell=True)
+ else:
+ _ = check_output(_cmd.split())
+ log('Upgrade successful')
+ except Exception as error: # pylint: disable=broad-except
+ log('Exception while executing shell command %s: %s' % (_cmd, error))
+ return False
+
+ return True
+
+ def upgrade_system(self):
+ """ Upgrade system
+
+ :return: success of system upgrade
+ :rtype: bool
+ """
+ _cmd = 'apt-get upgrade -y'
+ try:
+ log('Upgrading system')
+ if self.sudo:
+ _ = check_output('echo \'%s\' | sudo -S %s' %
+ (self._get_password(), _cmd), shell=True)
+ else:
+ _ = check_output(_cmd.split())
+ except Exception as error: # pylint: disable=broad-except
+ log('Exception while executing shell command %s: %s' % (_cmd, error))
+ return False
+
+ return True
diff --git a/addons/service.xbmc.versioncheck/resources/lib/version_check/versions.py b/addons/service.xbmc.versioncheck/resources/lib/version_check/versions.py
new file mode 100644
index 0000000000..1bd9ba4f96
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/resources/lib/version_check/versions.py
@@ -0,0 +1,216 @@
+# -*- coding: utf-8 -*-
+
+"""
+
+ Copyright (C) 2013-2014 Team-XBMC
+ Copyright (C) 2014-2019 Team Kodi
+
+ This file is part of service.xbmc.versioncheck
+
+ SPDX-License-Identifier: GPL-3.0-or-later
+ See LICENSES/GPL-3.0-or-later.txt for more information.
+
+"""
+
+from .common import log
+
+
+def compare_version(version_installed, version_list):
+ """ Compare the installed version against the provided version list
+
+ :param version_installed: currently installed version
+ :type version_installed: dict
+ :param version_list: provided versions to compare against
+ :type version_list: dict
+ :return: old, current, available, and stable versions
+ :rtype: bool / 'stable', dict, dict, dict
+ """
+ # Create separate version lists
+ version_list_stable = version_list['releases']['stable']
+ version_list_rc = version_list['releases']['releasecandidate']
+ version_list_beta = version_list['releases']['beta']
+ version_list_alpha = version_list['releases']['alpha']
+ # version_list_prealpha = version_list['releases']['prealpha']
+
+ stable_version = version_list_stable[0]
+ rc_version = version_list_rc[0]
+ beta_version = version_list_beta[0]
+ alpha_version = version_list_alpha[0]
+
+ log('Version installed %s' % version_installed)
+
+ # Check to upgrade to newest available stable version
+ # check on smaller major version. Smaller version than available always notify
+
+ # check for stable versions
+ old_version, version_available = _check_for_stable_version(version_installed, stable_version)
+
+ if not old_version:
+ # Already skipped a possible newer stable build. Let's continue with non stable builds.
+ # Check also 'old version' hasn't been set to 'stable' or true by previous checks because
+ # if so, those part need to be skipped
+ old_version, version_available = _check_for_rc_version(version_installed,
+ rc_version, beta_version)
+
+ if not old_version:
+ # check for beta builds
+ old_version, version_available = _check_for_beta_version(version_installed, beta_version)
+
+ if not old_version:
+ # check for alpha builds
+ old_version, version_available = _check_for_alpha_version(version_installed, alpha_version)
+
+ return old_version, version_installed, version_available, stable_version
+
+
+def _check_for_stable_version(version_installed, stable_version):
+ """ Compare the installed version against the latest stable version
+
+ :param version_installed: currently installed version
+ :type version_installed: dict
+ :param stable_version: latest stable version
+ :type stable_version: dict
+ :return: whether using an old version, and available version if newer stable version available
+ :rtype: bool / 'stable', dict
+ """
+ # check if installed major version is smaller than available major stable
+ # here we don't care if running non stable
+ old_version = False
+ version_available = {}
+
+ if version_installed['major'] < int(stable_version['major']):
+ version_available = stable_version
+ old_version = 'stable'
+ log('Version available %s' % stable_version)
+ log('You are running an older version')
+
+ # check if installed major version is equal than available major stable
+ # however also check on minor version and still don't care about non stable
+ elif version_installed['major'] == int(stable_version['major']):
+ if version_installed['minor'] < int(stable_version['minor']):
+ version_available = stable_version
+ old_version = 'stable'
+ log('Version available %s' % stable_version)
+ log('You are running an older minor version')
+ # check for <= minor !stable
+ elif version_installed['tag'] != 'stable' and \
+ version_installed['minor'] <= int(stable_version['minor']):
+ version_available = stable_version
+ old_version = True
+ log('Version available %s' % stable_version)
+ log('You are running an older non stable minor version')
+ else:
+ log('Version available %s' % stable_version)
+ log('There is no newer stable available')
+
+ return old_version, version_available
+
+
+def _check_for_rc_version(version_installed, rc_version, beta_version):
+ """ Compare the installed version against the latest RC version
+
+ :param version_installed: currently installed version
+ :type version_installed: dict
+ :param rc_version: latest rc version
+ :type rc_version: dict
+ :param beta_version: latest beta version
+ :type beta_version: dict
+ :return: whether using an old version, and available version if newer rc version available
+ :rtype: bool, dict
+ """
+ old_version = False
+ version_available = {}
+ # check for RC builds
+ if version_installed['tag'] in ['releasecandidate']:
+ # check if you are using a RC build lower than current available RC
+ # then check if you are using a beta/alpha lower than current available RC
+ # 14.0rc3 is newer than: 14.0rc1, 14.0b9, 14.0a15
+ if version_installed['major'] <= int(rc_version['major']):
+ if version_installed['minor'] <= int(rc_version['minor']):
+ if version_installed.get('tagversion', '') < rc_version['tagversion']:
+ version_available = rc_version
+ old_version = True
+ log('Version available %s' % rc_version)
+ log('You are running an older RC version')
+ # now check if installed !=rc
+ elif version_installed['tag'] in ['beta', 'alpha', 'prealpha']:
+ if version_installed['major'] <= int(rc_version['major']):
+ if version_installed['minor'] <= int(beta_version['minor']):
+ version_available = rc_version
+ old_version = True
+ log('Version available %s' % rc_version)
+ log('You are running an older non RC version')
+
+ return old_version, version_available
+
+
+def _check_for_beta_version(version_installed, beta_version):
+ """ Compare the installed version against the latest beta version
+
+ :param version_installed: currently installed version
+ :type version_installed: dict
+ :param beta_version: latest beta version
+ :type beta_version: dict
+ :return: whether using an old version, and available version if newer beta version available
+ :rtype: bool, dict
+ """
+ old_version = False
+ version_available = {}
+ # check for beta builds
+ if not old_version and version_installed['tag'] == 'beta':
+ # check if you are using a RC build lower than current available RC
+ # then check if you are using a beta/alpha lower than current available RC
+ # 14.0b3 is newer than: 14.0b1, 14.0a15
+ if version_installed['major'] <= int(beta_version['major']):
+ if version_installed['minor'] <= int(beta_version['minor']):
+ if version_installed.get('tagversion', '') < beta_version['tagversion']:
+ version_available = beta_version
+ old_version = True
+ log('Version available %s' % beta_version)
+ log('You are running an older beta version')
+ # now check if installed !=beta
+ elif not old_version and version_installed['tag'] in ['alpha', 'prealpha']:
+ if version_installed['major'] <= int(beta_version['major']):
+ if version_installed['minor'] <= int(beta_version['minor']):
+ version_available = beta_version
+ old_version = True
+ log('Version available %s' % beta_version)
+ log('You are running an older non beta version')
+
+ return old_version, version_available
+
+
+def _check_for_alpha_version(version_installed, alpha_version):
+ """ Compare the installed version against the latest alpha version
+
+ :param version_installed: currently installed version
+ :type version_installed: dict
+ :param alpha_version: latest alpha version
+ :type alpha_version: dict
+ :return: whether using an old version, and available version if newer alpha version available
+ :rtype: bool, dict
+ """
+ old_version = False
+ version_available = {}
+ # check for alpha builds and older
+ if version_installed['tag'] == 'alpha':
+ # check if you are using a RC build lower than current available RC
+ # then check if you are using a beta/alpha lower than current available RC
+ # 14.0a3 is newer than: 14.0a1 or pre-alpha
+ if version_installed['major'] <= int(alpha_version['major']):
+ if version_installed['minor'] <= int(alpha_version['minor']):
+ if version_installed.get('tagversion', '') < alpha_version['tagversion']:
+ version_available = alpha_version
+ old_version = True
+ log('Version available %s' % alpha_version)
+ log('You are running an older alpha version')
+ # now check if installed !=alpha
+ elif version_installed['tag'] in ['prealpha']:
+ if version_installed['major'] <= int(alpha_version['major']):
+ if version_installed['minor'] <= int(alpha_version['minor']):
+ version_available = alpha_version
+ old_version = True
+ log('Version available %s' % alpha_version)
+ log('You are running an older non alpha version')
+
+ return old_version, version_available
diff --git a/addons/service.xbmc.versioncheck/resources/lib/version_check/viewer.py b/addons/service.xbmc.versioncheck/resources/lib/version_check/viewer.py
new file mode 100644
index 0000000000..9f2b00a34f
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/resources/lib/version_check/viewer.py
@@ -0,0 +1,159 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+"""
+
+ Copyright (C) 2011-2013 Martijn Kaijser
+ Copyright (C) 2013-2014 Team-XBMC
+ Copyright (C) 2014-2019 Team Kodi
+
+ This file is part of service.xbmc.versioncheck
+
+ SPDX-License-Identifier: GPL-3.0-or-later
+ See LICENSES/GPL-3.0-or-later.txt for more information.
+
+"""
+
+from contextlib import closing
+import os
+import sys
+
+import xbmc # pylint: disable=import-error
+import xbmcaddon # pylint: disable=import-error
+import xbmcgui # pylint: disable=import-error
+import xbmcvfs # pylint: disable=import-error
+
+_ADDON = xbmcaddon.Addon('service.xbmc.versioncheck')
+_ADDON_NAME = _ADDON.getAddonInfo('name')
+if sys.version_info[0] >= 3:
+ _ADDON_PATH = _ADDON.getAddonInfo('path')
+else:
+ _ADDON_PATH = _ADDON.getAddonInfo('path').decode('utf-8')
+_ICON = _ADDON.getAddonInfo('icon')
+
+
+class Viewer:
+ """ Show user a text viewer (WINDOW_DIALOG_TEXT_VIEWER)
+ Include the text file for the viewers body in the resources/ directory
+
+ usage:
+ script_path = os.path.join(_ADDON_PATH, 'resources', 'lib', 'version_check', 'viewer.py')
+ xbmc.executebuiltin('RunScript(%s,%s,%s)' % (script_path, 'Heading', 'notice.txt'))
+
+ :param heading: text viewer heading
+ :type heading: str
+ :param filename: filename to use for text viewers body
+ :type filename: str
+ """
+ WINDOW = 10147
+ CONTROL_LABEL = 1
+ CONTROL_TEXTBOX = 5
+
+ def __init__(self, heading, filename):
+ self.heading = heading
+ self.filename = filename
+ # activate the text viewer window
+ xbmc.executebuiltin('ActivateWindow(%d)' % (self.WINDOW,))
+ # get window
+ self.window = xbmcgui.Window(self.WINDOW)
+ # give window time to initialize
+ xbmc.sleep(100)
+ # set controls
+ self.set_controls()
+
+ def set_controls(self):
+ """ Set the window controls
+ """
+ # get text viewer body text
+ text = self.get_text()
+ # set heading
+ self.window.getControl(self.CONTROL_LABEL).setLabel('%s : %s' % (_ADDON_NAME,
+ self.heading,))
+ # set text
+ self.window.getControl(self.CONTROL_TEXTBOX).setText(text)
+ xbmc.sleep(2000)
+
+ def get_text(self):
+ """ Get the text viewers body text from self.filename
+
+ :return: contents of self.filename
+ :rtype: str
+ """
+ try:
+ return self.read_file(self.filename)
+ except Exception as error: # pylint: disable=broad-except
+ xbmc.log(_ADDON_NAME + ': ' + str(error), xbmc.LOGERROR)
+ return ''
+
+ @staticmethod
+ def read_file(filename):
+ """ Read the contents of the provided file, from
+ os.path.join(_ADDON_PATH, 'resources', filename)
+
+ :param filename: name of file to read
+ :type filename: str
+ :return: contents of the provided file
+ :rtype: str
+ """
+ filename = os.path.join(_ADDON_PATH, 'resources', filename)
+ with closing(xbmcvfs.File(filename)) as open_file:
+ contents = open_file.read()
+ return contents
+
+
+class WebBrowser:
+ """ Display url using the default browser
+
+ usage:
+ script_path = os.path.join(_ADDON_PATH, 'resources', 'lib', 'version_check', 'viewer.py')
+ xbmc.executebuiltin('RunScript(%s,%s,%s)' % (script_path, 'webbrowser', 'https://kodi.tv/'))
+
+ :param url: url to open
+ :type url: str
+ """
+
+ def __init__(self, url):
+ self.url = url
+ try:
+ # notify user
+ self.notification(_ADDON_NAME, self.url)
+ xbmc.sleep(100)
+ # launch url
+ self.launch_url()
+ except Exception as error: # pylint: disable=broad-except
+ xbmc.log(_ADDON_NAME + ': ' + str(error), xbmc.LOGERROR)
+
+ @staticmethod
+ def notification(heading, message, icon=None, time=15000, sound=True):
+ """ Create a notification
+
+ :param heading: notification heading
+ :type heading: str
+ :param message: notification message
+ :type message: str
+ :param icon: path and filename for the notification icon
+ :type icon: str
+ :param time: time to display notification
+ :type time: int
+ :param sound: is notification audible
+ :type sound: bool
+ """
+ if not icon:
+ icon = _ICON
+ xbmcgui.Dialog().notification(heading, message, icon, time, sound)
+
+ def launch_url(self):
+ """ Open self.url in the default web browser
+ """
+ import webbrowser # pylint: disable=import-outside-toplevel
+ webbrowser.open(self.url)
+
+
+if __name__ == '__main__':
+ try:
+ if sys.argv[1] == 'webbrowser':
+ WebBrowser(sys.argv[2])
+ else:
+ Viewer(sys.argv[1], sys.argv[2])
+ except Exception as err: # pylint: disable=broad-except
+ xbmc.log(_ADDON_NAME + ': ' + str(err), xbmc.LOGERROR)
diff --git a/addons/service.xbmc.versioncheck/resources/polkit/10-allow-update.pkla b/addons/service.xbmc.versioncheck/resources/polkit/10-allow-update.pkla
index a5135348ef..2316dffc00 100644
--- a/addons/service.xbmc.versioncheck/resources/polkit/10-allow-update.pkla
+++ b/addons/service.xbmc.versioncheck/resources/polkit/10-allow-update.pkla
@@ -1,5 +1,5 @@
[Untrusted Upgrade]
-Identity=unix-user:xbmc
+Identity=unix-user:kodi
Action=org.debian.apt.upgrade-packages;org.debian.apt.update-cache
ResultAny=no
ResultInactive=yes
diff --git a/addons/service.xbmc.versioncheck/resources/polkit/README b/addons/service.xbmc.versioncheck/resources/polkit/README
index c3a1a45134..77920c0d69 100644
--- a/addons/service.xbmc.versioncheck/resources/polkit/README
+++ b/addons/service.xbmc.versioncheck/resources/polkit/README
@@ -1,10 +1,11 @@
-If you run xbmc standalone and/or do want to have password less upgrades, copy the file 10-allow-update.conf to /etc/polkit-1/localauthority/50-local.d/
+If you run Kodi/XBMC standalone and/or do want to have password less upgrades, copy the file
+10-allow-update.conf to /etc/polkit-1/localauthority/50-local.d/
-Make sure to adjust the username if it is different from "xbmc"
+Make sure to adjust the username if it is different from "kodi"
-For this to work, you must have python-apt and python-aptdaemon installed:
+For this to work, you must have python-apt and python-aptdaemon installed:
sudo apt-get install python-apt python-aptdaemon
-If those packages are not installed, this script will fallback to calling apt directly and ask you for your password.
-
+If those packages are not installed, this script will fallback to calling apt directly and ask you
+for your password.
diff --git a/addons/service.xbmc.versioncheck/resources/settings.xml b/addons/service.xbmc.versioncheck/resources/settings.xml
index ad7824ccfb..e6f36dc3cc 100644
--- a/addons/service.xbmc.versioncheck/resources/settings.xml
+++ b/addons/service.xbmc.versioncheck/resources/settings.xml
@@ -1,8 +1,24 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<settings>
- <category label="32020">
- <setting label="32021" type="bool" id="versioncheck_enable" default="true"/>
- <setting label="32023" type="bool" id="upgrade_system" default="false"/>
- <setting label="32024" type="bool" id="upgrade_apt" default="false"/>
- </category>
+<?xml version="1.0" ?>
+<settings version="1">
+ <section id="service.xbmc.versioncheck">
+ <category help="" id="general" label="32020">
+ <group id="1">
+ <setting help="" id="versioncheck_enable" label="32021" type="boolean">
+ <level>0</level>
+ <default>true</default>
+ <control type="toggle"/>
+ </setting>
+ <setting help="" id="upgrade_system" label="32023" type="boolean">
+ <level>0</level>
+ <default>false</default>
+ <control type="toggle"/>
+ </setting>
+ <setting help="" id="upgrade_apt" label="32024" type="boolean">
+ <level>0</level>
+ <default>false</default>
+ <control type="toggle"/>
+ </setting>
+ </group>
+ </category>
+ </section>
</settings>
diff --git a/addons/service.xbmc.versioncheck/resources/versions.schema.txt b/addons/service.xbmc.versioncheck/resources/versions.schema.txt
new file mode 100644
index 0000000000..dcfdfd03bc
--- /dev/null
+++ b/addons/service.xbmc.versioncheck/resources/versions.schema.txt
@@ -0,0 +1,214 @@
+{
+ "$schema": "http://json-schema.org/schema#",
+ "type": "object",
+ "properties": {
+ "jsonrpc": {
+ "type": "string"
+ },
+ "releases": {
+ "type": "object",
+ "properties": {
+ "stable": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "major": {
+ "type": "string"
+ },
+ "minor": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ },
+ "tagversion": {
+ "type": "string"
+ },
+ "revision": {
+ "type": "string"
+ },
+ "extrainfo": {
+ "type": "string"
+ },
+ "addon_support": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "addon_support",
+ "extrainfo",
+ "major",
+ "minor",
+ "revision",
+ "tag",
+ "tagversion"
+ ]
+ }
+ },
+ "releasecandidate": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "major": {
+ "type": "string"
+ },
+ "minor": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ },
+ "tagversion": {
+ "type": "string"
+ },
+ "revision": {
+ "type": "string"
+ },
+ "extrainfo": {
+ "type": "string"
+ },
+ "addon_support": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "addon_support",
+ "extrainfo",
+ "major",
+ "minor",
+ "revision",
+ "tag",
+ "tagversion"
+ ]
+ }
+ },
+ "beta": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "major": {
+ "type": "string"
+ },
+ "minor": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ },
+ "tagversion": {
+ "type": "string"
+ },
+ "revision": {
+ "type": "string"
+ },
+ "addon_support": {
+ "type": "string"
+ },
+ "extrainfo": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "addon_support",
+ "extrainfo",
+ "major",
+ "minor",
+ "revision",
+ "tag",
+ "tagversion"
+ ]
+ }
+ },
+ "alpha": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "major": {
+ "type": "string"
+ },
+ "minor": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ },
+ "tagversion": {
+ "type": "string"
+ },
+ "revision": {
+ "type": "string"
+ },
+ "addon_support": {
+ "type": "string"
+ },
+ "extrainfo": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "addon_support",
+ "extrainfo",
+ "major",
+ "minor",
+ "revision",
+ "tag",
+ "tagversion"
+ ]
+ }
+ },
+ "prealpha": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "major": {
+ "type": "string"
+ },
+ "minor": {
+ "type": "string"
+ },
+ "tag": {
+ "type": "string"
+ },
+ "tagversion": {
+ "type": "string"
+ },
+ "revision": {
+ "type": "string"
+ },
+ "extrainfo": {
+ "type": "string"
+ },
+ "addon_support": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "addon_support",
+ "extrainfo",
+ "major",
+ "minor",
+ "revision",
+ "tag",
+ "tagversion"
+ ]
+ }
+ }
+ },
+ "required": [
+ "alpha",
+ "beta",
+ "releasecandidate",
+ "stable"
+ ]
+ }
+ },
+ "required": [
+ "jsonrpc",
+ "releases"
+ ]
+}
diff --git a/addons/service.xbmc.versioncheck/resources/versions.txt b/addons/service.xbmc.versioncheck/resources/versions.txt
index cf38def2e8..2d6e2d9f1e 100644
--- a/addons/service.xbmc.versioncheck/resources/versions.txt
+++ b/addons/service.xbmc.versioncheck/resources/versions.txt
@@ -3,6 +3,96 @@
"releases": {
"stable": [
{
+ "major": "18",
+ "minor": "9",
+ "tag": "stable",
+ "tagversion":"",
+ "revision": "20201023-0655c2c718",
+ "extrainfo": "final",
+ "addon_support": "yes"
+ },
+ {
+ "major": "18",
+ "minor": "8",
+ "tag": "stable",
+ "tagversion":"",
+ "revision": "20200727-45686bddb1",
+ "extrainfo": "final",
+ "addon_support": "yes"
+ },
+ {
+ "major": "18",
+ "minor": "7",
+ "tag": "stable",
+ "tagversion":"",
+ "revision": "20200520-f14f7a8",
+ "extrainfo": "final",
+ "addon_support": "yes"
+ },
+ {
+ "major": "18",
+ "minor": "6",
+ "tag": "stable",
+ "tagversion":"",
+ "revision": "20200229-8e967df",
+ "extrainfo": "final",
+ "addon_support": "yes"
+ },
+ {
+ "major": "18",
+ "minor": "5",
+ "tag": "stable",
+ "tagversion":"",
+ "revision": "20191116-37f51f6",
+ "extrainfo": "final",
+ "addon_support": "yes"
+ },
+ {
+ "major": "18",
+ "minor": "4",
+ "tag": "stable",
+ "tagversion":"",
+ "revision": "20190831-3ade758",
+ "extrainfo": "final",
+ "addon_support": "yes"
+ },
+ {
+ "major": "18",
+ "minor": "3",
+ "tag": "stable",
+ "tagversion":"",
+ "revision": "20190619-89472b7",
+ "extrainfo": "final",
+ "addon_support": "yes"
+ },
+ {
+ "major": "18",
+ "minor": "2",
+ "tag": "stable",
+ "tagversion":"",
+ "revision": "20190422-f264356",
+ "extrainfo": "final",
+ "addon_support": "yes"
+ },
+ {
+ "major": "18",
+ "minor": "1",
+ "tag": "stable",
+ "tagversion":"",
+ "revision": "20190217-8cfdc89",
+ "extrainfo": "final",
+ "addon_support": "yes"
+ },
+ {
+ "major": "18",
+ "minor": "0",
+ "tag": "stable",
+ "tagversion":"",
+ "revision": "20190128-d81c34c",
+ "extrainfo": "final",
+ "addon_support": "yes"
+ },
+ {
"major": "17",
"minor": "6",
"tag": "stable",
@@ -444,6 +534,7 @@
"tag": "beta",
"tagversion":"5",
"revision": "20181103-920e823249",
+ "extrainfo": "beta5",
"addon_support": "yes"
},
{
@@ -452,6 +543,7 @@
"tag": "beta",
"tagversion":"4",
"revision": "20181023-c77874c5bf",
+ "extrainfo": "beta4",
"addon_support": "yes"
},
{
@@ -460,6 +552,7 @@
"tag": "beta",
"tagversion":"3",
"revision": "20181002-c2e1b316f5",
+ "extrainfo": "beta3",
"addon_support": "yes"
},
{
@@ -468,6 +561,7 @@
"tag": "beta",
"tagversion":"2",
"revision": "20180909-7868a27c6a",
+ "extrainfo": "beta2",
"addon_support": "yes"
},
{
@@ -476,6 +570,7 @@
"tag": "beta",
"tagversion":"1",
"revision": "20180826-f21b477993",
+ "extrainfo": "beta1",
"addon_support": "yes"
},
{
@@ -484,6 +579,7 @@
"tag": "beta",
"tagversion":"6",
"revision": "20161130-654f1b7",
+ "extrainfo": "beta6",
"addon_support": "yes"
},
{
@@ -492,6 +588,7 @@
"tag": "beta",
"tagversion":"5",
"revision": "20160110-9d9a153",
+ "extrainfo": "beta5",
"addon_support": "yes"
},
{
@@ -500,6 +597,7 @@
"tag": "beta",
"tagversion":"4",
"revision": "20151213-a724f29",
+ "extrainfo": "beta4",
"addon_support": "yes"
},
{
@@ -508,6 +606,7 @@
"tag": "beta",
"tagversion":"3",
"revision": "20151205-85a0a13",
+ "extrainfo": "beta3",
"addon_support": "yes"
},
{
@@ -516,6 +615,7 @@
"tag": "beta",
"tagversion":"2",
"revision": "20151121-98e0275",
+ "extrainfo": "beta2",
"addon_support": "yes"
},
{
@@ -524,6 +624,7 @@
"tag": "beta",
"tagversion":"1",
"revision": "20151113-9c7322e",
+ "extrainfo": "beta1",
"addon_support": "yes"
},
{
@@ -532,6 +633,7 @@
"tag": "beta",
"tagversion":"2",
"revision": "20150614-daedd5f",
+ "extrainfo": "beta2",
"addon_support": "yes"
},
{
@@ -540,6 +642,7 @@
"tag": "beta",
"tagversion":"1",
"revision": "20150501-d1a2c33",
+ "extrainfo": "beta1",
"addon_support": "yes"
},
{
@@ -548,6 +651,7 @@
"tag": "beta",
"tagversion":"5",
"revision": "20141125-4465fbf",
+ "extrainfo": "beta5",
"addon_support": "yes"
},
{
@@ -556,6 +660,7 @@
"tag": "beta",
"tagversion":"4",
"revision": "20141124-ec361ca",
+ "extrainfo": "beta4",
"addon_support": "yes"
},
{
@@ -564,6 +669,7 @@
"tag": "beta",
"tagversion":"3",
"revision": "20141116-88a9a44",
+ "extrainfo": "beta3",
"addon_support": "yes"
},
{
@@ -572,6 +678,7 @@
"tag": "beta",
"tagversion":"2",
"revision": "20141108-2d88a9a",
+ "extrainfo": "beta2",
"addon_support": "yes"
},
{
@@ -580,6 +687,7 @@
"tag": "beta",
"tagversion":"1",
"revision": "20141103-d6947be",
+ "extrainfo": "beta1",
"addon_support": "yes"
},
{
@@ -729,11 +837,30 @@
],
"alpha": [
{
+ "major": "19",
+ "minor": "0",
+ "tag": "alpha",
+ "tagversion":"2",
+ "revision": "20201005-54be31bc5c",
+ "extrainfo": "alpha2",
+ "addon_support": "yes"
+ },
+ {
+ "major": "19",
+ "minor": "0",
+ "tag": "alpha",
+ "tagversion":"1",
+ "revision": "20200726-db40b2ade4",
+ "extrainfo": "alpha1",
+ "addon_support": "yes"
+ },
+ {
"major": "17",
"minor": "0",
"tag": "alpha",
"tagversion":"2",
"revision": "",
+ "extrainfo": "alpha2",
"addon_support": "yes"
},
{
@@ -742,6 +869,7 @@
"tag": "alpha",
"tagversion":"1",
"revision": "",
+ "extrainfo": "alpha1",
"addon_support": "yes"
},
{
@@ -750,6 +878,7 @@
"tag": "alpha",
"tagversion":"3",
"revision": "20151001-ca8d08c",
+ "extrainfo": "alpha3",
"addon_support": "yes"
},
{
@@ -758,6 +887,7 @@
"tag": "alpha",
"tagversion":"2",
"revision": "20150831-b4afc20",
+ "extrainfo": "alpha2",
"addon_support": "yes"
},
{
@@ -766,6 +896,7 @@
"tag": "alpha",
"tagversion":"1",
"revision": "20150801-c5f806e",
+ "extrainfo": "alpha1",
"addon_support": "yes"
},
{
@@ -774,6 +905,7 @@
"tag": "alpha",
"tagversion":"2",
"revision": "20150331-32c1f53",
+ "extrainfo": "alpha2",
"addon_support": "yes"
},
{
@@ -782,6 +914,7 @@
"tag": "alpha",
"tagversion":"1",
"revision": "20150228-5dc1a55",
+ "extrainfo": "alpha1",
"addon_support": "yes"
},
{
@@ -790,6 +923,7 @@
"tag": "alpha",
"tagversion":"5",
"revision": "20141002-d2a4ee9",
+ "extrainfo": "alpha5",
"addon_support": "yes"
},
{
diff --git a/addons/service.xbmc.versioncheck/service.py b/addons/service.xbmc.versioncheck/service.py
deleted file mode 100644
index 038589f7a8..0000000000
--- a/addons/service.xbmc.versioncheck/service.py
+++ /dev/null
@@ -1,131 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2013 Team-XBMC
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-import platform
-import xbmc
-import xbmcgui
-import lib.common
-from lib.common import log, dialog_yesno, localise, waitForAbort
-from lib.common import upgrade_message as _upgrademessage
-from lib.common import upgrade_message2 as _upgrademessage2
-
-ADDON = lib.common.ADDON
-ADDONVERSION = lib.common.ADDONVERSION
-ADDONNAME = lib.common.ADDONNAME
-ADDONPATH = lib.common.ADDONPATH
-ICON = lib.common.ICON
-oldversion = False
-
-monitor = xbmc.Monitor()
-
-class Main:
- def __init__(self):
- linux = False
- packages = []
-
- if waitForAbort(5):
- sys.exit(0)
-
- if xbmc.getCondVisibility('System.Platform.Linux') and ADDON.getSetting("upgrade_apt") == 'true':
- packages = ['kodi']
- _versionchecklinux(packages)
- else:
- oldversion, version_installed, version_available, version_stable = _versioncheck()
- if oldversion:
- _upgrademessage2( version_installed, version_available, version_stable, oldversion, False)
-
-def _versioncheck():
- # initial vars
- from lib.jsoninterface import get_installedversion, get_versionfilelist
- from lib.versions import compare_version
- # retrieve versionlists from supplied version file
- versionlist = get_versionfilelist()
- # retrieve version installed
- version_installed = get_installedversion()
- # compare installed and available
- oldversion, version_installed, version_available, version_stable = compare_version(version_installed, versionlist)
- return oldversion, version_installed, version_available, version_stable
-
-
-def _versionchecklinux(packages):
- if platform.dist()[0].lower() in ['ubuntu', 'debian', 'linuxmint']:
- handler = False
- result = False
- try:
- # try aptdaemon first
- from lib.aptdaemonhandler import AptdaemonHandler
- handler = AptdaemonHandler()
- except:
- # fallback to shell
- # since we need the user password, ask to check for new version first
- from lib.shellhandlerapt import ShellHandlerApt
- sudo = True
- handler = ShellHandlerApt(sudo)
- if dialog_yesno(32015):
- pass
- elif dialog_yesno(32009, 32010):
- log("disabling addon by user request")
- ADDON.setSetting("versioncheck_enable", 'false')
- return
-
- if handler:
- if handler.check_upgrade_available(packages[0]):
- if _upgrademessage(32012, oldversion, True):
- if ADDON.getSetting("upgrade_system") == "false":
- result = handler.upgrade_package(packages[0])
- else:
- result = handler.upgrade_system()
- if result:
- from lib.common import message_upgrade_success, message_restart
- message_upgrade_success()
- message_restart()
- else:
- log("Error during upgrade")
- else:
- log("Error: no handler found")
- else:
- log("Unsupported platform %s" %platform.dist()[0])
- sys.exit(0)
-
-# Python cryptography < 1.7 (still shipped with Ubuntu 16.04) has issues with
-# pyOpenSSL integration, leading to all sorts of weird bugs - check here to save
-# on some troubleshooting. This check may be removed in the future (when switching
-# to Python3?)
-# See https://github.com/pyca/pyopenssl/issues/542
-def _checkcryptography():
- ver = None
- try:
- import cryptography
- ver = cryptography.__version__
- except:
- # If the module is not found - no problem
- return
-
- ver_parts = list(map(int, ver.split('.')))
- if len(ver_parts) < 2 or ver_parts[0] < 1 or (ver_parts[0] == 1 and ver_parts[1] < 7):
- log('Python cryptography module version %s is too old, at least version 1.7 needed' % ver)
- xbmcgui.Dialog().ok(ADDONNAME, localise(32040) % ver, localise(32041), localise(32042))
-
-if (__name__ == "__main__"):
- _checkcryptography()
- if ADDON.getSetting("versioncheck_enable") == "false":
- log("Disabled")
- else:
- log('Version %s started' % ADDONVERSION)
- Main()