├── .gitignore
├── .project
├── LICENSE.txt
├── README.md
├── addon.xml
├── changelog.txt
├── default.py
├── download.py
├── icon.png
├── icon.svg
├── resources
├── __init__.py
├── language
│ ├── English
│ │ └── strings.po
│ └── Spanish
│ │ └── strings.po
├── lib
│ ├── .gitignore
│ ├── __init__.py
│ ├── addon.py
│ ├── builds.py
│ ├── funcs.py
│ ├── gui.py
│ ├── history.py
│ ├── log.py
│ ├── openelec.py
│ ├── progress.py
│ ├── rpi.py
│ ├── script_exceptions.py
│ └── utils.py
├── settings.xml
└── skins
│ └── Default
│ ├── 1080i
│ ├── script-devupdate-history.xml
│ ├── script-devupdate-info.xml
│ └── script-devupdate-main.xml
│ ├── colors
│ └── Defaults.xml
│ └── media
│ ├── cancel.png
│ ├── downgrade.png
│ ├── downgrade.svg
│ ├── highlight.png
│ ├── history.png
│ ├── installed.png
│ ├── logotype.png
│ ├── openelec_logo_only.svg
│ ├── openelec_small-logo-no-descr_transp.svg
│ ├── openelec_small-logo_transp.svg
│ ├── settings.png
│ ├── upgrade.png
│ ├── upgrade.svg
│ └── white.png
└── service.py
/.gitignore:
--------------------------------------------------------------------------------
1 | *.py?
2 | *~
3 | .settings
4 | .pydevproject
5 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | OpenELEC Dev Update
4 |
5 |
6 |
7 |
8 |
9 | org.python.pydev.PyDevBuilder
10 |
11 |
12 |
13 |
14 |
15 | org.python.pydev.pythonNature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 | {one line to give the program's name and a brief idea of what it does.}
635 | Copyright (C) {year} {name of author}
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | {project} Copyright (C) {year} {fullname}
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | OpenELEC Dev Update
2 | =========================
3 |
4 | This [Kodi](http://kodi.tv) addon for [OpenELEC](http://www.openelec.tv) enables downloading of various development build updates and releases directly from the GUI.
5 |
6 | 
7 |
--------------------------------------------------------------------------------
/addon.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | all
18 | Unofficial OpenELEC updater
19 | This add-on downloads OpenELEC update files ready to be installed on the next reboot. Select a predefined source or a custom source defined in the add-on settings, then choose from a list of available builds. Some sources provide full build details which can be viewed by pressing 'Info'.
20 | Development builds often have major bugs and crashes can happen quite often. Always backup your userdata folder when installing development builds.
21 | http://openelec.tv/forum/128-addons/49855
22 | http://ls80.github.io/script.openelec.devupdate
23 | http://github.com/LS80/script.openelec.devupdate.git
24 | GNU GENERAL PUBLIC LICENSE. Version 3, 29 June 2007
25 |
26 |
27 |
--------------------------------------------------------------------------------
/changelog.txt:
--------------------------------------------------------------------------------
1 | 4.39.0
2 | - Add LibreELEC support.
3 |
4 | 4.38.1
5 | - Fixed a script error when retrieving dates for official releases.
6 |
7 | 4.38.0
8 | - Reversed the order of the builds in the command line script.
9 |
10 | 4.37.2
11 | - Added new Milhouse RPi builds thread for v17.
12 |
13 | 4.37.1
14 | - Fixed the notification of a pending installation.
15 |
16 | 4.37.0
17 | - Added a Spanish translation. Thanks Gaudi.
18 |
19 | 4.36.1
20 | - Fixed a script error when the update directory does not exist.
21 |
22 | 4.36.0
23 | - Make the history dialog the same size as the main dialog.
24 | - Tooltip for selecting a build source.
25 |
26 | 4.35.0
27 | - Changed the build date display to use the Kodi short date format.
28 | - Added a setting to restore the old build date format.
29 | - Fixed toolbar button tooltip not showing.
30 | - Fixed a problem with re-enabling rpi overclocking.
31 |
32 | 4.34.1
33 | - Fixed a problem with manually defined URLs.
34 | - Fixed the alignment of the build type label.
35 |
36 | 4.34.0
37 | - Moved DarkAngel2401 Dual Audio Builds from the default list
38 | to the custom sources so it can be disabled
39 | - Added an extra custom source slot
40 |
41 | 4.33.0
42 | - Fixed build summaries not showing when the build list is re-focused.
43 | - Show toolbar tooltips in white to visually separate them from
44 | the build summaries.
45 |
46 | 4.32.0
47 | - Added a button to the toolbar to cancel a pending update,
48 | instead of the settings action.
49 | - Added tooltips for toolbar buttons to the bottom information area.
50 |
51 | 4.31.0
52 | - Made it easier to add additional Milhouse build folders.
53 |
54 | 4.30.0
55 | - Made it possible to fit all sources on screen.
56 |
57 | 4.29.2
58 | - Additional fix for the script error when installing releases.
59 |
60 | 4.29.1
61 | - Fixed a script error when installing releases.
62 |
63 | 4.29.0
64 | - Use full screen height for the main dialog.
65 | - Two custom sources can be defined.
66 | - Added a subdirectory setting for custom sources.
67 | - Milhouse custom sources can be defined more easily.
68 | - Notify about a pending installation.
69 | - Added a setting for the reboot countdown time.
70 | - Removed the version number from every log line.
71 | - Stopped spurious error messages about creating the symbolic link.
72 |
73 | 4.28.0
74 | - Add updates made with the command line script to the installation history.
75 |
76 | 4.27.0
77 | - Added a button to show the installation history.
78 |
79 | 4.26.0
80 | - Made the history script runnable under OpenELEC.
81 |
82 | 4.25.0
83 | - Use the tar file for the update even when verifying the images.
84 | - Reduced the new build notification time when playing video.
85 |
86 | 4.24.1
87 | - Fixed the devupdate command line script (broken since 4.23.0).
88 |
89 | 4.24.0
90 | - Show the correct build information For Nvidia_Legacy.x86_64 and Generic Milhouse builds.
91 |
92 | 4.23.0
93 | - Show a notification if the install was unsuccessful.
94 | - Keep a history of installed builds.
95 |
96 | 4.22.0
97 | - Fixed installs of Milhouse debug builds not notifying as successful.
98 | - Kodi debug logging is now required for the add-on DEBUG messages to show.
99 |
100 | 4.21.0
101 | - Stop more than one instance of the add-on running at the same time.
102 | - Adjusted the source name text colour so it doesn't look "greyed out".
103 | - Removed support for the obsolete ATV2.
104 |
105 | 4.20.0
106 | - Made Milhouse builds available for platforms other than RPi.
107 |
108 | 4.19.1
109 | - Fixed a service error when the selected source has no builds available.
110 |
111 | 4.19.0
112 | - Added Nvidia_Legacy.x86_64 and WeTek_Play.arm as override build types.
113 |
114 | 4.18.1
115 | - Fixed a possible issue with the custom build setting.
116 |
117 | 4.18.0
118 | - Settings reorganised.
119 |
120 | 4.17.0
121 | - Fixed compatibility with the latest OpenELEC builds where some files
122 | in /etc have been removed.
123 | - Automatically set file permissions and create a devupdate symlink in the
124 | home directory to more easily run the cmd line script.
125 |
126 | 4.16.3
127 | - Fixed a problem with empty build summaries when changing the source.
128 | - Fixed the scrollbar height.
129 |
130 | 4.16.2
131 | - Fixed a problem with dev build sources.
132 |
133 | 4.16.1
134 | - Fixed problems parsing the Milhouse build summaries.
135 |
136 | 4.16.0
137 | - Fixed the RPi system partition size check.
138 | - Command line download can now be cancelled with Ctrl-C.
139 |
140 | 4.15.0
141 | - Show Milhouse debug builds when the system partition is large enough.
142 |
143 | 4.14.0
144 | - Do not block the gui when waiting to set the build information.
145 | - Use a slide animation when closing the build selection dialog.
146 | - Fixed the download script (broken since 4.12.0)
147 |
148 | 4.13.0
149 | - Info now toggles the build details dialog on and off.
150 |
151 | 4.12.0
152 | - Include the Build Highlights section from the Milhouse release posts.
153 |
154 | 4.11.1
155 | - Fixed sometimes showing the build info for a different build.
156 |
157 | 4.11.0
158 | - Added a build details dialog for Milhouse RPi builds (press Info).
159 | - Added a button to open the add-on settings.
160 | - Fixed a problem with Milhouse build summaries not showing when the source
161 | is re-selected.
162 |
163 | 4.10.0
164 | - Show older releases down to 3.95.1.
165 | - Fixed build information not updating when paging up/down.
166 |
167 | 4.9.0
168 | - Fixed missing Milhouse build information.
169 |
170 | 4.8.2
171 | - Fixed missing build information for Milhouse builds with a letter suffix.
172 |
173 | 4.8.1
174 | - Fixed not waiting for the backup to complete.
175 |
176 | 4.8.0
177 | - Handle the latest development build file names with the added version number.
178 |
179 | 4.7.0
180 | - Enabled Milhouse builds as a custom source.
181 |
182 | 4.6.1
183 | - Updated the forum thread url for Milhouse build descriptions.
184 |
185 | 4.6.0
186 | - Fixed the detection of the installed build.
187 | - Align dates in the list of builds.
188 | - Decompress when required when using the command line download script.
189 |
190 | 4.5.0
191 | - Added commit messages to the info area for Official Snapshots
192 | and Chris Swan RPi Builds.
193 | - By default use the commit hash for development build names
194 | instead of the commit count.
195 | - Fixed the missing installation notification.
196 |
197 | 4.4.0
198 | - Added build information for Milhouse RPi Builds.
199 | - Fixed RPi2 overclock disable.
200 | - Blue highlight for build name in dialogs.
201 |
202 | 4.3.0
203 | - Only show RPi build sources for RPi
204 |
205 | 4.2.0
206 | - Added a setting to control the new build check interval.
207 | - Bug fixes.
208 |
209 | 4.1.0
210 | - Fixed a problem with the default archive directory due to a missing trailing slash.
211 | - Flipped some default settings.
212 |
213 | 4.0.0
214 | - Updated gui now supports browsing through all build sources.
215 |
216 | 3.14.0
217 | - Support Milhouse builds with a letter suffix, e.g. #0308b.
218 |
219 | 3.13.0
220 | - Fixed Official Release downloads.
221 |
222 | 3.12.0
223 | - Support the new naming scheme for Milhouse builds.
224 |
225 | 3.11.0
226 | - Add RPi.arm and RPi2.arm as build types for the override option, to enable
227 | switching between the two with the same SD card.
228 |
229 | 3.10.0
230 | - Support Milhouse builds for RPi2.
231 |
232 | 3.9.0
233 | - Updated the Milhouse URL.
234 | - Added a download.py script to download updates on the command line.
235 |
236 | 3.8.1
237 | - Fixed a problem with the Milhouse builds.
238 |
239 | 3.8.0
240 | - Updated the Milhouse builds URL.
241 | - Removed the Rbej Gotham builds.
242 |
243 | 3.7.0
244 | - Fixed the issue with the new build check service failing with Helix builds.
245 |
246 | 3.6.0
247 | - Added Cuboxi.arm and imx6.arm build type overrides.
248 |
249 | 3.5.1
250 | - Fixed a script error caused by the Kodi rebrand.
251 |
252 | 3.5.0
253 | - Added an option to enable notifications of new official releases.
254 | - Fixed the cancel pending update action.
255 |
256 | 3.4.2
257 | - Fixed a problem with DarkAngel2401 builds due to a change on the server.
258 |
259 | 3.4.1
260 | - Fixed a problem with the archiving of the tar files.
261 |
262 | 3.4.0
263 | - Removed the XBMCNightlyBuilds source which has not worked for some time.
264 | - Official Snapshot Builds is now the default source.
265 |
266 | 3.3.5
267 | - Fixed a problem with DarkAngel2401 builds due to a change on the server.
268 |
269 | 3.3.4
270 | - Fixed a problem with the service part failing on some systems.
271 |
272 | 3.3.3
273 | - goo.gl short URLs can now be used as a custom URL.
274 |
275 | 3.3.2
276 | - Fixed a problem with updates not being applied if no manual updates
277 | have previously been performed.
278 |
279 | 3.3.1
280 | - Fixed a broken dependency which caused the "Incompatible" message.
281 |
282 | 3.3.0
283 | - Added DarkAngel2401 Dual Audio Builds.
284 | - Minor bug fixes.
285 |
286 | 3.2.5
287 | - Fixed the subdirectory setting for sources other than a custom url.
288 |
289 | 3.2.4
290 | - Fixed a script error when using XBMCNightlyBuilds.
291 |
292 | 3.2.3
293 | - Include the LICENSE.txt file.
294 |
295 | 3.2.2
296 | - Fixed another script error when using official releases.
297 |
298 | 3.2.1
299 | - Use an improved OpenELEC icon.
300 |
301 | 3.2.0
302 | - Added icons to indicate upgrades and downgrades.
303 |
304 | 3.1.0
305 | - Added a custom dialog to select builds.
306 | - Fixed a script error when using official releases.
307 | - Fixed a problem finding builds when using the Official Archive source.
308 |
309 | 3.0.0
310 | - Now requires OpenELEC 4.0
311 | - Added an option to run a background progress dialog.
312 | - Added an option to disable update file verification
313 | which also means extraction is not required.
314 | - Show progress of copy to archive.
315 |
316 | 2.19.1
317 | - Fixed a problem with XBMC Backup showing a dialog
318 | instead of just running the backup automatically.
319 |
320 | 2.19.0
321 | - Fixed a problem with the Official Releases source.
322 | - Renamed Official Daily Builds to Official Snapshot Builds.
323 |
324 | 2.18.4
325 | - Handle URL problems properly.
326 |
327 | 2.18.3
328 | - Fixed a downloading problem caused by the previous change.
329 |
330 | 2.18.2
331 | - Fixed a possible problem retrieving the build list from a custom URL.
332 |
333 | 2.18.1
334 | - Fixed a problem with installing the latest ATV builds.
335 |
336 | 2.18.0
337 | - Renamed xbmcnightlybuilds to XBMCNightlyBuilds (Nightly Builds) and
338 | made this the default source.
339 | - Added XBMCNightlyBuilds Official Stable Builds Mirror
340 | as an alternative to the Official Archive source
341 | - Updated the Official Daily Builds url to snapshots.openelec.tv
342 |
343 | 2.17.4
344 | - Updated xbmcnightlybuilds to point to mirror site.
345 |
346 | 2.17.3
347 | - Fixed a possible script error when using MilhouseVH Builds.
348 |
349 | 2.17.2
350 | - [RPi] Fixed notifications not showing after the reboot to re-enable overclocking.
351 | - Set xbmcnightlybuilds server back to openelec.xbmcnightlybuilds.com
352 |
353 | 2.17.1
354 | - Use an alternative mirror for xbmcnightlybuilds as a temporary fix for
355 | missing recent builds.
356 |
357 | 2.17.0
358 | - Added an option to backup XBMC data when installing a new build,
359 | using the "XBMC Backup" add-on.
360 |
361 | 2.16.2
362 | - Fixed a problem with incomplete build lists for xbmcnightlybuilds.
363 | - Fixed broken Official Archive source.
364 |
365 | 2.16.1
366 | - Create the directory for temporary downloads if it doesn't exist.
367 |
368 | 2.16.0
369 | - Handle the new build version format with the git shorthash (-r12345-g123abc.tar)
370 |
371 | 2.15.2
372 | - Fixed potential Raspberry Pi infinite reboot problem introduced in 2.15.1.
373 |
374 | 2.15.1
375 | - Put Raspberry Pi config.txt temporary backup in the add-on data directory
376 | instead of /flash, to avoid potential conflicts with other code.
377 |
378 | 2.15.0
379 | - Added MilhouseVH builds.
380 |
381 | 2.14.2
382 | - Only check for archive directory if the option is enabled.
383 |
384 | 2.14.1
385 | - Fixed a dependencies not met error when installed with the latest Gotham nightlies.
386 |
387 | 2.14.0
388 | - Changed the selection of the build source and build type
389 | to use a selection dialog instead of a spinner.
390 |
391 | 2.13.0
392 | - Added the current build to the new build notification dialog.
393 |
394 | 2.12.2
395 | - Fixed the scheduled build check that has caused XBMC to crash since 2.9.0.
396 | - Fixed the "Check only on boot" option.
397 | - Decreased the frequency of the new build check from 1 hour to 4 hours.
398 |
399 | 2.12.1
400 | - Fixed downloads from Official Archive.
401 |
402 | 2.12.0
403 | - Removed vicbitter Gotham build source.
404 |
405 | 2.11.1
406 | - Fixed possible duplicates in build list.
407 | - Fixed wrong dates for very old releases.
408 |
409 | 2.11.0
410 | - Added an option to install a build type other than the currently installed one.
411 | (ION, Intel, and Fusion now need the Generic build)
412 | - Added a notification after cancelling a pending update.
413 |
414 | 2.10.3
415 | - Fixed a script error in the build check service when there is no network.
416 |
417 | 2.10.2
418 | - Fixed a problem showing the available builds after a new build check.
419 |
420 | 2.10.1
421 | - Fixed a problem with downloads from xbmcnightlybuilds.
422 |
423 | 2.10.0
424 | - Added an option to install builds from openelec.xbmcnightlybuilds.com
425 |
426 | 2.9.0
427 | - Added a settings action to cancel a pending update.
428 |
429 | 2.8.0
430 | - Added an option to install the Rbej popcornmix builds.
431 |
432 | 2.7.1
433 | - Fixed a problem that caused some official releases to be missing from the list.
434 |
435 | 2.7.0
436 | - Added an option to specify a timeout in seconds.
437 |
438 | 2.6.1
439 | - Fixed a problem caused by the 3.2.0 release when set to list official releases.
440 |
441 | 2.6.0
442 | - Improved the startup time when not using official releases.
443 |
444 | 2.5.2
445 | - Show a message if there is no Internet connectivity.
446 |
447 | 2.5.1
448 | - Show a message if there is an error during decompression of the build file.
449 |
450 | 2.5.0
451 | - Support an archive directory which can be a network location.
452 |
453 | 2.4.3
454 | - Added an option to install the latest extlinux as part of the update (not Raspberry Pi).
455 |
456 | 2.4.2
457 | - Identify Rbej builds when installed and simplify the display name.
458 |
459 | 2.4.1
460 | - Fixed a problem with repeated installed build notifications.
461 |
462 | 2.4.0
463 | - Changed the Rbej builds to use the new netlir.dk url.
464 | - Put the source name in the build selection dialog heading.
465 |
466 | 2.3.0
467 | - Added Rbej Frodo builds.
468 | - Removed hwat.be archive and replaced it with the official one at archive.openelec.tv.
469 |
470 | 2.2.0
471 | - Added an experimental option to temporarily disable Raspberry Pi overclocking during an update.
472 | This helps to prevent SD card corruption.
473 | - Added the Rbej builds as a new URL option.
474 | - Changed the default URL option to "Official Releases".
475 |
476 | 2.1.0
477 | - Added a notification about a successful update on startup.
478 |
479 | 2.0.11
480 | - Fixed a problem with the gui hanging if the update files are already in place.
481 | - Added a 10 second reboot timeout dialog instead of rebooting immediately.
482 |
483 | 2.0.10
484 | - Fixed a possible script error when set to "Official Releases".
485 |
486 | 2.0.9
487 | - Reduced the delay between starting the add-on and the busy indicator appearing.
488 |
489 | 2.0.8
490 | - Fixed a possible script error when using nightly build sources.
491 |
492 | 2.0.7
493 | - Fixed build list to also show uncompressed tar file builds.
494 |
495 | 2.0.6
496 | - Fixed a possible problem with bogus new build notifications.
497 |
498 | 2.0.5
499 | - Added http://hwat.be/openelec/official.archive as a new URL option.
500 |
501 | 2.0.4
502 | - Fixed a problem with date comparison of the installed build.
503 | - Changed settings to allow the build list prompt to be completely disabled.
504 |
505 | 2.0.3
506 | - Added a setting to disable the restart confirmation.
507 |
508 | 2.0.2
509 | - Fixed a problem with the build check service crashing after 30 mins.
510 | - Removed the build check interval setting (replaced with simpler options).
511 | - More small modifications to the settings.
512 |
513 | 2.0.1
514 | - Fixed a problem with xbmc hanging on reboot/shutdown/suspend.
515 |
516 | 2.0.0
517 | - Added an option to periodically check if a newer build is available.
518 | - Upgrade/downgrade logic is now always based on the date of the build/release.
519 | - Improved the settings layout.
520 | - Notifications now show the icon.
521 |
522 | 1.1.7
523 | - Made older releases available to install.
524 | - Fixed problems with the busy dialog.
525 |
526 | 1.1.6
527 | - Added vicbitter's Gotham builds.
528 |
529 | 1.1.5
530 | - Official releases now have an associated date.
531 |
532 | 1.1.4
533 | - Fixed the slow startup problem.
534 | - Fixed an issue with official daily build downloads.
535 |
536 | 1.1.3
537 | - Added back the option to install official releases.
538 | - Fixed the url for Chris Swan's RPi builds.
539 |
540 | 1.1.2
541 | - Added the option to install official testing builds.
542 |
543 | 1.1.1
544 | - Removed the option to install official releases which was
545 | broken after the website redesign.
546 |
547 | 1.1.0
548 | - Added the option to install official releases.
549 |
550 | 1.0.9
551 | - Added a progress bar for the md5 verification (slow on RPi).
552 |
553 | 1.0.8
554 | - Added a speed indicator to the progress bar.
555 | - Worked around the missing progress dialog bug (trac #13467).
556 | - Added verification of the md5 sums.
557 |
558 | 1.0.7
559 | - Now checks if update files are already in place when starting up.
560 | - Added an icon for the addon.
561 |
562 | 1.0.6
563 | - Use a notification message to inform about the build
564 | installing after a reboot.
565 |
566 | 1.0.5
567 | - Now select a URL using a source name instead of the URL itself.
568 |
569 | 1.0.4
570 | - Added the URL for the Xtreamer Ultra builds by incubus.
571 | - Added a url subdirectory option.
572 |
573 | 1.0.3
574 | - The addon will now auto-update.
575 |
576 | 1.0.2
577 | - Updated the official build URL.
578 | - Catch write errors and handle them with a popup message box.
579 |
580 | 1.0.1
581 | - Changed the addon id to script.openelec.devupdate.
582 | - Added a debug logging setting.
583 | - Better handle url errors by popping up a dialog message box and
584 | either log the error cleanly, or open up the settings to attempt
585 | to correct the problem.
586 |
587 | 1.0.0
588 | - Initial release.
589 |
--------------------------------------------------------------------------------
/default.py:
--------------------------------------------------------------------------------
1 | ############################################################################
2 | #
3 | # Copyright 2012 Lee Smith
4 | #
5 | # This program is free software: you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation, either version 3 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # This program is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with this program. If not, see .
17 | #
18 | ############################################################################
19 |
20 | from __future__ import division
21 |
22 | import os
23 | import sys
24 | import tarfile
25 | from contextlib import closing
26 |
27 | import xbmc, xbmcgui, xbmcaddon, xbmcvfs
28 | import requests
29 |
30 | from resources.lib import (progress, script_exceptions, utils, builds, openelec,
31 | rpi, addon, log, gui, funcs)
32 | from resources.lib.addon import L10n
33 |
34 | TEMP_PATH = xbmc.translatePath("special://temp/")
35 |
36 |
37 | class Main(object):
38 | def __enter__(self):
39 | return self
40 |
41 | def __exit__(self, exc_type, exc_val, exc_tb):
42 | already_running = exc_type is script_exceptions.AlreadyRunning
43 |
44 | if not already_running:
45 | utils.set_not_running()
46 |
47 | return already_running
48 |
49 | def start(self):
50 | if utils.is_running():
51 | raise script_exceptions.AlreadyRunning
52 |
53 | utils.set_running()
54 | log.log("Starting")
55 |
56 | builds.arch = utils.get_arch()
57 | log.log("Set arch to {}".format(builds.arch))
58 |
59 | if addon.get_bool_setting('set_timeout'):
60 | builds.timeout = float(addon.get_setting('timeout'))
61 |
62 | self.background = addon.get_bool_setting('background')
63 | self.verify_files = addon.get_bool_setting('verify_files')
64 |
65 | funcs.create_directory(openelec.UPDATE_DIR)
66 |
67 | utils.check_update_files(builds.get_build_from_notify_file(),
68 | force_dialog=True)
69 |
70 | self.installed_build = self.get_installed_build()
71 |
72 | self.select_build()
73 |
74 | utils.remove_update_files()
75 |
76 | self.check_archive()
77 |
78 | self.maybe_download()
79 |
80 | self.maybe_verify()
81 |
82 | rpi.maybe_disable_overclock()
83 |
84 | utils.maybe_schedule_extlinux_update()
85 |
86 | utils.maybe_run_backup()
87 |
88 | self.confirm()
89 |
90 | def get_installed_build(self):
91 | try:
92 | return builds.get_installed_build()
93 | except requests.ConnectionError as e:
94 | utils.connection_error(str(e))
95 | sys.exit(1)
96 |
97 | def select_build(self):
98 | build_select = gui.BuildSelectDialog(self.installed_build)
99 | build_select.doModal()
100 |
101 | self.selected_source = build_select.selected_source
102 | addon.set_setting('source_name', self.selected_source)
103 | log.log("Selected source: " + str(self.selected_source))
104 |
105 | if not build_select:
106 | log.log("No build selected")
107 | sys.exit(0)
108 |
109 | selected_build = build_select.selected_build
110 | log.log("Selected build: " + str(selected_build))
111 |
112 | build_str = utils.format_build(selected_build)
113 | msg = L10n(32003).format(utils.format_build(self.installed_build),
114 | build_str)
115 |
116 | if selected_build < self.installed_build:
117 | args = (L10n(32004), L10n(32005), msg)
118 | elif selected_build > self.installed_build:
119 | args = (L10n(32001), L10n(32002), msg)
120 | else:
121 | msg = L10n(32007).format(build_str)
122 | args = (L10n(32006), msg, L10n(32008))
123 |
124 | if not utils.yesno(*args):
125 | sys.exit(0)
126 |
127 | self.selected_build = selected_build
128 |
129 | def check_archive(self):
130 | self.archive = addon.get_bool_setting('archive')
131 | if self.archive:
132 | archive_root = addon.get_setting('archive_root')
133 | self.archive_root = utils.ensure_trailing_slash(archive_root)
134 | self.archive_tar_path = None
135 | self.archive_dir = os.path.join(self.archive_root, str(self.selected_source))
136 | log.log("Archive builds to " + self.archive_dir)
137 | if not xbmcvfs.exists(self.archive_root):
138 | log.log("Unable to access archive")
139 | utils.ok(L10n(32009), L10n(32010).format(self.archive_root), L10n(32011))
140 | addon.open_settings()
141 | sys.exit(1)
142 | elif not xbmcvfs.mkdir(self.archive_dir):
143 | log.log("Unable to create directory in archive")
144 | utils.ok(L10n(32009), L10n(32012).format(self.archive_dir), L10n(32013))
145 | sys.exit(1)
146 |
147 | def maybe_download(self):
148 | try:
149 | remote_file = self.selected_build.remote_file()
150 | except requests.RequestException as e:
151 | utils.url_error(self.selected_build.url, str(e))
152 | sys.exit(1)
153 |
154 | filename = self.selected_build.filename
155 | tar_name = self.selected_build.tar_name
156 | size = self.selected_build.size
157 |
158 | self.download_path = os.path.join(TEMP_PATH, filename)
159 | self.temp_tar_path = os.path.join(TEMP_PATH, tar_name)
160 | self.update_tar_path = os.path.join(openelec.UPDATE_DIR, tar_name)
161 | if self.archive:
162 | self.archive_tar_path = os.path.join(self.archive_dir, tar_name)
163 |
164 | if not self.copy_from_archive():
165 | if (os.path.isfile(self.download_path) and
166 | os.path.getsize(self.download_path) == size):
167 | # Skip the download if the file exists with the correct size.
168 | log.log("Skipping download")
169 | else:
170 | try:
171 | log.log("Starting download of {} to {}".format(self.selected_build.url,
172 | self.download_path))
173 | with progress.FileProgress(L10n(32014), remote_file, self.download_path,
174 | size, self.background) as downloader:
175 | downloader.start()
176 | log.log("Completed download")
177 | except script_exceptions.Canceled:
178 | sys.exit(0)
179 | except requests.RequestException as e:
180 | utils.url_error(self.selected_build.url, str(e))
181 | sys.exit(1)
182 | except script_exceptions.WriteError as e:
183 | utils.write_error(self.download_path, str(e))
184 | sys.exit(1)
185 |
186 | if self.selected_build.compressed:
187 | try:
188 | bf = open(self.download_path, 'rb')
189 | log.log("Starting decompression of " + self.download_path)
190 | with progress.DecompressProgress(L10n(32015),
191 | bf, self.temp_tar_path, size,
192 | self.background) as decompressor:
193 | decompressor.start()
194 | log.log("Completed decompression")
195 | except script_exceptions.Canceled:
196 | sys.exit(0)
197 | except script_exceptions.WriteError as e:
198 | utils.write_error(self.temp_tar_path, str(e))
199 | sys.exit(1)
200 | except script_exceptions.DecompressError as e:
201 | utils.decompress_error(self.download_path, str(e))
202 | sys.exit(1)
203 | finally:
204 | funcs.remove_file(self.download_path)
205 |
206 | self.maybe_copy_to_archive()
207 |
208 | log.log("Moving tar file to " + self.update_tar_path)
209 | os.renames(self.temp_tar_path, self.update_tar_path)
210 |
211 | addon.set_setting('update_pending', 'true')
212 |
213 | def copy_from_archive(self):
214 | if self.archive and xbmcvfs.exists(self.archive_tar_path):
215 | log.log("Skipping download and decompression")
216 |
217 | archive = xbmcvfs.File(self.archive_tar_path)
218 | try:
219 | with progress.FileProgress(L10n(32016),
220 | archive, self.update_tar_path, archive.size(),
221 | self.background) as extractor:
222 | extractor.start()
223 | except script_exceptions.Canceled:
224 | funcs.remove_file(self.tar_path)
225 | sys.exit(0)
226 | except script_exceptions.WriteError:
227 | sys.exit(1)
228 | return True
229 | return False
230 |
231 | def maybe_copy_to_archive(self):
232 | if self.archive and not xbmcvfs.exists(self.archive_tar_path):
233 | log.log("Archiving tar file to {}".format(self.archive_tar_path))
234 |
235 | tar = open(self.temp_tar_path)
236 | size = os.path.getsize(self.temp_tar_path)
237 |
238 | try:
239 | with progress.FileProgress(L10n(32017),
240 | tar, self.archive_tar_path, size,
241 | self.background) as extractor:
242 | extractor.start()
243 | except script_exceptions.Canceled:
244 | log.log("Archive copy canceled")
245 | xbmcvfs.delete(self.archive_tar_path)
246 | except script_exceptions.WriteError as e:
247 | utils.write_error(self.archive_tar_path, str(e))
248 | xbmcvfs.delete(self.archive_tar_path)
249 |
250 | def maybe_verify(self):
251 | if not self.verify_files:
252 | return
253 |
254 | log.log("Verifying update file")
255 | with closing(tarfile.open(self.update_tar_path, 'r')) as tf:
256 | tar_names = tf.getnames()
257 |
258 | for update_image in openelec.UPDATE_IMAGES:
259 | path_in_tar = next(name for name in tar_names
260 | if name.endswith(os.path.join('target', update_image)))
261 | ti = tf.extractfile(path_in_tar)
262 | temp_image_path = os.path.join(TEMP_PATH, update_image)
263 | try:
264 | with progress.FileProgress(L10n(32018), ti, temp_image_path, ti.size,
265 | self.background) as extractor:
266 | extractor.start()
267 | log.log("Extracted " + temp_image_path)
268 | except script_exceptions.Canceled:
269 | return
270 | except script_exceptions.WriteError as e:
271 | utils.write_error(temp_image_path, str(e))
272 | return
273 |
274 | md5sum = tf.extractfile(path_in_tar + '.md5').read().split()[0]
275 | log.log("{}.md5 file = {}".format(update_image, md5sum))
276 |
277 | if not progress.md5sum_verified(md5sum, temp_image_path,
278 | self.background):
279 | log.log("{} md5 mismatch!".format(update_image))
280 | utils.ok(L10n(32019).format(update_image),
281 | self.selected_build.filename,
282 | L10n(32020).format(update_image), L10n(32021))
283 | utils.remove_update_files()
284 | return
285 | else:
286 | log.log("{} md5 is correct".format(update_image))
287 |
288 | funcs.remove_file(temp_image_path)
289 |
290 | def confirm(self):
291 | funcs.create_notify_file(self.selected_source, self.selected_build)
292 |
293 | build_str = utils.format_build(self.selected_build)
294 | do_notify = False
295 |
296 | if addon.get_bool_setting('confirm_reboot'):
297 | if utils.yesno(L10n(32022), " ", L10n(32024).format(build_str)):
298 | xbmc.restart()
299 | else:
300 | do_notify = True
301 | else:
302 | if progress.reboot_countdown(
303 | L10n(32054), L10n(32025).format(build_str),
304 | addon.get_int_setting('reboot_count')):
305 | xbmc.restart()
306 | sys.exit()
307 | else:
308 | do_notify = True
309 |
310 | if do_notify:
311 | utils.notify(L10n(32026).format(build_str))
312 |
313 |
314 | def new_build_check():
315 | log.log("Checking for a new build")
316 |
317 | check_official = addon.get_bool_setting('check_official')
318 | check_interval = addon.get_int_setting('check_interval')
319 |
320 | autoclose_ms = check_interval * 3540000 # check interval in ms - 1 min
321 |
322 | try:
323 | installed_build = builds.get_installed_build()
324 | except:
325 | log.log("Unable to get installed build so exiting")
326 | sys.exit(1)
327 |
328 | source = addon.get_setting('source_name')
329 | if (isinstance(installed_build, builds.Release) and source == "Official Releases"
330 | and not check_official):
331 | # Don't do the job of the official auto-update system.
332 | log.log("Skipping build check - official release")
333 | else:
334 | builds.arch = utils.get_arch()
335 |
336 | if addon.get_bool_setting('set_timeout'):
337 | builds.timeout = float(addon.get_setting('timeout'))
338 |
339 | build_sources = builds.sources()
340 | try:
341 | build_url = build_sources[source]
342 | except KeyError:
343 | log.log("{} is not a valid source".format(source))
344 | return
345 |
346 | log.log("Checking {}".format(build_url.url))
347 |
348 | latest = builds.latest_build(source)
349 | if latest and latest > installed_build:
350 | if utils.do_show_dialog():
351 | log.log("New build {} is available, "
352 | "prompting to show build list".format(latest))
353 |
354 | if utils.yesno(
355 | addon.name,
356 | line1=L10n(32027).format(utils.format_build(latest)),
357 | line2=L10n(32028).format(utils.format_build(installed_build)),
358 | line3=L10n(32029),
359 | autoclose=autoclose_ms):
360 | with Main() as main:
361 | main.start()
362 | else:
363 | utils.notify(L10n(32030).format(utils.format_build(latest)),
364 | 4000)
365 |
366 |
367 | log.log_version()
368 | log.log("Script arguments: {}".format(sys.argv))
369 |
370 | if addon.get_bool_setting('set_date_format'):
371 | builds.date_fmt = funcs.strftime_fmt(addon.get_setting('date_format'))
372 | else:
373 | builds.date_fmt = xbmc.getRegion('dateshort')
374 | log.log("Set date format to {}".format(builds.date_fmt))
375 |
376 | if len(sys.argv) > 1:
377 | if sys.argv[1] == 'checkperiodic':
378 | if addon.get_bool_setting('check'):
379 | selected = builds.get_build_from_notify_file()
380 | if not utils.check_update_files(selected):
381 | new_build_check()
382 |
383 | elif sys.argv[1] == 'checkonboot':
384 | if addon.get_bool_setting('check'):
385 | new_build_check()
386 |
387 | elif sys.argv[1] == 'confirm':
388 | selected = builds.get_build_from_notify_file()
389 | if selected:
390 | installed_build = builds.get_installed_build()
391 | utils.maybe_confirm_installation(selected, installed_build)
392 | funcs.remove_notify_file()
393 | else:
394 | log.log("No new installation")
395 | else:
396 | with Main() as main:
397 | main.start()
398 |
399 |
--------------------------------------------------------------------------------
/download.py:
--------------------------------------------------------------------------------
1 | #! /usr/bin/python
2 | ############################################################################
3 | #
4 | # Copyright 2012 Lee Smith
5 | #
6 | # This program is free software: you can redistribute it and/or modify
7 | # it under the terms of the GNU General Public License as published by
8 | # the Free Software Foundation, either version 3 of the License, or
9 | # (at your option) any later version.
10 | #
11 | # This program is distributed in the hope that it will be useful,
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | # GNU General Public License for more details.
15 | #
16 | # You should have received a copy of the GNU General Public License
17 | # along with this program. If not, see .
18 | #
19 | #################################################imp###########################
20 |
21 | import sys
22 | import os
23 | import time
24 | from argparse import ArgumentParser
25 | from urlparse import urlparse
26 | import bz2
27 |
28 | from resources.lib.funcs import size_fmt, add_deps_to_path
29 | add_deps_to_path()
30 |
31 | import requests
32 |
33 | from resources.lib import builds, openelec, funcs
34 |
35 |
36 | parser = ArgumentParser(description='Download an OpenELEC update')
37 | parser.add_argument('-a', '--arch',
38 | help='Set the build type (e.g. Generic.x86_64, RPi.arm)')
39 | parser.add_argument('-s', '--source', help='Set the build source')
40 | parser.add_argument('-r', '--releases', action='store_true',
41 | help='Look for unofficial releases instead of development builds')
42 |
43 | args = parser.parse_args()
44 |
45 |
46 | def get_choice(items, suffix=lambda item: " ", reverse=False):
47 | num_width = len(str(len(items) - 1))
48 |
49 | if reverse:
50 | items_iter = reversed(list(enumerate(items)))
51 | else:
52 | items_iter = enumerate(items)
53 |
54 | for i, item in items_iter:
55 | print "[{num:{width}d}] {item:s}\t{suffix}".format(
56 | num=i, item=item, width=num_width, suffix=suffix(item))
57 | print '-' * 50
58 |
59 | choice = raw_input('Choose an item or "q" to quit: ')
60 | while choice != 'q':
61 | try:
62 | item = items[int(choice)]
63 | return item
64 | except ValueError:
65 | choice = raw_input('You entered a non-integer. Choice must be an'
66 | ' integer or "q": ')
67 | except IndexError:
68 | choice = raw_input('You entered an invalid integer. Choice must be'
69 | ' from above list or "q": ')
70 | sys.exit()
71 |
72 |
73 | if args.arch:
74 | builds.arch = args.arch
75 |
76 | urls = builds.sources()
77 |
78 | if args.source:
79 | source = args.source
80 | try:
81 | build_url = urls[source]
82 | except KeyError:
83 | parsed = urlparse(source)
84 | if parsed.scheme in ('http', 'https') and parsed.netloc:
85 | if args.releases:
86 | build_url = builds.BuildsURL(source,
87 | extractor=builds.ReleaseLinkExtractor)
88 | else:
89 | build_url = builds.BuildsURL(source)
90 | else:
91 | print ('"{}" is not in the list of available sources '
92 | 'and is not a valid HTTP URL').format(args.source)
93 | print 'Valid options are:\n\t{}'.format("\n\t".join(urls.keys()))
94 | sys.exit(1)
95 | else:
96 | source = get_choice(urls.keys())
97 | build_url = urls[source]
98 |
99 | installed_build = builds.get_installed_build()
100 |
101 | def build_suffix(build):
102 | if build > installed_build:
103 | symbol = '+'
104 | elif build < installed_build:
105 | symbol = '-'
106 | else:
107 | symbol = '='
108 | return symbol
109 |
110 | print
111 | print "Arch: {}".format(builds.arch)
112 | print "Installed build: {}".format(installed_build)
113 |
114 |
115 | def read(f):
116 | return f.read(131072)
117 |
118 | decompressor = bz2.BZ2Decompressor()
119 | def decompress(f):
120 | data = read(f)
121 | return decompressor.decompress(data)
122 |
123 | def process(fin, fout, size, read_func=read):
124 | start_time = time.time()
125 | done = 0
126 | while done < size:
127 | data = read_func(fin)
128 | done = fin.tell()
129 | fout.write(data)
130 | percent = int(done * 100 / size)
131 | bytes_per_second = done / (time.time() - start_time)
132 | print "\r {0:3d}% ({1}/s) ".format(percent, size_fmt(bytes_per_second)),
133 | sys.stdout.flush()
134 | print
135 |
136 | try:
137 | links = build_url.builds()
138 | except requests.RequestException as e:
139 | print str(e)
140 | except builds.BuildURLError as e:
141 | print str(e)
142 | else:
143 | if links:
144 | build = get_choice(links, build_suffix, reverse=True)
145 | remote = build.remote_file()
146 | file_path = os.path.join(openelec.UPDATE_DIR, build.filename)
147 | print
148 | print "Downloading {0} ...".format(build.url)
149 | try:
150 | with open(file_path, 'w') as out:
151 | process(remote, out, build.size)
152 | except KeyboardInterrupt:
153 | os.remove(file_path)
154 | print
155 | print "Download cancelled"
156 | sys.exit()
157 |
158 | if build.compressed:
159 | tar_path = os.path.join(openelec.UPDATE_DIR, build.tar_name)
160 | size = os.path.getsize(file_path)
161 | print
162 | print "Decompressing {0} ...".format(file_path)
163 | with open(file_path, 'r') as fin, open(tar_path, 'w') as fout:
164 | process(fin, fout, size, decompress)
165 | os.remove(file_path)
166 |
167 | funcs.create_notify_file(source, build)
168 |
169 | print
170 | print "The update is ready to be installed. Please reboot."
171 | else:
172 | print
173 | print "No builds available"
174 |
--------------------------------------------------------------------------------
/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LS80/script.openelec.devupdate/b714dde6aed8c18a1381a060e6bea45f8523011d/icon.png
--------------------------------------------------------------------------------
/resources/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LS80/script.openelec.devupdate/b714dde6aed8c18a1381a060e6bea45f8523011d/resources/__init__.py
--------------------------------------------------------------------------------
/resources/language/English/strings.po:
--------------------------------------------------------------------------------
1 | # Kodi Media Center language file
2 | # Addon Name: OpenELEC Dev Update
3 | # Addon id: script.openelec.devupdate
4 | # Addon Provider: Leopold
5 | msgid ""
6 | msgstr ""
7 | "Project-Id-Version: Kodi Addons\n"
8 | "Report-Msgid-Bugs-To: alanwww1@xbmc.org\n"
9 | "POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11 | "Last-Translator: Kodi Translation Team\n"
12 | "Language-Team: English (http://www.transifex.com/projects/p/xbmc-addons/language/en/)\n"
13 | "MIME-Version: 1.0\n"
14 | "Content-Type: text/plain; charset=UTF-8\n"
15 | "Content-Transfer-Encoding: 8bit\n"
16 | "Language: en\n"
17 | "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18 |
19 | msgctxt "#32001"
20 | msgid "Confirm upgrade"
21 | msgstr ""
22 |
23 | msgctxt "#32002"
24 | msgid "Upgrade"
25 | msgstr ""
26 |
27 | msgctxt "#32003"
28 | msgid "{} to {} ?"
29 | msgstr ""
30 |
31 | msgctxt "#32004"
32 | msgid "Confirm downgrade"
33 | msgstr ""
34 |
35 | msgctxt "#32005"
36 | msgid "Downgrade"
37 | msgstr ""
38 |
39 | msgctxt "#32006"
40 | msgid "Confirm install"
41 | msgstr ""
42 |
43 | msgctxt "#32007"
44 | msgid "Build {} is already installed."
45 | msgstr ""
46 |
47 | msgctxt "#32008"
48 | msgid "Continue?"
49 | msgstr ""
50 |
51 | msgctxt "#32009"
52 | msgid "Directory Error"
53 | msgstr ""
54 |
55 | msgctxt "#32010"
56 | msgid "{} is not accessible."
57 | msgstr ""
58 |
59 | msgctxt "#32011"
60 | msgid "Check the archive directory in the addon settings."
61 | msgstr ""
62 |
63 | msgctxt "#32012"
64 | msgid "Unable to create {}."
65 | msgstr ""
66 |
67 | msgctxt "#32013"
68 | msgid "Check the archive directory permissions."
69 | msgstr ""
70 |
71 | msgctxt "#32014"
72 | msgid "Downloading"
73 | msgstr ""
74 |
75 | msgctxt "#32015"
76 | msgid "Decompressing"
77 | msgstr ""
78 |
79 | msgctxt "#32016"
80 | msgid "Retrieving tar file from archive"
81 | msgstr ""
82 |
83 | msgctxt "#32017"
84 | msgid "Copying to archive"
85 | msgstr ""
86 |
87 | msgctxt "#32018"
88 | msgid "Verifying"
89 | msgstr ""
90 |
91 | msgctxt "#32019"
92 | msgid "{} md5 mismatch"
93 | msgstr ""
94 |
95 | msgctxt "#32020"
96 | msgid "The {} image is corrupt."
97 | msgstr ""
98 |
99 | msgctxt "#32021"
100 | msgid "The update file will be removed."
101 | msgstr ""
102 |
103 | msgctxt "#32022"
104 | msgid "Confirm reboot"
105 | msgstr ""
106 |
107 | msgctxt "#32024"
108 | msgid "Reboot now to install build {}?"
109 | msgstr ""
110 |
111 | msgctxt "#32025"
112 | msgid "Build {} is ready to install."
113 | msgstr ""
114 |
115 | msgctxt "#32026"
116 | msgid "Build {} will install on the next reboot"
117 | msgstr ""
118 |
119 | msgctxt "#32027"
120 | msgid "A more recent build is available: {}"
121 | msgstr ""
122 |
123 | msgctxt "#32028"
124 | msgid "Current build: {}"
125 | msgstr ""
126 |
127 | msgctxt "#32029"
128 | msgid "Show builds available to install?"
129 | msgstr ""
130 |
131 | msgctxt "#32030"
132 | msgid "Build {} is available"
133 | msgstr ""
134 |
135 | msgctxt "#32031"
136 | msgid "Install History"
137 | msgstr ""
138 |
139 | msgctxt "#32032"
140 | msgid "Install history not available"
141 | msgstr ""
142 |
143 | msgctxt "#32034"
144 | msgid "Update cancelled"
145 | msgstr ""
146 |
147 | msgctxt "#32035"
148 | msgid "Build {}"
149 | msgstr ""
150 |
151 | msgctxt "#32036"
152 | msgid "Open settings"
153 | msgstr ""
154 |
155 | msgctxt "#32037"
156 | msgid "Show install history"
157 | msgstr ""
158 |
159 | msgctxt "#32038"
160 | msgid "Cancel pending installation"
161 | msgstr ""
162 |
163 | msgctxt "#32039"
164 | msgid "No builds were found for {}."
165 | msgstr ""
166 |
167 | msgctxt "#32040"
168 | msgid "Ready to reboot to re-enable overclocking."
169 | msgstr ""
170 |
171 | msgctxt "#32041"
172 | msgid "Connection Error"
173 | msgstr ""
174 |
175 | msgctxt "#32042"
176 | msgid "Please check you have a connection to the internet."
177 | msgstr ""
178 |
179 | msgctxt "#32043"
180 | msgid "URL not found."
181 | msgstr ""
182 |
183 | msgctxt "#32044"
184 | msgid "URL Error"
185 | msgstr ""
186 |
187 | msgctxt "#32045"
188 | msgid "Please check the URL."
189 | msgstr ""
190 |
191 | msgctxt "#32046"
192 | msgid "Please check the log file."
193 | msgstr ""
194 |
195 | msgctxt "#32047"
196 | msgid "Write Error"
197 | msgstr ""
198 |
199 | msgctxt "#32048"
200 | msgid "Check the directory."
201 | msgstr ""
202 |
203 | msgctxt "#32049"
204 | msgid "Decompression Error"
205 | msgstr ""
206 |
207 | msgctxt "#32050"
208 | msgid "An error occurred during decompression:"
209 | msgstr ""
210 |
211 | msgctxt "#32052"
212 | msgid "An installation is pending for {}."
213 | msgstr ""
214 |
215 | msgctxt "#32053"
216 | msgid "An installation is pending."
217 | msgstr ""
218 |
219 | msgctxt "#32054"
220 | msgid "Rebooting"
221 | msgstr ""
222 |
223 | msgctxt "#32055"
224 | msgid "Reboot now to install the update?"
225 | msgstr ""
226 |
227 | msgctxt "#32056"
228 | msgid "Please reboot"
229 | msgstr ""
230 |
231 | msgctxt "#32057"
232 | msgid "Rebooting in {} seconds..."
233 | msgstr ""
234 |
235 | msgctxt "#32058"
236 | msgid "Rebooting in 1 second..."
237 | msgstr ""
238 |
239 | msgctxt "#32059"
240 | msgid "Rebooting..."
241 | msgstr ""
242 |
243 | msgctxt "#32060"
244 | msgid "ERROR: {}"
245 | msgstr ""
246 |
247 | msgctxt "#32061"
248 | msgid "Backup"
249 | msgstr ""
250 |
251 | msgctxt "#32062"
252 | msgid "Run Backup now?"
253 | msgstr ""
254 |
255 | msgctxt "#32063"
256 | msgid "This is recommended"
257 | msgstr ""
258 |
259 | msgctxt "#32064"
260 | msgid "Build {} was installed successfully"
261 | msgstr ""
262 |
263 | msgctxt "#32065"
264 | msgid "Build {} was not installed"
265 | msgstr ""
266 |
267 | msgctxt "#32066"
268 | msgid "Invalid custom source URL"
269 | msgstr ""
270 |
271 | msgctxt "#32101"
272 | msgid "General"
273 | msgstr ""
274 |
275 | msgctxt "#32102"
276 | msgid "Selected source name"
277 | msgstr ""
278 |
279 | msgctxt "#32103"
280 | msgid "Show progress in background"
281 | msgstr ""
282 |
283 | msgctxt "#32104"
284 | msgid "Archive tar files (for quicker re-installs)"
285 | msgstr ""
286 |
287 | msgctxt "#32105"
288 | msgid "Archive directory"
289 | msgstr ""
290 |
291 | msgctxt "#32106"
292 | msgid "Verify update files"
293 | msgstr ""
294 |
295 | msgctxt "#32107"
296 | msgid "Never"
297 | msgstr ""
298 |
299 | msgctxt "#32108"
300 | msgid "Prompt every time"
301 | msgstr ""
302 |
303 | msgctxt "#32109"
304 | msgid "Always"
305 | msgstr ""
306 |
307 | msgctxt "#32110"
308 | msgid "Notifications"
309 | msgstr ""
310 |
311 | msgctxt "#32111"
312 | msgid "Enable notifications"
313 | msgstr ""
314 |
315 | msgctxt "#32112"
316 | msgid "Check only on boot"
317 | msgstr ""
318 |
319 | msgctxt "#32113"
320 | msgid "Check interval in hours (requires restart)"
321 | msgstr ""
322 |
323 | msgctxt "#32114"
324 | msgid "Show dialog"
325 | msgstr ""
326 |
327 | msgctxt "#32115"
328 | msgid "When not playing video"
329 | msgstr ""
330 |
331 | msgctxt "#32116"
332 | msgid "Enable for official releases"
333 | msgstr ""
334 |
335 | msgctxt "#32117"
336 | msgid "Enable reboot confirmation dialog"
337 | msgstr ""
338 |
339 | msgctxt "#32118"
340 | msgid "Reboot countdown (seconds)"
341 | msgstr ""
342 |
343 | msgctxt "#32119"
344 | msgid "Custom Sources"
345 | msgstr ""
346 |
347 | msgctxt "#32121"
348 | msgid "Enable"
349 | msgstr ""
350 |
351 | msgctxt "#32122"
352 | msgid "Build type"
353 | msgstr ""
354 |
355 | msgctxt "#32123"
356 | msgid "Development"
357 | msgstr ""
358 |
359 | msgctxt "#32124"
360 | msgid "Release"
361 | msgstr ""
362 |
363 | msgctxt "#32125"
364 | msgid "Name"
365 | msgstr ""
366 |
367 | msgctxt "#32126"
368 | msgid "URL"
369 | msgstr ""
370 |
371 | msgctxt "#32127"
372 | msgid "Subdirectory"
373 | msgstr ""
374 |
375 | msgctxt "#32128"
376 | msgid "Other"
377 | msgstr ""
378 |
379 | msgctxt "#32129"
380 | msgid "Enable subdirectory"
381 | msgstr ""
382 |
383 | msgctxt "#32130"
384 | msgid "Other subdirectory"
385 | msgstr ""
386 |
387 | msgctxt "#32131"
388 | msgid "Advanced"
389 | msgstr ""
390 |
391 | msgctxt "#32132"
392 | msgid "Override installed build type"
393 | msgstr ""
394 |
395 | msgctxt "#32133"
396 | msgid "Build type to install"
397 | msgstr ""
398 |
399 | msgctxt "#32134"
400 | msgid "Disable overclocking during update"
401 | msgstr ""
402 |
403 | msgctxt "#32135"
404 | msgid "Also update extlinux"
405 | msgstr ""
406 |
407 | msgctxt "#32136"
408 | msgid "Set HTTP timeout"
409 | msgstr ""
410 |
411 | msgctxt "#32137"
412 | msgid "Timeout (seconds)"
413 | msgstr ""
414 |
415 | msgctxt "#32138"
416 | msgid "Enable debug logging"
417 | msgstr ""
418 |
419 | msgctxt "#32139"
420 | msgid "Set custom build date format"
421 | msgstr ""
422 |
423 | msgctxt "#32140"
424 | msgid "Date format"
425 | msgstr ""
426 |
427 | msgctxt "#32141"
428 | msgid "Select to show the list of available builds"
429 | msgstr ""
430 |
--------------------------------------------------------------------------------
/resources/language/Spanish/strings.po:
--------------------------------------------------------------------------------
1 | # Kodi Media Center language file
2 | # Addon Name: OpenELEC Dev Update
3 | # Addon id: script.openelec.devupdate
4 | # Addon Provider: Leopold
5 | msgid ""
6 | msgstr ""
7 | "Project-Id-Version: Kodi Addons\n"
8 | "Report-Msgid-Bugs-To: alanwww1@xbmc.org\n"
9 | "POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
10 | "PO-Revision-Date: 2015-11-06 13:46-0300\n"
11 | "Last-Translator: Gaudi \n"
12 | "Language-Team: English (http://www.transifex.com/projects/p/xbmc-addons/language/en/)\n"
13 | "MIME-Version: 1.0\n"
14 | "Content-Type: text/plain; charset=UTF-8\n"
15 | "Content-Transfer-Encoding: 8bit\n"
16 | "Language: es\n"
17 | "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18 | "X-Generator: Poedit 1.8.6\n"
19 |
20 | msgctxt "#32001"
21 | msgid "Confirm upgrade"
22 | msgstr "Confirmar actualización"
23 |
24 | msgctxt "#32002"
25 | msgid "Upgrade"
26 | msgstr "Actualizad"
27 |
28 | msgctxt "#32003"
29 | msgid "{} to {} ?"
30 | msgstr "¿{} a {} ?"
31 |
32 | msgctxt "#32004"
33 | msgid "Confirm downgrade"
34 | msgstr "Confirmar degradación de versión"
35 |
36 | msgctxt "#32005"
37 | msgid "Downgrade"
38 | msgstr "Degradar versión"
39 |
40 | msgctxt "#32006"
41 | msgid "Confirm install"
42 | msgstr "Confirmar la instalación"
43 |
44 | msgctxt "#32007"
45 | msgid "Build {} is already installed."
46 | msgstr "La compilación {} ya se encuentra instalada."
47 |
48 | msgctxt "#32008"
49 | msgid "Continue?"
50 | msgstr "¿Continuar?"
51 |
52 | msgctxt "#32009"
53 | msgid "Directory Error"
54 | msgstr "Error de carpeta"
55 |
56 | msgctxt "#32010"
57 | msgid "{} is not accessible."
58 | msgstr "{} no se encuentra accesible"
59 |
60 | msgctxt "#32011"
61 | msgid "Check the archive directory in the addon settings."
62 | msgstr "Verifique la carpeta de almacenamiento en la configuración del addon."
63 |
64 | msgctxt "#32012"
65 | msgid "Unable to create {}."
66 | msgstr "Imposible crear {}."
67 |
68 | msgctxt "#32013"
69 | msgid "Check the archive directory permissions."
70 | msgstr "Verifique los permisos de la carpeta de almacenamiento."
71 |
72 | msgctxt "#32014"
73 | msgid "Downloading"
74 | msgstr "Descargando"
75 |
76 | msgctxt "#32015"
77 | msgid "Decompressing"
78 | msgstr "Descomprimiendo"
79 |
80 | msgctxt "#32016"
81 | msgid "Retrieving tar file from archive"
82 | msgstr "Recuperando archivo tar del almacenamiento"
83 |
84 | msgctxt "#32017"
85 | msgid "Copying to archive"
86 | msgstr "Copiando al almacenamiendo"
87 |
88 | msgctxt "#32018"
89 | msgid "Verifying"
90 | msgstr "Verificando"
91 |
92 | msgctxt "#32019"
93 | msgid "{} md5 mismatch"
94 | msgstr "{} error de md5"
95 |
96 | msgctxt "#32020"
97 | msgid "The {} image is corrupt."
98 | msgstr "La imagen {} está corrupta."
99 |
100 | msgctxt "#32021"
101 | msgid "The update file will be removed."
102 | msgstr "El archivo de actualización será removido."
103 |
104 | msgctxt "#32022"
105 | msgid "Confirm reboot"
106 | msgstr "Confirmar reinicio"
107 |
108 | msgctxt "#32024"
109 | msgid "Reboot now to install build {}?"
110 | msgstr "¿Reiniciar ahora para instalar la compilación {}?"
111 |
112 | msgctxt "#32025"
113 | msgid "Build {} is ready to install."
114 | msgstr "La compilación {} está lista para ser instalada."
115 |
116 | msgctxt "#32026"
117 | msgid "Build {} will install on the next reboot"
118 | msgstr "La compilación {} se instalará en el próximo reinicio"
119 |
120 | msgctxt "#32027"
121 | msgid "A more recent build is available: {}"
122 | msgstr "Está disponible una versión más actualizada: {}"
123 |
124 | msgctxt "#32028"
125 | msgid "Current build: {}"
126 | msgstr "Compilación actual: {}"
127 |
128 | msgctxt "#32029"
129 | msgid "Show builds available to install?"
130 | msgstr "¿Mostrar compilaciones disponibles para instalar?"
131 |
132 | msgctxt "#32030"
133 | msgid "Build {} is available"
134 | msgstr "La compilación {} está disponible"
135 |
136 | msgctxt "#32031"
137 | msgid "Install History"
138 | msgstr "Historial de instalación"
139 |
140 | msgctxt "#32032"
141 | msgid "Install history not available"
142 | msgstr "Historial de instalación no disponible"
143 |
144 | msgctxt "#32034"
145 | msgid "Update cancelled"
146 | msgstr "Actualización cancelada"
147 |
148 | msgctxt "#32035"
149 | msgid "Build {}"
150 | msgstr "Compilación {}"
151 |
152 | msgctxt "#32036"
153 | msgid "Open settings"
154 | msgstr "Abrir ajustes"
155 |
156 | msgctxt "#32037"
157 | msgid "Show install history"
158 | msgstr "Mostar historial de instalación"
159 |
160 | msgctxt "#32038"
161 | msgid "Cancel pending installation"
162 | msgstr "Cancelar instalación pendiente"
163 |
164 | msgctxt "#32039"
165 | msgid "No builds were found for {}."
166 | msgstr "No se han encontrado compilaciones para {}."
167 |
168 | msgctxt "#32040"
169 | msgid "Ready to reboot to re-enable overclocking."
170 | msgstr "Listo para reiniciar para reactivar overclocking."
171 |
172 | msgctxt "#32041"
173 | msgid "Connection Error"
174 | msgstr "Error de conexión"
175 |
176 | msgctxt "#32042"
177 | msgid "Please check you have a connection to the internet."
178 | msgstr "Por favor verifique que tiene conexión a internet"
179 |
180 | msgctxt "#32043"
181 | msgid "URL not found."
182 | msgstr "URL no encontrada."
183 |
184 | msgctxt "#32044"
185 | msgid "URL Error"
186 | msgstr "Error de URL"
187 |
188 | msgctxt "#32045"
189 | msgid "Please check the URL."
190 | msgstr "Por favor verifique la URL."
191 |
192 | msgctxt "#32046"
193 | msgid "Please check the log file."
194 | msgstr "Por favor verifique el archivo de registro."
195 |
196 | msgctxt "#32047"
197 | msgid "Write Error"
198 | msgstr "Error de escritura"
199 |
200 | msgctxt "#32048"
201 | msgid "Check the directory."
202 | msgstr "Verifique carpeta."
203 |
204 | msgctxt "#32049"
205 | msgid "Decompression Error"
206 | msgstr "Error de descompresión"
207 |
208 | msgctxt "#32050"
209 | msgid "An error occurred during decompression:"
210 | msgstr "Ocurrión un error durante la descompresión:"
211 |
212 | msgctxt "#32052"
213 | msgid "An installation is pending for {}."
214 | msgstr "Hay una instalación pendiente para {}."
215 |
216 | msgctxt "#32053"
217 | msgid "An installation is pending."
218 | msgstr "Hay una instalación pendiente."
219 |
220 | msgctxt "#32054"
221 | msgid "Rebooting"
222 | msgstr "Reiniciando"
223 |
224 | msgctxt "#32055"
225 | msgid "Reboot now to install the update?"
226 | msgstr "¿Reiniciar ahora para instalar la actualización?"
227 |
228 | msgctxt "#32056"
229 | msgid "Please reboot"
230 | msgstr "Por favor reinicie"
231 |
232 | msgctxt "#32057"
233 | msgid "Rebooting in {} seconds..."
234 | msgstr "Reiniciando en {} segundos..."
235 |
236 | msgctxt "#32058"
237 | msgid "Rebooting in 1 second..."
238 | msgstr "Reiniciando en 1 segundo..."
239 |
240 | msgctxt "#32059"
241 | msgid "Rebooting..."
242 | msgstr "Reiniciando..."
243 |
244 | msgctxt "#32060"
245 | msgid "ERROR: {}"
246 | msgstr "ERROR: {}"
247 |
248 | msgctxt "#32061"
249 | msgid "Backup"
250 | msgstr "Copia de seguridad"
251 |
252 | msgctxt "#32062"
253 | msgid "Run Backup now?"
254 | msgstr "¿Ejecutar copia de seguridad ahora?"
255 |
256 | msgctxt "#32063"
257 | msgid "This is recommended"
258 | msgstr "Se recomienda"
259 |
260 | msgctxt "#32064"
261 | msgid "Build {} was installed successfully"
262 | msgstr "La compilación {} se instaló satisfactoriamente"
263 |
264 | msgctxt "#32065"
265 | msgid "Build {} was not installed"
266 | msgstr "La compilación {} no se instaló"
267 |
268 | msgctxt "#32066"
269 | msgid "Invalid custom source URL"
270 | msgstr "Origen URL personalizado inválido"
271 |
272 | msgctxt "#32101"
273 | msgid "General"
274 | msgstr "General"
275 |
276 | msgctxt "#32102"
277 | msgid "Selected source name"
278 | msgstr "Nobre de origen seleccionado"
279 |
280 | msgctxt "#32103"
281 | msgid "Show progress in background"
282 | msgstr "Mostrar progreso en el fondo"
283 |
284 | msgctxt "#32104"
285 | msgid "Archive tar files (for quicker re-installs)"
286 | msgstr "Almacenar archivos tar (para reinstalaciones más rápidas)"
287 |
288 | msgctxt "#32105"
289 | msgid "Archive directory"
290 | msgstr "Carpeta de almacenamiendo"
291 |
292 | msgctxt "#32106"
293 | msgid "Verify update files"
294 | msgstr "Verificar los archivos de actualización"
295 |
296 | msgctxt "#32107"
297 | msgid "Never"
298 | msgstr "Nunca"
299 |
300 | msgctxt "#32108"
301 | msgid "Prompt every time"
302 | msgstr "Preguntar cada vez"
303 |
304 | msgctxt "#32109"
305 | msgid "Always"
306 | msgstr "Siempre"
307 |
308 | msgctxt "#32110"
309 | msgid "Notifications"
310 | msgstr "Notificaciones"
311 |
312 | msgctxt "#32111"
313 | msgid "Enable notifications"
314 | msgstr "Habilitar notificaciones"
315 |
316 | msgctxt "#32112"
317 | msgid "Check only on boot"
318 | msgstr "Verificar solo al inicio"
319 |
320 | msgctxt "#32113"
321 | msgid "Check interval in hours (requires restart)"
322 | msgstr "Intervalo de verificación en horas (requiere reinicio)"
323 |
324 | msgctxt "#32114"
325 | msgid "Show dialog"
326 | msgstr "Mostrar diálogo"
327 |
328 | msgctxt "#32115"
329 | msgid "When not playing video"
330 | msgstr "Cuando no se esté reproduciendo video"
331 |
332 | msgctxt "#32116"
333 | msgid "Enable for official releases"
334 | msgstr "Habilitar para versiones oficiales"
335 |
336 | msgctxt "#32117"
337 | msgid "Enable reboot confirmation dialog"
338 | msgstr "Habilitar el diálogo de confirmación de reinicio"
339 |
340 | msgctxt "#32118"
341 | msgid "Reboot countdown (seconds)"
342 | msgstr "Cuenta regresiva de reinicio (segundos)"
343 |
344 | msgctxt "#32119"
345 | msgid "Custom Sources"
346 | msgstr "Orígenes personalizados"
347 |
348 | msgctxt "#32121"
349 | msgid "Enable"
350 | msgstr "Habilitar"
351 |
352 | msgctxt "#32122"
353 | msgid "Build type"
354 | msgstr "Tipo de compilación"
355 |
356 | msgctxt "#32123"
357 | msgid "Development"
358 | msgstr "Desarrollo"
359 |
360 | msgctxt "#32124"
361 | msgid "Release"
362 | msgstr "Version"
363 |
364 | msgctxt "#32125"
365 | msgid "Name"
366 | msgstr "Nombre"
367 |
368 | msgctxt "#32126"
369 | msgid "URL"
370 | msgstr "URL"
371 |
372 | msgctxt "#32127"
373 | msgid "Subdirectory"
374 | msgstr "Subcarpeta"
375 |
376 | msgctxt "#32128"
377 | msgid "Other"
378 | msgstr "Otro"
379 |
380 | msgctxt "#32129"
381 | msgid "Enable subdirectory"
382 | msgstr "Habilitar subcarpeta"
383 |
384 | msgctxt "#32130"
385 | msgid "Other subdirectory"
386 | msgstr "Otra subcarpeta"
387 |
388 | msgctxt "#32131"
389 | msgid "Advanced"
390 | msgstr "Avanzado"
391 |
392 | msgctxt "#32132"
393 | msgid "Override installed build type"
394 | msgstr "Sustituir tipo de compilación instalada"
395 |
396 | msgctxt "#32133"
397 | msgid "Build type to install"
398 | msgstr "Tipo de versión a instalar"
399 |
400 | msgctxt "#32134"
401 | msgid "Disable overclocking during update"
402 | msgstr "Desactivar el overclocking durante la actualización"
403 |
404 | msgctxt "#32135"
405 | msgid "Also update extlinux"
406 | msgstr "Actualizar también extlinux"
407 |
408 | msgctxt "#32136"
409 | msgid "Set HTTP timeout"
410 | msgstr "Configurar el tiempo de espera HTTP"
411 |
412 | msgctxt "#32137"
413 | msgid "Timeout (seconds)"
414 | msgstr "Tiempo de espera (segundos)"
415 |
416 | msgctxt "#32138"
417 | msgid "Enable debug logging"
418 | msgstr "Habilitar el registro de depuración"
419 |
420 | msgctxt "#32139"
421 | msgid "Set custom build date format"
422 | msgstr "Configurar el formato de fecha para compilaciones personalizadas"
423 |
424 | msgctxt "#32140"
425 | msgid "Date format"
426 | msgstr "Formato de fecha"
427 |
428 | msgctxt "#32141"
429 | msgid "Select to show the list of available builds"
430 | msgstr "Seleccione para mostrar una lista de compilaciones disponibles"
431 |
--------------------------------------------------------------------------------
/resources/lib/.gitignore:
--------------------------------------------------------------------------------
1 | *.pyc
2 |
--------------------------------------------------------------------------------
/resources/lib/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LS80/script.openelec.devupdate/b714dde6aed8c18a1381a060e6bea45f8523011d/resources/lib/__init__.py
--------------------------------------------------------------------------------
/resources/lib/addon.py:
--------------------------------------------------------------------------------
1 | import xbmc, xbmcaddon
2 |
3 | __addon = xbmcaddon.Addon('script.openelec.devupdate')
4 |
5 | info = __addon.getAddonInfo
6 | get_setting = __addon.getSetting
7 | set_setting = __addon.setSetting
8 | open_settings = __addon.openSettings
9 | L10n = __addon.getLocalizedString
10 |
11 | def get_bool_setting(setting):
12 | return get_setting(setting) == 'true'
13 |
14 | def get_int_setting(setting):
15 | return int(get_setting(setting))
16 |
17 | name = info('name')
18 | version = info('version')
19 | data_path = xbmc.translatePath(info('profile'))
20 | src_path = xbmc.translatePath(info('path'))
21 | icon_path = info('icon')
22 |
--------------------------------------------------------------------------------
/resources/lib/builds.py:
--------------------------------------------------------------------------------
1 | #! /usr/bin/python
2 |
3 | # This is required to work around the ImportError exception
4 | # "Failed to import _strptime because the import lock is held by another thread."
5 | import _strptime
6 |
7 | import time
8 | import re
9 | import os
10 | import urlparse
11 | from datetime import datetime
12 | from collections import OrderedDict
13 | from urllib2 import unquote
14 |
15 | from bs4 import BeautifulSoup, SoupStrainer
16 | import requests
17 | import html2text
18 |
19 | import openelec, funcs, log
20 |
21 |
22 | timeout = None
23 | arch = openelec.ARCH
24 | date_fmt = '%d %b %y'
25 |
26 |
27 | class BuildURLError(Exception):
28 | pass
29 |
30 |
31 | class Build(object):
32 | """Holds information about an OpenELEC build and defines how to compare them,
33 | produce a unique hash for dictionary keys, and print them.
34 | """
35 | DATETIME_FMT = '%Y%m%d%H%M%S'
36 |
37 | def __init__(self, _datetime, version):
38 | self._version = version
39 | if isinstance(_datetime, datetime):
40 | self._datetime = _datetime
41 | else:
42 | try:
43 | self._datetime = datetime.strptime(_datetime, self.DATETIME_FMT)
44 | except TypeError:
45 | # Work around an issue with datetime.strptime when the script
46 | # is run a second time.
47 | dt = time.strptime(_datetime, self.DATETIME_FMT)[0:6]
48 | self._datetime = datetime(*(dt))
49 |
50 | def __eq__(self, other):
51 | return (self._version, self._datetime) == (other._version, other._datetime)
52 |
53 | def __hash__(self):
54 | return hash((self._version, self._datetime))
55 |
56 | def __lt__(self, other):
57 | return self._datetime < other._datetime
58 |
59 | def __gt__(self, other):
60 | return self._datetime > other._datetime
61 |
62 | def __str__(self):
63 | return '{} ({})'.format(self.version, self.date)
64 |
65 | def __repr__(self):
66 | return "{}('{}', '{}')".format("Build",
67 | self._datetime.strftime(self.DATETIME_FMT),
68 | self.version)
69 |
70 | @property
71 | def date(self):
72 | return self._datetime.strftime(date_fmt)
73 |
74 | @property
75 | def version(self):
76 | return self._version
77 |
78 |
79 | class Release(Build):
80 | """Subclass of Build for official releases.
81 |
82 | Has additional methods for retrieving datetime information from the git tags.
83 | """
84 | DATETIME_FMT = '%Y-%m-%dT%H:%M:%S'
85 | MIN_VERSION = [3,95,0]
86 | tags = None
87 |
88 | def __init__(self, version):
89 | self.release_str = version
90 | self.maybe_get_tags()
91 | if version in self.tags:
92 | self._has_date = True
93 | Build.__init__(self, self.tags[version][:19], version)
94 | else:
95 | self._has_date = False
96 | self.release = [int(p) for p in version.split('.')]
97 |
98 | def is_valid(self):
99 | return self._has_date and self.release >= self.MIN_VERSION
100 |
101 | __nonzero__ = is_valid
102 |
103 | @classmethod
104 | def tag_match(cls, tag, attrs):
105 | return (tag == 'relative-time' or
106 | ('class' in attrs and attrs['class'] == 'tag-name'))
107 |
108 | @classmethod
109 | def pagination_match(cls, tag, attrs):
110 | return (tag == 'div' and
111 | ('class' in attrs and attrs['class'] == 'pagination'))
112 |
113 | @classmethod
114 | def get_tags_page_dict(cls, html):
115 | soup = BeautifulSoup(html, 'html.parser',
116 | parse_only=SoupStrainer(cls.tag_match))
117 | iter_contents = iter(soup.contents)
118 | return dict((unicode(iter_contents.next().string), tag['datetime'])
119 | for tag in iter_contents)
120 |
121 | @classmethod
122 | def maybe_get_tags(cls):
123 | if cls.tags is None:
124 | cls.tags = {}
125 | releases_url = "http://github.com/{dist}/{dist}.tv/tags".format(
126 | dist=openelec.dist())
127 | html = requests.get(releases_url).text
128 | while True:
129 | cls.tags.update(cls.get_tags_page_dict(html))
130 | soup = BeautifulSoup(html, 'html.parser',
131 | parse_only=SoupStrainer(cls.pagination_match))
132 | next_page_link = soup.find('a', text='Next')
133 | if next_page_link:
134 | href = next_page_link['href']
135 | version = [int(p) for p in href.split('=')[-1].split('.')]
136 | if version < cls.MIN_VERSION:
137 | break
138 | html = requests.get(href).text
139 | else:
140 | break
141 |
142 | def __repr__(self):
143 | return "{}('{}')".format("Release", self.release_str)
144 |
145 |
146 | class BuildLinkBase(object):
147 | """Base class for links to builds"""
148 | def __init__(self, baseurl, link):
149 | # Set the absolute URL
150 | link = link.strip()
151 | scheme, netloc, path = urlparse.urlparse(link)[:3]
152 | if not scheme:
153 | # Construct the full url
154 | if not baseurl.endswith('/'):
155 | baseurl += '/'
156 | self.url = urlparse.urljoin(baseurl, link)
157 | else:
158 | if netloc == "www.dropbox.com":
159 | # Fix Dropbox url
160 | link = urlparse.urlunparse((scheme, "dl.dropbox.com", path,
161 | None, None, None))
162 | self.url = link
163 |
164 | def remote_file(self):
165 | response = requests.get(self.url, stream=True, timeout=timeout,
166 | headers={'Accept-Encoding': None})
167 | try:
168 | self.size = int(response.headers['Content-Length'])
169 | except KeyError:
170 | self.size = 0
171 |
172 | # Get the actual filename
173 | self.filename = unquote(os.path.basename(urlparse.urlparse(response.url).path))
174 |
175 | name, ext = os.path.splitext(self.filename)
176 | self.tar_name = self.filename if ext == '.tar' else name
177 | self.compressed = ext == '.bz2'
178 |
179 | return response.raw
180 |
181 |
182 | class BuildLink(Build, BuildLinkBase):
183 | """Holds information about a link to an OpenELEC build."""
184 | def __init__(self, baseurl, link, datetime_str, revision):
185 | BuildLinkBase.__init__(self, baseurl, link)
186 | Build.__init__(self, datetime_str, version=revision)
187 |
188 |
189 | class ReleaseLink(Release, BuildLinkBase):
190 | """Class for links to OpenELEC release downloads."""
191 | def __init__(self, baseurl, link, release):
192 | BuildLinkBase.__init__(self, baseurl, link)
193 | Release.__init__(self, release)
194 |
195 |
196 | class BaseExtractor(object):
197 | """Base class for all extractors."""
198 | url = None
199 |
200 | def __init__(self, url=None):
201 | if url is not None:
202 | self.url = url
203 |
204 | def _response(self):
205 | response = requests.get(self.url, timeout=timeout)
206 | if not response:
207 | msg = "Build URL error: status {}".format(response.status_code)
208 | raise BuildURLError(msg)
209 | return response
210 |
211 | def _text(self):
212 | return self._response().text
213 |
214 | def _json(self):
215 | return self._response().json()
216 |
217 | def __repr__(self):
218 | return "{}('{}')".format(self.__class__.__name__, self.url)
219 |
220 |
221 | class BuildLinkExtractor(BaseExtractor):
222 | """Base class for extracting build links from a URL"""
223 | BUILD_RE = (".*{dist}.*-{arch}-(?:\d+\.\d+-|)[a-zA-Z]+-(\d+)"
224 | "-r\d+[a-z]*-g([0-9a-z]+)\.tar(|\.bz2)")
225 | CSS_CLASS = None
226 |
227 | def __iter__(self):
228 | html = self._text()
229 | args = ['a']
230 | if self.CSS_CLASS is not None:
231 | args.append(self.CSS_CLASS)
232 |
233 | self.build_re = re.compile(self.BUILD_RE.format(dist=openelec.dist(), arch=arch), re.I)
234 |
235 | soup = BeautifulSoup(html, 'html.parser',
236 | parse_only=SoupStrainer(*args, href=self.build_re))
237 |
238 | for link in soup.contents:
239 | l = self._create_link(link)
240 | if l:
241 | yield l
242 |
243 | def _create_link(self, link):
244 | href = link['href']
245 | return BuildLink(self.url, href, *self.build_re.match(href).groups()[:2])
246 |
247 |
248 | class DropboxBuildLinkExtractor(BuildLinkExtractor):
249 | CSS_CLASS = 'filename-link'
250 |
251 |
252 | class ReleaseLinkExtractor(BuildLinkExtractor):
253 | """Class to extract release links from a URL.
254 |
255 | Overrides _create_link to return a ReleaseLink for each link.
256 | """
257 | BUILD_RE = ".*{dist}.*-{arch}-([\d\.]+)\.tar(|\.bz2)"
258 | BASE_URL = None
259 |
260 | def _create_link(self, link):
261 | href = link['href']
262 | baseurl = self.BASE_URL if self.BASE_URL is not None else self.url
263 | return ReleaseLink(baseurl, href, self.build_re.match(href).group(1))
264 |
265 |
266 | class OfficialReleaseLinkExtractor(ReleaseLinkExtractor):
267 | BASE_URL = "http://releases.{dist}.tv".format(dist=openelec.dist())
268 |
269 |
270 | class DualAudioReleaseLinkExtractor(ReleaseLinkExtractor):
271 | BUILD_RE = ".*{dist}-{arch}.DA-([\d\.]+)\.tar(|\.bz2)"
272 |
273 |
274 | class MilhouseBuildLinkExtractor(BuildLinkExtractor):
275 | BUILD_RE = ("{dist}-{arch}-(?:\d+\.\d+-|)"
276 | "Milhouse-(\d+)-(?:r|%23)(\d+[a-z]*)-g[0-9a-z]+\.tar(|\.bz2)")
277 |
278 |
279 | class BuildInfo(object):
280 | """Class to hold the short summary of a build and the full details."""
281 | def __init__(self, summary, details=None):
282 | self.summary = summary
283 | self.details = details
284 |
285 | def __str__(self):
286 | return self.summary
287 |
288 |
289 | class BuildDetailsExtractor(BaseExtractor):
290 | """Default class for extracting build details which returns an empty string."""
291 | def get_text(self):
292 | return ""
293 |
294 |
295 | class MilhouseBuildDetailsExtractor(BuildDetailsExtractor):
296 | """Class for extracting the full build details for a Milhouse build.
297 | from the release post on the Kodi forum.
298 | """
299 | def get_text(self):
300 | soup = BeautifulSoup(self._text(), 'html.parser')
301 | pid = urlparse.parse_qs(urlparse.urlparse(self.url).query)['pid'][0]
302 | post_div_id = "pid_{}".format(pid)
303 | post = soup.find('div', 'post-body', id=post_div_id)
304 |
305 | text_maker = html2text.HTML2Text()
306 | text_maker.ignore_links = True
307 | text_maker.ul_item_mark = '-'
308 |
309 | text = text_maker.handle(unicode(post))
310 |
311 | text = re.search(r"(Build Highlights:.*)", text, re.DOTALL).group(1)
312 | text = re.sub(r"(Build Highlights:)", r"[B]\1[/B]", text)
313 | text = re.sub(r"(Build Details:)", r"[B]\1[/B]", text)
314 |
315 | return text
316 |
317 |
318 | class BuildInfoExtractor(BaseExtractor):
319 | """Default build info extractor class for all build sources which just creates
320 | an empty dictionary."""
321 | def get_info(self):
322 | return {}
323 |
324 |
325 | class MilhouseBuildInfoExtractor(BuildInfoExtractor):
326 | """Class for creating a dictionary of BuildInfo objects for Milhouse builds
327 | keyed on the build version."""
328 | URL_FMT = "http://forum.kodi.tv/showthread.php?tid={}"
329 | R = re.compile("#(\d{4}[a-z]?).*?\((.+)\)")
330 |
331 | def _get_info(self, soup):
332 | for post in soup.find_all('div', 'post-body', limit=3):
333 | for ul in post('ul'):
334 | for li in ul('li'):
335 | m = self.R.match(li.get_text())
336 | if m:
337 | url = li.find('a', text="Release post")['href']
338 | yield m.group(1), BuildInfo(m.group(2),
339 | MilhouseBuildDetailsExtractor(url))
340 |
341 | def get_info(self):
342 | soup = BeautifulSoup(self._text(), 'html.parser')
343 | return dict(self._get_info(soup))
344 |
345 | @classmethod
346 | def from_thread_id(cls, thread_id):
347 | """Create a Milhouse build info extractor from the thread id number."""
348 | url = cls.URL_FMT.format(thread_id)
349 | return cls(url)
350 |
351 |
352 | def get_milhouse_build_info_extractors():
353 | if openelec.dist() == "openelec":
354 | if arch.startswith("RPi"):
355 | threads = [224025, 231092, 250817]
356 | else:
357 | threads = [238393]
358 | elif openelec.dist() == "libreelec":
359 | if arch.startswith("RPi"):
360 | threads = [269814, 298461]
361 | else:
362 | threads = [269815, 298462]
363 |
364 | for thread_id in threads:
365 | yield MilhouseBuildInfoExtractor.from_thread_id(thread_id)
366 |
367 |
368 | class CommitInfoExtractor(BuildInfoExtractor):
369 | """Class used by development build sources for extracting the git commit messages
370 | for a commit hash as the summary. Full build details are set to None."""
371 | url = "https://api.github.com/repositories/1093060/commits?per_page=100"
372 |
373 | def get_info(self):
374 | return dict((commit['sha'][:7],
375 | BuildInfo(commit['commit']['message'].split('\n\n')[0], None))
376 | for commit in self._json())
377 |
378 |
379 | class BuildsURL(object):
380 | """Class representing a source of builds."""
381 | def __init__(self, url, subdir=None, extractor=BuildLinkExtractor,
382 | info_extractors=[BuildInfoExtractor()]):
383 | self.url = url
384 | if subdir:
385 | self.add_subdir(subdir)
386 |
387 | self._extractor = extractor
388 | self.info_extractors = info_extractors
389 |
390 | def builds(self):
391 | return sorted(self._extractor(self.url), reverse=True)
392 |
393 | def __iter__(self):
394 | return iter(self.builds())
395 |
396 | def latest(self):
397 | """Return the most recent build or None if no builds are available."""
398 | builds = self.builds()
399 | try:
400 | return builds[0]
401 | except IndexError:
402 | return None
403 |
404 | def add_subdir(self, subdir):
405 | self._add_slash()
406 | self.url = urlparse.urljoin(self.url, subdir)
407 | self._add_slash()
408 |
409 | def _add_slash(self):
410 | if not self.url.endswith('/'):
411 | self.url += '/'
412 |
413 | def __str__(self):
414 | return self.url
415 |
416 | def __repr__(self):
417 | return "{}('{}')".format(self.__class__.__name__, self.url)
418 |
419 |
420 | class MilhouseBuildsURL(BuildsURL):
421 | def __init__(self, subdir="master"):
422 | self.subdir = subdir
423 | url = "http://milhouse.{dist}.tv/builds/".format(dist=openelec.dist().lower())
424 | super(MilhouseBuildsURL, self).__init__(
425 | url, os.path.join(subdir, arch.split('.')[0]),
426 | MilhouseBuildLinkExtractor, list(get_milhouse_build_info_extractors()))
427 |
428 | def __repr__(self):
429 | return "{}('{}')".format(self.__class__.__name__, self.subdir)
430 |
431 |
432 | dual_audio_builds = BuildsURL("http://openelec-dualaudio.subcarrier.de/OpenELEC-DualAudio/",
433 | subdir=arch, extractor=DualAudioReleaseLinkExtractor)
434 |
435 |
436 | def get_installed_build():
437 | """Return the currently installed build object."""
438 | DEVEL_RE = "devel-(\d+)-r\d+-g([a-z0-9]+)"
439 | if 'MILHOUSE_BUILD' in openelec.OS_RELEASE:
440 | DEVEL_RE = "devel-(\d+)-[r#](\d{4}[a-z]?)"
441 |
442 | if openelec.OS_RELEASE['NAME'] in ("OpenELEC", "LibreELEC"):
443 | version = openelec.OS_RELEASE['VERSION']
444 | else:
445 | # For testing on a non OpenELEC machine
446 | version = 'devel-20150503135721-r20764-gbfd3782'
447 |
448 | m = re.match(DEVEL_RE, version)
449 | if m:
450 | return Build(*m.groups())
451 | else:
452 | # A full release is installed.
453 | return Release(version)
454 |
455 |
456 | def sources():
457 | """Return an ordered dictionary of the sources as BuildsURL objects.
458 | Only return sources which are relevant for the system.
459 | The GUI will show the sources in the order defined here.
460 | """
461 | _sources = OrderedDict()
462 | if openelec.OS_RELEASE['NAME'] == "OpenELEC":
463 | builds_url = BuildsURL("http://snapshots.openelec.tv",
464 | info_extractors=[CommitInfoExtractor()])
465 | _sources["Official Snapshot Builds"] = builds_url
466 |
467 | if arch.startswith("RPi"):
468 | builds_url = BuildsURL("http://resources.pichimney.com/OpenELEC/dev_builds",
469 | info_extractors=[CommitInfoExtractor()])
470 | _sources["Chris Swan RPi Builds"] = builds_url
471 |
472 | _sources["Official Releases"] = BuildsURL(
473 | "http://{dist}.mirrors.uk2.net".format(dist=openelec.dist()),
474 | extractor=OfficialReleaseLinkExtractor)
475 |
476 | _sources["Official Archive"] = BuildsURL(
477 | "http://archive.{dist}.tv".format(dist=openelec.dist()), extractor=ReleaseLinkExtractor)
478 |
479 | _sources["Milhouse Builds"] = MilhouseBuildsURL()
480 |
481 | if openelec.debug_system_partition():
482 | _sources["Milhouse Builds (debug)"] = MilhouseBuildsURL(subdir="debug")
483 |
484 | return _sources
485 |
486 |
487 | def latest_build(source):
488 | """Return the most recent build for the provided source name or None if
489 | there is an error. This is used by the service to check for a new build.
490 | """
491 | build_sources = sources()
492 | try:
493 | build_url = build_sources[source]
494 | except KeyError:
495 | return None
496 | else:
497 | return build_url.latest()
498 |
499 |
500 | @log.with_logging(msg_error="Unable to create build object from the notify file")
501 | def get_build_from_notify_file():
502 | selected = funcs.read_notify_file()
503 | if selected:
504 | source, build_repr = selected
505 | return source, eval(build_repr)
506 |
507 |
508 | def main():
509 | """Test function to print all available builds when executing the module."""
510 | import sys
511 |
512 | installed_build = get_installed_build()
513 |
514 | def get_info(build_url):
515 | info = {}
516 | for info_extractor in build_url.info_extractors:
517 | try:
518 | info.update(info_extractor.get_info())
519 | except Exception as e:
520 | print str(e)
521 | return info
522 |
523 | def print_links(name, build_url):
524 | info = get_info(build_url)
525 | print name
526 | try:
527 | for link in build_url:
528 | try:
529 | summary = info[link.version]
530 | except KeyError:
531 | summary = ""
532 | print "\t{:25s} {}".format(str(link) + ' *' * (link > installed_build),
533 | summary)
534 | except (requests.RequestException, BuildURLError) as e:
535 | print str(e)
536 | print
537 |
538 | print "Installed build = {}".format(installed_build)
539 | print
540 |
541 | urls = sources()
542 |
543 | if len(sys.argv) > 1:
544 | name = sys.argv[1]
545 | if name not in urls:
546 | print '"{}" not in URL list'.format(name)
547 | else:
548 | print_links(name, urls[name])
549 | else:
550 | for name, build_url in urls.items():
551 | print_links(name, build_url)
552 |
553 |
554 | if __name__ == "__main__":
555 | main()
556 |
--------------------------------------------------------------------------------
/resources/lib/funcs.py:
--------------------------------------------------------------------------------
1 | ''' Module for functions which also work outside of Kodi '''
2 |
3 | import os
4 | import sys
5 | import stat
6 | import glob
7 |
8 | import log, openelec
9 |
10 |
11 | TEMP_DIR = os.path.expanduser('~')
12 |
13 | UPDATE_EXTLINUX_FILE = os.path.join(TEMP_DIR, '.update_extlinux')
14 | NOTIFY_FILE = os.path.join(TEMP_DIR, '.installed_build')
15 |
16 | STRFTIME_FMTS = [('YYYY', '%Y'),
17 | ('YY', '%y'),
18 | ('MMMM', '%B'),
19 | ('MMM', '%b'),
20 | ('MM', '%m'),
21 | ('M', '%-m'),
22 | ('DD', '%d'),
23 | ('D', '%-d')]
24 |
25 |
26 | def strftime_fmt(date_fmt):
27 | for key, fmt in STRFTIME_FMTS:
28 | date_fmt = date_fmt.replace(key, fmt)
29 | return date_fmt
30 |
31 |
32 | def size_fmt(num):
33 | for s, f in (('bytes', '{0:.0f}'), ('KB', '{0:.1f}'), ('MB', '{0:.1f}')):
34 | if num < 1024.0:
35 | return (f + " {1}").format(num, s)
36 | num /= 1024.0
37 |
38 |
39 | def add_deps_to_path():
40 | addons = os.path.join(os.path.expanduser('~'), '.kodi', 'addons')
41 | if os.path.isdir(addons):
42 | for module in ('requests', 'beautifulsoup4', 'html2text'):
43 | path = os.path.join(addons, 'script.module.' + module, 'lib')
44 | sys.path.append(path)
45 |
46 |
47 | def create_empty_file(path):
48 | open(path, 'w').close()
49 |
50 |
51 | def create_notify_file(source, build):
52 | with open(NOTIFY_FILE, 'w') as f:
53 | f.write('\n'.join((str(source), repr(build))))
54 |
55 |
56 | def remove_notify_file():
57 | remove_file(NOTIFY_FILE)
58 |
59 |
60 | def read_notify_file():
61 | try:
62 | with open(NOTIFY_FILE) as f:
63 | return f.read().splitlines()
64 | except (IOError, ValueError):
65 | return None
66 |
67 |
68 | def schedule_extlinux_update():
69 | create_empty_file(UPDATE_EXTLINUX_FILE)
70 |
71 |
72 | def maybe_update_extlinux():
73 | if os.path.isfile(UPDATE_EXTLINUX_FILE):
74 | log.log("Updating extlinux")
75 | with openelec.write_context():
76 | openelec.update_extlinux()
77 | remove_file(UPDATE_EXTLINUX_FILE)
78 |
79 |
80 | @log.with_logging("Created directory {}", log_exc=False)
81 | def create_directory(path):
82 | os.mkdir(path)
83 |
84 |
85 | @log.with_logging("Removed file", "Could not remove file")
86 | def remove_file(file_path):
87 | log.log("Removing {}".format(file_path))
88 | try:
89 | os.remove(file_path)
90 | except OSError:
91 | return False
92 | else:
93 | return True
94 |
95 |
96 | @log.with_logging(msg_error="Unable to make executable")
97 | def make_executable(path):
98 | os.chmod(path, stat.S_IXUSR|stat.S_IRUSR|stat.S_IWUSR)
99 |
100 |
101 | @log.with_logging(msg_error="Unable to create symbolic link")
102 | def maybe_create_symlink(path, symlink_path):
103 | if not(os.path.islink(symlink_path) and
104 | os.path.realpath(symlink_path) == path):
105 | try:
106 | os.remove(symlink_path)
107 | except:
108 | pass
109 | os.symlink(path, symlink_path)
110 |
111 |
112 | def update_files():
113 | return glob.glob(os.path.join(openelec.UPDATE_DIR, '*tar'))
114 |
--------------------------------------------------------------------------------
/resources/lib/gui.py:
--------------------------------------------------------------------------------
1 | import threading
2 |
3 | import xbmcgui
4 | import requests
5 |
6 | from . import addon, builds, utils, log, history, funcs
7 | from .addon import L10n
8 |
9 |
10 | class BaseInfoDialog(xbmcgui.WindowXMLDialog):
11 | def onAction(self, action):
12 | action_id = action.getId()
13 | if action_id in (xbmcgui.ACTION_SHOW_INFO,
14 | xbmcgui.ACTION_PREVIOUS_MENU, xbmcgui.ACTION_NAV_BACK):
15 | self.close()
16 |
17 |
18 | class InfoDialog(BaseInfoDialog):
19 | def __new__(cls, *args):
20 | return super(InfoDialog, cls).__new__(
21 | cls, "script-devupdate-info.xml", addon.src_path)
22 |
23 | def __init__(self, title, text):
24 | self._title = title
25 | self._text = text
26 |
27 | def onInit(self):
28 | self.getControl(1).setLabel(self._title)
29 | self.getControl(2).setText(self._text)
30 |
31 |
32 | class HistoryDialog(BaseInfoDialog):
33 | def __new__(cls, *args):
34 | return super(HistoryDialog, cls).__new__(
35 | cls, "script-devupdate-history.xml", addon.src_path)
36 |
37 | def __init__(self, history):
38 | self._history = history
39 |
40 | def onInit(self):
41 | if self._history is not None:
42 | self.getControl(1).setLabel(L10n(32031))
43 | install_list = self.getControl(2)
44 | for install in reversed(self._history):
45 | li = xbmcgui.ListItem()
46 | for attr in ('source', 'version'):
47 | li.setProperty(attr, str(getattr(install, attr)))
48 | li.setProperty('timestamp', install.timestamp.strftime("%Y-%m-%d %H:%M"))
49 | install_list.addItem(li)
50 | else:
51 | self.getControl(1).setLabel(L10n(32032))
52 |
53 |
54 | class BuildSelectDialog(xbmcgui.WindowXMLDialog):
55 | LABEL_ID = 100
56 | BUILD_LIST_ID = 20
57 | SOURCE_LIST_ID = 10
58 | INFO_TEXTBOX_ID = 200
59 | SETTINGS_BUTTON_ID = 30
60 | HISTORY_BUTTON_ID = 40
61 | CANCEL_BUTTON_ID = 50
62 |
63 | def __new__(cls, *args):
64 | return super(BuildSelectDialog, cls).__new__(
65 | cls, "script-devupdate-main.xml", addon.src_path)
66 |
67 | def __init__(self, installed_build):
68 | self._installed_build = installed_build
69 |
70 | self._sources = builds.sources()
71 | utils.add_custom_sources(self._sources)
72 |
73 | self._initial_source = addon.get_setting('source_name')
74 | try:
75 | self._build_url = self._sources[self._initial_source]
76 | except KeyError:
77 | self._build_url = self._sources.itervalues().next()
78 | self._initial_source = self._sources.iterkeys().next()
79 | self._builds = self._get_build_links(self._build_url)
80 |
81 | self._build_infos = {}
82 |
83 | def __nonzero__(self):
84 | return self._selected_build is not None
85 |
86 | def onInit(self):
87 | self._selected_build = None
88 |
89 | self._sources_list = self.getControl(self.SOURCE_LIST_ID)
90 | self._sources_list.addItems(self._sources.keys())
91 |
92 | self._build_list = self.getControl(self.BUILD_LIST_ID)
93 |
94 | self.getControl(self.LABEL_ID).setLabel(builds.arch)
95 |
96 | self._info_textbox = self.getControl(self.INFO_TEXTBOX_ID)
97 |
98 | if self._builds:
99 | self._selected_source_position = self._sources.keys().index(self._initial_source)
100 |
101 | self._set_builds(self._builds)
102 | else:
103 | self._selected_source_position = 0
104 | self._initial_source = self._sources.iterkeys().next()
105 | self.setFocusId(self.SOURCE_LIST_ID)
106 |
107 | self._selected_source = self._initial_source
108 |
109 | self._sources_list.selectItem(self._selected_source_position)
110 |
111 | item = self._sources_list.getListItem(self._selected_source_position)
112 | self._selected_source_item = item
113 | self._selected_source_item.setLabel2('selected')
114 |
115 | self._cancel_button = self.getControl(self.CANCEL_BUTTON_ID)
116 | self._cancel_button.setVisible(bool(funcs.update_files()))
117 |
118 | threading.Thread(target=self._get_and_set_build_info,
119 | args=(self._build_url,)).start()
120 |
121 | @property
122 | def selected_build(self):
123 | return self._selected_build
124 |
125 | @property
126 | def selected_source(self):
127 | return self._selected_source
128 |
129 | def onClick(self, controlID):
130 | if controlID == self.BUILD_LIST_ID:
131 | self._selected_build = self._builds[self._build_list.getSelectedPosition()]
132 | self.close()
133 | elif controlID == self.SOURCE_LIST_ID:
134 | self._build_url = self._get_build_url()
135 | build_links = self._get_build_links(self._build_url)
136 |
137 | if build_links:
138 | self._selected_source_item.setLabel2('')
139 | self._selected_source_item = self._sources_list.getSelectedItem()
140 | self._selected_source_position = self._sources_list.getSelectedPosition()
141 | self._selected_source_item.setLabel2('selected')
142 | self._selected_source = self._selected_source_item.getLabel()
143 |
144 | self._set_builds(build_links)
145 |
146 | threading.Thread(target=self._get_and_set_build_info,
147 | args=(self._build_url,)).start()
148 | else:
149 | self._sources_list.selectItem(self._selected_source_position)
150 | elif controlID == self.SETTINGS_BUTTON_ID:
151 | self.close()
152 | addon.open_settings()
153 | elif controlID == self.HISTORY_BUTTON_ID:
154 | dialog = HistoryDialog(history.get_full_install_history())
155 | dialog.doModal()
156 | elif controlID == self.CANCEL_BUTTON_ID:
157 | if utils.remove_update_files():
158 | utils.notify(L10n(32034))
159 | self._cancel_button.setVisible(False)
160 | funcs.remove_notify_file()
161 | self._info_textbox.setText("")
162 |
163 | def onAction(self, action):
164 | action_id = action.getId()
165 | if action_id in (xbmcgui.ACTION_MOVE_DOWN, xbmcgui.ACTION_MOVE_UP,
166 | xbmcgui.ACTION_PAGE_DOWN, xbmcgui.ACTION_PAGE_UP,
167 | xbmcgui.ACTION_MOUSE_MOVE):
168 | self._set_build_info()
169 |
170 | elif action_id == xbmcgui.ACTION_SHOW_INFO:
171 | build_version = self._build_list.getSelectedItem().getLabel()
172 | try:
173 | info = self._build_infos[build_version]
174 | except KeyError:
175 | log.log("Build details for build {} not found".format(build_version))
176 | else:
177 | if info.details is not None:
178 | try:
179 | details = info.details.get_text()
180 | except Exception as e:
181 | log.log("Unable to retrieve build details: {}".format(e))
182 | else:
183 | if details:
184 | build = "[B]{}[/B]\n\n".format(L10n(32035)).format(build_version)
185 | dialog = InfoDialog(build, details)
186 | dialog.doModal()
187 |
188 | elif action_id in (xbmcgui.ACTION_PREVIOUS_MENU, xbmcgui.ACTION_NAV_BACK):
189 | self.close()
190 |
191 | def onFocus(self, controlID):
192 | if controlID != self.BUILD_LIST_ID:
193 | self._info_textbox.setText("")
194 | self._builds_focused = False
195 |
196 | if controlID == self.BUILD_LIST_ID:
197 | self._builds_focused = True
198 | self._set_build_info()
199 | elif controlID == self.SOURCE_LIST_ID:
200 | self._info_textbox.setText("[COLOR=white]{}[/COLOR]".format(L10n(32141)))
201 | elif controlID == self.SETTINGS_BUTTON_ID:
202 | self._info_textbox.setText("[COLOR=white]{}[/COLOR]".format(L10n(32036)))
203 | elif controlID == self.HISTORY_BUTTON_ID:
204 | self._info_textbox.setText("[COLOR=white]{}[/COLOR]".format(L10n(32037)))
205 | elif controlID == self.CANCEL_BUTTON_ID:
206 | self._info_textbox.setText("[COLOR=white]{}[/COLOR]".format(L10n(32038)))
207 |
208 | @utils.showbusy
209 | def _get_build_links(self, build_url):
210 | links = []
211 | try:
212 | links = build_url.builds()
213 | except requests.ConnectionError as e:
214 | utils.connection_error(str(e))
215 | except builds.BuildURLError as e:
216 | utils.bad_url(build_url.url, str(e))
217 | except requests.RequestException as e:
218 | utils.url_error(build_url.url, str(e))
219 | else:
220 | if not links:
221 | utils.bad_url(build_url.url, L10n(32039).format(builds.arch))
222 | return links
223 |
224 | def _get_build_infos(self, build_url):
225 | log.log("Retrieving build information")
226 | info = {}
227 | for info_extractor in build_url.info_extractors:
228 | try:
229 | info.update(info_extractor.get_info())
230 | except Exception as e:
231 | log.log("Unable to retrieve build info: {}".format(str(e)))
232 | return info
233 |
234 | def _set_build_info(self):
235 | if self._builds_focused:
236 | selected_item = self._build_list.getSelectedItem()
237 | try:
238 | build_version = selected_item.getLabel()
239 | except AttributeError:
240 | log.log("Unable to get selected build name")
241 | else:
242 | try:
243 | info = self._build_infos[build_version].summary
244 | except KeyError:
245 | info = ""
246 | log.log("Build info for build {} not found".format(build_version))
247 | else:
248 | log.log("Info for build {}:\n\t{}".format(build_version, info))
249 | self._info_textbox.setText(info)
250 |
251 | def _get_and_set_build_info(self, build_url):
252 | self._build_infos = self._get_build_infos(build_url)
253 | self._set_build_info()
254 |
255 | def _get_build_url(self):
256 | source = self._sources_list.getSelectedItem().getLabel()
257 | build_url = self._sources[source]
258 |
259 | log.log("Full URL = " + build_url.url)
260 | return build_url
261 |
262 | def _set_builds(self, builds):
263 | self._builds = builds
264 | self._build_list.reset()
265 | for build in builds:
266 | li = xbmcgui.ListItem()
267 | li.setLabel(build.version)
268 | li.setLabel2(build.date)
269 | if build > self._installed_build:
270 | icon = 'upgrade'
271 | elif build < self._installed_build:
272 | icon = 'downgrade'
273 | else:
274 | icon = 'installed'
275 | li.setIconImage("{}.png".format(icon))
276 | self._build_list.addItem(li)
277 | self.setFocusId(self.BUILD_LIST_ID)
278 | self._builds_focused = True
279 |
--------------------------------------------------------------------------------
/resources/lib/history.py:
--------------------------------------------------------------------------------
1 | #! /usr/bin/python
2 |
3 | import os
4 | from datetime import datetime
5 | import sqlite3
6 | from collections import namedtuple
7 |
8 | import log
9 |
10 | try:
11 | import addon
12 | except ImportError:
13 | pass
14 | else:
15 | HISTORY_FILE = os.path.join(addon.data_path, 'builds.db')
16 |
17 |
18 | FIELDS = ['source', 'version', 'timestamp']
19 | _Install = namedtuple('Install', FIELDS)
20 | def _row_factory(cursor, row):
21 | return _Install(*row)
22 |
23 |
24 | def maybe_create_database():
25 | with sqlite3.connect(HISTORY_FILE) as conn:
26 | conn.execute('''CREATE TABLE IF NOT EXISTS builds
27 | (id INTEGER PRIMARY KEY AUTOINCREMENT, source TEXT NOT NULL,
28 | version TEXT NOT NULL, marked INTEGER default 0, comments TEXT,
29 | UNIQUE(source, version))''')
30 |
31 | conn.execute('''CREATE UNIQUE INDEX IF NOT EXISTS source_version
32 | ON builds (source, version)''')
33 |
34 | conn.execute('''CREATE TABLE IF NOT EXISTS installs
35 | (id INTEGER PRIMARY KEY AUTOINCREMENT,
36 | build_id INTEGER REFERENCES builds(id),
37 | timestamp TIMESTAMP NOT NULL)''')
38 |
39 |
40 | @log.with_logging("Added install {}|{} to database",
41 | "Failed to add install {}|{} to database")
42 | def add_install(source, build):
43 | maybe_create_database()
44 | with sqlite3.connect(HISTORY_FILE) as conn:
45 | conn.execute('''INSERT OR IGNORE INTO builds (source, version)
46 | VALUES (?, ?)''', (source, build.version))
47 |
48 | build_id = conn.execute('''SELECT last_insert_rowid()
49 | FROM builds''').fetchone()[0]
50 | if build_id == 0:
51 | build_id = get_build_id(source, build.version)
52 |
53 | conn.execute('''INSERT INTO installs (build_id, timestamp)
54 | VALUES (?, ?)''', (build_id, datetime.now()))
55 |
56 |
57 | def get_build_id(source, version):
58 | with sqlite3.connect(HISTORY_FILE) as conn:
59 | return conn.execute('''SELECT id FROM builds WHERE source = ? AND version = ?''',
60 | (source, version)).fetchone()[0]
61 |
62 |
63 | @log.with_logging("Retrieved install history for source {}",
64 | "Failed to retrieve install history for source {}")
65 | def get_source_install_history(source):
66 | with sqlite3.connect(HISTORY_FILE, detect_types=sqlite3.PARSE_DECLTYPES) as conn:
67 | conn.row_factory = _row_factory
68 | return conn.execute('''SELECT {}
69 | FROM installs
70 | JOIN builds ON builds.id = build_id
71 | WHERE source = ?'''.format(','.join(FIELDS)),
72 | (source,)).fetchall()
73 |
74 |
75 | @log.with_logging("Retrieved full install history",
76 | "Failed to retrieve full install history")
77 | def get_full_install_history():
78 | with sqlite3.connect(HISTORY_FILE, detect_types=sqlite3.PARSE_DECLTYPES) as conn:
79 | conn.row_factory = _row_factory
80 | return conn.execute('''SELECT {}
81 | FROM installs
82 | JOIN builds ON builds.id = build_id'''
83 | .format(','.join(FIELDS))).fetchall()
84 |
85 |
86 | def is_previously_installed(source, build):
87 | with sqlite3.connect(HISTORY_FILE) as conn:
88 | return bool(conn.execute('''SELECT COUNT(*) FROM installs WHERE
89 | source = ? AND version = ?''',
90 | (source, build.version)).fetchone()[0])
91 |
92 |
93 | def format_history_lines(history):
94 | for install in reversed(history):
95 | yield "{:16s} {:>7s} {:30s}".format(
96 | install.timestamp.strftime("%Y-%m-%d %H:%M"), install.version,
97 | install.source)
98 |
99 |
100 | if __name__ == "__main__":
101 | from argparse import ArgumentParser, RawTextHelpFormatter
102 | import sys
103 | import logging
104 |
105 | parser = ArgumentParser(description='Print install history',
106 | formatter_class=RawTextHelpFormatter)
107 | parser.add_argument(
108 | 'dbpath', nargs='?',
109 | default="/storage/.kodi/userdata/addon_data/script.openelec.devupdate/builds.db",
110 | help="path to the install history database \n (default: %(default)s)")
111 |
112 | parser.add_argument(
113 | '--logdebug', action='store_true',
114 | help="log all debug messages to the log file ({})".format(log.log_path))
115 |
116 | args = parser.parse_args()
117 |
118 | HISTORY_FILE = args.dbpath
119 |
120 | if not os.path.isfile(HISTORY_FILE):
121 | print "dbpath does not exist"
122 | parser.print_usage()
123 | sys.exit(1)
124 |
125 | if args.logdebug:
126 | logging.getLogger().setLevel(logging.DEBUG)
127 |
128 | history = get_full_install_history()
129 | for line in format_history_lines(history):
130 | print line
131 |
--------------------------------------------------------------------------------
/resources/lib/log.py:
--------------------------------------------------------------------------------
1 | import sys
2 | import functools
3 | import traceback
4 | import os
5 |
6 | try:
7 | import xbmc
8 | from . import addon
9 | except ImportError:
10 | import logging
11 | xbmc_log = False
12 | else:
13 | xbmc_log = True
14 |
15 |
16 | if xbmc_log:
17 | def _log(txt, level=xbmc.LOGDEBUG):
18 | if not (addon.get_setting('debug') == 'false' and level == xbmc.LOGDEBUG):
19 | msg = '{}: {}'.format(addon.name, txt)
20 | xbmc.log(msg, level)
21 |
22 | def log(txt):
23 | _log(txt, level=xbmc.LOGDEBUG)
24 |
25 | def log_error(txt):
26 | _log(txt, level=xbmc.LOGERROR)
27 | else:
28 | log_path = os.path.join(os.path.expanduser('~'), 'devupdate.log')
29 | logging.basicConfig(filename=log_path,
30 | level=logging.ERROR,
31 | format='%(asctime)s %(levelname)7s: %(message)s')
32 |
33 | def log(txt):
34 | logging.debug(txt)
35 |
36 | def log_error(txt):
37 | logging.error(txt)
38 |
39 |
40 | def log_exception():
41 | log_error("".join(traceback.format_exception(*sys.exc_info())))
42 |
43 |
44 | def with_logging(msg_success=None, msg_error=None, log_exc=True):
45 | def wrap(func):
46 | @functools.wraps(func)
47 | def call_with_logging(*args, **kwargs):
48 | try:
49 | result = func(*args, **kwargs)
50 | except:
51 | if msg_error is not None:
52 | log_error(msg_error.format(*args))
53 | if log_exc:
54 | log_exception()
55 | else:
56 | if msg_success is not None:
57 | log(msg_success.format(*args))
58 | return result
59 | return call_with_logging
60 | return wrap
61 |
62 |
63 | def log_version():
64 | log("version {}".format(addon.version))
65 |
--------------------------------------------------------------------------------
/resources/lib/openelec.py:
--------------------------------------------------------------------------------
1 | import os
2 | import glob
3 | import subprocess
4 | from contextlib import contextmanager
5 |
6 |
7 | OS_RELEASE = dict(line.strip().replace('"', '').split('=')
8 | for line in open('/etc/os-release'))
9 |
10 | try:
11 | ARCH = OS_RELEASE['OPENELEC_ARCH']
12 | except KeyError:
13 | # Enables testing on non OpenELEC machines
14 | ARCH = 'RPi.arm'
15 |
16 | UPDATE_DIR = os.path.join(os.path.expanduser('~'), '.update')
17 | if OS_RELEASE['NAME'] not in ["OpenELEC", "LibreELEC"]:
18 | try:
19 | import xbmc
20 | except ImportError:
21 | # Enables testing standalone script outside Kodi
22 | UPDATE_DIR = os.path.expanduser('~')
23 | else:
24 | # Enables testing in non OpenELEC Kodi
25 | UPDATE_DIR = xbmc.translatePath("special://temp/")
26 |
27 | UPDATE_IMAGES = ('SYSTEM', 'KERNEL')
28 |
29 | def dist():
30 | dist = OS_RELEASE['NAME']
31 | if dist in ("LibreELEC", "OpenELEC"):
32 | return dist.lower()
33 | else:
34 | return "libreelec"
35 |
36 |
37 | def mount_readwrite():
38 | subprocess.check_call(['mount', '-o', 'rw,remount', '/flash'])
39 |
40 |
41 | def mount_readonly():
42 | subprocess.call(['mount', '-o', 'ro,remount', '/flash'])
43 |
44 |
45 | @contextmanager
46 | def write_context():
47 | try:
48 | mount_readwrite()
49 | except subprocess.CalledProcessError:
50 | pass
51 | else:
52 | try:
53 | yield
54 | finally:
55 | mount_readonly()
56 |
57 |
58 | def update_extlinux():
59 | subprocess.call(['/usr/bin/extlinux', '--update', '/flash'])
60 |
61 |
62 | def debug_system_partition():
63 | try:
64 | partition = os.path.basename(os.readlink('/dev/disk/by-label/System'))
65 | except OSError:
66 | return False
67 |
68 | try:
69 | size_path = glob.glob('/sys/block/*/{}/size'.format(partition))[0]
70 | except IndexError:
71 | return False
72 |
73 | system_size_bytes = int(open(size_path).read()) * 512
74 | return system_size_bytes >= 384 * 1024*1024
75 |
--------------------------------------------------------------------------------
/resources/lib/progress.py:
--------------------------------------------------------------------------------
1 | from __future__ import division
2 |
3 | import os
4 | import bz2
5 | import time
6 | import hashlib
7 |
8 | import xbmc, xbmcgui, xbmcvfs
9 |
10 | from .script_exceptions import Canceled, WriteError, DecompressError
11 | from .funcs import size_fmt
12 | from .addon import L10n
13 |
14 |
15 | class Progress(xbmcgui.DialogProgress):
16 | def create(self, heading, line1=None, line2=None):
17 | if line1 is None:
18 | line1 = " "
19 | if line2 is None:
20 | line2 = " "
21 | super(Progress, self).create(heading, line1, line2)
22 |
23 | def update(self, percent, message=None):
24 | super(Progress, self).update(percent, line3=message)
25 |
26 |
27 | class ProgressBG(xbmcgui.DialogProgressBG):
28 | def iscanceled(self):
29 | return False
30 |
31 | def create(self, heading, line1=None, line2=None):
32 | if line1 is None:
33 | message = line2
34 | else:
35 | message = line1
36 | super(ProgressBG, self).create(heading, message)
37 |
38 | def update(self, percent, message=None):
39 | super(ProgressBG, self).update(percent)
40 |
41 |
42 | class FileProgress(object):
43 | """Wraps DialogProgress(BG) as a context manager to
44 | handle the file progress"""
45 |
46 | BLOCK_SIZE = 131072
47 |
48 | def __init__(self, heading, infile, outpath, size, background=False):
49 | self._heading = heading
50 | self._in_f = infile
51 | self._outpath = outpath
52 | self._outfile = os.path.basename(outpath)
53 | self._out_f = None
54 |
55 | self._size = size
56 | if background:
57 | self._progress = ProgressBG()
58 | else:
59 | self._progress = Progress()
60 | self._done = 0
61 |
62 | def __enter__(self):
63 | return self
64 |
65 | def __exit__(self, exc_type, exc_value, traceback):
66 | self._in_f.close()
67 | if self._out_f is not None:
68 | self._out_f.close()
69 |
70 | self._progress.close()
71 |
72 | # If an exception occurred remove the incomplete file.
73 | if exc_type is not None:
74 | xbmcvfs.delete(self._outpath)
75 |
76 | def start(self):
77 | self._progress.create(self._heading, self._outfile, size_fmt(self._size))
78 | try:
79 | self._out_f = xbmcvfs.File(self._outpath, 'w')
80 | except Exception as e:
81 | raise WriteError(e)
82 |
83 | start_time = time.time()
84 | while self._done < self._size:
85 | if self._progress.iscanceled():
86 | raise Canceled
87 | data = self._read()
88 | try:
89 | self._out_f.write(data)
90 | except Exception as e:
91 | raise WriteError(e)
92 | percent = int(self._done * 100 / self._size)
93 | bytes_per_second = self._done / (time.time() - start_time)
94 | self._progress.update(percent, "{0}/s".format(size_fmt(bytes_per_second)))
95 |
96 | def _getdata(self):
97 | return self._in_f.read(self.BLOCK_SIZE)
98 |
99 | def _read(self):
100 | data = self._getdata()
101 | self._done += len(data)
102 | return data
103 |
104 |
105 | class DecompressProgress(FileProgress):
106 | decompressor = bz2.BZ2Decompressor()
107 | def _read(self):
108 | data = self._getdata()
109 | try:
110 | decompressed_data = self.decompressor.decompress(data)
111 | except IOError as e:
112 | raise DecompressError(e)
113 | self._done = self._in_f.tell()
114 | return decompressed_data
115 |
116 |
117 | def reboot_countdown(title, line1, count):
118 | count = int(count)
119 | progress = xbmcgui.DialogProgress()
120 | progress.create(title)
121 |
122 | timed_out = True
123 | seconds = count
124 | while seconds >= 0:
125 | if seconds > 1:
126 | msg = L10n(32057).format(seconds)
127 | elif seconds == 1:
128 | msg = L10n(32058)
129 | else:
130 | msg = L10n(32059)
131 |
132 | progress.update(int((count - seconds) / count * 100),
133 | line1, msg, " ")
134 |
135 | xbmc.sleep(1000)
136 | if progress.iscanceled():
137 | timed_out = False
138 | break
139 | seconds -= 1
140 | progress.close()
141 | return timed_out
142 |
143 |
144 | def md5sum_verified(md5sum_compare, path, background):
145 | if background:
146 | verify_progress = ProgressBG()
147 | else:
148 | verify_progress = Progress()
149 |
150 | verify_progress.create("Verifying", line1=os.path.basename(path))
151 |
152 | BLOCK_SIZE = 8192
153 |
154 | hasher = hashlib.md5()
155 | f = open(path)
156 |
157 | done = 0
158 | size = os.path.getsize(path)
159 | while done < size:
160 | if verify_progress.iscanceled():
161 | verify_progress.close()
162 | return True
163 | data = f.read(BLOCK_SIZE)
164 | done += len(data)
165 | hasher.update(data)
166 | percent = int(done * 100 / size)
167 | verify_progress.update(percent)
168 | verify_progress.close()
169 |
170 | md5sum = hasher.hexdigest()
171 | return md5sum == md5sum_compare
172 |
--------------------------------------------------------------------------------
/resources/lib/rpi.py:
--------------------------------------------------------------------------------
1 | import os
2 | import re
3 | import sys
4 |
5 | import xbmc, xbmcvfs
6 |
7 | from . import openelec, addon, log, progress
8 | from .addon import L10n
9 |
10 | CONFIG_FILE = 'config.txt'
11 | CONFIG_PATH = '/flash/' + CONFIG_FILE
12 | CONFIG_BACKUP_PATH = os.path.join(addon.data_path, CONFIG_FILE)
13 |
14 | OVERCLOCK_SETTINGS = ('arm_freq',
15 | 'core_freq',
16 | 'sdram_freq',
17 | 'over_voltage.*')
18 |
19 | OVERCLOCK_RE = re.compile(r'^([ \t]*({})[ \t]*=)'.format('|'.join(OVERCLOCK_SETTINGS)),
20 | re.MULTILINE)
21 |
22 |
23 | def maybe_restore_config():
24 | if os.path.exists(CONFIG_BACKUP_PATH):
25 | log.log("Re-enabling overclocking")
26 | with openelec.write_context():
27 | xbmcvfs.copy(CONFIG_BACKUP_PATH, CONFIG_PATH)
28 | xbmcvfs.delete(CONFIG_BACKUP_PATH)
29 | if progress.reboot_countdown(L10n(32054), L10n(32040),
30 | addon.get_int_setting('reboot_count')):
31 | log.log("Restarting")
32 | xbmc.restart()
33 | sys.exit()
34 | else:
35 | log.log("Restart cancelled")
36 |
37 |
38 | def maybe_disable_overclock():
39 | if (openelec.ARCH.startswith('RPi') and
40 | os.path.isfile(CONFIG_PATH) and
41 | addon.get_bool_setting('disable_overclock')):
42 |
43 | with open(CONFIG_PATH, 'r') as a:
44 | config = a.read()
45 |
46 | if OVERCLOCK_RE.search(config):
47 |
48 | xbmcvfs.copy(CONFIG_PATH,
49 | os.path.join(addon.data_path, CONFIG_FILE))
50 |
51 | def repl(m):
52 | return '#' + m.group(1)
53 |
54 | with openelec.write_context(), open(CONFIG_PATH, 'w') as b:
55 | b.write(re.sub(OVERCLOCK_RE, repl, config))
56 |
--------------------------------------------------------------------------------
/resources/lib/script_exceptions.py:
--------------------------------------------------------------------------------
1 | class Canceled(Exception):
2 | pass
3 |
4 | class WriteError(IOError):
5 | pass
6 |
7 | class DecompressError(IOError):
8 | pass
9 |
10 | class AlreadyRunning(Exception):
11 | pass
12 |
--------------------------------------------------------------------------------
/resources/lib/utils.py:
--------------------------------------------------------------------------------
1 | ''' Module for functions with a dependency on Kodi Python modules '''
2 |
3 | from __future__ import division
4 |
5 | import os
6 | import sys
7 | import functools
8 | from urlparse import urlparse
9 |
10 | import xbmc, xbmcaddon, xbmcgui
11 |
12 | from . import openelec, log, addon, funcs, history, builds
13 | from .addon import L10n
14 |
15 |
16 | ok = xbmcgui.Dialog().ok
17 | yesno = xbmcgui.Dialog().yesno
18 | notification = xbmcgui.Dialog().notification
19 |
20 |
21 | def connection_error(msg):
22 | ok(L10n(32041), msg, L10n(32042))
23 |
24 |
25 | def bad_url(url, msg=L10n(32043)):
26 | ok(L10n(32044), msg, url, L10n(32045))
27 |
28 |
29 | def url_error(url, msg):
30 | log.log_exception()
31 | ok(L10n(32044), msg, url, L10n(32046))
32 |
33 |
34 | def write_error(path, msg):
35 | log.log_exception()
36 | ok(L10n(32047), msg, path, L10n(32048))
37 | addon.open_settings()
38 |
39 |
40 | def decompress_error(path, msg):
41 | log.log_exception()
42 | ok(L10n(32049), L10n(32050), " ", msg)
43 |
44 |
45 | def check_update_files(selected, force_dialog=False):
46 | log.log("Checking for an existing update file")
47 | if funcs.update_files():
48 | log.log("An update file is in place")
49 |
50 | if selected:
51 | build_str = format_build(selected[1])
52 | msg = L10n(32052).format(build_str)
53 | else:
54 | build_str = ""
55 | msg = L10n(32053)
56 |
57 | if do_show_dialog() or force_dialog:
58 | if yesno(addon.name, msg, " ", L10n(32055)):
59 | xbmc.restart()
60 | sys.exit(0)
61 | else:
62 | notify(" ".join((msg, L10n(32056))))
63 |
64 | return True
65 | else:
66 | return False
67 |
68 |
69 | def remove_update_files():
70 | return all(funcs.remove_file(tar) for tar in funcs.update_files())
71 |
72 |
73 | def get_arch():
74 | if addon.get_bool_setting('set_arch'):
75 | return addon.get_setting('arch')
76 | else:
77 | return openelec.ARCH
78 |
79 |
80 | def notify(msg, time=12000, error=False):
81 | log.log("Notifying: {}".format(msg))
82 | if error:
83 | msg = "[COLOR red]{}[/COLOR]".format(L10n(32060)).format(msg)
84 | notification(addon.name, msg, addon.icon_path, time)
85 |
86 |
87 | def showbusy(f):
88 | @functools.wraps(f)
89 | def busy_wrapper(*args, **kwargs):
90 | xbmc.executebuiltin("ActivateWindow(busydialog)")
91 | try:
92 | return f(*args, **kwargs)
93 | finally:
94 | xbmc.executebuiltin("Dialog.Close(busydialog)")
95 | return busy_wrapper
96 |
97 |
98 | def do_show_dialog():
99 | show = addon.get_int_setting('check_prompt')
100 | return show == 2 or (show == 1 and not xbmc.Player().isPlayingVideo())
101 |
102 |
103 | def ensure_trailing_slash(path):
104 | return path if path.endswith('/') else path + '/'
105 |
106 |
107 | @log.with_logging(msg_error="Unable to check if another instance is running")
108 | def is_running():
109 | running = xbmcgui.Window(10000).getProperty('DevUpdateRunning') == 'True'
110 | log.log("Another instance is running" if running else "No other instance is running")
111 | return running
112 |
113 |
114 | @log.with_logging("Set running flag", "Unable to set running flag")
115 | def set_running():
116 | xbmcgui.Window(10000).setProperty('DevUpdateRunning', 'True')
117 |
118 |
119 | @log.with_logging("Cleared running flag", "Unable to clear running flag")
120 | def set_not_running():
121 | xbmcgui.Window(10000).clearProperty('DevUpdateRunning')
122 |
123 |
124 | def install_cmdline_script():
125 | """ Creates a symbolic link to the command line download script
126 | in the root user home directory. The script can then be invoked
127 | by running:
128 |
129 | ./devupdate
130 | """
131 |
132 | SCRIPT_NAME = "download.py"
133 | script_path = os.path.join(addon.src_path, SCRIPT_NAME)
134 |
135 | SYMLINK_NAME = "devupdate"
136 | symlink_path = os.path.join(os.path.expanduser('~'), SYMLINK_NAME)
137 |
138 | log.log("Installing command line script {}".format(symlink_path))
139 |
140 | funcs.make_executable(script_path)
141 |
142 | funcs.maybe_create_symlink(script_path, symlink_path)
143 |
144 |
145 | def maybe_schedule_extlinux_update():
146 | if (not openelec.ARCH.startswith('RPi') and
147 | addon.get_bool_setting('update_extlinux')):
148 | funcs.schedule_extlinux_update()
149 |
150 |
151 | def maybe_run_backup():
152 | backup = addon.get_int_setting('backup')
153 | if backup == 0:
154 | do_backup = False
155 | elif backup == 1:
156 | do_backup = yesno(L10n(32061), L10n(32062), L10n(32063))
157 | log.log("Backup requested")
158 | elif backup == 2:
159 | do_backup = True
160 | log.log("Backup always")
161 |
162 | if do_backup:
163 | xbmc.executebuiltin('RunScript(script.xbmcbackup, mode=backup)', True)
164 | xbmc.sleep(10000)
165 | window = xbmcgui.Window(10000)
166 | while (window.getProperty('script.xbmcbackup.running') == 'true'):
167 | xbmc.sleep(5000)
168 |
169 |
170 | def make_runscript(arg):
171 | return "RunScript({}, {})".format(addon.info('id'), arg)
172 |
173 |
174 | def format_build(build):
175 | return "[COLOR=lightskyblue][B]{}[/COLOR][/B]".format(build)
176 |
177 |
178 | def setup_build_check():
179 | xbmc.executebuiltin(make_runscript('checkonboot'))
180 | if not addon.get_bool_setting('check_onbootonly'):
181 | interval = addon.get_int_setting('check_interval')
182 | log.log("Starting build check timer for every {:d} hour{}"
183 | .format(interval, 's' if interval > 1 else ''))
184 | cmd = ("AlarmClock(devupdatecheck, {}, {:02d}:00:00, silent, loop)".
185 | format(make_runscript('checkperiodic'), interval))
186 | xbmc.executebuiltin(cmd)
187 |
188 |
189 | def maybe_confirm_installation(selected, installed_build):
190 | source, selected_build = selected
191 | log.log("Selected build: {}".format(selected_build))
192 | log.log("Installed build: {}".format(installed_build))
193 |
194 | build_str = format_build(selected_build)
195 | if installed_build == selected_build:
196 | msg = L10n(32064)
197 | notify(msg.format(build_str))
198 | log.log(msg.format(selected_build))
199 |
200 | history.add_install(source, selected_build)
201 | else:
202 | msg = L10n(32065)
203 | notify(msg.format(build_str), error=True)
204 | log.log(msg.format(selected_build))
205 |
206 |
207 | def add_custom_sources(sources):
208 | for suffix in ('', '_2', '_3'):
209 | if addon.get_bool_setting('custom_source_enable' + suffix):
210 | build_type = addon.get_setting('build_type' + suffix)
211 | try:
212 | build_type_index = int(build_type)
213 | except ValueError:
214 | log.log_error("Invalid build type index '{}'".format(build_type))
215 | build_type_index = 0
216 |
217 | if build_type_index == 2:
218 | subdir = addon.get_setting('subdir_preset' + suffix)
219 | if subdir == L10n(32128):
220 | subdir = addon.get_setting('other_subdir' + suffix)
221 | custom_name = "Milhouse Builds ({})".format(subdir)
222 | sources[custom_name] = builds.MilhouseBuildsURL(subdir)
223 | elif build_type_index < 2:
224 | custom_name = addon.get_setting('custom_source' + suffix)
225 | custom_url = addon.get_setting('custom_url' + suffix)
226 | scheme, netloc = urlparse(custom_url)[:2]
227 | if not scheme in ('http', 'https') or not netloc:
228 | bad_url(custom_url, L10n(32066))
229 | continue
230 |
231 | custom_extractors = (builds.BuildLinkExtractor,
232 | builds.ReleaseLinkExtractor)
233 |
234 | kwargs = {}
235 | if addon.get_setting('custom_subdir_enable' + suffix):
236 | kwargs['subdir'] = addon.get_setting('custom_subdir' + suffix)
237 |
238 | sources[custom_name] = builds.BuildsURL(
239 | custom_url, extractor=custom_extractors[build_type_index], **kwargs)
240 | elif build_type_index == 3:
241 | sources["DarkAngel2401 Dual Audio Builds"] = builds.dual_audio_builds
242 |
--------------------------------------------------------------------------------
/resources/settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/resources/skins/Default/1080i/script-devupdate-history.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 10
4 |
5 |
6 | WindowOpen
7 | WindowClose
8 | 1100
9 | 1080
10 | 960
11 | 540
12 |
13 |
14 | Background image
15 | white.png
16 |
17 |
18 |
19 | Title
20 | 1100
21 | 90
22 | 40
23 | center
24 | ffffffff
25 |
26 |
27 |
28 | 131
29 | 170
30 | 880
31 | 10
32 | 2000
33 |
34 |
35 |
36 | 0
37 | 260
38 | 44
39 | ffbbbbbb
40 | ListItem.Property(timestamp)
41 |
42 |
43 | 260
44 | 160
45 | 44
46 | right
47 | ff87bde1
48 | ListItem.Property(version)
49 |
50 |
51 | 450
52 | 400
53 | 44
54 | left
55 | ff888888
56 | ListItem.Property(source)
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 | 131
67 | 1092
68 | 880
69 | white.png
70 | white.png
71 | white.png
72 | false
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/resources/skins/Default/1080i/script-devupdate-info.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 10
4 |
5 |
6 | WindowOpen
7 | WindowClose
8 | 1920
9 | 1080
10 | 960
11 | 540
12 |
13 |
14 | Background image
15 | white.png
16 |
17 |
18 |
19 | Title
20 | 200
21 | 90
22 | 860
23 | 40
24 | ffffffff
25 |
26 |
27 |
28 | 131
29 | 70
30 | 1780
31 | 880
32 | ff87bde1
33 | 10
34 | 2000
35 |
36 |
37 | 131
38 | 1912
39 | 880
40 | white.png
41 | white.png
42 | white.png
43 | false
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/resources/skins/Default/1080i/script-devupdate-main.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Window size and position
6 | WindowOpen
7 | WindowClose
8 | 1100
9 | 1080
10 | 960
11 | 540
12 |
13 |
14 | Background image
15 | 1100
16 | white.png
17 |
22 |
23 |
24 |
25 | Bottom panel
26 | 940
27 |
28 | Separator
29 | 0
30 | white.png
31 |
32 |
33 | Info area
34 | 40
35 | 25
36 | 130
37 | 1030
38 | ff87bde1
39 |
40 |
41 |
42 |
43 | Left panel
44 | 680
45 |
46 |
47 | OpenELEC logo
48 | 20
49 | 60
50 | logotype.png
51 | keep
52 | 152
53 | 482
54 |
55 |
56 |
57 | Build type label
58 | 150
59 | 50
60 | right
61 | top
62 | ff87bde1
63 |
64 |
65 |
66 | Toolbar
67 | 190
68 | 60
69 | 30
70 | horizontal
71 | 10
72 | 20
73 |
74 |
75 | Settings button
76 | 48
77 | 48
78 | settings.png
79 | settings.png
80 |
81 |
82 |
83 | History button
84 | 48
85 | 48
86 | history.png
87 | history.png
88 |
89 |
90 |
91 | Cancel button
92 | 48
93 | 48
94 | cancel.png
95 | cancel.png
96 |
97 |
98 |
99 |
100 | Source selection
101 | 0
102 | 280
103 |
104 |
105 | 0
106 | 25
107 | 680
108 | 585
109 | 20
110 | 300
111 |
112 |
113 | StringCompare(ListItem.Label2, selected)
114 | white.png
115 | f02b2b2b
116 |
117 |
118 | StringCompare(ListItem.Label2, selected)
119 | 680
120 | 50
121 | center
122 | ffffffff
123 | ListItem.Label
124 |
125 |
126 | !StringCompare(ListItem.Label2, selected)
127 | 680
128 | 50
129 | center
130 | d0b2afa8
131 | ListItem.Label
132 |
133 |
134 |
135 |
136 | Focus
137 | Focus
138 |
139 |
140 | !Control.HasFocus(10) + StringCompare(ListItem.Label2, selected)
141 | white.png
142 | f02b2b2b
143 |
144 |
145 |
146 | Control.HasFocus(10) + StringCompare(ListItem.Label2, selected)
147 | white.png
148 | 502b2b2b
149 |
150 |
151 |
152 |
153 | Control.HasFocus(10)
154 | highlight.png
155 |
156 |
157 |
158 | !StringCompare(ListItem.Label2, selected)
159 | 680
160 | 50
161 | center
162 | f0b2afa8
163 | ListItem.Label
164 |
165 |
166 |
167 | StringCompare(ListItem.Label2, selected)
168 | 680
169 | 50
170 | center
171 | ffffffff
172 | ListItem.Label
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 | Right panel
181 | 680
182 | 940
183 | 420
184 |
185 |
186 | white.png
187 | f02b2b2b
188 |
189 |
190 |
191 | 412
192 | 940
193 | white.png
194 | white.png
195 | false
196 |
197 |
198 |
199 | Build list
200 | 0
201 | 45
202 | 845
203 | 600
204 | 10
205 |
206 |
207 |
208 | 0
209 | 190
210 | center
211 | center
212 | ffb2afa8
213 | ListItem.Label
214 |
215 |
216 |
217 | 100
218 | center
219 | right
220 | ffb2afa8
221 | ListItem.Label2
222 |
223 |
224 |
225 | 340
226 | 10
227 | 48
228 | 48
229 | ListItem.Icon
230 |
231 |
232 |
233 |
234 | Focus
235 | Focus
236 |
237 |
238 | Control.HasFocus(20)
239 | 0
240 | 190
241 | center
242 | center
243 | ffffffff
244 | ListItem.Label
245 |
246 |
247 |
248 | !Control.HasFocus(20)
249 | 0
250 | 190
251 | center
252 | center
253 | ffb2afa8
254 | ListItem.Label
255 |
256 |
257 |
258 | Control.HasFocus(20)
259 | 100
260 | center
261 | right
262 | ffffffff
263 | ListItem.Label2
264 |
265 |
266 |
267 | !Control.HasFocus(20)
268 | 100
269 | center
270 | right
271 | ffb2afa8
272 | ListItem.Label2
273 |
274 |
275 |
276 | 340
277 | 10
278 | 48
279 | 48
280 | ListItem.Icon
281 |
282 |
283 |
284 |
285 | Control.HasFocus(20)
286 | highlight.png
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
--------------------------------------------------------------------------------
/resources/skins/Default/colors/Defaults.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | af33b5e5
4 | ff33b5e5
5 | ff181818
6 | ffdddddd
7 | 9fdddddd
8 |
9 |
--------------------------------------------------------------------------------
/resources/skins/Default/media/cancel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LS80/script.openelec.devupdate/b714dde6aed8c18a1381a060e6bea45f8523011d/resources/skins/Default/media/cancel.png
--------------------------------------------------------------------------------
/resources/skins/Default/media/downgrade.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LS80/script.openelec.devupdate/b714dde6aed8c18a1381a060e6bea45f8523011d/resources/skins/Default/media/downgrade.png
--------------------------------------------------------------------------------
/resources/skins/Default/media/downgrade.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
70 |
--------------------------------------------------------------------------------
/resources/skins/Default/media/highlight.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LS80/script.openelec.devupdate/b714dde6aed8c18a1381a060e6bea45f8523011d/resources/skins/Default/media/highlight.png
--------------------------------------------------------------------------------
/resources/skins/Default/media/history.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LS80/script.openelec.devupdate/b714dde6aed8c18a1381a060e6bea45f8523011d/resources/skins/Default/media/history.png
--------------------------------------------------------------------------------
/resources/skins/Default/media/installed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LS80/script.openelec.devupdate/b714dde6aed8c18a1381a060e6bea45f8523011d/resources/skins/Default/media/installed.png
--------------------------------------------------------------------------------
/resources/skins/Default/media/logotype.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LS80/script.openelec.devupdate/b714dde6aed8c18a1381a060e6bea45f8523011d/resources/skins/Default/media/logotype.png
--------------------------------------------------------------------------------
/resources/skins/Default/media/settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LS80/script.openelec.devupdate/b714dde6aed8c18a1381a060e6bea45f8523011d/resources/skins/Default/media/settings.png
--------------------------------------------------------------------------------
/resources/skins/Default/media/upgrade.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LS80/script.openelec.devupdate/b714dde6aed8c18a1381a060e6bea45f8523011d/resources/skins/Default/media/upgrade.png
--------------------------------------------------------------------------------
/resources/skins/Default/media/upgrade.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
71 |
--------------------------------------------------------------------------------
/resources/skins/Default/media/white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LS80/script.openelec.devupdate/b714dde6aed8c18a1381a060e6bea45f8523011d/resources/skins/Default/media/white.png
--------------------------------------------------------------------------------
/service.py:
--------------------------------------------------------------------------------
1 | ''' Run all the jobs which need to be run automatically '''
2 |
3 | # This is required to work around the ImportError exception
4 | # "Failed to import _strptime because the import lock is held by another thread."
5 | import _strptime
6 |
7 | import xbmc
8 |
9 | from resources.lib import utils, rpi, funcs, log
10 |
11 | log.log_version()
12 |
13 | rpi.maybe_restore_config()
14 |
15 | funcs.maybe_update_extlinux()
16 |
17 | # Need to call out to the main script here
18 | # because sys.path is only set when running the main script
19 | # and the builds module needs to import requests
20 | xbmc.executebuiltin(utils.make_runscript('confirm'))
21 |
22 | utils.setup_build_check()
23 |
24 | utils.install_cmdline_script()
25 |
--------------------------------------------------------------------------------