diff --git a/mediaserver/HTTPServer.py b/mediaserver/HTTPServer.py new file mode 100644 index 00000000..92cf680e --- /dev/null +++ b/mediaserver/HTTPServer.py @@ -0,0 +1,106 @@ +# -*- coding: utf-8 -*- + +import random +import re +import threading +import time +import traceback +from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer + +from platformcode import config, logger + + +class MyHTTPServer(HTTPServer): + daemon_threads = True + + def process_request_thread(self, request, client_address): + try: + + self.finish_request(request, client_address) + self.shutdown_request(request) + except: + self.handle_error(request, client_address) + self.shutdown_request(request) + + def process_request(self, request, client_address): + ID = "%032x" % (random.getrandbits(128)) + t = threading.Thread(target=self.process_request_thread, + args=(request, client_address), name=ID) + t.daemon = self.daemon_threads + t.start() + + def handle_error(self, request, client_address): + import traceback + if not "socket.py" in traceback.format_exc(): + logger.error(traceback.format_exc()) + + +class Handler(BaseHTTPRequestHandler): + def log_message(self, format, *args): + # sys.stderr.write("%s - - [%s] %s\n" %(self.client_address[0], self.log_date_time_string(), format%args)) + pass + + def do_GET(self): + from platformcode import platformtools + from platformcode import controllers + # Control de accesos + Usuario = "user" + Password = "password" + ControlAcceso = False + import base64 + # Comprueba la clave + if ControlAcceso and self.headers.getheader('Authorization') <> "Basic " + base64.b64encode( + Usuario + ":" + Password): + self.send_response(401) + self.send_header('WWW-Authenticate', + 'Basic realm=\"Introduce el nombre de usuario y clave para acceder a alfa\"') + self.send_header('Content-type', 'text/html; charset=utf-8') + self.end_headers() + self.wfile.write('¡Los datos introducidos no son correctos!') + return + + data = re.compile('/data/([^/]+)/([^/]+)/([^/]+)', re.DOTALL).findall(self.path) + if data: + data = data[0] + if data[0] in platformtools.requests: + c = platformtools.requests[data[0]] + response = {"id": data[1], "result": data[2]} + print response + c.handler = self + c.set_data(response) + while data[0] in platformtools.requests and not self.wfile.closed: + time.sleep(1) + else: + if self.path == "": self.path = "/" + + # Busca el controller para la url + controller = controllers.find_controller(self.path) + if controller: + try: + c = controller(self) + c.run(self.path) + except: + if not "socket.py" in traceback.format_exc(): + logger.error(traceback.format_exc()) + finally: + c.__del__() + del c + return + + def address_string(self): + # Disable reverse name lookups + return self.client_address[:2][0] + + +PORT = config.get_setting("server.port") +server = MyHTTPServer(('', int(PORT)), Handler) + + +def start(fnc_info): + server.fnc_info = fnc_info + threading.Thread(target=server.serve_forever).start() + + +def stop(): + server.socket.close() + server.shutdown() diff --git a/mediaserver/LICENSE b/mediaserver/LICENSE new file mode 100644 index 00000000..94a9ed02 --- /dev/null +++ b/mediaserver/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/mediaserver/TODO b/mediaserver/TODO deleted file mode 100755 index e69de29b..00000000 diff --git a/mediaserver/WebSocket.py b/mediaserver/WebSocket.py new file mode 100644 index 00000000..083f692d --- /dev/null +++ b/mediaserver/WebSocket.py @@ -0,0 +1,89 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------ +# HTTPServer +# ------------------------------------------------------------ +import os +import random +import traceback +from threading import Thread + +import WebSocketServer + +from core import jsontools as json +from platformcode import config, platformtools, logger + + +class HandleWebSocket(WebSocketServer.WebSocket): + def handleMessage(self): + try: + if self.data: + json_message = json.load(str(self.data)) + + if "request" in json_message: + t = Thread(target=run, args=[self.controller, json_message["request"].encode("utf8")], name=self.ID) + t.setDaemon(True) + t.start() + + elif "data" in json_message: + if type(json_message["data"]["result"]) == unicode: + json_message["data"]["result"] = json_message["data"]["result"].encode("utf8") + + self.controller.data = json_message["data"] + + except: + logger.error(traceback.format_exc()) + show_error_message(traceback.format_exc()) + + def handleConnected(self): + try: + self.ID = "%032x" % (random.getrandbits(128)) + from platformcode.controllers.html import html + self.controller = html(self, self.ID) + self.server.fnc_info() + except: + logger.error(traceback.format_exc()) + self.close() + + def handleClose(self): + self.controller.__del__() + del self.controller + self.server.fnc_info() + + +port = config.get_setting("websocket.port") +server = WebSocketServer.SimpleWebSocketServer("", int(port), HandleWebSocket) + + +def start(fnc_info): + server.fnc_info = fnc_info + Thread(target=server.serveforever).start() + + +def stop(): + server.close() + + +def run(controller, path): + try: + controller.run(path) + except: + logger.error(traceback.format_exc()) + show_error_message(traceback.format_exc()) + + +def show_error_message(err_info): + from core import scrapertools + patron = 'File "' + os.path.join(config.get_runtime_path(), "channels", "").replace("\\", "\\\\") + '([^.]+)\.py"' + canal = scrapertools.find_single_match(err_info, patron) + if canal: + platformtools.dialog_ok( + "Se ha producido un error en el canal " + canal, + "Esto puede ser devido a varias razones: \n \ + - El servidor no está disponible, o no esta respondiendo.\n \ + - Cambios en el diseño de la web.\n \ + - Etc...\n \ + Comprueba el log para ver mas detalles del error.") + else: + platformtools.dialog_ok( + "Se ha producido un error en Alfa", + "Comprueba el log para ver mas detalles del error.") diff --git a/mediaserver/__init__.py b/mediaserver/__init__.py new file mode 100644 index 00000000..40a96afc --- /dev/null +++ b/mediaserver/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/mediaserver/alfa.py b/mediaserver/alfa.py new file mode 100644 index 00000000..9aced495 --- /dev/null +++ b/mediaserver/alfa.py @@ -0,0 +1,103 @@ +#! /usr/bin/env python +# -*- coding: utf-8 -*- +# ------------------------------------------------------------ +# Launcher +# ------------------------------------------------------------ +import os +import sys +import threading +import time +from functools import wraps + +sys.dont_write_bytecode = True +from platformcode import config + +sys.path.append(os.path.join(config.get_runtime_path(), 'lib')) +from platformcode import platformtools, logger +import HTTPServer +import WebSocket + +http_port = config.get_setting("server.port") +websocket_port = config.get_setting("websocket.port") +myip = config.get_local_ip() + + +def ThreadNameWrap(func): + @wraps(func) + def bar(*args, **kw): + if "name" not in kw: + kw['name'] = threading.current_thread().name + return func(*args, **kw) + + return bar + + +threading.Thread.__init__ = ThreadNameWrap(threading.Thread.__init__) + +if sys.version_info < (2, 7, 11): + import ssl + + ssl._create_default_https_context = ssl._create_unverified_context + + +def MostrarInfo(): + os.system('cls' if os.name == 'nt' else 'clear') + print ("--------------------------------------------------------------------") + print ("Alfa Iniciado") + print ("La URL para acceder es http://%s:%s" % (myip, http_port)) + print ("WebSocket Server iniciado en ws://%s:%s" % (myip, websocket_port)) + print ("--------------------------------------------------------------------") + print ("Runtime Path : " + config.get_runtime_path()) + print ("Data Path : " + config.get_data_path()) + print ("Download Path : " + config.get_setting("downloadpath")) + print ("DownloadList Path : " + config.get_setting("downloadlistpath")) + print ("Bookmark Path : " + config.get_setting("bookmarkpath")) + print ("Videolibrary Path : " + config.get_setting("videolibrarypath")) + print ("--------------------------------------------------------------------") + conexiones = [] + controllers = platformtools.controllers + for a in controllers: + try: + print platformtools.controllers[a].controller.client_ip + " - (" + platformtools.controllers[ + a].controller.name + ")" + except: + pass + + +def start(): + logger.info("server init...") + config.verify_directories_created() + try: + HTTPServer.start(MostrarInfo) + WebSocket.start(MostrarInfo) + + # Da por levantado el servicio + logger.info("--------------------------------------------------------------------") + logger.info("Alfa Iniciado") + logger.info("La URL para acceder es http://%s:%s" % (myip, http_port)) + logger.info("WebSocket Server iniciado en ws://%s:%s" % (myip, websocket_port)) + logger.info("--------------------------------------------------------------------") + logger.info("Runtime Path : " + config.get_runtime_path()) + logger.info("Data Path : " + config.get_data_path()) + logger.info("Download Path : " + config.get_setting("downloadpath")) + logger.info("DownloadList Path : " + config.get_setting("downloadlistpath")) + logger.info("Bookmark Path : " + config.get_setting("bookmarkpath")) + logger.info("VideoLibrary Path : " + config.get_setting("videolibrarypath")) + logger.info("--------------------------------------------------------------------") + MostrarInfo() + + start = True + while start: + time.sleep(1) + + except KeyboardInterrupt: + print 'Deteniendo el servidor HTTP...' + HTTPServer.stop() + print 'Deteniendo el servidor WebSocket...' + WebSocket.stop() + print 'Alfa Detenido' + start = False + + +# Inicia el programa +start() diff --git a/mediaserver/lib/WebSocketServer.py b/mediaserver/lib/WebSocketServer.py new file mode 100644 index 00000000..ff20570c --- /dev/null +++ b/mediaserver/lib/WebSocketServer.py @@ -0,0 +1,648 @@ +''' +The MIT License (MIT) + +Copyright (c) 2013 Dave P. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +''' + +import SocketServer +import hashlib +import base64 +import socket +import struct +import ssl +import time +import sys +import errno +import logging +from BaseHTTPServer import BaseHTTPRequestHandler +from StringIO import StringIO +from select import select + + +class HTTPRequest(BaseHTTPRequestHandler): + def __init__(self, request_text): + self.rfile = StringIO(request_text) + self.raw_requestline = self.rfile.readline() + self.error_code = self.error_message = None + self.parse_request() + + +class WebSocket(object): + + handshakeStr = ( + "HTTP/1.1 101 Switching Protocols\r\n" + "Upgrade: WebSocket\r\n" + "Connection: Upgrade\r\n" + "Sec-WebSocket-Accept: %(acceptstr)s\r\n\r\n" + ) + + hixiehandshakedStr = ( + "HTTP/1.1 101 WebSocket Protocol Handshake\r\n" + "Upgrade: WebSocket\r\n" + "Connection: Upgrade\r\n" + "Sec-WebSocket-Origin: %(origin)s\r\n" + "Sec-WebSocket-Location: %(type)s://%(host)s%(location)s\r\n\r\n" + ) + + hixie75handshakedStr = ( + "HTTP/1.1 101 Web Socket Protocol Handshake\r\n" + "Upgrade: WebSocket\r\n" + "Connection: Upgrade\r\n" + "WebSocket-Origin: %(origin)s\r\n" + "WebSocket-Location: %(type)s://%(host)s%(location)s\r\n\r\n" + ) + GUIDStr = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' + + STREAM = 0x0 + TEXT = 0x1 + BINARY = 0x2 + CLOSE = 0x8 + PING = 0x9 + PONG = 0xA + + HEADERB1 = 1 + HEADERB2 = 3 + LENGTHSHORT = 4 + LENGTHLONG = 5 + MASK = 6 + PAYLOAD = 7 + + def __init__(self, server, sock, address): + self.server = server + self.client = sock + self.address = address + + self.handshaked = False + self.headerbuffer = '' + self.readdraftkey = False + self.draftkey = '' + self.headertoread = 2048 + self.hixie76 = False + + self.fin = 0 + self.data = None + self.opcode = 0 + self.hasmask = 0 + self.maskarray = None + self.length = 0 + self.lengtharray = None + self.index = 0 + self.request = None + self.usingssl = False + + self.state = self.HEADERB1 + + # restrict the size of header and payload for security reasons + self.maxheader = 65536 + self.maxpayload = 4194304 + + def close(self): + self.client.close() + self.state = self.HEADERB1 + self.hasmask = False + self.handshaked = False + self.readdraftkey = False + self.hixie76 = False + self.headertoread = 2048 + self.headerbuffer = '' + self.data = '' + + + def handleMessage(self): + pass + + def handleConnected(self): + pass + + def handleClose(self): + pass + + def handlePacket(self): + # close + if self.opcode == self.CLOSE: + self.sendClose() + raise Exception("received client close") + # ping + elif self.opcode == self.PING: + pass + + # pong + elif self.opcode == self.PONG: + pass + + # data + elif self.opcode == self.STREAM or self.opcode == self.TEXT or self.opcode == self.BINARY: + self.handleMessage() + + + def handleData(self): + + # do the HTTP header and handshake + if self.handshaked is False: + + data = self.client.recv(self.headertoread) + + if data: + # accumulate + self.headerbuffer += data + + if len(self.headerbuffer) >= self.maxheader: + raise Exception('header exceeded allowable size') + + # we need to read the entire 8 bytes of after the HTTP header, ensure we do + if self.readdraftkey is True: + self.draftkey += self.headerbuffer + read = self.headertoread - len(self.headerbuffer) + + if read != 0: + self.headertoread = read + else: + # complete hixie76 handshake + self.handshake_hixie76() + + # indicates end of HTTP header + elif '\r\n\r\n' in self.headerbuffer: + self.request = HTTPRequest(self.headerbuffer) + # hixie handshake + if self.request.headers.has_key('Sec-WebSocket-Key1'.lower()) and self.request.headers.has_key('Sec-WebSocket-Key2'.lower()): + # check if we have the key in our buffer + index = self.headerbuffer.find('\r\n\r\n') + 4 + # determine how much of the 8 byte key we have + read = len(self.headerbuffer) - index + # do we have all the 8 bytes we need? + if read < 8: + self.headertoread = 8 - read + self.readdraftkey = True + if read > 0: + self.draftkey += self.headerbuffer[index:index+read] + + else: + # get the key + self.draftkey += self.headerbuffer[index:index+8] + # complete hixie handshake + self.handshake_hixie76() + + # handshake rfc 6455 + elif self.request.headers.has_key('Sec-WebSocket-Key'.lower()): + key = self.request.headers['Sec-WebSocket-Key'.lower()] + hStr = self.handshakeStr % { 'acceptstr' : base64.b64encode(hashlib.sha1(key + self.GUIDStr).digest()) } + self.sendBuffer(hStr) + self.handshaked = True + self.headerbuffer = '' + + try: + self.handleConnected() + except: + pass + # hixie 75 + else: + self.handshake_hixie75() + #raise Exception('Sec-WebSocket-Key does not exist') + + # remote connection has been closed + else: + raise Exception("remote socket closed") + + # else do normal data + else: + data = self.client.recv(2048) + if data: + for val in data: + if self.hixie76 is False: + self.parseMessage(ord(val)) + else: + self.parseMessage_hixie76(ord(val)) + else: + raise Exception("remote socket closed") + + + def handshake_hixie75(self): + typestr = 'ws' + if self.usingssl is True: + typestr = 'wss' + + response = self.hixie75handshakedStr % { 'type' : typestr, 'origin' : self.request.headers['Origin'.lower()], 'host' : self.request.headers['Host'.lower()], 'location' : self.request.path } + + self.sendBuffer(response) + + + self.handshaked = True + self.headerbuffer = '' + self.hixie76 = True + + try: + self.handleConnected() + except: + pass + + def handshake_hixie76(self): + + k1 = self.request.headers['Sec-WebSocket-Key1'.lower()] + k2 = self.request.headers['Sec-WebSocket-Key2'.lower()] + + spaces1 = k1.count(" ") + spaces2 = k2.count(" ") + num1 = int("".join([c for c in k1 if c.isdigit()])) / spaces1 + num2 = int("".join([c for c in k2 if c.isdigit()])) / spaces2 + + key = '' + key += struct.pack('>I', num1) + key += struct.pack('>I', num2) + key += self.draftkey + + typestr = 'ws' + if self.usingssl is True: + typestr = 'wss' + + response = self.hixiehandshakedStr % { 'type' : typestr, 'origin' : self.request.headers['Origin'.lower()], 'host' : self.request.headers['Host'.lower()], 'location' : self.request.path } + + self.sendBuffer(response) + self.sendBuffer(hashlib.md5(key).digest()) + + self.handshaked = True + self.hixie76 = True + self.headerbuffer = '' + + try: + self.handleConnected() + except: + pass + + + def sendClose(self): + + msg = bytearray() + if self.hixie76 is False: + msg.append(0x88) + msg.append(0x00) + self.sendBuffer(msg) + else: + pass + + def sendBuffer(self, buff): + size = len(buff) + tosend = size + index = 0 + + while tosend > 0: + try: + # i should be able to send a bytearray + sent = self.client.send(str(buff[index:size])) + if sent == 0: + raise RuntimeError("socket connection broken") + + index += sent + tosend -= sent + + except socket.error as e: + # if we have full buffers then wait for them to drain and try again + if e.errno == errno.EAGAIN: + time.sleep(0.001) + else: + raise e + + + #if s is a string then websocket TEXT is sent else BINARY + def sendMessage(self, s): + + if self.hixie76 is False: + + header = bytearray() + isString = isinstance(s, str) + + if isString is True: + header.append(0x81) + else: + header.append(0x82) + + b2 = 0 + length = len(s) + + if length <= 125: + b2 |= length + header.append(b2) + + elif length >= 126 and length <= 65535: + b2 |= 126 + header.append(b2) + header.extend(struct.pack("!H", length)) + + else: + b2 |= 127 + header.append(b2) + header.extend(struct.pack("!Q", length)) + + if length > 0: + self.sendBuffer(header + s) + else: + self.sendBuffer(header) + header = None + + else: + msg = bytearray() + msg.append(0) + if len(s) > 0: + msg.extend(str(s).encode("UTF8")) + msg.append(0xFF) + + self.sendBuffer(msg) + msg = None + + + def parseMessage_hixie76(self, byte): + + if self.state == self.HEADERB1: + if byte == 0: + self.state = self.PAYLOAD + self.data = bytearray() + + elif self.state == self.PAYLOAD: + if byte == 0xFF: + self.opcode = 1 + self.length = len(self.data) + try: + self.handlePacket() + finally: + self.data = None + self.state = self.HEADERB1 + else : + self.data.append(byte) + # if length exceeds allowable size then we except and remove the connection + if len(self.data) >= self.maxpayload: + raise Exception('payload exceeded allowable size') + + + def parseMessage(self, byte): + # read in the header + if self.state == self.HEADERB1: + # fin + self.fin = (byte & 0x80) + # get opcode + self.opcode = (byte & 0x0F) + + self.state = self.HEADERB2 + + elif self.state == self.HEADERB2: + mask = byte & 0x80 + length = byte & 0x7F + + if mask == 128: + self.hasmask = True + else: + self.hasmask = False + + if length <= 125: + self.length = length + + # if we have a mask we must read it + if self.hasmask is True: + self.maskarray = bytearray() + self.state = self.MASK + else: + # if there is no mask and no payload we are done + if self.length <= 0: + try: + self.handlePacket() + finally: + self.state = self.HEADERB1 + self.data = None + + # we have no mask and some payload + else: + self.index = 0 + self.data = bytearray() + self.state = self.PAYLOAD + + elif length == 126: + self.lengtharray = bytearray() + self.state = self.LENGTHSHORT + + elif length == 127: + self.lengtharray = bytearray() + self.state = self.LENGTHLONG + + + elif self.state == self.LENGTHSHORT: + self.lengtharray.append(byte) + + if len(self.lengtharray) > 2: + raise Exception('short length exceeded allowable size') + + if len(self.lengtharray) == 2: + self.length = struct.unpack_from('!H', str(self.lengtharray))[0] + + if self.hasmask is True: + self.maskarray = bytearray() + self.state = self.MASK + else: + # if there is no mask and no payload we are done + if self.length <= 0: + try: + self.handlePacket() + finally: + self.state = self.HEADERB1 + self.data = None + + # we have no mask and some payload + else: + self.index = 0 + self.data = bytearray() + self.state = self.PAYLOAD + + elif self.state == self.LENGTHLONG: + + self.lengtharray.append(byte) + + if len(self.lengtharray) > 8: + raise Exception('long length exceeded allowable size') + + if len(self.lengtharray) == 8: + self.length = struct.unpack_from('!Q', str(self.lengtharray))[0] + + if self.hasmask is True: + self.maskarray = bytearray() + self.state = self.MASK + else: + # if there is no mask and no payload we are done + if self.length <= 0: + try: + self.handlePacket() + finally: + self.state = self.HEADERB1 + self.data = None + + # we have no mask and some payload + else: + self.index = 0 + self.data = bytearray() + self.state = self.PAYLOAD + + # MASK STATE + elif self.state == self.MASK: + self.maskarray.append(byte) + + if len(self.maskarray) > 4: + raise Exception('mask exceeded allowable size') + + if len(self.maskarray) == 4: + # if there is no mask and no payload we are done + if self.length <= 0: + try: + self.handlePacket() + finally: + self.state = self.HEADERB1 + self.data = None + + # we have no mask and some payload + else: + self.index = 0 + self.data = bytearray() + self.state = self.PAYLOAD + + # PAYLOAD STATE + elif self.state == self.PAYLOAD: + if self.hasmask is True: + self.data.append( byte ^ self.maskarray[self.index % 4] ) + else: + self.data.append( byte ) + + # if length exceeds allowable size then we except and remove the connection + if len(self.data) >= self.maxpayload: + raise Exception('payload exceeded allowable size') + + # check if we have processed length bytes; if so we are done + if (self.index+1) == self.length: + try: + self.handlePacket() + finally: + self.state = self.HEADERB1 + self.data = None + else: + self.index += 1 + + +class SimpleWebSocketServer(object): + def __init__(self, host, port, websocketclass): + self.websocketclass = websocketclass + self.serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + self.serversocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + self.serversocket.bind((host, port)) + self.serversocket.listen(5) + self.connections = {} + self.listeners = [self.serversocket] + + + def decorateSocket(self, sock): + return sock + + def constructWebSocket(self, sock, address): + return self.websocketclass(self, sock, address) + + def close(self): + self.serversocket.close() + + for conn in self.connections.itervalues(): + try: + conn.handleClose() + except: + pass + + conn.close() + + + def serveforever(self): + while True: + try: + rList, wList, xList = select(self.listeners, [], self.listeners, 1) + + for ready in rList: + if ready == self.serversocket: + try: + sock, address = self.serversocket.accept() + newsock = self.decorateSocket(sock) + newsock.setblocking(0) + fileno = newsock.fileno() + self.listeners.append(fileno) + self.connections[fileno] = self.constructWebSocket(newsock, address) + + except Exception as n: + + #logging.debug(str(address) + ' ' + str(n)) + + if sock is not None: + sock.close() + else: + client = self.connections[ready] + + try: + client.handleData() + + except Exception as n: + + #logging.debug(str(client.address) + ' ' + str(n)) + + try: + client.handleClose() + except: + pass + + client.close() + + del self.connections[ready] + self.listeners.remove(ready) + + for failed in xList: + if failed == self.serversocket: + self.close() + raise Exception("server socket failed") + else: + client = self.connections[failed] + + try: + client.handleClose() + except: + pass + + client.close() + + del self.connections[failed] + self.listeners.remove(failed) + except: + break + +class SimpleSSLWebSocketServer(SimpleWebSocketServer): + + def __init__(self, host, port, websocketclass, certfile, keyfile, version = ssl.PROTOCOL_TLSv1): + + SimpleWebSocketServer.__init__(self, host, port, websocketclass) + + self.cerfile = certfile + self.keyfile = keyfile + self.version = version + + def close(self): + super(SimpleSSLWebSocketServer, self).close() + + def decorateSocket(self, sock): + sslsock = ssl.wrap_socket(sock, + server_side=True, + certfile=self.cerfile, + keyfile=self.keyfile, + ssl_version=self.version) + return sslsock + + def constructWebSocket(self, sock, address): + ws = self.websocketclass(self, sock, address) + ws.usingssl = True + return ws + + def serveforever(self): + super(SimpleSSLWebSocketServer, self).serveforever() + + diff --git a/mediaserver/platformcode/__init__.py b/mediaserver/platformcode/__init__.py new file mode 100644 index 00000000..32a587e7 --- /dev/null +++ b/mediaserver/platformcode/__init__.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +import os +import sys + +# Appends the main plugin dir to the PYTHONPATH if an internal package cannot be imported. +# Examples: In Plex Media Server all modules are under "Code.*" package, and in Enigma2 under "Plugins.Extensions.*" +try: + # from core import logger + import core +except: + sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))) diff --git a/mediaserver/platformcode/config.py b/mediaserver/platformcode/config.py new file mode 100644 index 00000000..50602a55 --- /dev/null +++ b/mediaserver/platformcode/config.py @@ -0,0 +1,393 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------ +# Parámetros de configuración (mediaserver) +# ------------------------------------------------------------ + +import os +import re +import threading + +PLATFORM_NAME = "mediaserver" +PLUGIN_NAME = "alfa" + +settings_dic = {} +settings_types = {} +adult_setting = {} + + +def get_platform(full_version=False): + # full_version solo es util en xbmc/kodi + ret = { + 'num_version': 1.0, + 'name_version': PLATFORM_NAME, + 'video_db': "", + 'plaform': PLATFORM_NAME + } + + if full_version: + return ret + else: + return PLATFORM_NAME + + +def is_xbmc(): + return False + + +def get_videolibrary_support(): + return True + + +def get_system_platform(): + """ fonction: pour recuperer la platform que xbmc tourne """ + platform = "unknown" + if sys.platform == "linux" or sys.platform == "linux2": + platform = "linux" + elif sys.platform == "darwin": + platform = "osx" + elif sys.platform == "win32": + platform = "windows" + + return platform + + +def open_settings(): + Opciones = [] + from xml.dom import minidom + settings = open(menufilepath, 'rb').read() + xmldoc = minidom.parseString(settings) + for category in xmldoc.getElementsByTagName("category"): + for setting in category.getElementsByTagName("setting"): + Opciones.append(dict(setting.attributes.items() + [(u"category", category.getAttribute("label")), + (u"value", get_setting(setting.getAttribute("id")))])) + + from platformcode import platformtools + global adult_setting + adult_password = get_setting('adult_password') + if not adult_password: + adult_password = set_setting('adult_password', '0000') + adult_mode = get_setting('adult_mode') + adult_request_password = get_setting('adult_request_password') + + platformtools.open_settings(Opciones) + + # Hemos accedido a la seccion de Canales para adultos + if get_setting('adult_aux_intro_password'): + # La contraseña de acceso es correcta + if get_setting('adult_aux_intro_password') == adult_password: + + # Cambio de contraseña + if get_setting('adult_aux_new_password1'): + if get_setting('adult_aux_new_password1') == get_setting('adult_aux_new_password2'): + set_setting('adult_password', get_setting('adult_aux_new_password1')) + else: + platformtools.dialog_ok("Canales para adultos", + "Los campos 'Nueva contraseña' y 'Confirmar nueva contraseña' no coinciden.", + "Entre de nuevo en 'Preferencias' para cambiar la contraseña") + + # Fijar adult_pin + adult_pin = "" + if get_setting("adult_request_password") == True: + adult_pin = get_setting("adult_password") + set_setting("adult_pin", adult_pin) + + # Solo esta sesion: + id = threading.current_thread().name + if get_setting("adult_mode") == 2: + adult_setting[id] = True + set_setting("adult_mode", "0") + else: + adult_setting = {} + + else: + platformtools.dialog_ok("Canales para adultos", "La contraseña no es correcta.", + "Los cambios realizados en esta sección no se guardaran.") + # Deshacer cambios + set_setting("adult_mode", adult_mode) + set_setting("adult_request_password", adult_request_password) + + # Borramos settings auxiliares + set_setting('adult_aux_intro_password', '') + set_setting('adult_aux_new_password1', '') + set_setting('adult_aux_new_password2', '') + + +def get_setting(name, channel="", server=""): + """ + Retorna el valor de configuracion del parametro solicitado. + + Devuelve el valor del parametro 'name' en la configuracion global o en la configuracion propia del canal 'channel'. + + Si se especifica el nombre del canal busca en la ruta \addon_data\plugin.video.alfa\settings_channels el + archivo channel_data.json y lee el valor del parametro 'name'. Si el archivo channel_data.json no existe busca en la + carpeta channels el archivo channel.xml y crea un archivo channel_data.json antes de retornar el valor solicitado. + Si el parametro 'name' no existe en channel_data.json lo busca en la configuracion global y si ahi tampoco existe + devuelve un str vacio. + + Parametros: + name -- nombre del parametro + channel [opcional] -- nombre del canal + + Retorna: + value -- El valor del parametro 'name' + + """ + + # Specific channel setting + if channel: + + # logger.info("config.get_setting reading channel setting '"+name+"' from channel json") + from core import channeltools + value = channeltools.get_channel_setting(name, channel) + # logger.info("config.get_setting -> '"+repr(value)+"'") + + return value + + elif server: + # logger.info("config.get_setting reading server setting '"+name+"' from server json") + from core import servertools + value = servertools.get_server_setting(name, server) + # logger.info("config.get_setting -> '"+repr(value)+"'") + + return value + + # Global setting + else: + # logger.info("config.get_setting reading main setting '"+name+"'") + global settings_dic + value = settings_dic.get(name, "") + + if name == "adult_mode": + global adult_setting + id = threading.current_thread().name + if adult_setting.get(id) == True: + value = "2" + + # hack para devolver el tipo correspondiente + global settings_types + + if settings_types.get(name) in ['enum', 'number']: + value = int(value) + + elif settings_types.get(name) == 'bool': + value = value == 'true' + + elif not settings_types.has_key(name): + try: + t = eval(value) + value = t[0](t[1]) + except: + value = None + + return value + + +def set_setting(name, value, channel="", server=""): + """ + Fija el valor de configuracion del parametro indicado. + + Establece 'value' como el valor del parametro 'name' en la configuracion global o en la configuracion propia del + canal 'channel'. + Devuelve el valor cambiado o None si la asignacion no se ha podido completar. + + Si se especifica el nombre del canal busca en la ruta \addon_data\plugin.video.alfa\settings_channels el + archivo channel_data.json y establece el parametro 'name' al valor indicado por 'value'. Si el archivo + channel_data.json no existe busca en la carpeta channels el archivo channel.xml y crea un archivo channel_data.json + antes de modificar el parametro 'name'. + Si el parametro 'name' no existe lo añade, con su valor, al archivo correspondiente. + + + Parametros: + name -- nombre del parametro + value -- valor del parametro + channel [opcional] -- nombre del canal + + Retorna: + 'value' en caso de que se haya podido fijar el valor y None en caso contrario + + """ + if channel: + from core import channeltools + return channeltools.set_channel_setting(name, value, channel) + elif server: + from core import servertools + return servertools.set_server_setting(name, value, server) + else: + global settings_dic + global settings_types + + if settings_types.get(name) == 'bool': + if value: + new_value = "true" + else: + new_value = "false" + + elif settings_types.get(name): + new_value = str(value) + + else: + if isinstance(value, basestring): + new_value = "(%s, %s)" % (type(value).__name__, repr(value)) + else: + new_value = "(%s, %s)" % (type(value).__name__, value) + + settings_dic[name] = new_value + + from xml.dom import minidom + # Crea un Nuevo XML vacio + new_settings = minidom.getDOMImplementation().createDocument(None, "settings", None) + new_settings_root = new_settings.documentElement + + for key in settings_dic: + nodo = new_settings.createElement("setting") + nodo.setAttribute("value", settings_dic[key]) + nodo.setAttribute("id", key) + new_settings_root.appendChild(nodo) + + fichero = open(configfilepath, "w") + fichero.write(new_settings.toprettyxml(encoding='utf-8')) + fichero.close() + return value + + +def get_localized_string(code): + translationsfile = open(TRANSLATION_FILE_PATH, "r") + translations = translationsfile.read() + translationsfile.close() + cadenas = re.findall('([^<]+)<' % code, translations) + if len(cadenas) > 0: + dev = cadenas[0] + else: + dev = "%d" % code + + try: + dev = dev.encode("utf-8") + except: + pass + + return dev + + +def get_videolibrary_path(): + value = get_setting("videolibrarypath") + if value == "": + verify_directories_created() + value = get_setting("videolibrarypath") + + return value + + +def get_temp_file(filename): + import tempfile + return os.path.join(tempfile.gettempdir(), filename) + + +def get_runtime_path(): + return os.getcwd() + + +def get_data_path(): + dev = os.path.join(os.path.expanduser("~"), ".alfa") + + # Crea el directorio si no existe + if not os.path.exists(dev): + os.makedirs(dev) + + return dev + + +def get_cookie_data(): + import os + ficherocookies = os.path.join(get_data_path(), 'cookies.dat') + + cookiedatafile = open(ficherocookies, 'r') + cookiedata = cookiedatafile.read() + cookiedatafile.close() + + return cookiedata + + +# Test if all the required directories are created +def verify_directories_created(): + from platformcode import logger + from core import filetools + + config_paths = [["videolibrarypath", "library"], + ["downloadpath", "downloads"], + ["downloadlistpath", "downloads/list"], + ["bookmarkpath", "favorites"], + ["settings_path", "settings_channels"]] + + for path, default in config_paths: + saved_path = get_setting(path) + if not saved_path: + saved_path = filetools.join(get_data_path(), *default.split("/")) + set_setting(path, saved_path) + + if not filetools.exists(saved_path): + logger.debug("Creating %s: %s" % (path, saved_path)) + filetools.mkdir(saved_path) + + +def get_local_ip(): + import socket + s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) + s.connect(('8.8.8.8', 53)) # connecting to a UDP address doesn't send packets + myip = s.getsockname()[0] + return myip + + +def load_settings(): + global settings_dic + global settings_types + defaults = {} + from xml.etree import ElementTree + + encontrado = False + # Lee el archivo XML (si existe) + if os.path.exists(configfilepath): + settings = open(configfilepath, 'rb').read() + root = ElementTree.fromstring(settings) + for target in root.findall("setting"): + settings_dic[target.get("id")] = target.get("value") + + defaultsettings = open(menufilepath, 'rb').read() + root = ElementTree.fromstring(defaultsettings) + for category in root.findall("category"): + for target in category.findall("setting"): + if target.get("id"): + defaults[target.get("id")] = target.get("default") + settings_types[target.get("id")] = target.get("type") + + for key in defaults: + if not key in settings_dic: + settings_dic[key] = defaults[key] + set_settings(settings_dic) + + +def set_settings(JsonRespuesta): + for Ajuste in JsonRespuesta: + settings_dic[Ajuste] = JsonRespuesta[Ajuste].encode("utf8") + from xml.dom import minidom + # Crea un Nuevo XML vacio + new_settings = minidom.getDOMImplementation().createDocument(None, "settings", None) + new_settings_root = new_settings.documentElement + + for key in settings_dic: + nodo = new_settings.createElement("setting") + nodo.setAttribute("value", settings_dic[key]) + nodo.setAttribute("id", key) + new_settings_root.appendChild(nodo) + + fichero = open(configfilepath, "w") + fichero.write(new_settings.toprettyxml(encoding='utf-8')) + fichero.close() + + +# Fichero de configuración +menufilepath = os.path.join(get_runtime_path(), "resources", "settings.xml") +configfilepath = os.path.join(get_data_path(), "settings.xml") +if not os.path.exists(get_data_path()): os.mkdir(get_data_path()) +# Literales +TRANSLATION_FILE_PATH = os.path.join(get_runtime_path(), "resources", "language", "Spanish", "strings.xml") +load_settings() diff --git a/mediaserver/platformcode/controllers/__init__.py b/mediaserver/platformcode/controllers/__init__.py new file mode 100644 index 00000000..bc031b42 --- /dev/null +++ b/mediaserver/platformcode/controllers/__init__.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------ +# Módulo para acciones en el cliente HTML +# ------------------------------------------------------------ + +import os +from inspect import isclass + +from controller import Controller +from platformcode import logger + + +def load_controllers(): + controllers = [] + path = os.path.split(__file__)[0] + for fname in os.listdir(path): + mod, ext = os.path.splitext(fname) + fname = os.path.join(path, fname) + if os.path.isfile(fname) and ext == '.py' and not mod.startswith('_'): + try: + exec "import " + mod + " as controller" + except: + import traceback + logger.error(traceback.format_exc()) + + for c in dir(controller): + cls = getattr(controller, c) + + if not c.startswith('_') and isclass(cls) and issubclass(cls, Controller) and Controller != cls: + controllers.append(cls) + return controllers + + +controllers = load_controllers() + + +def find_controller(url): + result = [] + for c in controllers: + if c().match(url): + return c diff --git a/mediaserver/platformcode/controllers/controller.py b/mediaserver/platformcode/controllers/controller.py new file mode 100644 index 00000000..99dc910c --- /dev/null +++ b/mediaserver/platformcode/controllers/controller.py @@ -0,0 +1,129 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------ +# Mediaserver Base controller +# ------------------------------------------------------------ + +import threading + +from platformcode import config, platformtools + + +class Controller(object): + pattern = "" + name = None + + def __init__(self, handler=None, ID=None): + + self.handler = handler + self.id = ID + + if not self.id: + self.id = threading.current_thread().name + + if self.handler: + self.platformtools = Platformtools() + self.host = "http://%s:%s" % (config.get_local_ip(), config.get_setting("server.port")) + + def __setattr__(self, name, value): + super(Controller, self).__setattr__(name, value) + + if name == "platformtools": + platformtools.controllers[self.id] = self.platformtools + + def __del__(self): + from platformcode import platformtools + if self.id in platformtools.controllers: + del platformtools.controllers[self.id] + + def run(self, path): + pass + + def match(self, path): + if self.pattern.findall(path): + return True + else: + return False + + +class Platformtools(object): + def dialog_ok(self, heading, line1, line2="", line3=""): + pass + + def dialog_notification(self, heading, message, icon=0, time=5000, sound=True): + pass + + def dialog_yesno(self, heading, line1, line2="", line3="", nolabel="No", yeslabel="Si", autoclose=""): + return True + + def dialog_select(self, heading, list): + pass + + def dialog_progress(self, heading, line1, line2="", line3=""): + class Dialog(object): + def __init__(self, heading, line1, line2, line3, PObject): + self.PObject = PObject + self.closed = False + self.heading = heading + text = line1 + if line2: text += "\n" + line2 + if line3: text += "\n" + line3 + + def iscanceled(self): + return self.closed + + def update(self, percent, line1, line2="", line3=""): + pass + + def close(self): + self.closed = True + + return Dialog(heading, line1, line2, line3, None) + + def dialog_progress_bg(self, heading, message=""): + class Dialog(object): + def __init__(self, heading, message, PObject): + self.PObject = PObject + self.closed = False + self.heading = heading + + def isFinished(self): + return not self.closed + + def update(self, percent=0, heading="", message=""): + pass + + def close(self): + self.closed = True + + return Dialog(heading, message, None) + + def dialog_input(self, default="", heading="", hidden=False): + return default + + def dialog_numeric(self, type, heading, default=""): + return None + + def itemlist_refresh(self): + pass + + def itemlist_update(self, item): + pass + + def render_items(self, itemlist, parentitem): + pass + + def is_playing(self): + return False + + def play_video(self, item): + pass + + def show_channel_settings(self, list_controls=None, dict_values=None, caption="", callback=None, item=None, + custom_button=None, channelpath=None): + pass + + def show_video_info(self, data, caption="Información del vídeo", callback=None, item=None): + pass + + def show_recaptcha(self, key, url): + pass diff --git a/mediaserver/platformcode/controllers/fileserver.py b/mediaserver/platformcode/controllers/fileserver.py new file mode 100644 index 00000000..11ac6df1 --- /dev/null +++ b/mediaserver/platformcode/controllers/fileserver.py @@ -0,0 +1,104 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------ +# Controlador para acceso a archivos locales +# ------------------------------------------------------------ +import os +import re +import time + +from controller import Controller +from platformcode import config, logger + + +class fileserver(Controller): + pattern = re.compile("^/(?:media/.*?)?(?:local/.*?)?$") + + def run(self, path): + if path == "/": + f = open(os.path.join(config.get_runtime_path(), "platformcode", "template", "page.html"), "rb") + self.handler.send_response(200) + self.handler.send_header('Content-type', 'text/html') + self.handler.end_headers() + respuesta = f.read() + respuesta = respuesta.replace("{$WSPORT}", str(config.get_setting("websocket.port"))) + self.handler.wfile.write(respuesta) + f.close() + + elif path.startswith("/local/"): + import base64 + import urllib + Path = path.replace("/local/", "").split("/")[0] + Path = base64.b64decode(urllib.unquote_plus(Path)) + Size = int(os.path.getsize(Path.decode("utf8"))) + f = open(Path.decode("utf8"), "rb") + if not self.handler.headers.get("range") == None: + if "=" in str(self.handler.headers.get("range")) and "-" in str(self.handler.headers.get("range")): + Inicio = int(self.handler.headers.get("range").split("=")[1].split("-")[0]) + if self.handler.headers.get("range").split("=")[1].split("-")[1] <> "": + Fin = int(self.handler.headers.get("range").split("=")[1].split("-")[1]) + else: + Fin = Size - 1 + + else: + Inicio = 0 + Fin = Size - 1 + + if not Fin > Inicio: Fin = Size - 1 + + if self.handler.headers.get("range") == None: + logger.info("-------------------------------------------------------") + logger.info("Solicitando archivo local: " + Path) + logger.info("-------------------------------------------------------") + + self.handler.send_response(200) + self.handler.send_header("Content-Disposition", "attachment; filename=video.mp4") + self.handler.send_header('Accept-Ranges', 'bytes') + self.handler.send_header('Content-Length', str(Size)) + self.handler.send_header("Connection", "close") + self.handler.end_headers() + while True: + time.sleep(0.2) + buffer = f.read(1024 * 250) + if not buffer: + break + self.handler.wfile.write(buffer) + self.handler.wfile.close() + f.close() + else: + logger.info("-------------------------------------------------------") + logger.info("Solicitando archivo local: " + Path) + logger.info("Rango: " + str(Inicio) + "-" + str(Fin) + "/" + str(Size)) + logger.info("-------------------------------------------------------") + f.seek(Inicio) + + self.handler.send_response(206) + self.handler.send_header("Content-Disposition", "attachment; filename=video.mp4") + self.handler.send_header('Accept-Ranges', 'bytes') + self.handler.send_header('Content-Length', str(Fin - Inicio)) + self.handler.send_header('Content-Range', str(Inicio) + "-" + str(Fin) + "/" + str(Size)) + self.handler.send_header("Connection", "close") + + self.handler.end_headers() + while True: + time.sleep(0.2) + buffer = f.read(1024 * 250) + if not buffer: + break + self.handler.wfile.write(buffer) + self.handler.wfile.close() + f.close() + elif path.startswith("/media/"): + file = os.path.join(config.get_runtime_path(), "platformcode", "template", path[7:]) + from mimetypes import MimeTypes + mime = MimeTypes() + mime_type = mime.guess_type(file) + try: + mim = mime_type[0] + except: + mim = "" + f = open(file, "rb") + self.handler.send_response(200) + self.handler.send_header('Content-type', mim) + self.handler.end_headers() + self.handler.wfile.write(f.read()) + f.close() diff --git a/mediaserver/platformcode/controllers/html.py b/mediaserver/platformcode/controllers/html.py new file mode 100644 index 00000000..bff17a80 --- /dev/null +++ b/mediaserver/platformcode/controllers/html.py @@ -0,0 +1,788 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------ +# Controlador para HTML +# ------------------------------------------------------------ +import json +import os +import re +import threading +import time + +import channelselector +from controller import Controller +from controller import Platformtools +from platformcode import config +from core import versiontools +from core.item import Item +from core.tmdb import Tmdb +from platformcode import launcher, logger + + +class html(Controller): + pattern = re.compile("##") + name = "HTML" + + def __init__(self, handler=None, ID=None): + super(html, self).__init__(handler, ID) + self.platformtools = platform(self) + self.data = {} + if self.handler: + self.client_ip = handler.client.getpeername()[0] + self.send_message({"action": "connect", + "data": {"version": "Alfa %s" % versiontools.get_current_plugin_version_tag(), + "date": versiontools.get_current_plugin_date()}}) + t = threading.Thread(target=launcher.start, name=ID) + t.setDaemon(True) + t.start() + + def run(self, path): + if path: + item = Item().fromurl(path) + else: + item = Item(channel="channelselector", action="mainlist", viewmode="banner") + + launcher.run(item) + + def get_data(self, id): + while not "id" in self.data or not self.data["id"] == id: + time.sleep(0.1) + data = self.data["result"] + self.data = {} + return data + + def send_message(self, data): + import random + + ID = "%032x" % (random.getrandbits(128)) + data["id"] = ID + + self.handler.sendMessage(json.dumps(data)) + return ID + + +class platform(Platformtools): + def __init__(self, controller): + self.controller = controller + self.handler = controller.handler + self.get_data = controller.get_data + self.send_message = controller.send_message + + def render_items(self, itemlist, parent_item): + """ + Función encargada de mostrar el itemlist, se pasa como parametros el itemlist y el item del que procede + @type itemlist: list + @param itemlist: lista de elementos a mostrar + + @type parent_item: item + @param parent_item: elemento padre + """ + + # Si el itemlist no es un list salimos + if not type(itemlist) == list: + JsonData = {} + JsonData["action"] = "HideLoading" + JsonData["data"] = {} + self.send_message(JsonData) + return + + # Si no hay ningun item, mostramos un aviso + if not len(itemlist): + itemlist.append(Item(title="No hay elementos que mostrar")) + + if parent_item.channel == "channelselector" and not parent_item.action == "filterchannels": + parent_item.viewmode = "banner" + elif parent_item.channel == "channelselector" and parent_item.action == "filterchannels": + parent_item.viewmode = "channel" + if not parent_item.viewmode: + parent_item.viewmode = "list" + + # Item Atrás + if not (parent_item.channel == "channelselector" and parent_item.action == "mainlist") and not \ + itemlist[0].action == "go_back": + if parent_item.viewmode in ["banner", "channel"]: + itemlist.insert(0, Item(title="Atrás", action="go_back", + thumbnail=channelselector.get_thumb("back.png", "banner_"))) + else: + itemlist.insert(0, Item(title="Atrás", action="go_back", + thumbnail=channelselector.get_thumb("back.png"))) + + JsonData = {} + JsonData["action"] = "EndItems" + JsonData["data"] = {} + JsonData["data"]["itemlist"] = [] + JsonData["data"]["viewmode"] = parent_item.viewmode + JsonData["data"]["category"] = parent_item.category.capitalize() + JsonData["data"]["host"] = self.controller.host + + # Recorremos el itemlist + for item in itemlist: + + if not item.thumbnail and item.action == "search": item.thumbnail = channelselector.get_thumb("search.png") + if not item.thumbnail and item.folder == True: item.thumbnail = channelselector.get_thumb("folder.png", "banner") + if not item.thumbnail and item.folder == False: item.thumbnail = channelselector.get_thumb("nofolder.png") + if "http://media.xxxxx/" in item.thumbnail and not item.thumbnail.startswith( + "http://media.xxxxxxxx/thumb_"): + + if parent_item.viewmode in ["banner", "channel"]: + item.thumbnail = channelselector.get_thumbnail_path("banner") + os.path.basename(item.thumbnail) + else: + item.thumbnail = channelselector.get_thumbnail_path() + os.path.basename(item.thumbnail) + + # Estas imagenes no estan en banner, asi que si queremos banner, para que no se vean mal las quitamos + elif parent_item.viewmode in ["banner", "channel"] and item.thumbnail.startswith( + "http://media.xxxxx/thumb_"): + item.thumbnail = "" + + # Si el item no contiene categoria,le ponemos la del item padre + if item.category == "": + item.category = parent_item.category + + # Si el item no contiene fanart,le ponemos la del item padre + if item.fanart == "": + item.fanart = parent_item.fanart + + title = item.title.replace(item.title.lstrip(), "").replace(" ", " ") + item.title.lstrip() + + # Formatear titulo + if item.text_color: + title = '[COLOR %s]%s[/COLOR]' % (item.text_color, title) + if item.text_bold: + title = '[B]%s[/B]' % title + if item.text_italic: + title = '[I]%s[/I]' % title + + title = self.kodi_labels_to_html(title) + + # Añade headers a las imagenes si estan en un servidor con cloudflare + from core import httptools + item.thumbnail = httptools.get_url_headers(item.thumbnail) + item.fanart = httptools.get_url_headers(item.fanart) + + JsonItem = {} + JsonItem["title"] = title + JsonItem["thumbnail"] = item.thumbnail + JsonItem["fanart"] = item.fanart + JsonItem["plot"] = item.plot + JsonItem["action"] = item.action + JsonItem["url"] = item.tourl() + JsonItem["context"] = [] + if not item.action == "go_back": + for Comando in self.set_context_commands(item, parent_item): + JsonItem["context"].append({"title": Comando[0], "url": Comando[1]}) + + JsonData["data"]["itemlist"].append(JsonItem) + + ID = self.send_message(JsonData) + self.get_data(ID) + + def set_context_commands(self, item, parent_item): + """ + Función para generar los menus contextuales. + 1. Partiendo de los datos de item.context + a. Metodo antiguo item.context tipo str separando las opciones por "|" (ejemplo: item.context = "1|2|3") + (solo predefinidos) + b. Metodo list: item.context es un list con las diferentes opciones del menu: + - Predefinidos: Se cargara una opcion predefinida con un nombre. + item.context = ["1","2","3"] + + - dict(): Se cargara el item actual modificando los campos que se incluyan en el dict() en caso de + modificar los campos channel y action estos serán guardados en from_channel y from_action. + item.context = [{"title":"Nombre del menu", "action": "action del menu", "channel", + "channel del menu"}, {...}] + + 2. Añadiendo opciones segun criterios + Se pueden añadir opciones al menu contextual a items que cumplan ciertas condiciones + + 3. Añadiendo opciones a todos los items + Se pueden añadir opciones al menu contextual para todos los items + + @param item: elemento que contiene los menu contextuales + @type item: item + @param parent_item: + @type parent_item: item + """ + context_commands = [] + + # Creamos un list con las diferentes opciones incluidas en item.context + if type(item.context) == str: + context = item.context.split("|") + elif type(item.context) == list: + context = item.context + else: + context = [] + + # Opciones segun item.context + for command in context: + # Predefinidos + if type(command) == str: + if command == "buscar_trailer": + context_commands.append(("Buscar Trailer", + item.clone(channel="trailertools", action="buscartrailer", + contextual=True).tourl())) + + # Formato dict + if type(command) == dict: + # Los parametros del dict, se sobreescriben al nuevo context_item en caso de sobreescribir "action" y + # "channel", los datos originales se guardan en "from_action" y "from_channel" + if "action" in command: + command["from_action"] = item.action + if "channel" in command: + command["from_channel"] = item.channel + context_commands.append( + (command["title"], item.clone(**command).tourl())) + + # Opciones segun criterios + + # Ir al Menu Principal (channel.mainlist) + if parent_item.channel not in ["news", + "channelselector"] and item.action != "mainlist" and parent_item.action != "mainlist": + context_commands.append(("Ir al Menu Principal", Item(channel=item.channel, action="mainlist").tourl())) + + # Añadir a Favoritos + if item.channel not in ["favorites", "videolibrary", "help", "setting", + ""] and not parent_item.channel == "favorites": + context_commands.append((config.get_localized_string(30155), + item.clone(channel="favorites", action="addFavourite", from_channel=item.channel, + from_action=item.action).tourl())) + + # Añadimos opción contextual para Añadir la serie completa a la videoteca + if item.channel != "videolibrary" and item.action in ["episodios", "get_episodios"] \ + and (item.contentSerieName or item.show): + context_commands.append(("Añadir Serie a Videoteca", + item.clone(action="add_serie_to_library", from_action=item.action).tourl())) + + # Añadir Pelicula a videoteca + if item.channel != "videolibrary" and item.action in ["detail", "findvideos"] \ + and item.contentType == 'movie': + context_commands.append(("Añadir Pelicula a Videoteca", + item.clone(action="add_pelicula_to_library", from_action=item.action).tourl())) + + # Descargar pelicula + if item.contentType == "movie" and not item.channel == "downloads": + context_commands.append(("Descargar Pelicula", + item.clone(channel="downloads", action="save_download", from_channel=item.channel, + from_action=item.action).tourl())) + + # Descargar serie + if item.contentType == "tvshow" and not item.channel == "downloads": + context_commands.append(("Descargar Serie", + item.clone(channel="downloads", action="save_download", from_channel=item.channel, + from_action=item.action).tourl())) + + # Descargar episodio + if item.contentType == "episode" and not item.channel == "downloads": + context_commands.append(("Descargar Episodio", + item.clone(channel="downloads", action="save_download", from_channel=item.channel, + from_action=item.action).tourl())) + + # Descargar temporada + if item.contentType == "season" and not item.channel == "downloads": + context_commands.append(("Descargar Temporada", + item.clone(channel="downloads", action="save_download", from_channel=item.channel, + from_action=item.action).tourl())) + + # Abrir configuración + if parent_item.channel not in ["setting", "news", "search"]: + context_commands.append(("Abrir Configuración", Item(channel="setting", action="mainlist").tourl())) + + return sorted(context_commands, key=lambda comand: comand[0]) + + def dialog_ok(self, heading, line1, line2="", line3=""): + text = line1 + if line2: text += "\n" + line2 + if line3: text += "\n" + line3 + text = self.kodi_labels_to_html(text) + JsonData = {} + JsonData["action"] = "Alert" + JsonData["data"] = {} + JsonData["data"]["title"] = heading + JsonData["data"]["text"] = unicode(text, "utf8", "ignore").encode("utf8") + ID = self.send_message(JsonData) + self.get_data(ID) + + def dialog_notification(self, heading, message, icon=0, time=5000, sound=True): + JsonData = {} + JsonData["action"] = "notification" + JsonData["data"] = {} + JsonData["data"]["title"] = self.kodi_labels_to_html(heading) + JsonData["data"]["text"] = self.kodi_labels_to_html(message) + JsonData["data"]["icon"] = icon + JsonData["data"]["sound"] = sound + JsonData["data"]["time"] = time + self.send_message(JsonData) + return + + def dialog_yesno(self, heading, line1, line2="", line3="", nolabel="No", yeslabel="Si", autoclose=""): + text = line1 + if line2: text += "\n" + line2 + if line3: text += "\n" + line3 + text = self.kodi_labels_to_html(text) + heading = self.kodi_labels_to_html(heading) + JsonData = {} + JsonData["action"] = "AlertYesNo" + JsonData["data"] = {} + JsonData["data"]["title"] = heading + JsonData["data"]["text"] = text + ID = self.send_message(JsonData) + response = self.get_data(ID) + return response + + def dialog_select(self, heading, list): + JsonData = {} + heading = self.kodi_labels_to_html(heading) + JsonData["action"] = "List" + JsonData["data"] = {} + JsonData["data"]["title"] = heading + JsonData["data"]["list"] = [] + for Elemento in list: + JsonData["data"]["list"].append(self.kodi_labels_to_html(Elemento)) + ID = self.send_message(JsonData) + response = self.get_data(ID) + + return response + + def dialog_progress(self, heading, line1, line2="", line3=""): + class Dialog(object): + def __init__(self, heading, line1, line2, line3, platformtools): + self.platformtools = platformtools + self.closed = False + self.heading = self.platformtools.kodi_labels_to_html(heading) + text = line1 + if line2: text += "\n" + line2 + if line3: text += "\n" + line3 + text = self.platformtools.kodi_labels_to_html(text) + JsonData = {} + JsonData["action"] = "Progress" + JsonData["data"] = {} + JsonData["data"]["title"] = heading + JsonData["data"]["text"] = text + JsonData["data"]["percent"] = 0 + + ID = self.platformtools.send_message(JsonData) + self.platformtools.get_data(ID) + + def iscanceled(self): + JsonData = {} + JsonData["action"] = "ProgressIsCanceled" + JsonData["data"] = {} + ID = self.platformtools.send_message(JsonData) + response = self.platformtools.get_data(ID) + + return response + + def update(self, percent, line1, line2="", line3=""): + text = line1 + if line2: text += "\n" + line2 + if line3: text += "\n" + line3 + text = self.platformtools.kodi_labels_to_html(text) + JsonData = {} + JsonData["action"] = "ProgressUpdate" + JsonData["data"] = {} + JsonData["data"]["title"] = self.heading + JsonData["data"]["text"] = text + JsonData["data"]["percent"] = percent + self.platformtools.send_message(JsonData) + + def close(self): + JsonData = {} + JsonData["action"] = "ProgressClose" + JsonData["data"] = {} + ID = self.platformtools.send_message(JsonData) + self.platformtools.get_data(ID) + self.closed = True + + return Dialog(heading, line1, line2, line3, self) + + def dialog_progress_bg(self, heading, message=""): + class Dialog(object): + def __init__(self, heading, message, platformtools): + self.platformtools = platformtools + self.closed = False + self.heading = self.platformtools.kodi_labels_to_html(heading) + message = self.platformtools.kodi_labels_to_html(message) + JsonData = {} + JsonData["action"] = "ProgressBG" + JsonData["data"] = {} + JsonData["data"]["title"] = heading + JsonData["data"]["text"] = message + JsonData["data"]["percent"] = 0 + + ID = self.platformtools.send_message(JsonData) + self.platformtools.get_data(ID) + + def isFinished(self): + return not self.closed + + def update(self, percent=0, heading="", message=""): + JsonData = {} + JsonData["action"] = "ProgressBGUpdate" + JsonData["data"] = {} + JsonData["data"]["title"] = self.platformtools.kodi_labels_to_html(heading) + JsonData["data"]["text"] = self.platformtools.kodi_labels_to_html(message) + JsonData["data"]["percent"] = percent + self.platformtools.send_message(JsonData) + + def close(self): + JsonData = {} + JsonData["action"] = "ProgressBGClose" + JsonData["data"] = {} + ID = self.platformtools.send_message(JsonData) + self.platformtools.get_data(ID) + self.closed = True + + return Dialog(heading, message, self) + + def dialog_input(self, default="", heading="", hidden=False): + JsonData = {} + JsonData["action"] = "Keyboard" + JsonData["data"] = {} + JsonData["data"]["title"] = self.kodi_labels_to_html(heading) + JsonData["data"]["text"] = default + JsonData["data"]["password"] = hidden + ID = self.send_message(JsonData) + response = self.get_data(ID) + + return response + + def dialog_numeric(self, type, heading, default=""): + return self.dialog_input("", heading, False) + + def itemlist_refresh(self): + JsonData = {} + JsonData["action"] = "Refresh" + JsonData["data"] = {} + ID = self.send_message(JsonData) + self.get_data(ID) + + def itemlist_update(self, item): + JsonData = {} + JsonData["action"] = "Update" + JsonData["data"] = {} + JsonData["data"]["url"] = item.tourl() + ID = self.send_message(JsonData) + + self.get_data(ID) + + def is_playing(self): + JsonData = {} + JsonData["action"] = "isPlaying" + JsonData["data"] = {} + ID = self.send_message(JsonData) + response = self.get_data(ID) + return response + + def play_video(self, item): + if item.contentTitle: + title = item.contentTitle + elif item.fulltitle: + title = item.fulltitle + else: + title = item.title + + if item.contentPlot: + plot = item.contentPlot + else: + plot = item.plot + + if item.server == "torrent": + self.play_torrent(item) + else: + JsonData = {} + JsonData["action"] = "Play" + JsonData["data"] = {} + JsonData["data"]["title"] = title + JsonData["data"]["plot"] = plot + JsonData["data"]["video_url"] = item.video_url + JsonData["data"]["url"] = item.url + JsonData["data"]["host"] = self.controller.host + ID = self.send_message(JsonData) + self.get_data(ID) + + def play_torrent(self, item): + import time + import os + played = False + + # Importamos el cliente + from btserver import Client + + # Iniciamos el cliente: + c = Client(url=item.url, is_playing_fnc=self.is_playing, wait_time=None, timeout=5, + temp_path=os.path.join(config.get_data_path(), "torrent")) + + # Mostramos el progreso + progreso = self.dialog_progress("Alfa - Torrent", "Iniciando...") + + # Mientras el progreso no sea cancelado ni el cliente cerrado + while not progreso.iscanceled() and not c.closed: + try: + # Obtenemos el estado del torrent + s = c.status + + # Montamos las tres lineas con la info del torrent + txt = '%.2f%% de %.1fMB %s | %.1f kB/s' % \ + (s.progress_file, s.file_size, s.str_state, s._download_rate) + txt2 = 'S: %d(%d) P: %d(%d) | DHT:%s (%d) | Trakers: %d' % \ + ( + s.num_seeds, s.num_complete, s.num_peers, s.num_incomplete, s.dht_state, s.dht_nodes, + s.trackers) + txt3 = 'Origen Peers TRK: %d DHT: %d PEX: %d LSD %d ' % \ + (s.trk_peers, s.dht_peers, s.pex_peers, s.lsd_peers) + + progreso.update(s.buffer, txt, txt2, txt3) + + time.sleep(1) + + # Si el buffer se ha llenado y la reproduccion no ha sido iniciada, se inicia + if s.buffer == 100 and not played: + + # Cerramos el progreso + progreso.close() + + # Obtenemos el playlist del torrent + item.video_url = c.get_play_list() + item.server = "directo" + + self.play_video(item) + + # Marcamos como reproducido para que no se vuelva a iniciar + played = True + + # Y esperamos a que el reproductor se cierre + while self.is_playing(): + time.sleep(1) + + # Cuando este cerrado, Volvemos a mostrar el dialogo + progreso = self.dialog_progress("Alfa - Torrent", "Iniciando...") + + except: + import traceback + logger.info(traceback.format_exc()) + break + + progreso.update(100, "Terminando y eliminando datos", " ", " ") + + # Detenemos el cliente + if not c.closed: + c.stop() + + # Y cerramos el progreso + progreso.close() + + return + + def open_settings(self, items): + from platformcode import config + JsonData = {} + JsonData["action"] = "OpenConfig" + JsonData["data"] = {} + JsonData["data"]["title"] = "Opciones" + JsonData["data"]["items"] = [] + + for item in items: + if item.get('option') == 'hidden': + item['hidden'] = True + + for key in item: + if key in ["lvalues", "label", "category"]: + try: + ops = item[key].split("|") + for x, op in enumerate(ops): + ops[x] = config.get_localized_string(int(ops[x])) + item[key] = "|".join(ops) + except: + pass + + JsonData["data"]["items"].append(item) + ID = self.send_message(JsonData) + + response = self.get_data(ID) + + if response: + from platformcode import config + config.set_settings(response) + JsonData = {} + JsonData["action"] = "HideLoading" + JsonData["data"] = {} + self.send_message(JsonData) + + def show_channel_settings(self, list_controls=None, dict_values=None, caption="", callback=None, item=None, + custom_button=None, channelpath=None): + from platformcode import config + from core import channeltools + from core import servertools + import inspect + if not os.path.isdir(os.path.join(config.get_data_path(), "settings_channels")): + os.mkdir(os.path.join(config.get_data_path(), "settings_channels")) + + title = caption + + if type(custom_button) == dict: + custom_button = {"label": custom_button.get("label", ""), + "function": custom_button.get("function", ""), + "visible": bool(custom_button.get("visible", True)), + "close": bool(custom_button.get("close", False))} + + else: + custom_button = None + + # Obtenemos el canal desde donde se ha echo la llamada y cargamos los settings disponibles para ese canal + if not channelpath: + channelpath = inspect.currentframe().f_back.f_back.f_code.co_filename + channelname = os.path.basename(channelpath).replace(".py", "") + ch_type = os.path.basename(os.path.dirname(channelpath)) + + # Si no tenemos list_controls, hay que sacarlos del json del canal + if not list_controls: + + # Si la ruta del canal esta en la carpeta "channels", obtenemos los controles y valores mediante chaneltools + if os.path.join(config.get_runtime_path(), "channels") in channelpath: + + # La llamada se hace desde un canal + list_controls, default_values = channeltools.get_channel_controls_settings(channelname) + kwargs = {"channel": channelname} + + # Si la ruta del canal esta en la carpeta "servers", obtenemos los controles y valores mediante servertools + elif os.path.join(config.get_runtime_path(), "servers") in channelpath: + # La llamada se hace desde un server + list_controls, default_values = servertools.get_server_controls_settings(channelname) + kwargs = {"server": channelname} + + # En caso contrario salimos + else: + return None + + # Si no se pasan dict_values, creamos un dict en blanco + if dict_values == None: + dict_values = {} + + # Ponemos el titulo + if caption == "": + caption = str(config.get_localized_string(30100)) + " -- " + channelname.capitalize() + elif caption.startswith('@') and unicode(caption[1:]).isnumeric(): + caption = config.get_localized_string(int(caption[1:])) + + JsonData = {} + JsonData["action"] = "OpenConfig" + JsonData["data"] = {} + JsonData["data"]["title"] = self.kodi_labels_to_html(caption) + JsonData["data"]["custom_button"] = custom_button + JsonData["data"]["items"] = [] + + # Añadir controles + for c in list_controls: + if not "default" in c: c["default"] = "" + if not "color" in c: c["color"] = "auto" + if not "label" in c: continue + + # Obtenemos el valor + if not c["id"] in dict_values: + if not callback: + c["value"] = config.get_setting(c["id"], **kwargs) + else: + c["value"] = c["default"] + + dict_values[c["id"]] = c["value"] + + else: + c["value"] = dict_values[c["id"]] + + # Translation + if c['label'].startswith('@') and unicode(c['label'][1:]).isnumeric(): + c['label'] = str(config.get_localized_string(c['label'][1:])) + if c["label"].endswith(":"): c["label"] = c["label"][:-1] + + if c['type'] == 'list': + lvalues = [] + for li in c['lvalues']: + if li.startswith('@') and unicode(li[1:]).isnumeric(): + lvalues.append(str(config.get_localized_string(li[1:]))) + else: + lvalues.append(li) + c['lvalues'] = lvalues + + c["label"] = self.kodi_labels_to_html(c["label"]) + + JsonData["data"]["items"].append(c) + + ID = self.send_message(JsonData) + close = False + + while True: + data = self.get_data(ID) + if type(data) == dict: + JsonData["action"] = "HideLoading" + JsonData["data"] = {} + self.send_message(JsonData) + + for v in data: + if data[v] == "true": data[v] = True + if data[v] == "false": data[v] = False + if unicode(data[v]).isnumeric(): data[v] = int(data[v]) + + if callback and '.' in callback: + package, callback = callback.rsplit('.', 1) + else: + package = '%s.%s' % (ch_type, channelname) + + cb_channel = None + try: + cb_channel = __import__(package, None, None, [package]) + except ImportError: + logger.error('Imposible importar %s' % package) + + if callback: + # Si existe una funcion callback la invocamos ... + return getattr(cb_channel, callback)(item, data) + else: + # si no, probamos si en el canal existe una funcion 'cb_validate_config' ... + try: + return getattr(cb_channel, 'cb_validate_config')(item, data) + except AttributeError: + # ... si tampoco existe 'cb_validate_config'... + for v in data: + config.set_setting(v, data[v], **kwargs) + + elif data == "custom_button": + if '.' in callback: + package, callback = callback.rsplit('.', 1) + else: + package = '%s.%s' % (ch_type, channelname) + try: + cb_channel = __import__(package, None, None, [package]) + except ImportError: + logger.error('Imposible importar %s' % package) + else: + return_value = getattr(cb_channel, custom_button['function'])(item, dict_values) + if custom_button["close"] == True: + return return_value + else: + JsonData["action"] = "custom_button" + JsonData["data"] = {} + JsonData["data"]["values"] = dict_values + JsonData["data"]["return_value"] = return_value + ID = self.send_message(JsonData) + + elif data == False: + return None + + def show_video_info(self, data, caption="", item=None, scraper=Tmdb): + from platformcode import html_info_window + return html_info_window.InfoWindow().start(self, data, caption, item, scraper) + + def show_recaptcha(self, key, url): + from platformcode import html_recaptcha + return html_recaptcha.recaptcha().start(self, key, url) + + def kodi_labels_to_html(self, text): + text = re.sub(r"(?:\[I\])(.*?)(?:\[/I\])", r"\1", text) + text = re.sub(r"(?:\[B\])(.*?)(?:\[/B\])", r"\1", text) + text = re.sub(r"(?:\[COLOR (?:0x)?([0-f]{2})([0-f]{2})([0-f]{2})([0-f]{2})\])(.*?)(?:\[/COLOR\])", + lambda m: "%s" % ( + int(m.group(2), 16), int(m.group(3), 16), int(m.group(4), 16), int(m.group(1), 16) / 255.0, + m.group(5)), text) + text = re.sub(r"(?:\[COLOR (?:0x)?([0-f]{2})([0-f]{2})([0-f]{2})\])(.*?)(?:\[/COLOR\])", + r"\4", text) + text = re.sub(r"(?:\[COLOR (?:0x)?([a-z|A-Z]+)\])(.*?)(?:\[/COLOR\])", r"\2", + text) + return text diff --git a/mediaserver/platformcode/controllers/jsonserver.py b/mediaserver/platformcode/controllers/jsonserver.py new file mode 100644 index 00000000..9b9baf18 --- /dev/null +++ b/mediaserver/platformcode/controllers/jsonserver.py @@ -0,0 +1,188 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------ +# Controlador para RSS +# ------------------------------------------------------------ +import json +import random +import re +import threading +import time + +from controller import Controller +from controller import Platformtools +from core.item import Item + + +class jsonserver(Controller): + pattern = re.compile("^/json") + data = {} + + def __init__(self, handler=None): + super(jsonserver, self).__init__(handler) + self.platformtools = platformtools(self) + + def extract_item(self, path): + if path == "/json" or path == "/json/": + item = Item(channel="channelselector", action="mainlist") + else: + item = Item().fromurl(path.replace("/json/", "")) + return item + + def run(self, path): + item = self.extract_item(path) + from platformcode import launcher + launcher.run(item) + + def set_data(self, data): + self.data = data + + def get_data(self, id): + if "id" in self.data and self.data["id"] == id: + data = self.data["result"] + else: + data = None + return data + + def send_data(self, data, headers={}, response=200): + headers.setdefault("content-type", "application/json") + headers.setdefault("connection", "close") + self.handler.send_response(response) + for header in headers: + self.handler.send_header(header, headers[header]) + self.handler.end_headers() + self.handler.wfile.write(data) + + +class platformtools(Platformtools): + def __init__(self, controller): + self.controller = controller + self.handler = controller.handler + + def render_items(self, itemlist, parentitem): + JSONResponse = {} + JSONResponse["title"] = parentitem.title + JSONResponse["date"] = time.strftime("%x") + JSONResponse["time"] = time.strftime("%X") + JSONResponse["count"] = len(itemlist) + JSONResponse["list"] = [] + for item in itemlist: + JSONItem = {} + JSONItem["title"] = item.title + JSONItem["url"] = "http://" + self.controller.host + "/json/" + item.tourl() + if item.thumbnail: JSONItem["thumbnail"] = item.thumbnail + if item.plot: JSONItem["plot"] = item.plot + JSONResponse["list"].append(JSONItem) + + self.controller.send_data(json.dumps(JSONResponse, indent=4, sort_keys=True)) + + def dialog_select(self, heading, list): + ID = "%032x" % (random.getrandbits(128)) + response = '\n' + response += '\n' + response += '\n' + response += '/rss\n' + response += '' + heading + '\n' + for option in list: + response += '\n' + response += '' + option + '\n' + response += '%s\n' + response += 'http://' + self.controller.host + '/data/' + threading.current_thread().name + '/' + ID + '/' + str( + list.index(option)) + '\n' + response += '\n\n' + + response += '\n' + response += '\n' + self.controller.send_data(response) + + self.handler.server.shutdown_request(self.handler.request) + while not self.controller.get_data(ID): + continue + + return int(self.controller.get_data(ID)) + + def dialog_ok(self, heading, line1, line2="", line3=""): + text = line1 + if line2: text += "\n" + line2 + if line3: text += "\n" + line3 + ID = "%032x" % (random.getrandbits(128)) + response = '\n' + response += '\n' + response += '\n' + response += '/rss\n' + response += '' + heading + '\n' + response += '\n' + response += '' + text + '\n' + response += '%s\n' + response += '\n' + response += '\n\n' + response += '\n' + response += 'Si\n' + response += '%s\n' + response += 'http://' + self.controller.host + '/data/' + threading.current_thread().name + '/' + ID + '/1\n' + response += '\n\n' + response += '\n' + + response += '\n' + response += '\n' + self.controller.send_data(response) + + self.handler.server.shutdown_request(self.handler.request) + while not self.controller.get_data(ID): + continue + + def dialog_yesno(self, heading, line1, line2="", line3=""): + text = line1 + if line2: text += "\n" + line2 + if line3: text += "\n" + line3 + ID = "%032x" % (random.getrandbits(128)) + response = '\n' + response += '\n' + response += '\n' + response += '/rss\n' + response += '' + heading + '\n' + response += '\n' + response += '' + text + '\n' + response += '%s\n' + response += '\n' + response += '\n\n' + response += '\n' + response += 'Si\n' + response += '%s\n' + response += 'http://' + self.controller.host + '/data/' + threading.current_thread().name + '/' + ID + '/1\n' + response += '\n\n' + response += '\n' + response += 'No\n' + response += '%s\n' + response += 'http://' + self.controller.host + '/data/' + threading.current_thread().name + '/' + ID + '/0\n' + response += '\n\n' + + response += '\n' + response += '\n' + self.controller.send_data(response) + + self.handler.server.shutdown_request(self.handler.request) + while not self.controller.get_data(ID): + continue + + return bool(int(self.controller.get_data(ID))) + + def dialog_notification(self, heading, message, icon=0, time=5000, sound=True): + # No disponible por ahora, muestra un dialog_ok + self.dialog_ok(heading, message) + + def play_video(self, item): + response = '\n' + response += '\n' + response += '\n' + response += '/rss\n' + response += '' + item.title + '\n' + response += '\n' + response += '' + item.title + '\n' + response += '%s\n' + response += '' + item.video_url + '\n' + response += '\n\n' + + response += '\n' + response += '\n' + + self.controller.send_data(response) diff --git a/mediaserver/platformcode/controllers/proxy.py b/mediaserver/platformcode/controllers/proxy.py new file mode 100644 index 00000000..478e850b --- /dev/null +++ b/mediaserver/platformcode/controllers/proxy.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------ +# Controlador para acceso indirecto a ficheros remotos +# ------------------------------------------------------------ +import base64 +import re +import urllib +import urllib2 + +from controller import Controller + + +class proxy(Controller): + pattern = re.compile("^/proxy/") + + def run(self, path): + url = path.replace("/proxy/", "").split("/")[0] + url = base64.b64decode(urllib.unquote_plus(url)) + + request_headers = self.handler.headers.dict + + if "host" in request_headers: request_headers.pop("host") + if "referer" in request_headers: request_headers.pop("referer") + if "cookie" in request_headers: request_headers.pop("cookie") + + if "|" in url: + url_headers = dict( + [[header.split("=")[0].lower(), urllib.unquote_plus("=".join(header.split("=")[1:]))] for header in + url.split("|")[1].split("&")]) + url = url.split("|")[0] + request_headers.update(url_headers) + + req = urllib2.Request(url, headers=request_headers) + opener = urllib2.build_opener(urllib2.HTTPHandler(debuglevel=0)) + + try: + h = opener.open(req) + except urllib2.HTTPError, e: + h = e + except: + self.handler.send_response("503") + self.handler.wfile.close() + h.close() + + self.handler.send_response(h.getcode()) + for header in h.info(): + self.handler.send_header(header, h.info()[header]) + + self.handler.end_headers() + + blocksize = 1024 + bloqueleido = h.read(blocksize) + while len(bloqueleido) > 0: + self.handler.wfile.write(bloqueleido) + bloqueleido = h.read(blocksize) + + self.handler.wfile.close() + h.close() diff --git a/mediaserver/platformcode/controllers/rss.py b/mediaserver/platformcode/controllers/rss.py new file mode 100644 index 00000000..30931088 --- /dev/null +++ b/mediaserver/platformcode/controllers/rss.py @@ -0,0 +1,199 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------ +# Controlador para RSS +# ------------------------------------------------------------ +import random +import re +import threading + +from controller import Controller +from controller import Platformtools +from core.item import Item + + +class rss(Controller): + pattern = re.compile("^/rss") + data = {} + + def __init__(self, handler=None, ): + super(rss, self).__init__(handler) + self.platformtools = platformtools(self) + + def extract_item(self, path): + if path == "/rss" or path == "/rss/": + item = Item(channel="channelselector", action="mainlist") + else: + item = Item().fromurl(path.replace("/rss/", "")) + return item + + def run(self, path): + item = self.extract_item(path) + from platformcode import launcher + launcher.run(item) + + def set_data(self, data): + self.data = data + + def get_data(self, id): + if "id" in self.data and self.data["id"] == id: + data = self.data["result"] + else: + data = None + return data + + def send_data(self, data, headers={}, response=200): + headers.setdefault("content-type", "application/rss+xml") + headers.setdefault("connection", "close") + self.handler.send_response(response) + for header in headers: + self.handler.send_header(header, headers[header]) + self.handler.end_headers() + self.handler.wfile.write(data) + + +class platformtools(Platformtools): + def __init__(self, controller): + self.controller = controller + self.handler = controller.handler + + def create_rss(self, itemlist): + resp = '\n' + resp += '\n' + resp += '\n' + resp += 'http://' + self.controller.host + '/rss\n' + resp += 'Menú Principal\n' + for item in itemlist: + resp += '\n' + resp += '' + item.title + '\n' + resp += '' + item.thumbnail + '\n' + resp += '' + self.controller.host + '/rss/' + item.tourl() + '\n' + resp += '\n\n' + + resp += '\n' + resp += '\n' + + return resp + + def render_items(self, itemlist, parentitem): + new_itemlist = [] + for item in itemlist: + # if item.action == "search": continue + # if item.channel=="search": continue + # if item.channel=="setting": continue + # if item.channel=="help": continue + new_itemlist.append(item) + + response = self.create_rss(new_itemlist) + self.controller.send_data(response) + + def dialog_select(self, heading, list): + ID = "%032x" % (random.getrandbits(128)) + response = '\n' + response += '\n' + response += '\n' + response += '/rss\n' + response += '' + heading + '\n' + for option in list: + response += '\n' + response += '' + option + '\n' + response += '%s\n' + response += 'http://' + self.controller.host + '/data/' + threading.current_thread().name + '/' + ID + '/' + str( + list.index(option)) + '\n' + response += '\n\n' + + response += '\n' + response += '\n' + self.controller.send_data(response) + + self.handler.server.shutdown_request(self.handler.request) + while not self.controller.get_data(ID): + continue + + return int(self.controller.get_data(ID)) + + def dialog_ok(self, heading, line1, line2="", line3=""): + text = line1 + if line2: text += "\n" + line2 + if line3: text += "\n" + line3 + ID = "%032x" % (random.getrandbits(128)) + response = '\n' + response += '\n' + response += '\n' + response += '/rss\n' + response += '' + heading + '\n' + response += '\n' + response += '' + text + '\n' + response += '%s\n' + response += '\n' + response += '\n\n' + response += '\n' + response += 'Si\n' + response += '%s\n' + response += 'http://' + self.controller.host + '/data/' + threading.current_thread().name + '/' + ID + '/1\n' + response += '\n\n' + response += '\n' + + response += '\n' + response += '\n' + self.controller.send_data(response) + + self.handler.server.shutdown_request(self.handler.request) + while not self.controller.get_data(ID): + continue + + def dialog_yesno(self, heading, line1, line2="", line3=""): + text = line1 + if line2: text += "\n" + line2 + if line3: text += "\n" + line3 + ID = "%032x" % (random.getrandbits(128)) + response = '\n' + response += '\n' + response += '\n' + response += '/rss\n' + response += '' + heading + '\n' + response += '\n' + response += '' + text + '\n' + response += '%s\n' + response += '\n' + response += '\n\n' + response += '\n' + response += 'Si\n' + response += '%s\n' + response += 'http://' + self.controller.host + '/data/' + threading.current_thread().name + '/' + ID + '/1\n' + response += '\n\n' + response += '\n' + response += 'No\n' + response += '%s\n' + response += 'http://' + self.controller.host + '/data/' + threading.current_thread().name + '/' + ID + '/0\n' + response += '\n\n' + + response += '\n' + response += '\n' + self.controller.send_data(response) + + self.handler.server.shutdown_request(self.handler.request) + while not self.controller.get_data(ID): + continue + + return bool(int(self.controller.get_data(ID))) + + def dialog_notification(self, heading, message, icon=0, time=5000, sound=True): + # No disponible por ahora, muestra un dialog_ok + self.dialog_ok(heading, message) + + def play_video(self, item): + response = '\n' + response += '\n' + response += '\n' + response += '/rss\n' + response += '' + item.title + '\n' + response += '\n' + response += '' + item.title + '\n' + response += '%s\n' + response += '' + item.video_url + '\n' + response += '\n\n' + + response += '\n' + response += '\n' + + self.controller.send_data(response) diff --git a/mediaserver/platformcode/html_info_window.py b/mediaserver/platformcode/html_info_window.py new file mode 100644 index 00000000..e197ee49 --- /dev/null +++ b/mediaserver/platformcode/html_info_window.py @@ -0,0 +1,173 @@ +# -*- coding: utf-8 -*- + +from core.tmdb import Tmdb +from platformcode import logger + + +class InfoWindow(object): + otmdb = None + item_title = "" + item_serie = "" + item_temporada = 0 + item_episodio = 0 + result = {} + + @staticmethod + def get_language(lng): + # Cambiamos el formato del Idioma + languages = { + 'aa': 'Afar', 'ab': 'Abkhazian', 'af': 'Afrikaans', 'ak': 'Akan', 'sq': 'Albanian', 'am': 'Amharic', + 'ar': 'Arabic', 'an': 'Aragonese', 'as': 'Assamese', 'av': 'Avaric', 'ae': 'Avestan', + 'ay': 'Aymara', 'az': 'Azerbaijani', 'ba': 'Bashkir', 'bm': 'Bambara', 'eu': 'Basque', + 'be': 'Belarusian', 'bn': 'Bengali', 'bh': 'Bihari languages', 'bi': 'Bislama', + 'bo': 'Tibetan', 'bs': 'Bosnian', 'br': 'Breton', 'bg': 'Bulgarian', 'my': 'Burmese', + 'ca': 'Catalan; Valencian', 'cs': 'Czech', 'ch': 'Chamorro', 'ce': 'Chechen', 'zh': 'Chinese', + 'cu': 'Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic', + 'cv': 'Chuvash', 'kw': 'Cornish', 'co': 'Corsican', 'cr': 'Cree', 'cy': 'Welsh', + 'da': 'Danish', 'de': 'German', 'dv': 'Divehi; Dhivehi; Maldivian', 'nl': 'Dutch; Flemish', + 'dz': 'Dzongkha', 'en': 'English', 'eo': 'Esperanto', + 'et': 'Estonian', 'ee': 'Ewe', 'fo': 'Faroese', 'fa': 'Persian', 'fj': 'Fijian', + 'fi': 'Finnish', 'fr': 'French', 'fy': 'Western Frisian', 'ff': 'Fulah', + 'Ga': 'Georgian', 'gd': 'Gaelic; Scottish Gaelic', 'ga': 'Irish', 'gl': 'Galician', + 'gv': 'Manx', 'el': 'Greek, Modern (1453-)', 'gn': 'Guarani', 'gu': 'Gujarati', + 'ht': 'Haitian; Haitian Creole', 'ha': 'Hausa', 'he': 'Hebrew', 'hz': 'Herero', 'hi': 'Hindi', + 'ho': 'Hiri Motu', 'hr': 'Croatian', 'hu': 'Hungarian', 'hy': 'Armenian', 'ig': 'Igbo', + 'is': 'Icelandic', 'io': 'Ido', 'ii': 'Sichuan Yi; Nuosu', 'iu': 'Inuktitut', + 'ie': 'Interlingue; Occidental', 'ia': 'Interlingua (International Auxiliary Language Association)', + 'id': 'Indonesian', 'ik': 'Inupiaq', 'it': 'Italian', 'jv': 'Javanese', + 'ja': 'Japanese', 'kl': 'Kalaallisut; Greenlandic', 'kn': 'Kannada', 'ks': 'Kashmiri', + 'ka': 'Georgian', 'kr': 'Kanuri', 'kk': 'Kazakh', 'km': 'Central Khmer', 'ki': 'Kikuyu; Gikuyu', + 'rw': 'Kinyarwanda', 'ky': 'Kirghiz; Kyrgyz', 'kv': 'Komi', 'kg': 'Kongo', 'ko': 'Korean', + 'kj': 'Kuanyama; Kwanyama', 'ku': 'Kurdish', 'lo': 'Lao', 'la': 'Latin', 'lv': 'Latvian', + 'li': 'Limburgan; Limburger; Limburgish', 'ln': 'Lingala', 'lt': 'Lithuanian', + 'lb': 'Luxembourgish; Letzeburgesch', 'lu': 'Luba-Katanga', 'lg': 'Ganda', 'mk': 'Macedonian', + 'mh': 'Marshallese', 'ml': 'Malayalam', 'mi': 'Maori', 'mr': 'Marathi', 'ms': 'Malay', 'Mi': 'Micmac', + 'mg': 'Malagasy', 'mt': 'Maltese', 'mn': 'Mongolian', 'na': 'Nauru', + 'nv': 'Navajo; Navaho', 'nr': 'Ndebele, South; South Ndebele', 'nd': 'Ndebele, North; North Ndebele', + 'ng': 'Ndonga', 'ne': 'Nepali', 'nn': 'Norwegian Nynorsk; Nynorsk, Norwegian', + 'nb': 'Bokmål, Norwegian; Norwegian Bokmål', 'no': 'Norwegian', 'oc': 'Occitan (post 1500)', + 'oj': 'Ojibwa', 'or': 'Oriya', 'om': 'Oromo', 'os': 'Ossetian; Ossetic', 'pa': 'Panjabi; Punjabi', + 'pi': 'Pali', 'pl': 'Polish', 'pt': 'Portuguese', 'ps': 'Pushto; Pashto', 'qu': 'Quechua', + 'ro': 'Romanian; Moldavian; Moldovan', 'rn': 'Rundi', 'ru': 'Russian', 'sg': 'Sango', 'rm': 'Romansh', + 'sa': 'Sanskrit', 'si': 'Sinhala; Sinhalese', 'sk': 'Slovak', 'sl': 'Slovenian', 'se': 'Northern Sami', + 'sm': 'Samoan', 'sn': 'Shona', 'sd': 'Sindhi', 'so': 'Somali', 'st': 'Sotho, Southern', 'es': 'Spanish', + 'sc': 'Sardinian', 'sr': 'Serbian', 'ss': 'Swati', 'su': 'Sundanese', 'sw': 'Swahili', 'sv': 'Swedish', + 'ty': 'Tahitian', 'ta': 'Tamil', 'tt': 'Tatar', 'te': 'Telugu', 'tg': 'Tajik', 'tl': 'Tagalog', + 'th': 'Thai', 'ti': 'Tigrinya', 'to': 'Tonga (Tonga Islands)', 'tn': 'Tswana', 'ts': 'Tsonga', + 'tk': 'Turkmen', 'tr': 'Turkish', 'tw': 'Twi', 'ug': 'Uighur; Uyghur', 'uk': 'Ukrainian', + 'ur': 'Urdu', 'uz': 'Uzbek', 've': 'Venda', 'vi': 'Vietnamese', 'vo': 'Volapük', + 'wa': 'Walloon', 'wo': 'Wolof', 'xh': 'Xhosa', 'yi': 'Yiddish', 'yo': 'Yoruba', 'za': 'Zhuang; Chuang', + 'zu': 'Zulu'} + + return languages.get(lng, lng) + + def get_scraper_data(self, data_in): + self.otmdb = None + # logger.debug(str(data_in)) + + if self.listData: + # Datos comunes a todos los listados + infoLabels = self.scraper().get_infoLabels(origen=data_in) + + if "original_language" in infoLabels: + infoLabels["language"] = self.get_language(infoLabels["original_language"]) + if "vote_average" in data_in and "vote_count" in data_in: + infoLabels["puntuacion"] = str(data_in["vote_average"]) + "/10 (" + str(data_in["vote_count"]) + ")" + + self.result = infoLabels + + def start(self, handler, data, caption="Información del vídeo", item=None, scraper=Tmdb): + # Capturamos los parametros + self.caption = caption + self.item = item + self.indexList = -1 + self.listData = [] + self.handler = handler + self.scraper = scraper + + logger.debug(data) + if type(data) == list: + self.listData = data + self.indexList = 0 + data = self.listData[self.indexList] + + self.get_scraper_data(data) + + ID = self.update_window() + + return self.onClick(ID) + + def update_window(self): + JsonData = {} + JsonData["action"] = "OpenInfo" + JsonData["data"] = {} + JsonData["data"]["buttons"] = len(self.listData) > 0 + JsonData["data"]["previous"] = self.indexList > 0 + JsonData["data"]["next"] = self.indexList + 1 < len(self.listData) + JsonData["data"]["count"] = "(%s/%s)" % (self.indexList + 1, len(self.listData)) + JsonData["data"]["title"] = self.caption + JsonData["data"]["fanart"] = self.result.get("fanart", "") + JsonData["data"]["thumbnail"] = self.result.get("thumbnail", "") + + JsonData["data"]["lines"] = [] + + if self.result.get("mediatype", "movie") == "movie": + JsonData["data"]["lines"].append({"title": "Título:", "text": self.result.get("title", "N/A")}) + JsonData["data"]["lines"].append( + {"title": "Título Original:", "text": self.result.get("originaltitle", "N/A")}) + JsonData["data"]["lines"].append({"title": "Idioma Original:", "text": self.result.get("language", "N/A")}) + JsonData["data"]["lines"].append({"title": "Puntuación:", "text": self.result.get("puntuacion", "N/A")}) + JsonData["data"]["lines"].append({"title": "Lanzamiento:", "text": self.result.get("release_date", "N/A")}) + JsonData["data"]["lines"].append({"title": "Generos:", "text": self.result.get("genre", "N/A")}) + JsonData["data"]["lines"].append({"title": "", "text": ""}) + + + else: + JsonData["data"]["lines"].append({"title": "Serie:", "text": self.result.get("title", "N/A")}) + JsonData["data"]["lines"].append({"title": "Idioma Original:", "text": self.result.get("language", "N/A")}) + JsonData["data"]["lines"].append({"title": "Puntuación:", "text": self.result.get("puntuacion", "N/A")}) + JsonData["data"]["lines"].append({"title": "Generos:", "text": self.result.get("genre", "N/A")}) + + if self.result.get("season"): + JsonData["data"]["lines"].append( + {"title": "Titulo temporada:", "text": self.result.get("temporada_nombre", "N/A")}) + JsonData["data"]["lines"].append({"title": "Temporada:", + "text": self.result.get("season", "N/A") + " de " + self.result.get( + "seasons", "N/A")}) + JsonData["data"]["lines"].append({"title": "", "text": ""}) + + if self.result.get("episode"): + JsonData["data"]["lines"].append({"title": "Titulo:", "text": self.result.get("episode_title", "N/A")}) + JsonData["data"]["lines"].append({"title": "Episodio:", + "text": self.result.get("episode", "N/A") + " de " + self.result.get( + "episodes", "N/A")}) + JsonData["data"]["lines"].append({"title": "Emisión:", "text": self.result.get("date", "N/A")}) + + if self.result.get("plot"): + JsonData["data"]["lines"].append({"title": "Sinopsis:", "text": self.result["plot"]}) + else: + JsonData["data"]["lines"].append({"title": "", "text": ""}) + + ID = self.handler.send_message(JsonData) + return ID + + def onClick(self, ID): + while True: + response = self.handler.get_data(ID) + + if response == "ok": + return self.listData[self.indexList] + + elif response == "close": + return None + + elif response == "next" and self.indexList < len(self.listData) - 1: + self.indexList += 1 + self.get_scraper_data(self.listData[self.indexList]) + ID = self.update_window() + + + elif response == "previous" and self.indexList > 0: + self.indexList -= 1 + self.get_scraper_data(self.listData[self.indexList]) + ID = self.update_window() diff --git a/mediaserver/platformcode/html_recaptcha.py b/mediaserver/platformcode/html_recaptcha.py new file mode 100644 index 00000000..728df1a4 --- /dev/null +++ b/mediaserver/platformcode/html_recaptcha.py @@ -0,0 +1,79 @@ +# -*- coding: utf-8 -*- + +from core import httptools +from core import scrapertools +from platformcode import platformtools, logger + + +class recaptcha(object): + def start(self, handler, key, referer): + self.handler = handler + self.referer = referer + self.key = key + self.headers = {'Referer': self.referer} + + api_js = httptools.downloadpage("http://www.google.com/recaptcha/api.js?hl=es").data + version = scrapertools.find_single_match(api_js, 'po.src = \'(.*?)\';').split("/")[5] + + self.url = "https://www.google.com/recaptcha/api/fallback?k=%s&hl=es&v=%s&t=2&ff=true" % (self.key, version) + + ID = self.update_window() + + return self.onClick(ID) + + def update_window(self): + data = httptools.downloadpage(self.url, headers=self.headers).data + self.message = scrapertools.find_single_match(data, + '
(.*?)(?:|
)') + self.token = scrapertools.find_single_match(data, 'name="c" value="([^"]+)"') + self.image = "https://www.google.com/recaptcha/api2/payload?k=%s&c=%s" % (self.key, self.token) + self.result = {} + + JsonData = {} + JsonData["action"] = "recaptcha" + JsonData["data"] = {} + JsonData["data"]["title"] = "reCaptcha" + JsonData["data"]["image"] = self.image + JsonData["data"]["message"] = self.message + JsonData["data"]["selected"] = [int(k) for k in range(9) if self.result.get(k, False) == True] + JsonData["data"]["unselected"] = [int(k) for k in range(9) if self.result.get(k, False) == False] + ID = self.handler.send_message(JsonData) + return ID + + def onClick(self, ID): + while True: + response = self.handler.get_data(ID) + + if type(response) == int: + self.result[response] = not self.result.get(response, False) + JsonData = {} + JsonData["action"] = "recaptcha_select" + JsonData["data"] = {} + JsonData["data"]["selected"] = [int(k) for k in range(9) if self.result.get(k, False) == True] + JsonData["data"]["unselected"] = [int(k) for k in range(9) if self.result.get(k, False) == False] + self.handler.send_message(JsonData) + + elif response == "refresh": + ID = self.update_window() + continue + + elif response == True: + post = "c=%s" % self.token + for r in sorted([k for k, v in self.result.items() if v == True]): + post += "&response=%s" % r + logger.info(post) + logger.info(self.result) + data = httptools.downloadpage(self.url, post, headers=self.headers).data + result = scrapertools.find_single_match(data, '
.*?>([^<]+)<') + + if result: + platformtools.dialog_notification("Captcha Correcto", "La verificación ha concluido") + JsonData = {} + JsonData["action"] = "ShowLoading" + self.handler.send_message(JsonData) + return result + else: + ID = self.update_window() + + else: + return diff --git a/mediaserver/platformcode/launcher.py b/mediaserver/platformcode/launcher.py new file mode 100644 index 00000000..b8dfe6b3 --- /dev/null +++ b/mediaserver/platformcode/launcher.py @@ -0,0 +1,523 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------ +# Mediaserver Launcher +# ------------------------------------------------------------ + +import os +import sys + +from core import channeltools +from core import servertools +from core import videolibrarytools +from core.item import Item +from platformcode import config, platformtools, logger + + +def start(): + """ Primera funcion que se ejecuta al entrar en el plugin. + Dentro de esta funcion deberian ir todas las llamadas a las + funciones que deseamos que se ejecuten nada mas abrir el plugin. + """ + logger.info() + + # Test if all the required directories are created + config.verify_directories_created() + import videolibrary_service + videolibrary_service.start() + + +def run(item): + itemlist = [] + # Muestra el item en el log: + PrintItems(item) + + # Control Parental, comprueba si es adulto o no + if item.action == "mainlist": + # Parental control + if channeltools.is_adult(item.channel) and config.get_setting("adult_pin") != "": + tecleado = platformtools.dialog_input("", "Contraseña para canales de adultos", True) + if tecleado is None or tecleado != config.get_setting("adult_pin"): + platformtools.render_items(None, item) + return + + # Importa el canal para el item, todo item debe tener un canal, sino sale de la función + if item.channel: channelmodule = ImportarCanal(item) + + # If item has no action, stops here + if item.action == "": + logger.info("Item sin accion") + itemlist = None + + # Action Play, para mostrar el menú con las opciones de reproduccion. + elif item.action == "play": + logger.info("play") + # Si el canal tiene una acción "play" tiene prioridad + if hasattr(channelmodule, 'play'): + logger.info("executing channel 'play' method") + itemlist = channelmodule.play(item) + b_favourite = item.isFavourite + if len(itemlist) > 0 and isinstance(itemlist[0], Item): + item = itemlist[0] + if b_favourite: + item.isFavourite = True + play_menu(item) + elif len(itemlist) > 0 and isinstance(itemlist[0], list): + item.video_urls = itemlist + play_menu(item) + else: + platformtools.dialog_ok("plugin", "No hay nada para reproducir") + else: + logger.info("no channel 'play' method, executing core method") + play_menu(item) + + itemlist = None + + # Action Search, para mostrar el teclado y lanzar la busqueda con el texto indicado. + elif item.action == "search": + logger.info("search") + tecleado = platformtools.dialog_input() + if tecleado: + itemlist = channelmodule.search(item, tecleado) + else: + itemlist = [] + + elif item.channel == "channelselector": + import channelselector + if item.action == "mainlist": + itemlist = channelselector.getmainlist("banner_") + + # if config.get_setting("check_for_plugin_updates"): + # logger.info("channelselector.mainlist Verificar actualizaciones activado") + # + # from core import updater + # try: + # version = updater.checkforupdates() + # + # if version: + # platformtools.dialog_ok("Versión " + version + " disponible", + # "Ya puedes descargar la nueva versión del plugin\ndesde el listado principal") + # itemlist.insert(0, Item(title="Actualizar Alfa a la versión " + version, version=version, + # channel="updater", action="update", + # thumbnail=os.path.join(config.get_runtime_path(), "resources", "images", + # "banner", "thumb_update.png"))) + # except: + # platformtools.dialog_ok("No se puede conectar", "No ha sido posible comprobar", + # "si hay actualizaciones") + # logger.info("Fallo al verificar la actualización") + # + # else: + # logger.info("Verificar actualizaciones desactivado") + + if item.action == "getchanneltypes": + itemlist = channelselector.getchanneltypes("banner_") + if item.action == "filterchannels": + itemlist = channelselector.filterchannels(item.channel_type, "banner_") + + # Todas las demas las intenta ejecturaren el siguiente orden: + # 1. En el canal + # 2. En el launcher + # 3. Si no existe en el canal ni en el launcher guarda un error en el log + else: + # Si existe la funcion en el canal la ejecuta + if hasattr(channelmodule, item.action): + logger.info("Ejectuando accion: " + item.channel + "." + item.action + "(item)") + exec "itemlist = channelmodule." + item.action + "(item)" + + # Si existe la funcion en el launcher la ejecuta + elif hasattr(sys.modules[__name__], item.action): + logger.info("Ejectuando accion: " + item.action + "(item)") + exec "itemlist =" + item.action + "(item)" + + # Si no existe devuelve un error + else: + logger.info( + "No se ha encontrado la accion [" + item.action + "] en el canal [" + item.channel + "] ni en el launcher") + + # Llegados a este punto ya tenemos que tener el itemlist con los resultados correspondientes + # Pueden darse 3 escenarios distintos: + # 1. la función ha generado resultados y estan en el itemlist + # 2. la función no ha generado resultados y por tanto el itemlist contiene 0 items, itemlist = [] + # 3. la función realiza alguna accion con la cual no se generan nuevos items, en ese caso el resultado deve ser: itemlist = None para que no modifique el listado + # A partir de aquí ya se ha ejecutado la funcion en el lugar adecuado, si queremos realizar alguna acción sobre los resultados, este es el lugar. + + + + # Filtrado de Servers + if item.action == "findvideos": + itemlist = servertools.filter_servers(itemlist) + + # Si la accion no ha devuelto ningún resultado, añade un item con el texto "No hay elementos para mostrar" + if type(itemlist) == list: + if len(itemlist) == 0: + from channelselector import get_thumb + itemlist = [Item(title="No hay elementos para mostrar", thumbnail=get_thumb("error.png"))] + + # Imprime en el log el resultado + PrintItems(itemlist) + + # Muestra los resultados en pantalla + platformtools.render_items(itemlist, item) + + +def ImportarCanal(item): + channel = item.channel + channelmodule = "" + if os.path.exists(os.path.join(config.get_runtime_path(), "channels", channel + ".py")): + exec "from channels import " + channel + " as channelmodule" + elif os.path.exists(os.path.join(config.get_runtime_path(), "core", channel + ".py")): + exec "from core import " + channel + " as channelmodule" + elif os.path.exists(os.path.join(config.get_runtime_path(), channel + ".py")): + exec "import " + channel + " as channelmodule" + return channelmodule + + +def PrintItems(itemlist): + if type(itemlist) == list: + if len(itemlist) > 0: + logger.info("Items devueltos") + logger.info("-----------------------------------------------------------------------") + for item in itemlist: + logger.info(item.tostring()) + logger.info("-----------------------------------------------------------------------") + else: + item = itemlist + logger.info("-----------------------------------------------------------------------") + logger.info(item.tostring()) + logger.info("-----------------------------------------------------------------------") + + +def findvideos(item): + logger.info() + itemlist = servertools.find_video_items(item) + return itemlist + + +def add_pelicula_to_library(item): + videolibrarytools.add_movie(item) + + +def add_serie_to_library(item): + channel = ImportarCanal(item) + videolibrarytools.add_tvshow(item, channel) + + +def download_all_episodes(item, first_episode="", preferred_server="vidspot", filter_language=""): + logger.info("show=" + item.show) + channel = ImportarCanal(item) + show_title = item.show + + # Obtiene el listado desde el que se llamó + action = item.extra + + # Esta marca es porque el item tiene algo más aparte en el atributo "extra" + if "###" in item.extra: + action = item.extra.split("###")[0] + item.extra = item.extra.split("###")[1] + + exec "episode_itemlist = channel." + action + "(item)" + + # Ordena los episodios para que funcione el filtro de first_episode + episode_itemlist = sorted(episode_itemlist, key=lambda Item: Item.title) + + from core import downloadtools + from core import scrapertools + + best_server = preferred_server + worst_server = "moevideos" + + # Para cada episodio + if first_episode == "": + empezar = True + else: + empezar = False + + for episode_item in episode_itemlist: + try: + logger.info("episode=" + episode_item.title) + episode_title = scrapertools.get_match(episode_item.title, "(\d+x\d+)") + logger.info("episode=" + episode_title) + except: + import traceback + logger.error(traceback.format_exc()) + continue + + if first_episode != "" and episode_title == first_episode: + empezar = True + + if episodio_ya_descargado(show_title, episode_title): + continue + + if not empezar: + continue + + # Extrae los mirrors + try: + mirrors_itemlist = channel.findvideos(episode_item) + except: + mirrors_itemlist = servertools.find_video_items(episode_item) + print mirrors_itemlist + + descargado = False + + new_mirror_itemlist_1 = [] + new_mirror_itemlist_2 = [] + new_mirror_itemlist_3 = [] + new_mirror_itemlist_4 = [] + new_mirror_itemlist_5 = [] + new_mirror_itemlist_6 = [] + + for mirror_item in mirrors_itemlist: + + # Si está en español va al principio, si no va al final + if "(Español)" in mirror_item.title: + if best_server in mirror_item.title.lower(): + new_mirror_itemlist_1.append(mirror_item) + else: + new_mirror_itemlist_2.append(mirror_item) + elif "(Latino)" in mirror_item.title: + if best_server in mirror_item.title.lower(): + new_mirror_itemlist_3.append(mirror_item) + else: + new_mirror_itemlist_4.append(mirror_item) + elif "(VOS)" in mirror_item.title: + if best_server in mirror_item.title.lower(): + new_mirror_itemlist_3.append(mirror_item) + else: + new_mirror_itemlist_4.append(mirror_item) + else: + if best_server in mirror_item.title.lower(): + new_mirror_itemlist_5.append(mirror_item) + else: + new_mirror_itemlist_6.append(mirror_item) + + mirrors_itemlist = new_mirror_itemlist_1 + new_mirror_itemlist_2 + new_mirror_itemlist_3 + new_mirror_itemlist_4 + new_mirror_itemlist_5 + new_mirror_itemlist_6 + + for mirror_item in mirrors_itemlist: + logger.info("mirror=" + mirror_item.title) + + if "(Español)" in mirror_item.title: + idioma = "(Español)" + codigo_idioma = "es" + elif "(Latino)" in mirror_item.title: + idioma = "(Latino)" + codigo_idioma = "lat" + elif "(VOS)" in mirror_item.title: + idioma = "(VOS)" + codigo_idioma = "vos" + elif "(VO)" in mirror_item.title: + idioma = "(VO)" + codigo_idioma = "vo" + else: + idioma = "(Desconocido)" + codigo_idioma = "desconocido" + + logger.info("filter_language=#" + filter_language + "#, codigo_idioma=#" + codigo_idioma + "#") + if filter_language == "" or (filter_language != "" and filter_language == codigo_idioma): + logger.info("downloading mirror") + else: + logger.info("language " + codigo_idioma + " filtered, skipping") + continue + + if hasattr(channel, 'play'): + video_items = channel.play(mirror_item) + else: + video_items = [mirror_item] + + if len(video_items) > 0: + video_item = video_items[0] + + # Comprueba que esté disponible + video_urls, puedes, motivo = servertools.resolve_video_urls_for_playing(video_item.server, + video_item.url, + video_password="", + muestra_dialogo=False) + + # Lo añade a la lista de descargas + if puedes: + logger.info("downloading mirror started...") + # El vídeo de más calidad es el último + mediaurl = video_urls[len(video_urls) - 1][1] + devuelve = downloadtools.downloadbest(video_urls, + show_title + " " + episode_title + " " + idioma + " [" + video_item.server + "]", + continuar=False) + + if devuelve == 0: + logger.info("download ok") + descargado = True + break + elif devuelve == -1: + try: + + platformtools.dialog_ok("plugin", "Descarga abortada") + except: + pass + return + else: + logger.info("download error, try another mirror") + continue + + else: + logger.info("downloading mirror not available... trying next") + + if not descargado: + logger.info("EPISODIO NO DESCARGADO " + episode_title) + + +def add_to_favorites(item): + # Proviene del menu contextual: + if "item_action" in item: + item.action = item.item_action + del item.item_action + item.context = [] + + from channels import favorites + from core import downloadtools + if not item.fulltitle: item.fulltitle = item.title + title = platformtools.dialog_input( + default=downloadtools.limpia_nombre_excepto_1(item.fulltitle) + " [" + item.channel + "]") + if title is not None: + item.title = title + favorites.addFavourite(item) + platformtools.dialog_ok("Alfa", config.get_localized_string( + 30102) + "\n" + item.title + "\n" + config.get_localized_string(30108)) + return + + +def remove_from_favorites(item): + from channels import favorites + # En "extra" está el nombre del fichero en favoritos + favorites.delFavourite(item.extra) + platformtools.dialog_ok("Alfa", + config.get_localized_string(30102) + "\n" + item.title + "\n" + config.get_localized_string( + 30105)) + platformtools.itemlist_refresh() + return + + +def download(item): + from channels import downloads + if item.contentType == "list" or item.contentType == "tvshow": + item.contentType = "video" + item.play_menu = True + downloads.save_download(item) + return + + +def add_to_library(item): + if "item_action" in item: + item.action = item.item_action + del item.item_action + + if not item.fulltitle == "": + item.title = item.fulltitle + videolibrarytools.savelibrary(item) + platformtools.dialog_ok("Alfa", + config.get_localized_string(30101) + "\n" + item.title + "\n" + config.get_localized_string( + 30135)) + return + + +def delete_file(item): + os.remove(item.url) + platformtools.itemlist_refresh() + return + + +def search_trailer(item): + config.set_setting("subtitulo", False) + item.channel = "trailertools" + item.action = "buscartrailer" + item.contextual = True + run(item) + return + + +# Crea la lista de opciones para el menu de reproduccion +def check_video_options(item, video_urls): + itemlist = [] + # Opciones Reproducir + playable = (len(video_urls) > 0) + + for video_url in video_urls: + itemlist.append( + item.clone(option=config.get_localized_string(30151) + " " + video_url[0], video_url=video_url[1], + action="play_video")) + + if item.server == "local": + itemlist.append(item.clone(option=config.get_localized_string(30164), action="delete_file")) + + if not item.server == "local" and playable: + itemlist.append(item.clone(option=config.get_localized_string(30153), action="download", video_urls=video_urls)) + + if item.channel == "favorites": + itemlist.append(item.clone(option=config.get_localized_string(30154), action="remove_from_favorites")) + + if not item.channel == "favorites" and playable: + itemlist.append( + item.clone(option=config.get_localized_string(30155), action="add_to_favorites", item_action=item.action)) + + if not item.strmfile and playable and item.contentType == "movie": + itemlist.append( + item.clone(option=config.get_localized_string(30161), action="add_to_library", item_action=item.action)) + + if not item.channel in ["Trailer", "ecarteleratrailers"] and playable: + itemlist.append(item.clone(option=config.get_localized_string(30162), action="search_trailer")) + + return itemlist + + +# play_menu, abre el menu con las opciones para reproducir +def play_menu(item): + if item.server == "": item.server = "directo" + + if item.video_urls: + video_urls, puedes, motivo = item.video_urls, True, "" + else: + video_urls, puedes, motivo = servertools.resolve_video_urls_for_playing(item.server, item.url, item.password, + True) + + if not "strmfile" in item: item.strmfile = False + # TODO: unificar show y Serie ya que se usan indistintamente. + if not "Serie" in item: item.Serie = item.show + if item.server == "": item.server = "directo" + + opciones = check_video_options(item, video_urls) + if not puedes: + if item.server != "directo": + motivo = motivo.replace("
", "\n") + platformtools.dialog_ok("No puedes ver ese vídeo porque...", motivo + "\n" + item.url) + else: + platformtools.dialog_ok("No puedes ver ese vídeo porque...", + "El servidor donde está alojado no está\nsoportado en Alfa todavía\n" + item.url) + + if len(opciones) == 0: + return + + default_action = config.get_setting("default_action") + logger.info("default_action=%s" % (default_action)) + # Si la accion por defecto es "Preguntar", pregunta + if default_action == 0: + seleccion = platformtools.dialog_select(config.get_localized_string(30163), + [opcion.option for opcion in opciones]) + elif default_action == 1: + seleccion = 0 + elif default_action == 2: + seleccion = len(video_urls) - 1 + elif default_action == 3: + seleccion = seleccion + else: + seleccion = 0 + + if seleccion > -1: + logger.info("seleccion=%d" % seleccion) + logger.info("seleccion=%s" % opciones[seleccion].option) + selecteditem = opciones[seleccion] + del selecteditem.option + run(opciones[seleccion]) + + return + + +# play_video, Llama a la función especifica de la plataforma para reproducir +def play_video(item): + platformtools.play_video(item) diff --git a/mediaserver/platformcode/logger.py b/mediaserver/platformcode/logger.py new file mode 100644 index 00000000..51bd7b0b --- /dev/null +++ b/mediaserver/platformcode/logger.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------ +# logger for mediaserver +# ------------------------------------------------------------ +import logging +import logging.config +import os + +import config + + +class ExtendedLogger(logging.Logger): + def findCaller(self): + f = logging.currentframe().f_back.f_back + rv = "(unknown file)", 0, "(unknown function)" + while hasattr(f, "f_code"): + co = f.f_code + filename = os.path.normcase(co.co_filename) + if "logger" in filename: # This line is modified. + f = f.f_back + continue + filename = filename + " " + co.co_name + rv = (filename, f.f_lineno, co.co_name) + break + return rv + + +logging.setLoggerClass(ExtendedLogger) +logging.basicConfig(level=logging.DEBUG, + format='%(levelname)-5s %(asctime)s [%(filename)-40s] %(message)s', + datefmt="%d/%m/%y-%H:%M:%S", + filename=os.path.join(config.get_data_path(), "alfa.log"), + filemode='w') +logger_object = logging.getLogger("mediaserver") + + +def info(texto=""): + if config.get_setting("debug"): + logger_object.info(unicode(str(texto), "utf-8", "ignore").replace("\n", "\n" + " " * 67)) + + +def debug(texto=""): + if config.get_setting("debug"): + logger_object.debug(unicode(str(texto), "utf-8", "ignore").replace("\n", "\n" + " " * 67)) + + +def error(texto=""): + logger_object.error(unicode(str(texto), "utf-8", "ignore").replace("\n", "\n" + " " * 67)) diff --git a/mediaserver/platformcode/platformtools.py b/mediaserver/platformcode/platformtools.py new file mode 100644 index 00000000..1744a18e --- /dev/null +++ b/mediaserver/platformcode/platformtools.py @@ -0,0 +1,107 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------ +# platformtools +# ------------------------------------------------------------ +# Herramientas responsables de adaptar los diferentes +# cuadros de dialogo a una plataforma en concreto, +# en este caso Mediserver. +# version 1.3 +# ------------------------------------------------------------ +import threading + +controllers = {} + + +def dialog_ok(*args, **kwargs): + id = threading.current_thread().name + return controllers[id].dialog_ok(*args, **kwargs) + + +def dialog_notification(*args, **kwargs): + id = threading.current_thread().name + return controllers[id].dialog_notification(*args, **kwargs) + + +def dialog_yesno(*args, **kwargs): + id = threading.current_thread().name + return controllers[id].dialog_yesno(*args, **kwargs) + + +def dialog_select(*args, **kwargs): + id = threading.current_thread().name + return controllers[id].dialog_select(*args, **kwargs) + + +def dialog_progress(*args, **kwargs): + id = threading.current_thread().name + return controllers[id].dialog_progress(*args, **kwargs) + + +def dialog_progress_bg(*args, **kwargs): + id = threading.current_thread().name + return controllers[id].dialog_progress_bg(*args, **kwargs) + + +def dialog_input(*args, **kwargs): + id = threading.current_thread().name + return controllers[id].dialog_input(*args, **kwargs) + + +def dialog_numeric(*args, **kwargs): + id = threading.current_thread().name + return controllers[id].dialog_numeric(*args, **kwargs) + + +def itemlist_refresh(*args, **kwargs): + id = threading.current_thread().name + return controllers[id].itemlist_refresh(*args, **kwargs) + + +def itemlist_update(*args, **kwargs): + id = threading.current_thread().name + return controllers[id].itemlist_update(*args, **kwargs) + + +def render_items(*args, **kwargs): + id = threading.current_thread().name + return controllers[id].render_items(*args, **kwargs) + + +def is_playing(*args, **kwargs): + id = threading.current_thread().name + return controllers[id].is_playing(*args, **kwargs) + + +def play_video(*args, **kwargs): + id = threading.current_thread().name + return controllers[id].play_video(*args, **kwargs) + + +def stop_video(*args, **kwargs): + # id = threading.current_thread().name + # return controllers[id].play_video(*args, **kwargs) + return False + + +def open_settings(*args, **kwargs): + id = threading.current_thread().name + return controllers[id].open_settings(*args, **kwargs) + + +def show_channel_settings(*args, **kwargs): + id = threading.current_thread().name + return controllers[id].show_channel_settings(*args, **kwargs) + + +def show_video_info(*args, **kwargs): + id = threading.current_thread().name + return controllers[id].show_video_info(*args, **kwargs) + + +def show_recaptcha(*args, **kwargs): + id = threading.current_thread().name + return controllers[id].show_recaptcha(*args, **kwargs) + + +def torrent_client_installed(show_tuple=False): + return [] diff --git a/mediaserver/platformcode/template/css/alfa.css b/mediaserver/platformcode/template/css/alfa.css new file mode 100644 index 00000000..70b219b6 --- /dev/null +++ b/mediaserver/platformcode/template/css/alfa.css @@ -0,0 +1,1305 @@ +/* +Colores: +Azul Oscuro: #01455c +Azul: #005D7C +Azul Claro: #00779f + +*/ +/*Documento*/ + +:focus { + outline: 0; +} +a { + text-decoration: none; +} +div.window { + background-color: transparent; + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; +} +body { + background-color: #00779f; + margin: 0px; + font-family: sans-serif; +} + +div.window_loading { + background-color: #01455C; + border-color: #FFF; + border-radius: 5px; + border-style: solid; + border-width: 2px; + color: #FFF; + display: none; + height: 80px; + margin: auto; + padding: 10px; + position: relative; + top: 202px; + width: 250px; + z-index: 9999999; +} +div.window_loading > a.loading_message { + color: #FFF; + font-size: 16px; + margin: 0px; + text-align: center; + position: absolute; + left: 0; + right: 0; + font-weight: bold; + text-decoration: none; + cursor: default; +} +div.window_loading > span.loading_animation { + + background-image: url('data:image/gif;base64,R0lGODlhLAAsAPcAAAAAAAEBAQICAgMDAwQEBAUFBQYGBgcHBwgICAkJCQoKCgsLCwwMDA0NDQ4ODg8PDxAQEBERERISEhMTExQUFBMYGRMbHhEhJxAmLg4tNwk1RAY8TgNBVgFDWQFEWwFEWwFEWwFEWwFEWwFEWwFEWwFEWwFEWwFEWwFEWwFFXAFFXAFFXAFFXAFFXAFFXAFFXAFFXABFXABFXABFXABFXQBGXgBIYABJYgBLYwBMZQBMZgBOaABPaQBQawBSbQBUcABVcQBWdABXdQBYdgBZdwBaeABbeQBbegBbegBcewBcewBcewBcewBcewBcewBcegBbegBaeQBZdwBYdgBXdABVcgBUbwBRbABQagFOaAFNZwJMZQRLYwdLYgxMYhNOYhtQYiRTYi1VYzVYYz1aZEddZU1fZlRiZltkZ2JnaGpqamtra2xsbG1tbW5ubm9vb3BwcHFxcXJycnNzc3R0dHV1dXJ2eG94e216fmp7gGh8g2Z9hWV+h2N/iGKAimGAi2GBjGCBjV2BjmGDjmGDjmKEj2SEj2aHkmmJlGuMl26Nl3GOl3SOl3iPln2PlYKPk4qPkJGRkZKSkpOTk5SUlJWVlZaWlpeXl5iYmJmZmZqampubm5ycnJ2dnZ6enp+fn6CgoKGhoaKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq6ysrK2tra6urq+vr7CwsLGxsbKysrOzs7S0tLW1tba2tre3t7i4uLm5ubq6uru7u7m8vba9v7u9vr+/v8DAwMHBwcLCwsPDw8TExMXFxcbGxsfHx8jIyMnJycrKysvLy8zMzM3Nzc7Ozs/Pz9DQ0NHR0dLS0tPT09TU1NPV1dPW19LX2NHY2tLY2tTZ29fa29zd3d3f397g4d/i4+Dj5OHl5uLm5+Pn6OPo6eTo6uTp6+Tq7OXq7eXr7eXr7ubs7ubs7+bt7+ft7+ft8Oju8Oju8env8erv8evw8u3y8+/z9fH19vP29/X3+Pf5+fj6+vr7/Pz8/f3+/v///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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'); + border-radius: 23px; + display: block; + height: 44px; + margin: auto; + margin-bottom: 10px; + width: 44px; +} + + +/*------------------------Estructura pagina------------------------*/ + +div.content { + overflow: hidden; + padding: 0; + width: 100%; + height: 100%; + background-size: 100% 100%; +} + + div.panel_items { + height: 100%; + width: 60%; + overflow: hidden; + float: left; + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + padding: 20px; + padding-left:10px; + padding-right: 0; +} + div.panel_items_vertical { + height: 100%; + width: 100%; + overflow: hidden; + float: left; + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + padding: 20px; + padding-left:20px; + padding-right: 0; +} + div.panel_info { + padding: 20px; + height: 100%; + width: 40%; + float: left; + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + padding-right: 10px; +} + div.panel_info_vertical { + padding: 20px; + height: 100%; + width: 40%; + float: left; + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + padding-right: 10px; + display: none; +} +/*------------------------header------------------------*/ + +div.header { + background-color: #01455c; + color: #ffffff; + height: 50px; +} +div.header > div.logo { + float: left; + height: 50px; + width: 70px; + background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2270px%22%20height%3D%2250px%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Crect%20fill%3D%22%2391D9E8%22%20stroke%3D%22%2301455C%22%20stroke-width%3D%221%22%20x%3D%229%22%20y%3D%2215%22%20width%3D%2240.4%22%20height%3D%2226.5%22%2F%3E%0A%3Crect%20fill%3D%22%2303BFEC%22%20stroke%3D%22%2301455C%22%20stroke-width%3D%221%22%20x%3D%226%22%20y%3D%229%22%20width%3D%2210.8%22%20height%3D%229.3%22%20rx%3D%222%22%20ry%3D%222%22%2F%3E%0A%3Crect%20fill%3D%22%2303BFEC%22%20stroke%3D%22%2301455C%22%20stroke-width%3D%221%22%20x%3D%2237%22%20y%3D%2235%22%20width%3D%2215.5%22%20height%3D%2212.4%22%20rx%3D%222%22%20ry%3D%222%22%2F%3E%0A%3Crect%20fill%3D%22%2300ABE3%22%20stroke%3D%22%2301455C%22%20stroke-width%3D%221%22%20x%3D%2233%22%20y%3D%222%22%20width%3D%2234.2%22%20height%3D%2225%22%20rx%3D%222%22%20ry%3D%222%22%2F%3E%0A%3Crect%20fill%3D%22%2303BFEC%22%20stroke%3D%22%2301455C%22%20stroke-width%3D%221%22%20x%3D%223%22%20y%3D%2227%22%20width%3D%2224.8%22%20height%3D%2217%22%20rx%3D%222%22%20ry%3D%222%22%2F%3E%0A%3C%2Fsvg%3E"); +} + +div.header > a.settings:after { + background-color: transparent; + background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2230px%22%20height%3D%2230px%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cpath%20fill%3D%22%23FFFFFF%22%20fill-rule%3D%22evenodd%22%20d%3D%22M7%2026c0%2C-1%200%2C-1%200%2C-2%20-1%2C-1%20-2%2C-1%20-3%2C-1%20-1%2C0%20-2%2C0%20-2%2C0%200%2C-1%200%2C-2%201%2C-3%200%2C0%200%2C-1%200%2C-1%200%2C-1%200%2C-2%20-1%2C-2%20-1%2C0%20-2%2C-1%20-2%2C-2%200%2C-1%201%2C-1%202%2C-2%200%2C0%201%2C0%201%2C-1%201%2C0%200%2C-2%200%2C-2%20-1%2C-1%20-1%2C-2%20-1%2C-2%200%2C-1%201%2C-1%202%2C-1%201%2C0%201%2C0%202%2C0%201%2C-1%201%2C-2%201%2C-3%200%2C-1%200%2C-2%200%2C-2%201%2C0%202%2C0%203%2C1%200%2C0%201%2C0%201%2C0%201%2C0%202%2C0%202%2C-1%200%2C-1%201%2C-2%202%2C-2%201%2C0%201%2C1%202%2C2%200%2C0%200%2C1%201%2C1%200%2C1%202%2C0%202%2C0%201%2C-1%202%2C-1%202%2C-1%201%2C0%201%2C1%201%2C2%200%2C1%200%2C1%200%2C2%201%2C1%202%2C1%203%2C1%201%2C0%202%2C0%202%2C0%200%2C1%200%2C2%20-1%2C3%200%2C0%200%2C1%200%2C1%200%2C1%200%2C2%201%2C2%201%2C0%202%2C1%202%2C2%200%2C1%20-1%2C1%20-2%2C2%200%2C0%20-1%2C0%20-1%2C1%20-1%2C0%200%2C2%200%2C2%201%2C1%201%2C2%201%2C2%200%2C1%20-1%2C1%20-2%2C1%20-1%2C0%20-1%2C0%20-2%2C0%20-1%2C1%20-1%2C2%20-1%2C3%200%2C1%200%2C2%200%2C2%20-1%2C0%20-2%2C0%20-3%2C-1%200%2C0%20-1%2C0%20-1%2C0%20-1%2C0%20-2%2C0%20-2%2C1%200%2C1%20-1%2C2%20-2%2C2%20-1%2C0%20-1%2C-1%20-2%2C-2%200%2C0%200%2C-1%20-1%2C-1%200%2C-1%20-2%2C0%20-2%2C0%20-1%2C1%20-2%2C1%20-2%2C1%20-1%2C0%20-1%2C-1%20-1%2C-2zm8%20-16c3%2C0%205%2C2%205%2C5%200%2C3%20-2%2C5%20-5%2C5%20-3%2C0%20-5%2C-2%20-5%2C-5%200%2C-3%202%2C-5%205%2C-5z%22%2F%3E%0A%3C%2Fsvg%3E"); + background-position: 50% 50%; + background-repeat: no-repeat; + border-radius: 16px; + content: ""; + margin: 10px; + height: 30px; + width: 30px; + float: right; +} +div.header > a.settings:hover:after { + background-color: transparent; + background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2230px%22%20height%3D%2230px%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cpath%20fill%3D%22%2300779f%22%20fill-rule%3D%22evenodd%22%20d%3D%22M7%2026c0%2C-1%200%2C-1%200%2C-2%20-1%2C-1%20-2%2C-1%20-3%2C-1%20-1%2C0%20-2%2C0%20-2%2C0%200%2C-1%200%2C-2%201%2C-3%200%2C0%200%2C-1%200%2C-1%200%2C-1%200%2C-2%20-1%2C-2%20-1%2C0%20-2%2C-1%20-2%2C-2%200%2C-1%201%2C-1%202%2C-2%200%2C0%201%2C0%201%2C-1%201%2C0%200%2C-2%200%2C-2%20-1%2C-1%20-1%2C-2%20-1%2C-2%200%2C-1%201%2C-1%202%2C-1%201%2C0%201%2C0%202%2C0%201%2C-1%201%2C-2%201%2C-3%200%2C-1%200%2C-2%200%2C-2%201%2C0%202%2C0%203%2C1%200%2C0%201%2C0%201%2C0%201%2C0%202%2C0%202%2C-1%200%2C-1%201%2C-2%202%2C-2%201%2C0%201%2C1%202%2C2%200%2C0%200%2C1%201%2C1%200%2C1%202%2C0%202%2C0%201%2C-1%202%2C-1%202%2C-1%201%2C0%201%2C1%201%2C2%200%2C1%200%2C1%200%2C2%201%2C1%202%2C1%203%2C1%201%2C0%202%2C0%202%2C0%200%2C1%200%2C2%20-1%2C3%200%2C0%200%2C1%200%2C1%200%2C1%200%2C2%201%2C2%201%2C0%202%2C1%202%2C2%200%2C1%20-1%2C1%20-2%2C2%200%2C0%20-1%2C0%20-1%2C1%20-1%2C0%200%2C2%200%2C2%201%2C1%201%2C2%201%2C2%200%2C1%20-1%2C1%20-2%2C1%20-1%2C0%20-1%2C0%20-2%2C0%20-1%2C1%20-1%2C2%20-1%2C3%200%2C1%200%2C2%200%2C2%20-1%2C0%20-2%2C0%20-3%2C-1%200%2C0%20-1%2C0%20-1%2C0%20-1%2C0%20-2%2C0%20-2%2C1%200%2C1%20-1%2C2%20-2%2C2%20-1%2C0%20-1%2C-1%20-2%2C-2%200%2C0%200%2C-1%20-1%2C-1%200%2C-1%20-2%2C0%20-2%2C0%20-1%2C1%20-2%2C1%20-2%2C1%20-1%2C0%20-1%2C-1%20-1%2C-2zm8%20-16c3%2C0%205%2C2%205%2C5%200%2C3%20-2%2C5%20-5%2C5%20-3%2C0%20-5%2C-2%20-5%2C-5%200%2C-3%202%2C-5%205%2C-5z%22%2F%3E%0A%3C%2Fsvg%3E"); + background-position: 50% 50%; + background-repeat: no-repeat; + border-radius: 16px; + content: ""; + margin: 10px; + height: 30px; + width: 30px; + float: right; +} +div.header > h1.heading { + position: absolute; + left: 90px; + top: 10px; + margin: 0px; + text-align: left; + font-size: 1.2em; +} +/*------------------------footer------------------------*/ + +div.footer { + background-color: #01455c; + text-shadow: none; + border-style: none; + color: #38C; + height: 30px; +} +div.footer > div { + width: 33.3%; + height: 100%; + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + float:left; + padding:5px; + font-weight: 700; + color: #38C; + +} +div.footer > div.status { + text-align: right; +} +div.footer > div.links > a { + color: #38C; + text-decoration: underline; +} +div.footer > div.links { + text-align: center; +} + +/*------------------------media_info------------------------*/ + +div.panel_info > div.media_info { + height: 100%; + width: 100%; + padding: 10px; + background-color: #005d7c; + text-align: center; + color: #ffffff; + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + background-size: 100% 100%; +} +div.panel_info > div.version_info { + color: #ffffff; + font-size: 12px; + width: inherit; + position: absolute; + text-align: right; + padding-right: 40px; + margin-top: -40px; + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; +} +div.panel_info > div.media_info > img { + height: 60%; + max-width:100%; + display: none; + margin-left: auto; + margin-right: auto; +} +div.panel_info > div.media_info > h3 { + font-size: 10pt; + display: none; + height: 10%; + margin: 0px; + border-top-style: solid; + border-top-width: 10px; + border-top-color: transparent; + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; +} +div.panel_info > div.media_info > div { + font-size: 10pt; + text-align: justify; + display: none; + width: 100%; + overflow: hidden; + height: 30%; + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; +} + + +/*------------------------dialogs------------------------*/ +div.window_overlay { + width: 100%; + height: 100%; + top: 0; + margin: 0; + background-color: #00779f; + opacity: 0.8; + display: none; + position: fixed; + z-index: 100; +} +div.window_heading { + background-color: #01455c; + overflow: hidden; + height:25px; + color: #ffffff; + text-align: center; + background-color: #01455C; + overflow: hidden; + padding-top: 5px; + white-space: nowrap; + padding-right: 25px; + text-overflow: ellipsis; +} +a.window_close:after { + background-color: rgba(0, 0, 0, 0.3); + background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%2214px%22%20height%3D%2214px%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cpolygon%20fill%3D%22%23FFFFFF%22%20points%3D%2214%2C3%2011%2C0%207%2C4%203%2C0%200%2C3%204%2C7%200%2C11%203%2C14%207%2C10%2011%2C14%2014%2C11%2010%2C7%22%2F%3E%0A%3C%2Fsvg%3E"); + background-position: 50% 50%; + background-repeat: no-repeat; + border-radius: 16px; + content: ""; + display: block; + height: 22px; + left: 50%; + margin-left: -11px; + margin-top: -11px; + position: absolute; + top: 50%; + width: 22px; +} +a.window_close { + border-color: #F6F6F6; + border-radius: 5px; + border-style: solid; + border-width: 1px; + background-color: #F6F6F6; + border-radius: 10px; + height: 20px; + position: absolute; + right: 5px; + top: 5px; + width: 20px; + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; +} +a.window_close:focus { + background-color: #01455c; + border-color: #ffffff; +} +a.control_button { + background-color: #005D7C; + border-color: #005D7C; + border-radius: 5px; + border-style: solid; + border-width: 1px; + color: #FFF; + display: inline-block; + font-size: 12.5px; + font-weight: 700; + padding-bottom: 8.75px; + padding-left: 12.5px; + padding-right: 12.5px; + padding-top: 8.75px; + position: relative; + top: 4px; + text-decoration: none; +} +a.button_close, +a.button_ok { + padding-left: 37.5px; +} +a.button_ok:after { + background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%2214px%22%20height%3D%2214px%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cpolygon%20style%3D%22fill%3A%23FFFFFF%3B%22%20points%3D%2214%2C4%2011%2C1%205.003%2C6.997%203%2C5%200%2C8%204.966%2C13%204.983%2C12.982%205%2C13%22%2F%3E%0A%3C%2Fsvg%3E"); + background-color: rgba(0, 0, 0, 0.3); + background-position: 50% 50%; + background-repeat: no-repeat; + border-radius: 16px; + content: ""; + display: block; + height: 22px; + left: 20px; + margin-left: -11px; + margin-top: -11px; + position: absolute; + top: 50%; + width: 22px +} +a.button_close:after { + background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%2214px%22%20height%3D%2214px%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cpolygon%20fill%3D%22%23FFFFFF%22%20points%3D%2214%2C3%2011%2C0%207%2C4%203%2C0%200%2C3%204%2C7%200%2C11%203%2C14%207%2C10%2011%2C14%2014%2C11%2010%2C7%22%2F%3E%0A%3C%2Fsvg%3E"); + background-color: rgba(0, 0, 0, 0.3); + background-position: 50% 50%; + background-repeat: no-repeat; + border-radius: 16px; + content: ""; + display: block; + height: 22px; + left: 20px; + margin-left: -11px; + margin-top: -11px; + position: absolute; + top: 50%; + width: 22px +} +a.control_button:focus { + background-color: #01455c; + border-color: #ffffff; + border-style: solid; +} +div.window_footer { + border-top-style: solid; + border-top-color: #01455c; + border-top-width: 2px; + height: 45px; + background-color: #00779f; + text-align: center; +} + + +/*------------------------window_progress------------------------*/ +div.window_progress { + display: none; + background-color: #00779F; + width: 500px; + margin: auto; + top: 150px; + position: relative; + z-index: 101; + border-style: solid; + border-color: #ffffff; + border-width: 2px; +} + +div.window_progress > div.progress_background { + margin: 5px; + height: 10px; + background-color: #005D7C; +} +div.window_progress > div.progress_background > div.progress { + width: 0%; + height: 10px; + background-color: #ffffff; +} +div.window_progress > div.window_message { + overflow: hidden; + min-height: 70px; + max-height: 300px; + background-color: #00779f; + text-align: left; + padding: 10px; + overflow-y: auto; + color: #ffffff; +} + + +/*------------------------window_background_progress------------------------*/ +div.window_background_progress { + top:0px; + width: 350px; + margin: 0px; + margin-left: 40%; + margin-right: 40%; + background-color: #00779F; + position: absolute; + z-index: 101; + border-style: solid; + border-color: #ffffff; + border-width: 2px; + display: none; +} + +div.window_background_progress > div.progressbar_background { + margin: 5px; + height: 10px; + background-color: #005D7C; +} +div.window_background_progress > div.progressbar_background > div.progressbar { + width: 0%; + height: 10px; + background-color: #ffffff; +} +div.window_background_progress > div.window_message{ + overflow: hidden; + font-size:12px; + padding:5px; + padding-top:0px; + background-color: #00779f; + text-align: left; + overflow-y: auto; + color: #ffffff; +} +div.window_background_progress > div.window_heading { + overflow: hidden; + font-size:14px; + font-weight:bold; + background-color: #00779f; + padding:5px; + padding-bottom:0px; + text-align: left; + overflow-y: auto; + color: #F6AB36; +} + +/*------------------------window_input------------------------*/ + +div.window_input { + display: none; + background-color: #00779F; + width: 500px; + margin: auto; + top: 150px; + position: relative; + z-index: 101; + border-style: solid; + border-color: #ffffff; + border-width: 2px; +} +div.window_input > div.control_input { + height: 36px; + padding: 5px; +} +input.control_input { + position: relative; + float:left; + width: 100%; + height: 34px; + z-index: 100; + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + margin: 0px; + padding-left: 10px; + padding-right: 10px; + border-style:none; + background-color: transparent; + font-style: normal; + font-weight: bold; + color: #FFFFFF; + font-size: 16px; + font-family: sans-serif; +} + +label.control_input { + position: absolute; + left: 5px; + right :5px; + height:34px; + margin: 0px; + background-color: #005D7C; + border-radius: 40px; + border-style: solid; + border-color: #01455c; + border-width: 2px; + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + +} + + +/*------------------------window_recaptcha------------------------*/ +div.window_recaptcha { + display: none; + background-color: #00779F; + width: 350px; + margin: auto; + top: 150px; + position: relative; + z-index: 101; + border-style: solid; + border-color: #ffffff; + border-width: 2px; +} +div.window_recaptcha > div.window_message { + overflow-y: auto; + overflow-x: hidden; + max-height: 50px; + background-color: #00779f; + padding: 10px; + color: #ffffff; + text-align: center; + border-bottom-style: solid; + border-bottom-color: #01455c; + border-bottom-width: 2px; +} +div.window_recaptcha > div.window_image { + height: 340px; + background-size: 100% 100%; + background-origin: content-box; + background-clip: content-box; + padding: 5px; +} + +div.window_recaptcha > div.window_image > a{ + border-style: solid; + border-width: 2px; + border-color: transparent; + float: left; + width: 33.333%; + height: 33.333%; + box-sizing: border-box; +} +div.window_recaptcha > div.window_image > a:focus{ + border-color: #000000; +} +div.window_recaptcha > div.window_image > a.selected{ + background-color: #FFFFFF; + opacity: 0.5; +} +div.window_recaptcha > div.window_image > a.selected:after { + background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%2214px%22%20height%3D%2214px%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cpolygon%20style%3D%22fill%3A%23FFFFFF%3B%22%20points%3D%2214%2C4%2011%2C1%205.003%2C6.997%203%2C5%200%2C8%204.966%2C13%204.983%2C12.982%205%2C13%22%2F%3E%0A%3C%2Fsvg%3E"); + background-color: rgba(0, 0, 0, 0.3); + background-position: 50% 50%; + background-repeat: no-repeat; + border-radius: 16px; + content: ""; + display: block; + height: 22px; + margin-left: 44px; + margin-top: 44px; + width: 22px +} + +/*------------------------window_ok & window_yesno------------------------*/ +div.window_yesno, +div.window_ok { + display: none; + background-color: #00779F; + width: 500px; + margin: auto; + top: 150px; + position: relative; + z-index: 101; + border-style: solid; + border-color: #ffffff; + border-width: 2px; +} +div.window_yesno > div.window_message, +div.window_ok > div.window_message { + overflow-y: auto; + overflow-x: hidden; + min-height: 70px; + max-height: 300px; + background-color: #00779f; + text-align: left; + padding: 10px; + color: #ffffff; +} + + +/*------------------------window_notification------------------------*/ +div.window_notification { + display: none; + background-color: #00779F; + width: 300px; + bottom: 50px; + position: absolute; + z-index: 101; + border-style: solid; + border-color: #ffffff; + border-width: 2px; + right: 20px; +} +div.window_notification > div.window_heading { + overflow-y: auto; + overflow-x: hidden; + height: 20px; + background-color: #00779f; + text-align: left; + padding: 5px; + padding-bottom: 0px; + color: #F6AB36; +} +div.window_notification > div.window_message { + overflow-y: auto; + overflow-x: hidden; + height: 20px; + height: 20px; + background-color: #00779f; + text-align: left; + padding: 5px; + color: #ffffff; +} +div.window_notification > div.window_icon0 { + background-color: transparent; + background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%2236px%22%20height%3D%2236px%22%20xml%3Aspace%3D%22preserve%22%20viewBox%3D%220%200%2036%2036%22%3E%0A%3Cpath%20fill%3D%22%2301455c%22%20fill-rule%3D%22nonzero%22%20d%3D%22M22%2031l-2%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%202%20-1%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%201%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200zm-4%204l0%20-1%200%200%200%200%200%200%200%200%200%20-1%201%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%201%200%200%200%200%200%200%200%200%200%200%200%200%20-1%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20-1%200%200%200%200%202%200%200%200%200%201%200%200%200%200%200%200%200%200%200%201%200%200%200%200%200%200%200%200%20-1%201%200%200%200%200%200%200%200%200%200%200%200%201%200%200%20-1%200%200%200%200%200%200%200%200%200%20-1%200%200%200%200%200%200%200%200%200%20-1%200%200%200%200%200%200%200zm-4%20-4l2%200%200%200%200%200%200%200%200%201%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%201%200%200%200%200%200%200%200%200%200%200%201%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%201%200%200%201%200%200%200%200%200%200%200%201%200%200%200%200%20-1%200%200%200%200%200%200%200%200%200%20-1%200%200%200%200%200%200%200%200%200%20-1%200%200%200%200%20-1%200%200%200%200%200%200%200%200%20-1%200%200%20-1%200%200%200%200%200%200%200%200%200%20-1%200%200%200%200%200%200%200%200%200%20-1%200%200%200%200zm0%20-1l2%201%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20-2%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20-1%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200zm4%20-29l0%201%200%200%200%200%200%200%200%200%200%200%200%201%200%200%200%200%200%200%20-1%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%201%200%200%200%200%200%200%200%200%200%200%200%200%20-2%200%200%200%200%200%200%20-1%200%200%200%200%200%200%200%200%200%200%200%200%200%20-1%200%200%200%200%200%200%200%200%201%200%200%200%200%200%200%20-1%200%200%200%200%200%200%200%200%201%200%200%200%200%200%200%200%200%200%200%200%200%200%201%200%200%200%200%200%200%200zm3%203l-2%200%200%200%200%200%200%200%200%200%200%20-1%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20-1%200%200%200%200%200%200%200%200%20-1%200%200%200%200%200%200%200%200%200%20-1%200%200%200%200%200%200%201%200%200%200%200%200%200%200%200%200%200%200%201%200%200%200%200%200%200%200%200%200%200%200%200%200%200%201%200%200%201%200%200%200%200%200%200%200%200%200%200%200%200%201%200%200%200%200%200%200%200%200%200%200%200%201%200%200%200%200zm-1%20-1l0%202%20-1%20-1%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%202%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20-1%20-1zm0%202l-1%200%200%20-1%201%201zm9%209l-2%200%200%200%200%20-1%200%200%200%200%200%20-1%200%200%200%20-1%200%200%20-1%200%200%20-1%200%200%200%200%200%20-1%200%200%20-1%200%200%20-1%200%200%200%200%20-1%200%200%20-1%200%200%200%200%20-1%200%200%20-1%200%200%20-1%200%200%200%200%200%20-1%20-1%200%200%200%200%20-1%200%200%200%200%20-2%201%200%200%200%201%200%200%201%201%200%200%200%200%200%201%200%200%201%201%200%200%200%200%201%201%200%200%200%200%201%200%200%201%200%200%201%200%200%200%200%201%201%200%200%200%201%200%200%200%200%201%201%200%200%200%201%200%200%200%201%200%200%200%201%200%200zm-2%2010l0%20-10%202%200%200%2010%200%200%20-2%200zm6%207l0%20-2%200%202%200%200%20-1%200%200%200%200%200%200%200%20-1%200%200%200%200%200%20-1%20-1%200%200%200%200%200%200%20-1%200%200%20-1%200%200%200%200%20-1%200%200%200%200%20-1%200%200%200%200%200%20-1%20-1%200%200%200%200%20-1%200%200%200%200%200%200%200%20-1%200%200%200%200%200%20-1%202%200%200%200%200%201%200%200%200%200%200%200%200%201%200%200%200%200%200%200%200%201%200%200%201%200%200%200%200%200%200%201%200%200%200%200%200%200%201%200%200%200%200%200%200%201%200%200%200%200%201%200%200%200%200%200%200%200%200%200%201%200%200%200%200%200%200%202zm-30%20-2l30%200%200%202%20-30%200%200%20-2zm4%20-5l2%200%200%200%200%201%200%200%200%200%200%201%200%200%200%200%200%200%200%201%20-1%200%200%200%200%201%200%200%200%200%200%200%200%201%20-1%200%200%200%200%200%200%201%20-1%200%200%200%200%200%200%200%20-1%201%200%200%200%200%20-1%200%200%200%200%200%200%200%20-1%200%200%200%200%20-2%200%200%200%200%201%200%200%200%200%200%200%200%200%200%201%200%200%200%200%200%200%20-1%200%200%200%200%201%200%200%200%200%200%200%200%200%20-1%200%200%200%200%200%200%201%200%200%20-1%200%200%200%200%200%200%200%20-1%200%200%200%200%200%200%200%20-1%200%200%200%200zm2%20-10l0%2010%20-2%200%200%20-10%200%200%202%200zm6%20-10l2%200%20-1%201%200%200%20-1%200%200%200%200%200%20-1%201%200%200%200%200%20-1%200%200%200%200%201%20-1%200%200%200%200%200%20-1%200%200%201%200%200%200%200%200%201%20-1%200%200%200%200%201%200%200%200%200%200%201%20-1%200%200%200%200%201%200%200%200%201%200%200%200%200%200%201%20-2%200%200%20-1%200%200%200%20-1%200%200%200%20-1%200%200%201%20-1%200%200%200%200%200%20-1%200%200%200%20-1%201%200%200%200%200%20-1%200%200%201%20-1%200%200%200%200%201%200%200%20-1%200%200%201%200%200%20-1%201%200%200%200%200%200%201%200%200%20-1%201%200%200%200%201%200%20-1%201zm2%200l0%201%20-1%200%201%20-1z%22%2F%3E%0A%3C%2Fsvg%3E"); + background-position: 50% 50%; + background-repeat: no-repeat; + height: 35px; + padding: 10px; + float: left; + width: 35px; +} +div.window_notification > div.window_icon1 { + background-color: transparent; + background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%2236px%22%20height%3D%2236px%22%20xml%3Aspace%3D%22preserve%22%20viewBox%3D%220%200%2036%2036%22%3E%0A%3Cpath%20fill%3D%22%2301455c%22%20fill-rule%3D%22nonzero%22%20d%3D%22M25%2019l-8%20-15%202%20-1%208%2014%20-2%202zm8%2014l-8%20-14%202%20-2%208%2015%20-1%201%20-1%200zm2%20-1l1%201%20-2%200%201%20-1zm-17%20-1l16%200%200%202%20-16%200%200%200%200%20-2zm-16%200l16%200%200%202%20-16%200%20-1%20-1%201%20-1zm0%202l-2%200%201%20-1%201%201zm9%20-14l-8%2014%20-2%20-1%208%20-15%202%202zm8%20-15l-8%2015%20-2%20-2%208%20-14%202%200%200%201zm-2%20-1l1%20-2%201%202%20-2%200z%22%2F%3E%0A%3Crect%20fill%3D%22%2301455c%22%20x%3D%2216%22%20y%3D%2212%22%20width%3D%223.57356%22%20height%3D%2212.5059%22%2F%3E%0A%3Crect%20fill%3D%22%2301455c%22%20x%3D%2216%22%20y%3D%2226%22%20width%3D%223.57356%22%20height%3D%223.57357%22%2F%3E%0A%3C%2Fsvg%3E"); + background-position: 50% 50%; + background-repeat: no-repeat; + height: 35px; + padding: 10px; + float: left; + width: 35px; +} +div.window_notification > div.window_icon2 { + background-color: transparent; + background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%2236px%22%20height%3D%2236px%22%20xml%3Aspace%3D%22preserve%22%20viewBox%3D%220%200%2036%2036%22%3E%0A%3Cpolygon%20fill%3D%22%2301455c%22%20points%3D%2211%2C1%2018%2C1%2025%2C1%2030%2C6%2035%2C11%2035%2C18%2035%2C25%2030%2C30%2025%2C35%2018%2C35%2011%2C35%206%2C30%201%2C25%201%2C18%201%2C11%206%2C6%20%22%2F%3E%0A%3Crect%20fill%3D%22%23FFFFFF%22%20transform%3D%22matrix(0.846579%20-0.846579%200.895344%200.895344%209.51313%2012.3418)%22%20width%3D%223.34156%22%20height%3D%2215.7959%22%2F%3E%0A%3Crect%20fill%3D%22%23FFFFFF%22%20transform%3D%22matrix(-0.846579%20-0.846579%200.895344%20-0.895344%2012.3413%2026.4838)%22%20width%3D%223.34156%22%20height%3D%2215.7959%22%2F%3E%0A%3C%2Fsvg%3E"); + background-position: 50% 50%; + background-repeat: no-repeat; + height: 35px; + padding: 10px; + float: left; + width: 35px; +} + +/*------------------------window_player------------------------*/ +div.window_player { + display: none; + background-color: #00779F; + width: 500px; + margin: auto; + top: 150px; + position: relative; + z-index: 101; + border-style: solid; + border-color: #ffffff; + border-width: 2px; +} +div.window_player > div.media_content { + background-color: #00779f; + text-align: left; + padding: 0px; + color: #ffffff; + height:282px; +} + +.media_player { + width:100%; + height:100%; + top:0px; + left:0px; +} + + +/*------------------------window_select------------------------*/ +div.window_select { + display: none; + background-color: #00779F; + width: 350px; + margin: auto; + top: 150px; + position: relative; + z-index: 101; + border-style: solid; + border-color: #ffffff; + border-width: 2px; +} + +div.window_select > ul.control_list { + background-color: #00779f; + max-height: 500px; + overflow: auto; + padding: 0; + margin: 0px; + padding-top: 5px; +} +div.window_select > ul.control_list > li.item { + border-color: transparent; + border-style: solid; + border-width: 5px; + display: block; + border-top-width: 0px; +} +div.window_select > ul.control_list > li.item > a > h3 { + color: #FFF; + font-size: 16px; + margin: 0px; + overflow: hidden; + white-space: nowrap; + display: block; + width: 295px; + max-width: 295px; + text-overflow: ellipsis; + display: table-cell; + vertical-align: middle; + height: 25px; +} +div.window_select > ul.control_list > li.item > a:after { + background-color: rgba(0, 0, 0, 0.3); + background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%2214px%22%20height%3D%2214px%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M9%2C5v3l5-4L9%2C0v3c0%2C0-5%2C0-5%2C7C6%2C5%2C9%2C5%2C9%2C5z%20M11%2C12H2V5h1l2-2H0v11h13V7l-2%2C2V12z%22%2F%3E%0A%3C%2Fsvg%3E"); + background-position: 50% 50%; + background-repeat: no-repeat; + border-radius: 16px; + color: #FFF; + content: ""; + display: block; + height: 22px; + left: 9px; + margin-top: -11px; + position: absolute; + top: 50%; + width: 22px; +} +div.window_select > ul.control_list > li.item > a{ + background-color: #005D7C; + border-color: transparent; + border-style: solid; + border-width: 4px; + display: block; + height: 25px; + padding-bottom: 0px; + padding-left: 40px; + padding-right: 5px; + padding-top: 0px; + position: relative; + text-decoration: none; +} +div.window_select > ul.control_list > li.item > a:focus { + background-color: #01455c; + border-color: #ffffff; +} + + +/*------------------------window_info------------------------*/ +a.disabled:focus { + background-color: #418196; + color: #a7b4c0; + border-color: #FFFFFF +} +a.disabled { + background-color: #418196; + color: #a7b4c0; + border-color: #005D7C; +} + +div.window_info { + display: none; + background-color: #00779F; + width: 600px; + margin: auto; + top: 150px; + position: relative; + z-index: 101; + border-style: solid; + border-color: #ffffff; + border-width: 2px; +} +div.window_info > div.window_content { + height: 300px; + overflow-y: auto; + background-color: #00779f; +} +div.window_info > div.window_content > img.info_fanart{ + height: 296px; + width: 400px; + opacity: 0.5; + float: left; +} +div.window_info > div.window_content > img.info_poster { + height: 296px; + width: 200px; + float: left; +} +div.window_info > div.window_content > span { + position: absolute; + float: left; + font-size: 15px; + max-width: 240px; + width: 240px; + color: #fff; + font-weight: bold; + white-space: nowrap; + overflow: hidden; + height: 20px; + text-shadow: 1px 1px #000; +} +div.window_info > div.window_content > span.page_info { + right:10px; + top: 300px; + width: auto; +} +div.window_info > div.window_content > span.line1_head { + left:10px; + top: 30px; +} +div.window_info > div.window_content > span.line1 { + left:150px; + top: 30px; +} +div.window_info > div.window_content > span.line2_head { + left:10px; + top: 50px; +} +div.window_info > div.window_content > span.line2 { + left:150px; + top: 50px; +} +div.window_info > div.window_content > span.line3_head { + left:10px; + top: 70px; +} +div.window_info > div.window_content > span.line3 { + left:150px; + top: 70px; + position: absolute; +} +div.window_info > div.window_content > span.line4_head { + left:10px; + top: 90px; + +} +div.window_info > div.window_content > span.line4 { + left:150px; + top: 90px; +} +div.window_info > div.window_content > span.line5_head { + left:10px; + top: 110px; +} +div.Video_Info > div.window_content > span.line5 { + left:150px; + top: 110px; +} +div.window_info > div.window_content > span.line6_head { + left:10px; + top: 130px; +} +div.window_info > div.window_content > span.line6 { + left:150px; + top: 130px; +} +div.window_info > div.window_content > span.line7_head { + left:10px; + top: 150px; +} +div.window_info > div.window_content > span.line7 { + left:150px; + top: 150px; +} +div.window_info > div.window_content > span.line5_head { + left: 0px; + top: 170px; + width: 400px; + text-align: center; + max-width: 400px; +} +div.window_info > div.window_content > span.line8 { + left: 10px; + top: 190px; + max-width: 380px; + width: 380px; + max-height: 135px; + height: 135px; + overflow: hidden; + text-align: justify; + white-space: normal; +} + +/*------------------------window_settings------------------------*/ +div.window_settings { + display: none; + background-color: #00779F; + width: 650px; + margin: auto; + top: 150px; + position: relative; + z-index: 101; + border-style: solid; + border-color: #ffffff; + border-width: 2px; +} +div.window_settings > div.category_container { + border-bottom-style: solid; + border-bottom-color: #01455c; + border-bottom-width: 2px; + height: 45px; + background-color: #00779f; + text-align: center; +} +div.window_settings > div.controls_container { + height: 295px; + overflow-y: auto; + background-color: #00779f; +} + +div.window_settings > div.controls_container > ul.settings_list { + height: inherit; + margin: 0px; + overflow-y: auto; + padding: 0px; + max-height: 300px; +} + +div.window_settings > div.controls_container > ul.settings_list > li{ + border-style: solid; + border-width: 6px; + border-bottom-width: 3px; + border-top-width: 3px; + border-color: transparent; + padding: 0px; + display:block; +} + +div.window_settings > div.controls_container > ul.settings_list > li > div { + height: 15px; + border-style: solid; + border-width: 4px; + border-color: transparent; +} +div.window_settings > div.controls_container > ul.settings_list > li > div.separator { + height: 0px; + background-color: #005d7c; + border-style: solid; + border-width: 4px; + border-radius: 10px; + border-color: transparent; +} +div.window_settings > div.controls_container > ul.settings_list > li > div.control { + height: 38px; + background-color: #005d7c; + border-style: solid; + border-width: 4px; + border-color: transparent; +} +div.window_settings > div.controls_container > ul.settings_list > li > div.control_focused { + background-color: #01455c; + border-color: #FFFFFF; +} + +div.window_settings > div.controls_container > ul.settings_list > li > div > span.name { + width: 500px; + float: left; + font-size: 15px; + font-weight: bold; + white-space: nowrap; + overflow:hidden; + text-overflow: ellipsis; +} +div.window_settings > div.controls_container > ul.settings_list > li > div.control > span.name { + margin: 0px; + width: 330px; + float: left; + padding: 9px; + font-size: 15px; + font-weight: bold; + white-space: nowrap; + overflow:hidden; + text-overflow: ellipsis; +} + +div.window_settings > div.controls_container > ul.settings_list > li > div.control > input.checkbox { + position: relative; + float: right; + right:2px; + width: 100px; + height: 28px; + z-index: 100; + margin-top: 4px; + + border-style: solid; + border-width: 6px; + border-color: transparent; + background-color: transparent; + cursor: pointer; + opacity: 0; +} +div.window_settings > div.controls_container > ul.settings_list > li > div.control > label.checkbox { + position: relative; + float: right; + width: 100px; + height: 24px; + margin: 4px; + margin-right: -103px; + background: #005D7C; + border-radius: 40px; + border-style: solid; + border-color: #00779f; +} +div.window_settings > div.controls_container > ul.settings_list > li > div.control > input.checkbox:checked ~ label { + background: #005D7C; +} + +div.window_settings > div.controls_container > ul.settings_list > li > div.control > label.checkbox i { + height: 100%; + width: 60%; + border-radius: inherit; + background: #01455c; + position: absolute; + right: 40%; +} +div.window_settings > div.controls_container > ul.settings_list > li > div.control > input.checkbox:checked ~ label i { + right: 0%; +} +div.window_settings > div.controls_container > ul.settings_list > li > div.control > input.checkbox:checked ~ label i:before { + content: "ON"; + right: 110%; +} +div.window_settings > div.controls_container > ul.settings_list > li > div.control > label.checkbox i:before { + content: "OFF"; + font-style: normal; + font-weight: bold; + color: #FFFFFF; + position: absolute; + top: 50%; + margin-top: -9px; + right: -60%; +} +div.window_settings > div.controls_container > ul.settings_list > li > div.control > select > option{ + color: #000000; + font-weight: normal; +} +div.window_settings > div.controls_container > ul.settings_list > li > div.control > select.list { + position: relative; + float: right; + right:9px; + width: 245px; + height: 28px; + z-index: 100; + margin-top: 4px; + + border-style: solid; + border-width: 6px; + border-color: transparent; + background-color: transparent; + cursor: pointer; + + font-style: normal; + font-weight: bold; + color: #FFFFFF; + font-size: 14px; + font-family: sans-serif; +} +div.window_settings > div.controls_container > ul.settings_list > li > div.control > label.list { + position: relative; + float: right; + width: 246px; + height: 24px; + margin: 4px; + margin-right: -241px; + background: #005D7C; + border-radius: 40px; + border-style: solid; + border-color: #00779f; +} +div.window_settings > div.controls_container > ul.settings_list > li > div > label.list i { + position: absolute; + right: 0%; + height: 100%; + width: 30px; + z-index:100; + border-top-right-radius: inherit; + border-bottom-right-radius: inherit; + background: #01455c; + cursor: pointer; + background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222px%22%20height%3D%2222px%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cpolygon%20fill%3D%22%2300000000%22%20stroke%3D%22%23FFFFFF%22%20stroke-width%3D%222%22%20points%3D%224%2C5%2011%2C18%2019%2C5%20%22%2F%3E%0A%3C%2Fsvg%3E"); + background-position: 48% 51%; + background-repeat: no-repeat; + +} + + +div.window_settings > div.controls_container > ul.settings_list > li > div > input.text { + position: relative; + float: right; + right:8px; + width: 228px; + height: 26px; + z-index: 100; + + border-style: solid; + border-width: 6px; + border-color: transparent; + background-color: transparent; + + font-style: normal; + font-weight: bold; + color: #FFFFFF; + font-size: 14px; + font-family: sans-serif; +} + +div.window_settings > div.controls_container > ul.settings_list > li > div > label.text { + position: relative; + float: right; + width: 246px; + height: 24px; + margin: 4px; + margin-right: -238px; + background: #005D7C; + border-radius: 40px; + border-style: solid; + border-color: #00779f; +} +div.window_settings > div.controls_container > ul.settings_list > li > div.control > select:disabled, +div.window_settings > div.controls_container > ul.settings_list > li > div.control > input:disabled { + cursor: default; +} +div.window_settings > div.controls_container > ul.settings_list > li > div.control > select:disabled ~ label, +div.window_settings > div.controls_container > ul.settings_list > li > div.control > input:disabled ~ label { + background: #00779f; +} +div.window_settings > div.controls_container > ul.settings_list > li > div.control > select:disabled ~ label i, +div.window_settings > div.controls_container > ul.settings_list > li > div.control > input:disabled ~ label i{ + cursor: default; +} + +/*------------------------ItemList------------------------*/ +/*itemlist*/ +ul.itemlist { + height: inherit; + margin: 0px; + overflow-y: auto; + padding: 0px; +} + +/*items*/ +ul.itemlist > li { + border-bottom-color: transparent; + border-bottom-style: solid; + border-bottom-width: 13px; + border-radius: 5px; + display: block; + font-size: 16px; + padding-right: 20px; + position: relative; +} +ul.itemlist > li.item_list { + border-bottom-width: 7px; +} + +ul.itemlist > li > a:focus { + background-color: #01455c; + border-color: #ffffff; +} +ul.itemlist > li > a { + position: relative; + height: 78px; + padding: 5px; + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + background-color: #005D7C; + border-color: transparent; + border-radius: 5px; + border-style: solid; + border-width: 4px; + color: #FFFFFF; + display: block; + overflow: hidden; +} +ul.itemlist > li.item_list > a { + height: 28px; + padding: 0px; + padding-left: 3px; +} +ul.itemlist > li > a.item_with_menu { + margin-right: 40px; +} +ul.itemlist > li > a.item_menu { + position: absolute; + top: 0px; + right: 0px; + width: 38px; + margin-right: 20px; +} +ul.itemlist > li > a.item_menu:after { + position: absolute; + top: 50%; + left: 50%; + height: 22px; + width: 22px; + background-color: rgba(0, 0, 0, 0.3); + background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%2214px%22%20height%3D%2214px%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M1%2C4h12c0.553%2C0%2C1-0.447%2C1-1s-0.447-1-1-1H1C0.447%2C2%2C0%2C2.447%2C0%2C3S0.447%2C4%2C1%2C4z%20M13%2C6H1%20C0.447%2C6%2C0%2C6.447%2C0%2C7c0%2C0.553%2C0.447%2C1%2C1%2C1h12c0.553%2C0%2C1-0.447%2C1-1C14%2C6.447%2C13.553%2C6%2C13%2C6z%20M13%2C10H1c-0.553%2C0-1%2C0.447-1%2C1%20s0.447%2C1%2C1%2C1h12c0.553%2C0%2C1-0.447%2C1-1S13.553%2C10%2C13%2C10z%22%2F%3E%0A%3C%2Fsvg%3E"); + background-position: 50% 50%; + background-repeat: no-repeat; + border-radius: 16px; + content: ""; + margin-left: -11px; + margin-top: -11px; +} + +/*images*/ +ul.itemlist > li > a.item > label.fanart { + display: none; +} +ul.itemlist > li > a.item > label.thumbnail { + display: none; +} +ul.itemlist > li > a.item > img.thumbnail { + color: transparent; + border-style: none; + position: absolute; + left: 0px; + top: 0px; + height: 100%; + width: 100%; +} +ul.itemlist > li.item_movie > a.item > img.thumbnail { + height: 100%; + width: auto; + max-width: 110px; +} +ul.itemlist > li.item_list > a.item > img.thumbnail{ + display: none; +} + +/*plot*/ +ul.itemlist > li > a.item > label.plot { + display:none; +} + +/*label*/ +ul.itemlist > li > a.item > h3.label { + margin: 0px; + font-size: 16px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + position: absolute; + padding-top: 19px; + padding-left: 120px; + width: 100%; +} +ul.itemlist > li.item_channel > a.item > h3.label { + padding-left: inherit; + text-align: center; + left: 0px; + right: 0px; +} +ul.itemlist > li.item_list > a.item > h3.label { + padding-left: inherit; + padding-top: 0px; + left: 0px; + right: 0px; +} \ No newline at end of file diff --git a/mediaserver/platformcode/template/favicon.ico b/mediaserver/platformcode/template/favicon.ico new file mode 100644 index 00000000..1cad56c7 Binary files /dev/null and b/mediaserver/platformcode/template/favicon.ico differ diff --git a/mediaserver/platformcode/template/html/config_bool.html b/mediaserver/platformcode/template/html/config_bool.html new file mode 100644 index 00000000..04b20716 --- /dev/null +++ b/mediaserver/platformcode/template/html/config_bool.html @@ -0,0 +1,7 @@ +
  • +
    + %item_label + + +
    +
  • \ No newline at end of file diff --git a/mediaserver/platformcode/template/html/config_category.html b/mediaserver/platformcode/template/html/config_category.html new file mode 100644 index 00000000..984a4510 --- /dev/null +++ b/mediaserver/platformcode/template/html/config_category.html @@ -0,0 +1 @@ +%item_label diff --git a/mediaserver/platformcode/template/html/config_container.html b/mediaserver/platformcode/template/html/config_container.html new file mode 100644 index 00000000..df13bd7c --- /dev/null +++ b/mediaserver/platformcode/template/html/config_container.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mediaserver/platformcode/template/html/config_label.html b/mediaserver/platformcode/template/html/config_label.html new file mode 100644 index 00000000..4f8b2c0c --- /dev/null +++ b/mediaserver/platformcode/template/html/config_label.html @@ -0,0 +1,5 @@ +
  • +
    + %item_label +
    +
  • \ No newline at end of file diff --git a/mediaserver/platformcode/template/html/config_list.html b/mediaserver/platformcode/template/html/config_list.html new file mode 100644 index 00000000..fcb3961a --- /dev/null +++ b/mediaserver/platformcode/template/html/config_list.html @@ -0,0 +1,7 @@ +
  • +
    + %item_label + + +
    +
  • \ No newline at end of file diff --git a/mediaserver/platformcode/template/html/config_sep.html b/mediaserver/platformcode/template/html/config_sep.html new file mode 100644 index 00000000..229a0eef --- /dev/null +++ b/mediaserver/platformcode/template/html/config_sep.html @@ -0,0 +1,4 @@ +
  • +
    +
    +
  • \ No newline at end of file diff --git a/mediaserver/platformcode/template/html/config_text.html b/mediaserver/platformcode/template/html/config_text.html new file mode 100644 index 00000000..965159ac --- /dev/null +++ b/mediaserver/platformcode/template/html/config_text.html @@ -0,0 +1,7 @@ +
  • +
    + %item_label + + +
    +
  • \ No newline at end of file diff --git a/mediaserver/platformcode/template/html/itemlist_banner.html b/mediaserver/platformcode/template/html/itemlist_banner.html new file mode 100644 index 00000000..a07bbb81 --- /dev/null +++ b/mediaserver/platformcode/template/html/itemlist_banner.html @@ -0,0 +1,10 @@ +
  • + + +

    %item_title

    + + + +
    + %item_menu +
  • \ No newline at end of file diff --git a/mediaserver/platformcode/template/html/itemlist_channel.html b/mediaserver/platformcode/template/html/itemlist_channel.html new file mode 100644 index 00000000..051736de --- /dev/null +++ b/mediaserver/platformcode/template/html/itemlist_channel.html @@ -0,0 +1,10 @@ +
  • + +

    %item_title

    + + + + +
    + %item_menu +
  • \ No newline at end of file diff --git a/mediaserver/platformcode/template/html/itemlist_list.html b/mediaserver/platformcode/template/html/itemlist_list.html new file mode 100644 index 00000000..ff9ae77f --- /dev/null +++ b/mediaserver/platformcode/template/html/itemlist_list.html @@ -0,0 +1,10 @@ +
  • + +

    %item_title

    + + + + +
    + %item_menu +
  • \ No newline at end of file diff --git a/mediaserver/platformcode/template/html/itemlist_menu.html b/mediaserver/platformcode/template/html/itemlist_menu.html new file mode 100644 index 00000000..872872f7 --- /dev/null +++ b/mediaserver/platformcode/template/html/itemlist_menu.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mediaserver/platformcode/template/html/itemlist_movie.html b/mediaserver/platformcode/template/html/itemlist_movie.html new file mode 100644 index 00000000..2ee52ac4 --- /dev/null +++ b/mediaserver/platformcode/template/html/itemlist_movie.html @@ -0,0 +1,10 @@ +
  • + +

    %item_title

    + + + + +
    + %item_menu +
  • \ No newline at end of file diff --git a/mediaserver/platformcode/template/html/player_flash.html b/mediaserver/platformcode/template/html/player_flash.html new file mode 100644 index 00000000..82a4a3af --- /dev/null +++ b/mediaserver/platformcode/template/html/player_flash.html @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/mediaserver/platformcode/template/html/player_html.html b/mediaserver/platformcode/template/html/player_html.html new file mode 100644 index 00000000..c7f1b20c --- /dev/null +++ b/mediaserver/platformcode/template/html/player_html.html @@ -0,0 +1 @@ +
    ' %item.extra + patron = '(?s)%s(.*?)' % item.extra bloque = scrapertools.find_single_match(data, patron) - patron = 'href="([^"]+)' + patron = 'href="([^"]+)' patron += '">([^<]+)' matches = scrapertools.find_multiple_matches(bloque, patron) for url, titulo in matches: - itemlist.append(Item(channel = item.channel, - action = "peliculas", - title = titulo, - url = url - )) + itemlist.append(Item(channel=item.channel, + action="peliculas", + title=titulo, + url=url + )) return itemlist @@ -86,22 +86,22 @@ def peliculas(item): year = scrapertools.find_single_match(varios, 'Año.*?kinopoisk">([^<]+)') year = scrapertools.find_single_match(year, '[0-9]{4}') mtitulo = titulo + " (" + idioma + ") (" + year + ")" - new_item = Item(channel = item.channel, - action = "findvideos", - title = mtitulo, - fulltitle = titulo, - thumbnail = thumbnail, - url = url, - contentTitle = titulo, - contentType="movie" - ) + new_item = Item(channel=item.channel, + action="findvideos", + title=mtitulo, + fulltitle=titulo, + thumbnail=thumbnail, + url=url, + contentTitle=titulo, + contentType="movie" + ) if year: new_item.infoLabels['year'] = int(year) itemlist.append(new_item) url_pagina = scrapertools.find_single_match(data, 'next" href="([^"]+)') if url_pagina != "": pagina = "Pagina: " + scrapertools.find_single_match(url_pagina, "page/([0-9]+)") - itemlist.append(Item(channel = item.channel, action = "peliculas", title = pagina, url = url_pagina)) + itemlist.append(Item(channel=item.channel, action="peliculas", title=pagina, url=url_pagina)) return itemlist @@ -120,24 +120,25 @@ def findvideos(item): elif "vimeo" in url: url += "|" + "http://www.allcalidad.com" itemlist.append( - Item(channel = item.channel, - action = "play", - title = titulo, - fulltitle = item.fulltitle, - thumbnail = item.thumbnail, - server = "", - url = url + Item(channel=item.channel, + action="play", + title=titulo, + fulltitle=item.fulltitle, + thumbnail=item.thumbnail, + server=server, + url=url )) itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize()) if itemlist: - itemlist.append(Item(channel = item.channel)) + itemlist.append(Item(channel=item.channel)) itemlist.append(item.clone(channel="trailertools", title="Buscar Tráiler", action="buscartrailer", context="", text_color="magenta")) # Opción "Añadir esta película a la biblioteca de KODI" if item.extra != "library": if config.get_videolibrary_support(): itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green", - filtro=True, action="add_pelicula_to_library", url=item.url, thumbnail = item.thumbnail, + filtro=True, action="add_pelicula_to_library", url=item.url, + thumbnail=item.thumbnail, infoLabels={'title': item.fulltitle}, fulltitle=item.fulltitle, extra="library")) return itemlist diff --git a/plugin.video.alfa/channels/allpeliculas.py b/plugin.video.alfa/channels/allpeliculas.py index 71c40b70..28eeacc4 100644 --- a/plugin.video.alfa/channels/allpeliculas.py +++ b/plugin.video.alfa/channels/allpeliculas.py @@ -2,12 +2,11 @@ import string -from core import config from core import httptools -from core import logger from core import scrapertools from core import servertools from core.item import Item +from platformcode import config, logger __modo_grafico__ = config.get_setting('modo_grafico', "allpeliculas") __perfil__ = int(config.get_setting('perfil', "allpeliculas")) @@ -366,7 +365,7 @@ def episodios(item): for item in itemlist: if item.infoLabels["episodio_titulo"]: item.title = "%dx%02d: %s" % ( - item.contentSeason, item.contentEpisodeNumber, item.infoLabels["episodio_titulo"]) + item.contentSeason, item.contentEpisodeNumber, item.infoLabels["episodio_titulo"]) else: item.title = "%dx%02d: %s" % (item.contentSeason, item.contentEpisodeNumber, item.title) diff --git a/plugin.video.alfa/channels/alltorrent.py b/plugin.video.alfa/channels/alltorrent.py index 8f662aca..85190bb6 100755 --- a/plugin.video.alfa/channels/alltorrent.py +++ b/plugin.video.alfa/channels/alltorrent.py @@ -5,13 +5,12 @@ import re import unicodedata from threading import Thread -from core import config from core import httptools -from core import logger from core import scrapertools from core import servertools from core import tmdb from core.item import Item +from platformcode import config, logger __modo_grafico__ = config.get_setting('modo_grafico', "ver-pelis") @@ -255,14 +254,14 @@ def get_art(item): if id == None: if item.contentType == "movie": urlbing_imdb = "http://www.bing.com/search?q=%s+%s+tv+series+site:imdb.com" % ( - item.fulltitle.replace(' ', '+'), year) + item.fulltitle.replace(' ', '+'), year) data = browser(urlbing_imdb) data = re.sub(r"\n|\r|\t|\s{2}| |http://ssl-proxy.my-addr.org/myaddrproxy.php/", "", data) subdata_imdb = scrapertools.find_single_match(data, '
  • (.*?)h="ID.*?.*?TV Series') else: urlbing_imdb = "http://www.bing.com/search?q=%s+%s+site:imdb.com" % ( - item.fulltitle.replace(' ', '+'), year) + item.fulltitle.replace(' ', '+'), year) data = browser(urlbing_imdb) data = re.sub(r"\n|\r|\t|\s{2}| |http://ssl-proxy.my-addr.org/myaddrproxy.php/", "", data) subdata_imdb = scrapertools.find_single_match(data, '
  • (.*?)h="ID.*?') @@ -282,7 +281,7 @@ def get_art(item): title = scrapertools.find_single_match(item.fulltitle, '\(.*?\)') if item.contentType != "movie": urlbing_imdb = "http://www.bing.com/search?q=%s+%s+tv+series+site:imdb.com" % ( - title.replace(' ', '+'), year) + title.replace(' ', '+'), year) data = browser(urlbing_imdb) data = re.sub(r"\n|\r|\t|\s{2}| |http://ssl-proxy.my-addr.org/myaddrproxy.php/", "", data) @@ -290,7 +289,7 @@ def get_art(item): '
  • (.*?)h="ID.*?.*?TV Series') else: urlbing_imdb = "http://www.bing.com/search?q=%s+%s+site:imdb.com" % ( - title.replace(' ', '+'), year) + title.replace(' ', '+'), year) data = browser(urlbing_imdb) data = re.sub(r"\n|\r|\t|\s{2}| |http://ssl-proxy.my-addr.org/myaddrproxy.php/", "", data) diff --git a/plugin.video.alfa/channels/animeflv.py b/plugin.video.alfa/channels/animeflv.py index 91e97197..67ad3f07 100755 --- a/plugin.video.alfa/channels/animeflv.py +++ b/plugin.video.alfa/channels/animeflv.py @@ -6,9 +6,9 @@ import urlparse from channels import renumbertools from core import httptools from core import jsontools -from core import logger from core import scrapertools from core.item import Item +from platformcode import logger HOST = "https://animeflv.net/" diff --git a/plugin.video.alfa/channels/animeflv_me.py b/plugin.video.alfa/channels/animeflv_me.py index 66361793..5adaf6e9 100755 --- a/plugin.video.alfa/channels/animeflv_me.py +++ b/plugin.video.alfa/channels/animeflv_me.py @@ -5,12 +5,11 @@ import urlparse from os import path from channels import renumbertools -from core import config from core import filetools from core import httptools -from core import logger from core import scrapertools from core.item import Item +from platformcode import config, logger CHANNEL_HOST = "http://animeflv.me/" CHANNEL_DEFAULT_HEADERS = [ diff --git a/plugin.video.alfa/channels/animeflv_ru.py b/plugin.video.alfa/channels/animeflv_ru.py index 9dd5a71a..e7a0df38 100755 --- a/plugin.video.alfa/channels/animeflv_ru.py +++ b/plugin.video.alfa/channels/animeflv_ru.py @@ -6,9 +6,9 @@ import urlparse from channels import renumbertools from core import httptools from core import jsontools -from core import logger from core import scrapertools from core.item import Item +from platformcode import logger HOST = "https://animeflv.ru/" diff --git a/plugin.video.alfa/channels/animeid.py b/plugin.video.alfa/channels/animeid.py index 9e678e04..b7a52c8d 100755 --- a/plugin.video.alfa/channels/animeid.py +++ b/plugin.video.alfa/channels/animeid.py @@ -3,11 +3,10 @@ import re import urlparse -from core import config from core import httptools -from core import logger from core import scrapertools from core.item import Item +from platformcode import config, logger CHANNEL_HOST = "http://animeid.tv/" diff --git a/plugin.video.alfa/channels/animeshd.py b/plugin.video.alfa/channels/animeshd.py index ebbf050c..3fd34f84 100755 --- a/plugin.video.alfa/channels/animeshd.py +++ b/plugin.video.alfa/channels/animeshd.py @@ -4,10 +4,10 @@ import re import urllib from core import httptools -from core import logger from core import scrapertools -from core.item import Item from core import servertools +from core.item import Item +from platformcode import logger tgenero = {"Comedia": "https://s7.postimg.org/ne9g9zgwb/comedia.png", "Drama": "https://s16.postimg.org/94sia332d/drama.png", diff --git a/plugin.video.alfa/channels/anitoonstv.py b/plugin.video.alfa/channels/anitoonstv.py index b13ea9f4..13ea2d75 100644 --- a/plugin.video.alfa/channels/anitoonstv.py +++ b/plugin.video.alfa/channels/anitoonstv.py @@ -3,20 +3,20 @@ import re from channels import renumbertools -from core import config +from channelselector import get_thumb from core import httptools -from core import logger from core import scrapertools from core import servertools from core import tmdb from core.item import Item +from platformcode import config, logger host = "http://www.anitoonstv.com" def mainlist(item): logger.info() - thumb_series = config.get_thumb("thumb_channels_tvshow.png") + thumb_series = get_thumb("channels_tvshow.png") itemlist = list() diff --git a/plugin.video.alfa/channels/areadocumental.py b/plugin.video.alfa/channels/areadocumental.py index e45e72b2..78151414 100755 --- a/plugin.video.alfa/channels/areadocumental.py +++ b/plugin.video.alfa/channels/areadocumental.py @@ -2,11 +2,10 @@ import urllib -from core import config from core import httptools -from core import logger from core import scrapertools from core.item import Item +from platformcode import config, logger host = "http://www.area-documental.com" __perfil__ = int(config.get_setting('perfil', "areadocumental")) diff --git a/plugin.video.alfa/channels/autoplay.py b/plugin.video.alfa/channels/autoplay.py index d4b32f5b..f42a46d5 100755 --- a/plugin.video.alfa/channels/autoplay.py +++ b/plugin.video.alfa/channels/autoplay.py @@ -3,10 +3,9 @@ import os from core import channeltools -from core import config from core import jsontools -from core import logger from core.item import Item +from platformcode import config, logger from platformcode import platformtools __channel__ = "autoplay" diff --git a/plugin.video.alfa/channels/bajui2.py b/plugin.video.alfa/channels/bajui2.py index b091797a..7f042be1 100755 --- a/plugin.video.alfa/channels/bajui2.py +++ b/plugin.video.alfa/channels/bajui2.py @@ -3,10 +3,10 @@ import re import urlparse -from core import logger from core import scrapertools from core import servertools from core.item import Item +from platformcode import logger def mainlist(item): diff --git a/plugin.video.alfa/channels/beeg.py b/plugin.video.alfa/channels/beeg.py index f032da02..345c1b58 100755 --- a/plugin.video.alfa/channels/beeg.py +++ b/plugin.video.alfa/channels/beeg.py @@ -4,9 +4,9 @@ import re import urllib from core import jsontools as json -from core import logger from core import scrapertools from core.item import Item +from platformcode import logger url_api = "" beeg_salt = "" diff --git a/plugin.video.alfa/channels/bityouth.py b/plugin.video.alfa/channels/bityouth.py index 054612d8..99a720da 100755 --- a/plugin.video.alfa/channels/bityouth.py +++ b/plugin.video.alfa/channels/bityouth.py @@ -6,9 +6,9 @@ import urllib import urllib2 import urlparse -from core import logger from core import scrapertools from core.item import Item +from platformcode import logger try: import xbmc diff --git a/plugin.video.alfa/channels/borrachodetorrent.py b/plugin.video.alfa/channels/borrachodetorrent.py index d5a4565f..85d1f0cf 100755 --- a/plugin.video.alfa/channels/borrachodetorrent.py +++ b/plugin.video.alfa/channels/borrachodetorrent.py @@ -7,14 +7,13 @@ from threading import Thread import xbmc import xbmcgui -from core import config from core import httptools -from core import logger from core import scrapertools from core import servertools from core import tmdb from core.item import Item from core.scrapertools import decodeHtmlentities as dhe +from platformcode import config, logger try: _create_unverified_https_context = ssl._create_unverified_context diff --git a/plugin.video.alfa/channels/bricocine.py b/plugin.video.alfa/channels/bricocine.py index c44af86e..3da0d7bf 100755 --- a/plugin.video.alfa/channels/bricocine.py +++ b/plugin.video.alfa/channels/bricocine.py @@ -6,10 +6,10 @@ import urllib import urllib2 import xbmcgui -from core import logger from core import scrapertools from core import servertools from core.item import Item +from platformcode import logger ## Cargar los datos con la librería 'requests' diff --git a/plugin.video.alfa/channels/canalporno.py b/plugin.video.alfa/channels/canalporno.py index 24436b0d..ab706d74 100755 --- a/plugin.video.alfa/channels/canalporno.py +++ b/plugin.video.alfa/channels/canalporno.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- from core import httptools -from core import logger from core import scrapertools +from platformcode import logger host = "http://www.canalporno.com" diff --git a/plugin.video.alfa/channels/cartoonlatino.py b/plugin.video.alfa/channels/cartoonlatino.py index 8731a83a..702d860d 100644 --- a/plugin.video.alfa/channels/cartoonlatino.py +++ b/plugin.video.alfa/channels/cartoonlatino.py @@ -3,13 +3,13 @@ import re from channels import renumbertools -from core import config +from channelselector import get_thumb from core import httptools -from core import logger from core import scrapertools from core import servertools from core import tmdb from core.item import Item +from platformcode import config, logger host = "http://www.cartoon-latino.com/" @@ -17,8 +17,7 @@ host = "http://www.cartoon-latino.com/" def mainlist(item): logger.info() - thumb_series = config.get_thumb("thumb_channels_tvshow.png") - thumb_series_az = config.get_thumb("thumb_channels_tvshow_az.png") + thumb_series = get_thumb("channels_tvshow.png") itemlist = list() diff --git a/plugin.video.alfa/channels/ciberdocumentales.py b/plugin.video.alfa/channels/ciberdocumentales.py index fe3dd4ec..325b84a8 100755 --- a/plugin.video.alfa/channels/ciberdocumentales.py +++ b/plugin.video.alfa/channels/ciberdocumentales.py @@ -3,10 +3,10 @@ import re from core import httptools -from core import logger from core import scrapertools from core import tmdb from core.item import Item +from platformcode import logger host = 'http://www.ciberdocumentales.com' diff --git a/plugin.video.alfa/channels/cineasiaenlinea.py b/plugin.video.alfa/channels/cineasiaenlinea.py index 5adfbdd9..5dab9193 100755 --- a/plugin.video.alfa/channels/cineasiaenlinea.py +++ b/plugin.video.alfa/channels/cineasiaenlinea.py @@ -2,12 +2,11 @@ import re -from core import config from core import httptools -from core import logger from core import scrapertools from core import servertools from core.item import Item +from platformcode import config, logger host = "http://www.cineasiaenlinea.com/" # Configuracion del canal diff --git a/plugin.video.alfa/channels/cinecalidad.py b/plugin.video.alfa/channels/cinecalidad.py index e683781b..c968bcc5 100644 --- a/plugin.video.alfa/channels/cinecalidad.py +++ b/plugin.video.alfa/channels/cinecalidad.py @@ -5,13 +5,12 @@ import urlparse from channels import autoplay from channels import filtertools -from core import config from core import httptools -from core import logger from core import scrapertools from core import servertools from core import tmdb from core.item import Item +from platformcode import config, logger IDIOMAS = {'latino': 'Latino', 'castellano': 'Español', 'portugues': 'Portugues'} list_language = IDIOMAS.values() @@ -285,16 +284,16 @@ def findvideos(item): patron = 'target="_blank".*? service=".*?" data="(.*?)">
  • (.*?)<\/li>' matches = re.compile(patron, re.DOTALL).findall(data) - server_url = {'YourUpload':'https://www.yourupload.com/embed/', - 'Openload':'https://openload.co/embed/', - 'TVM':'https://thevideo.me/embed-', - 'Trailer':'', - 'BitTorrent':'', - 'Mega':'', - 'MediaFire':''} + server_url = {'YourUpload': 'https://www.yourupload.com/embed/', + 'Openload': 'https://openload.co/embed/', + 'TVM': 'https://thevideo.me/embed-', + 'Trailer': '', + 'BitTorrent': '', + 'Mega': '', + 'MediaFire': ''} for video_cod, server_id in matches: - if server_id not in ['BitTorrent', 'Mega', 'MediaFire', 'Trailer','']: + if server_id not in ['BitTorrent', 'Mega', 'MediaFire', 'Trailer', '']: video_id = dec(video_cod) if server_id in server_url: @@ -302,23 +301,22 @@ def findvideos(item): thumbnail = servertools.guess_server_thumbnail(server_id) if server_id == 'TVM': server = 'thevideo.me' - url= server_url[server_id]+video_id+'.html' + url = server_url[server_id] + video_id + '.html' else: - url = server_url[server_id]+video_id - title = item.contentTitle +' (%s)'%server + url = server_url[server_id] + video_id + title = item.contentTitle + ' (%s)' % server quality = 'default' - if server_id not in ['BitTorrent', 'Mega', 'MediaFire', 'Trailer']: if url not in duplicados: - itemlist.append(item.clone(action = 'play', + itemlist.append(item.clone(action='play', title=title, fulltitle=item.contentTitle, url=url, language=IDIOMAS[item.language], - thumbnail = thumbnail, + thumbnail=thumbnail, quality=quality, - server = server + server=server )) duplicados.append(url) @@ -330,7 +328,7 @@ def findvideos(item): autoplay.start(itemlist, item) - #itemlist.append(trailer_item) + # itemlist.append(trailer_item) if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos': itemlist.append( Item(channel=item.channel, diff --git a/plugin.video.alfa/channels/cinefox.py b/plugin.video.alfa/channels/cinefox.py index 4e3c11ef..b57027ec 100755 --- a/plugin.video.alfa/channels/cinefox.py +++ b/plugin.video.alfa/channels/cinefox.py @@ -3,13 +3,12 @@ import re import urlparse -from core import config from core import httptools from core import jsontools -from core import logger from core import scrapertools from core import servertools from core.item import Item +from platformcode import config, logger __modo_grafico__ = config.get_setting('modo_grafico', 'cinefox') __perfil__ = int(config.get_setting('perfil', "cinefox")) @@ -33,17 +32,17 @@ def mainlist(item): itemlist = [] itemlist.append(item.clone(action="seccion_peliculas", title="Películas", fanart="http://i.imgur.com/PjJaW8o.png", - url= host + "/catalogue?type=peliculas")) + url=host + "/catalogue?type=peliculas")) # Seccion series itemlist.append(item.clone(action="seccion_series", title="Series", - url= host + "/ultimos-capitulos", fanart="http://i.imgur.com/9loVksV.png")) + url=host + "/ultimos-capitulos", fanart="http://i.imgur.com/9loVksV.png")) itemlist.append(item.clone(action="peliculas", title="Documentales", fanart="http://i.imgur.com/Q7fsFI6.png", - url= host + "/catalogue?type=peliculas&genre=documental")) + url=host + "/catalogue?type=peliculas&genre=documental")) if config.get_setting("adult_mode") != 0: itemlist.append(item.clone(action="peliculas", title="Sección Adultos +18", - url= host + "/catalogue?type=adultos", + url=host + "/catalogue?type=adultos", fanart="http://i.imgur.com/kIvE1Zh.png")) itemlist.append(item.clone(title="Buscar...", action="local_search")) @@ -245,7 +244,7 @@ def filtrado(item, values): item.valores = "Filtro: " + ", ".join(sorted(strings)) item.strings = "" item.url = host + "/catalogue?type=%s&genre=%s&release=%s&quality=%s&language=%s&order=%s" % \ - (item.extra, genero, year, calidad, idioma, order) + (item.extra, genero, year, calidad, idioma, order) return globals()[item.extra](item) @@ -255,11 +254,11 @@ def seccion_peliculas(item): itemlist = [] # Seccion peliculas itemlist.append(item.clone(action="peliculas", title="Novedades", fanart="http://i.imgur.com/PjJaW8o.png", - url= host + "/catalogue?type=peliculas")) + url=host + "/catalogue?type=peliculas")) itemlist.append(item.clone(action="peliculas", title="Estrenos", - url= host + "/estrenos-de-cine", fanart="http://i.imgur.com/PjJaW8o.png")) + url=host + "/estrenos-de-cine", fanart="http://i.imgur.com/PjJaW8o.png")) itemlist.append(item.clone(action="filtro", title="Filtrar películas", extra="peliculas", - url= host + "/catalogue?type=peliculas", + url=host + "/catalogue?type=peliculas", fanart="http://i.imgur.com/PjJaW8o.png")) # Filtros personalizados para peliculas for i in range(1, 4): @@ -269,21 +268,22 @@ def seccion_peliculas(item): new_item = item.clone() new_item.values = filtros itemlist.append(new_item.clone(action="filtro", title=title, fanart="http://i.imgur.com/PjJaW8o.png", - url= host + "/catalogue?type=peliculas", extra="peliculas")) + url=host + "/catalogue?type=peliculas", extra="peliculas")) itemlist.append(item.clone(action="mapa", title="Mapa de películas", extra="peliculas", - url= host + "/mapa-de-peliculas", + url=host + "/mapa-de-peliculas", fanart="http://i.imgur.com/PjJaW8o.png")) return itemlist + def seccion_series(item): logger.info() itemlist = [] # Seccion series itemlist.append(item.clone(action="ultimos", title="Últimos capítulos", - url= host + "/ultimos-capitulos", fanart="http://i.imgur.com/9loVksV.png")) + url=host + "/ultimos-capitulos", fanart="http://i.imgur.com/9loVksV.png")) itemlist.append(item.clone(action="series", title="Series recientes", - url= host + "/catalogue?type=series", + url=host + "/catalogue?type=series", fanart="http://i.imgur.com/9loVksV.png")) itemlist.append(item.clone(action="filtro", title="Filtrar series", extra="series", url=host + "/catalogue?type=series", @@ -296,9 +296,9 @@ def seccion_series(item): new_item = item.clone() new_item.values = filtros itemlist.append(new_item.clone(action="filtro", title=title, fanart="http://i.imgur.com/9loVksV.png", - url= host + "/catalogue?type=series", extra="series")) + url=host + "/catalogue?type=series", extra="series")) itemlist.append(item.clone(action="mapa", title="Mapa de series", extra="series", - url= host + "/mapa-de-series", + url=host + "/mapa-de-series", fanart="http://i.imgur.com/9loVksV.png")) return itemlist @@ -476,7 +476,7 @@ def menu_info(item): item.infoLabels["plot"] = scrapertools.htmlclean(sinopsis) id = scrapertools.find_single_match(item.url, '/(\d+)/') - data_trailer = httptools.downloadpage( host + "/media/trailer?idm=%s&mediaType=1" % id).data + data_trailer = httptools.downloadpage(host + "/media/trailer?idm=%s&mediaType=1" % id).data trailer_url = jsontools.load(data_trailer)["video"]["url"] if trailer_url != "": item.infoLabels["trailer"] = trailer_url @@ -539,14 +539,15 @@ def episodios(item): itemlist.reverse() if "episodios" not in item.extra and not item.path: id = scrapertools.find_single_match(item.url, '/(\d+)/') - data_trailer = httptools.downloadpage( host + "/media/trailer?idm=%s&mediaType=1" % id).data + data_trailer = httptools.downloadpage(host + "/media/trailer?idm=%s&mediaType=1" % id).data item.infoLabels["trailer"] = jsontools.load(data_trailer)["video"]["url"] itemlist.append(item.clone(channel="trailertools", action="buscartrailer", title="Buscar Tráiler", text_color="magenta")) if config.get_videolibrary_support(): itemlist.append(Item(channel=item.channel, action="add_serie_to_library", text_color=color5, title="Añadir serie a la videoteca", show=item.show, thumbnail=item.thumbnail, - url=item.url, fulltitle=item.fulltitle, fanart=item.fanart, extra="episodios###episodios", + url=item.url, fulltitle=item.fulltitle, fanart=item.fanart, + extra="episodios###episodios", contentTitle=item.fulltitle)) return itemlist @@ -633,7 +634,7 @@ def findvideos(item): itemlist.extend(get_enlaces(item, url, "de Descarga")) if extra == "media": - data_trailer = httptools.downloadpage( host + "/media/trailer?idm=%s&mediaType=1" % id).data + data_trailer = httptools.downloadpage(host + "/media/trailer?idm=%s&mediaType=1" % id).data trailer_url = jsontools.load(data_trailer)["video"]["url"] if trailer_url != "": item.infoLabels["trailer"] = trailer_url @@ -662,18 +663,20 @@ def get_enlaces(item, url, type): if type == "Online": gg = httptools.downloadpage(item.url, add_referer=True).data bloque = scrapertools.find_single_match(gg, 'class="tab".*?button show') - patron = 'a href="#([^"]+)' + patron = 'a href="#([^"]+)' patron += '.*?language-ES-medium ([^"]+)' patron += '.*?([^<]+)' matches = scrapertools.find_multiple_matches(bloque, patron) for scrapedopcion, scrapedlanguage, scrapedcalidad in matches: - google_url = scrapertools.find_single_match(bloque, 'id="%s.*?src="([^"]+)' %scrapedopcion) + google_url = scrapertools.find_single_match(bloque, 'id="%s.*?src="([^"]+)' % scrapedopcion) if "medium-es" in scrapedlanguage: language = "Castellano" if "medium-en" in scrapedlanguage: language = "Ingles" if "medium-vs" in scrapedlanguage: language = "VOSE" if "medium-la" in scrapedlanguage: language = "Latino" - titulo = " [%s/%s]" %(language, scrapedcalidad.strip()) - itemlist.append(item.clone(action="play", url=google_url, title=" Ver en Gvideo"+titulo, text_color=color2, extra="", server = "gvideo")) + titulo = " [%s/%s]" % (language, scrapedcalidad.strip()) + itemlist.append( + item.clone(action="play", url=google_url, title=" Ver en Gvideo" + titulo, text_color=color2, + extra="", server="gvideo")) patron = '
    ([^<]+)<' matches = scrapertools.find_multiple_matches(data, patron) @@ -747,6 +750,6 @@ def select_page(item): dialog = xbmcgui.Dialog() number = dialog.numeric(0, "Introduce el número de página") if number != "": - item.url = re.sub(r'page=(\d+)', "page="+number, item.url) + item.url = re.sub(r'page=(\d+)', "page=" + number, item.url) return peliculas(item) diff --git a/plugin.video.alfa/channels/cinefoxtv.py b/plugin.video.alfa/channels/cinefoxtv.py index 08bcdade..722144ac 100755 --- a/plugin.video.alfa/channels/cinefoxtv.py +++ b/plugin.video.alfa/channels/cinefoxtv.py @@ -3,13 +3,12 @@ import re import urlparse -from core import config from core import httptools -from core import logger from core import scrapertools from core import servertools from core import tmdb from core.item import Item +from platformcode import config, logger host = 'http://cinefoxtv.net/' headers = [['User-Agent', 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0'], diff --git a/plugin.video.alfa/channels/cinehindi.py b/plugin.video.alfa/channels/cinehindi.py index e3f59a3f..4dfc127e 100755 --- a/plugin.video.alfa/channels/cinehindi.py +++ b/plugin.video.alfa/channels/cinehindi.py @@ -3,12 +3,11 @@ import re import urlparse -from core import config from core import httptools -from core import logger from core import scrapertools from core import servertools from core.item import Item +from platformcode import config, logger host = "http://www.cinehindi.com/" diff --git a/plugin.video.alfa/channels/cinetemagay.py b/plugin.video.alfa/channels/cinetemagay.py index 5e40e0aa..9a981445 100755 --- a/plugin.video.alfa/channels/cinetemagay.py +++ b/plugin.video.alfa/channels/cinetemagay.py @@ -3,11 +3,10 @@ import os import re -from core import config -from core import logger from core import scrapertools from core import servertools from core.item import Item +from platformcode import config, logger IMAGES_PATH = os.path.join(config.get_runtime_path(), 'resources', 'images', 'cinetemagay') diff --git a/plugin.video.alfa/channels/cinetux.py b/plugin.video.alfa/channels/cinetux.py index f73f2a2f..348cdaf9 100644 --- a/plugin.video.alfa/channels/cinetux.py +++ b/plugin.video.alfa/channels/cinetux.py @@ -2,14 +2,12 @@ import urlparse -from core import config from core import httptools -from core import logger from core import scrapertools from core import servertools from core import tmdb from core.item import Item - +from platformcode import config, logger CHANNEL_HOST = "http://www.cinetux.net/" @@ -34,7 +32,7 @@ def mainlist(item): data = httptools.downloadpage(CHANNEL_HOST).data total = scrapertools.find_single_match(data, "TENEMOS\s(.*?)") - titulo = "Peliculas (%s)" %total + titulo = "Peliculas (%s)" % total itemlist.append(item.clone(title=titulo, text_color=color2, action="", text_bold=True)) itemlist.append(item.clone(action="peliculas", title=" Novedades", url=CHANNEL_HOST + "pelicula", thumbnail="https://raw.githubusercontent.com/master-1970/resources/master/images/genres" @@ -134,7 +132,7 @@ def peliculas(item): # Descarga la página data = httptools.downloadpage(item.url).data - patron = '(?s)class="(?:result-item|item movies)">.*?([^<]+)') try: fulltitle = scrapedtitle - year = scrapedyear.replace(" ","") + year = scrapedyear.replace(" ", "") if "/" in fulltitle: fulltitle = fulltitle.split(" /", 1)[0] scrapedtitle = "%s (%s)" % (fulltitle, year) @@ -159,7 +157,7 @@ def peliculas(item): new_item.infoLabels['year'] = int(year) itemlist.append(new_item) try: - #tmdb.set_infoLabels(itemlist, __modo_grafico__) + # tmdb.set_infoLabels(itemlist, __modo_grafico__) a = 1 except: pass @@ -183,13 +181,13 @@ def destacadas(item): # Extrae las entradas (carpetas) bloque = scrapertools.find_single_match(data, 'peliculas_destacadas.*?class="single-page') - patron = '(?s)title="([^"]+)"' + patron = '(?s)title="([^"]+)"' patron += '.href="([^"]+)"' patron += '.*?src="([^"]+)' matches = scrapertools.find_multiple_matches(bloque, patron) - for scrapedtitle, scrapedurl, scrapedthumbnail in matches: + for scrapedtitle, scrapedurl, scrapedthumbnail in matches: scrapedurl = "http://www.cinetux.net" + scrapedurl - scrapedtitle = scrapedtitle.replace("Ver ","") + scrapedtitle = scrapedtitle.replace("Ver ", "") new_item = item.clone(action="findvideos", title=scrapedtitle, fulltitle=scrapedtitle, url=scrapedurl, thumbnail=scrapedthumbnail, contentTitle=scrapedtitle, contentType="movie") @@ -198,7 +196,8 @@ def destacadas(item): # Extrae el paginador next_page_link = scrapertools.find_single_match(data, ']+>»') if next_page_link: - itemlist.append(item.clone(action="destacadas", title=">> Página siguiente", url=next_page_link, text_color=color3)) + itemlist.append( + item.clone(action="destacadas", title=">> Página siguiente", url=next_page_link, text_color=color3)) return itemlist @@ -235,7 +234,7 @@ def idioma(item): return itemlist - + def findvideos(item): logger.info() itemlist = [] @@ -253,7 +252,7 @@ def findvideos(item): year = scrapertools.find_single_match(item.title, "\(([0-9]+)") if year and item.extra != "library": - item.infoLabels['year'] = int(year) + item.infoLabels['year'] = int(year) # Ampliamos datos en tmdb if not item.infoLabels['plot']: try: @@ -280,7 +279,7 @@ def findvideos(item): if itemlist: itemlist.append(item.clone(channel="trailertools", title="Buscar Tráiler", action="buscartrailer", context="", - text_color="magenta")) + text_color="magenta")) # Opción "Añadir esta película a la videoteca" if item.extra != "library": if config.get_videolibrary_support(): @@ -288,7 +287,7 @@ def findvideos(item): filtro=True, action="add_pelicula_to_library", url=item.url, infoLabels={'title': item.fulltitle}, fulltitle=item.fulltitle, extra="library")) - + else: itemlist.append(item.clone(title="No hay enlaces disponibles", action="", text_color=color3)) @@ -299,9 +298,9 @@ def bloque_enlaces(data, filtro_idioma, dict_idiomas, type, item): logger.info() lista_enlaces = [] matches = [] - if type == "online" : t_tipo = "Ver Online" + if type == "online": t_tipo = "Ver Online" if type == "descarga": t_tipo = "Descargar" - data = data.replace("\n","") + data = data.replace("\n", "") if type == "online": patron = '(?is)class="playex.*?visualizaciones' bloque1 = scrapertools.find_single_match(data, patron) @@ -311,18 +310,18 @@ def bloque_enlaces(data, filtro_idioma, dict_idiomas, type, item): lazy = "" if "lazy" in bloque1: lazy = "lazy-" - patron = '(?s)id="%s".*?metaframe.*?%ssrc="([^"]+)' %(scrapedoption, lazy) + patron = '(?s)id="%s".*?metaframe.*?%ssrc="([^"]+)' % (scrapedoption, lazy) url = scrapertools.find_single_match(bloque1, patron) if "goo.gl" in url: - url = httptools.downloadpage(url, follow_redirects=False, only_headers=True).headers.get("location","") + url = httptools.downloadpage(url, follow_redirects=False, only_headers=True).headers.get("location", "") if "www.cinetux.me" in url: server = scrapertools.find_single_match(url, "player/(.*?)\.") else: server = servertools.get_server_from_url(url) matches.append([url, server, "", language.strip(), t_tipo]) bloque2 = scrapertools.find_single_match(data, '(?s)box_links.*?dt_social_single') - bloque2 = bloque2.replace("\t","").replace("\r","") - patron = '(?s)optn" href="([^"]+)' + bloque2 = bloque2.replace("\t", "").replace("\r", "") + patron = '(?s)optn" href="([^"]+)' patron += '.*?title="([^"]+)' patron += '.*?src.*?src="[^>]+"?/>([^<]+)' patron += '.*?src="[^>]+"?/>([^<]+)' @@ -343,11 +342,12 @@ def bloque_enlaces(data, filtro_idioma, dict_idiomas, type, item): if filtro_idioma == 3 or item.filtro: lista_enlaces.append(item.clone(title=title, action="play", text_color=color2, - url=scrapedurl, server=scrapedserver, idioma=scrapedlanguage, extra=item.url)) + url=scrapedurl, server=scrapedserver, idioma=scrapedlanguage, + extra=item.url)) else: idioma = dict_idiomas[language] if idioma == filtro_idioma: - lista_enlaces.append(item.clone(title=title, text_color=color2, action="play", url=scrapedurl, + lista_enlaces.append(item.clone(title=title, text_color=color2, action="play", url=scrapedurl, extra=item.url)) else: if language not in filtrados: @@ -368,7 +368,7 @@ def play(item): data = httptools.downloadpage(item.url, headers={'Referer': item.extra}).data.replace("\\", "") id = scrapertools.find_single_match(data, 'img src="[^#]+#(.*?)"') item.url = "https://youtube.googleapis.com/embed/?status=ok&hl=es&allow_embed=1&ps=docs&partnerid=30&hd=1&autoplay=0&cc_load_policy=1&showinfo=0&docid=" + id - itemlist = servertools.find_video_items(data = item.url) + itemlist = servertools.find_video_items(data=item.url) elif "links" in item.url or "www.cinetux.me" in item.url: data = httptools.downloadpage(item.url).data scrapedurl = scrapertools.find_single_match(data, '|', '', data) data = re.sub(r'\s+', ' ', data) data = re.sub(r'>\s<', '><', data) @@ -23,7 +23,7 @@ def agrupa_datos(data): def mainlist(item): logger.info() - thumb_buscar = get_thumbnail_path() + "thumb_search.png" + thumb_buscar = get_thumb("search.png") itemlist = [] itemlist.append(Item(channel=item.channel, title="Últimas agregadas", action="agregadas", diff --git a/plugin.video.alfa/channels/descargasmix.py b/plugin.video.alfa/channels/descargasmix.py index 996ef66a..b2797e16 100755 --- a/plugin.video.alfa/channels/descargasmix.py +++ b/plugin.video.alfa/channels/descargasmix.py @@ -3,12 +3,11 @@ import re import urllib -from core import config from core import httptools -from core import logger from core import scrapertools from core import servertools from core.item import Item +from platformcode import config, logger __modo_grafico__ = config.get_setting("modo_grafico", "descargasmix") __perfil__ = config.get_setting("perfil", "descargasmix") diff --git a/plugin.video.alfa/channels/discoverymx.py b/plugin.video.alfa/channels/discoverymx.py index 5c44fbe9..c0684131 100755 --- a/plugin.video.alfa/channels/discoverymx.py +++ b/plugin.video.alfa/channels/discoverymx.py @@ -3,10 +3,10 @@ import re import urlparse -from core import logger from core import scrapertools from core import servertools from core.item import Item +from platformcode import logger def mainlist(item): diff --git a/plugin.video.alfa/channels/divxatope.py b/plugin.video.alfa/channels/divxatope.py index 79855355..6d70b2a4 100755 --- a/plugin.video.alfa/channels/divxatope.py +++ b/plugin.video.alfa/channels/divxatope.py @@ -5,10 +5,10 @@ import urllib import urlparse from core import httptools -from core import logger from core import scrapertools from core import servertools from core.item import Item +from platformcode import logger def mainlist(item): diff --git a/plugin.video.alfa/channels/divxtotal.py b/plugin.video.alfa/channels/divxtotal.py index fa4477ab..9a7746e3 100755 --- a/plugin.video.alfa/channels/divxtotal.py +++ b/plugin.video.alfa/channels/divxtotal.py @@ -7,13 +7,12 @@ from threading import Thread import xbmc import xbmcgui -from core import config from core import httptools -from core import logger from core import scrapertools from core import tmdb from core.item import Item from core.scrapertools import decodeHtmlentities as dhe +from platformcode import config, logger header = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0'} @@ -490,14 +489,14 @@ class TextBox2(xbmcgui.WindowDialog): self.addControl(self.plot) self.plot.setAnimations( [('conditional', 'effect=zoom delay=2000 center=auto start=0 end=100 time=800 condition=true ',), ( - 'conditional', - 'effect=rotate delay=2000 center=auto aceleration=6000 start=0% end=360% time=800 condition=true',), + 'conditional', + 'effect=rotate delay=2000 center=auto aceleration=6000 start=0% end=360% time=800 condition=true',), ('WindowClose', 'effect=zoom center=auto start=100% end=-0% time=600 condition=true',)]) self.addControl(self.fanart) self.fanart.setAnimations( [('WindowOpen', 'effect=slide start=0,-700 delay=1000 time=2500 tween=bounce condition=true',), ( - 'conditional', - 'effect=rotate center=auto start=0% end=360% delay=3000 time=2500 tween=bounce condition=true',), + 'conditional', + 'effect=rotate center=auto start=0% end=360% delay=3000 time=2500 tween=bounce condition=true',), ('WindowClose', 'effect=slide end=0,-700% time=1000 condition=true',)]) self.addControl(self.title) self.title.setText(self.getTitle) @@ -743,14 +742,14 @@ def get_art(item): if id == None: if item.contentType == "movie": urlbing_imdb = "http://www.bing.com/search?q=%s+%s+tv+series+site:imdb.com" % ( - item.fulltitle.replace(' ', '+'), year) + item.fulltitle.replace(' ', '+'), year) data = browser(urlbing_imdb) data = re.sub(r"\n|\r|\t|\s{2}| |http://ssl-proxy.my-addr.org/myaddrproxy.php/", "", data) subdata_imdb = scrapertools.find_single_match(data, '
  • (.*?)h="ID.*?.*?TV Series') else: urlbing_imdb = "http://www.bing.com/search?q=%s+%s+site:imdb.com" % ( - item.fulltitle.replace(' ', '+'), year) + item.fulltitle.replace(' ', '+'), year) data = browser(urlbing_imdb) data = re.sub(r"\n|\r|\t|\s{2}| |http://ssl-proxy.my-addr.org/myaddrproxy.php/", "", data) subdata_imdb = scrapertools.find_single_match(data, '
  • (.*?)h="ID.*?') @@ -770,7 +769,7 @@ def get_art(item): title = scrapertools.find_single_match(item.fulltitle, '\(.*?\)') if item.contentType != "movie": urlbing_imdb = "http://www.bing.com/search?q=%s+%s+tv+series+site:imdb.com" % ( - title.replace(' ', '+'), year) + title.replace(' ', '+'), year) data = browser(urlbing_imdb) data = re.sub(r"\n|\r|\t|\s{2}| |http://ssl-proxy.my-addr.org/myaddrproxy.php/", "", data) @@ -778,7 +777,7 @@ def get_art(item): '
  • (.*?)h="ID.*?.*?TV Series') else: urlbing_imdb = "http://www.bing.com/search?q=%s+%s+site:imdb.com" % ( - title.replace(' ', '+'), year) + title.replace(' ', '+'), year) data = browser(urlbing_imdb) data = re.sub(r"\n|\r|\t|\s{2}| |http://ssl-proxy.my-addr.org/myaddrproxy.php/", "", data) diff --git a/plugin.video.alfa/channels/documaniatv.py b/plugin.video.alfa/channels/documaniatv.py index 194467bd..35f945fb 100755 --- a/plugin.video.alfa/channels/documaniatv.py +++ b/plugin.video.alfa/channels/documaniatv.py @@ -4,11 +4,10 @@ import re import urllib import urlparse -from core import config from core import jsontools -from core import logger from core import scrapertools from core.item import Item +from platformcode import config, logger host = "http://www.documaniatv.com/" account = config.get_setting("documaniatvaccount", "documaniatv") diff --git a/plugin.video.alfa/channels/documentalesonline.py b/plugin.video.alfa/channels/documentalesonline.py index 65b7a8f2..f6ef436e 100755 --- a/plugin.video.alfa/channels/documentalesonline.py +++ b/plugin.video.alfa/channels/documentalesonline.py @@ -3,9 +3,9 @@ import re from core import httptools -from core import logger from core import scrapertools from core.item import Item +from platformcode import logger HOST = "http://documentales-online.com/" diff --git a/plugin.video.alfa/channels/doomtv.py b/plugin.video.alfa/channels/doomtv.py index a9a15e86..35df32a3 100755 --- a/plugin.video.alfa/channels/doomtv.py +++ b/plugin.video.alfa/channels/doomtv.py @@ -6,13 +6,12 @@ import urlparse from channels import autoplay from channels import filtertools -from core import config from core import httptools -from core import logger from core import scrapertools from core import servertools from core import tmdb from core.item import Item +from platformcode import config, logger IDIOMAS = {'latino': 'Latino'} list_language = IDIOMAS.values() diff --git a/plugin.video.alfa/channels/doramastv.py b/plugin.video.alfa/channels/doramastv.py index 1e16a3ab..ef371288 100755 --- a/plugin.video.alfa/channels/doramastv.py +++ b/plugin.video.alfa/channels/doramastv.py @@ -3,9 +3,9 @@ import re import urlparse -from core import logger from core import scrapertools from core.item import Item +from platformcode import logger host = "http://doramastv.com/" DEFAULT_HEADERS = [] diff --git a/plugin.video.alfa/channels/downloads.py b/plugin.video.alfa/channels/downloads.py index 16fddcbd..08317038 100755 --- a/plugin.video.alfa/channels/downloads.py +++ b/plugin.video.alfa/channels/downloads.py @@ -7,15 +7,14 @@ import os import re import time -from core import config from core import filetools -from core import videolibrarytools -from core import logger from core import scraper from core import scrapertools from core import servertools +from core import videolibrarytools from core.downloader import Downloader from core.item import Item +from platformcode import config, logger from platformcode import platformtools STATUS_COLORS = {0: "orange", 1: "orange", 2: "green", 3: "red"} @@ -52,7 +51,7 @@ def mainlist(item): itemlist): title = TITLE_TVSHOW % ( - STATUS_COLORS[i.downloadStatus], i.downloadProgress, i.contentSerieName, i.contentChannel) + STATUS_COLORS[i.downloadStatus], i.downloadProgress, i.contentSerieName, i.contentChannel) itemlist.append(Item(title=title, channel="descargas", action="mainlist", contentType="tvshow", contentSerieName=i.contentSerieName, contentChannel=i.contentChannel, @@ -61,8 +60,9 @@ def mainlist(item): else: s = \ - filter(lambda x: x.contentSerieName == i.contentSerieName and x.contentChannel == i.contentChannel, - itemlist)[0] + filter( + lambda x: x.contentSerieName == i.contentSerieName and x.contentChannel == i.contentChannel, + itemlist)[0] s.downloadProgress.append(i.downloadProgress) downloadProgress = sum(s.downloadProgress) / len(s.downloadProgress) @@ -71,7 +71,7 @@ def mainlist(item): s.downloadStatus = i.downloadStatus s.title = TITLE_TVSHOW % ( - STATUS_COLORS[s.downloadStatus], downloadProgress, i.contentSerieName, i.contentChannel) + STATUS_COLORS[s.downloadStatus], downloadProgress, i.contentSerieName, i.contentChannel) # Peliculas elif i.contentType == "movie" or i.contentType == "video": @@ -149,7 +149,7 @@ def clean_all(item): if fichero.endswith(".json"): download_item = Item().fromjson(filetools.read(os.path.join(DOWNLOAD_LIST_PATH, fichero))) if not item.contentType == "tvshow" or ( - item.contentSerieName == download_item.contentSerieName and item.contentChannel == download_item.contentChannel): + item.contentSerieName == download_item.contentSerieName and item.contentChannel == download_item.contentChannel): filetools.remove(os.path.join(DOWNLOAD_LIST_PATH, fichero)) platformtools.itemlist_refresh() @@ -161,7 +161,7 @@ def clean_ready(item): if fichero.endswith(".json"): download_item = Item().fromjson(filetools.read(os.path.join(DOWNLOAD_LIST_PATH, fichero))) if not item.contentType == "tvshow" or ( - item.contentSerieName == download_item.contentSerieName and item.contentChannel == download_item.contentChannel): + item.contentSerieName == download_item.contentSerieName and item.contentChannel == download_item.contentChannel): if download_item.downloadStatus == STATUS_CODES.completed: filetools.remove(os.path.join(DOWNLOAD_LIST_PATH, fichero)) @@ -175,7 +175,7 @@ def restart_error(item): download_item = Item().fromjson(filetools.read(os.path.join(DOWNLOAD_LIST_PATH, fichero))) if not item.contentType == "tvshow" or ( - item.contentSerieName == download_item.contentSerieName and item.contentChannel == download_item.contentChannel): + item.contentSerieName == download_item.contentSerieName and item.contentChannel == download_item.contentChannel): if download_item.downloadStatus == STATUS_CODES.error: if filetools.isfile( os.path.join(config.get_setting("downloadpath"), download_item.downloadFilename)): @@ -196,7 +196,7 @@ def download_all(item): filetools.read(os.path.join(DOWNLOAD_LIST_PATH, fichero))) if not item.contentType == "tvshow" or ( - item.contentSerieName == download_item.contentSerieName and item.contentChannel == download_item.contentChannel): + item.contentSerieName == download_item.contentSerieName and item.contentChannel == download_item.contentChannel): if download_item.downloadStatus in [STATUS_CODES.stoped, STATUS_CODES.canceled]: res = start_download(download_item) platformtools.itemlist_refresh() @@ -339,7 +339,7 @@ def get_server_position(server): if server in servers: pos = [s for s in sorted(servers, key=lambda x: (sum(servers[x]["speeds"]) / (len(servers[x]["speeds"]) or 1), float(sum(servers[x]["success"])) / ( - len(servers[x]["success"]) or 1)), reverse=True)] + len(servers[x]["success"]) or 1)), reverse=True)] return pos.index(server) + 1 else: return 0 @@ -532,7 +532,7 @@ def download_from_server(item): return {"downloadStatus": STATUS_CODES.error} progreso.close() logger.info("contentAction: %s | contentChannel: %s | server: %s | url: %s" % ( - item.contentAction, item.contentChannel, item.server, item.url)) + item.contentAction, item.contentChannel, item.server, item.url)) if not item.server or not item.url or not item.contentAction == "play" or item.server in unsupported_servers: logger.error("El Item no contiene los parametros necesarios.") @@ -677,7 +677,7 @@ def start_download(item): def get_episodes(item): logger.info("contentAction: %s | contentChannel: %s | contentType: %s" % ( - item.contentAction, item.contentChannel, item.contentType)) + item.contentAction, item.contentChannel, item.contentType)) # El item que pretendemos descargar YA es un episodio if item.contentType == "episode": @@ -727,7 +727,7 @@ def get_episodes(item): episode.contentTitle = re.sub("\[[^\]]+\]|\([^\)]+\)|\d*x\d*\s*-", "", episode.title).strip() episode.downloadFilename = filetools.validate_path(os.path.join(item.downloadFilename, "%dx%0.2d - %s" % ( - episode.contentSeason, episode.contentEpisodeNumber, episode.contentTitle.strip()))) + episode.contentSeason, episode.contentEpisodeNumber, episode.contentTitle.strip()))) itemlist.append(episode) # Cualquier otro resultado no nos vale, lo ignoramos @@ -785,7 +785,7 @@ def save_download(item): def save_download_video(item): logger.info("contentAction: %s | contentChannel: %s | contentTitle: %s" % ( - item.contentAction, item.contentChannel, item.contentTitle)) + item.contentAction, item.contentChannel, item.contentTitle)) set_movie_title(item) @@ -802,7 +802,7 @@ def save_download_video(item): def save_download_movie(item): logger.info("contentAction: %s | contentChannel: %s | contentTitle: %s" % ( - item.contentAction, item.contentChannel, item.contentTitle)) + item.contentAction, item.contentChannel, item.contentTitle)) progreso = platformtools.dialog_progress("Descargas", "Obteniendo datos de la pelicula") @@ -830,7 +830,7 @@ def save_download_movie(item): def save_download_tvshow(item): logger.info("contentAction: %s | contentChannel: %s | contentType: %s | contentSerieName: %s" % ( - item.contentAction, item.contentChannel, item.contentType, item.contentSerieName)) + item.contentAction, item.contentChannel, item.contentType, item.contentSerieName)) progreso = platformtools.dialog_progress("Descargas", "Obteniendo datos de la serie") diff --git a/plugin.video.alfa/channels/ecarteleratrailers.py b/plugin.video.alfa/channels/ecarteleratrailers.py index 2bcfc353..a6bfb4dd 100755 --- a/plugin.video.alfa/channels/ecarteleratrailers.py +++ b/plugin.video.alfa/channels/ecarteleratrailers.py @@ -3,9 +3,9 @@ import re import urlparse -from core import logger from core import scrapertools from core.item import Item +from platformcode import logger def mainlist(item): diff --git a/plugin.video.alfa/channels/elitetorrent.py b/plugin.video.alfa/channels/elitetorrent.py index f6614f91..bd3c993e 100644 --- a/plugin.video.alfa/channels/elitetorrent.py +++ b/plugin.video.alfa/channels/elitetorrent.py @@ -3,9 +3,9 @@ import re import urlparse -from core import logger from core import scrapertools from core.item import Item +from platformcode import logger BASE_URL = 'http://www.elitetorrent.wesconference.net' diff --git a/plugin.video.alfa/channels/elsenordelanillo.py b/plugin.video.alfa/channels/elsenordelanillo.py index ef054c54..4b99d3b4 100755 --- a/plugin.video.alfa/channels/elsenordelanillo.py +++ b/plugin.video.alfa/channels/elsenordelanillo.py @@ -3,10 +3,10 @@ import re import urlparse -from core import logger from core import scrapertools from core import servertools from core.item import Item +from platformcode import logger def mainlist(item): diff --git a/plugin.video.alfa/channels/eporner.py b/plugin.video.alfa/channels/eporner.py index 4fee0a64..8a13ed7b 100755 --- a/plugin.video.alfa/channels/eporner.py +++ b/plugin.video.alfa/channels/eporner.py @@ -5,7 +5,7 @@ import urlparse from core import httptools from core import jsontools -from core import logger +from platformcode import logger def mainlist(item): diff --git a/plugin.video.alfa/channels/erotik.py b/plugin.video.alfa/channels/erotik.py index 2a213b74..0aa9cc4f 100755 --- a/plugin.video.alfa/channels/erotik.py +++ b/plugin.video.alfa/channels/erotik.py @@ -3,9 +3,9 @@ import re import urlparse -from core import logger from core import scrapertools from core.item import Item +from platformcode import logger def mainlist(item): diff --git a/plugin.video.alfa/channels/estadepelis.py b/plugin.video.alfa/channels/estadepelis.py index f70eb948..843846af 100755 --- a/plugin.video.alfa/channels/estadepelis.py +++ b/plugin.video.alfa/channels/estadepelis.py @@ -4,13 +4,12 @@ import re from channels import autoplay from channels import filtertools -from core import config from core import httptools -from core import logger from core import scrapertools from core import servertools from core import tmdb from core.item import Item +from platformcode import config, logger host = 'http://www.estadepelis.com/' headers = [['User-Agent', 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0'], diff --git a/plugin.video.alfa/channels/estrenosgo.py b/plugin.video.alfa/channels/estrenosgo.py index eaa0aec9..46bdd7cb 100755 --- a/plugin.video.alfa/channels/estrenosgo.py +++ b/plugin.video.alfa/channels/estrenosgo.py @@ -3,13 +3,12 @@ import re from core import channeltools -from core import config from core import httptools -from core import logger from core import scrapertools from core import servertools from core import tmdb from core.item import Item +from platformcode import config, logger HOST = 'http://estrenosli.org/' parameters = channeltools.get_channel_parameters('estrenosgo') @@ -165,15 +164,17 @@ def findvideos(item): if s: itemlist.append(item.clone(url=s[0][1], action="play", folder=False, server=s[0][2], title="Ver %s en %s%s" % ( - capitulo.strip(), s[0][2].capitalize(), idioma), + capitulo.strip(), s[0][2].capitalize(), idioma), thumbnail2=item.thumbnail, thumbnail=config.get_thumb("server_" + s[0][2] + ".png"))) else: + import os for s in servertools.findvideos(data): itemlist.append(item.clone(url=s[1], action="play", folder=False, server=s[2], title="Ver en %s%s" % (s[2].capitalize(), idioma), thumbnail2=item.thumbnail, - thumbnail=config.get_thumb("server_" + s[2] + ".png"))) + thumbnail=os.path.join(config.get_runtime_path(), "resources", "media", + "servers", "server_" + s[2] + ".png"))) # Insertar items "Buscar trailer" y "Añadir a la videoteca" if itemlist and item.extra == "movie": diff --git a/plugin.video.alfa/channels/favorites.py b/plugin.video.alfa/channels/favorites.py index 355b7990..b409b08a 100755 --- a/plugin.video.alfa/channels/favorites.py +++ b/plugin.video.alfa/channels/favorites.py @@ -6,11 +6,10 @@ import os import time -from core import config from core import filetools -from core import logger from core import scrapertools from core.item import Item +from platformcode import config, logger from platformcode import platformtools try: @@ -148,7 +147,7 @@ def readbookmark(filepath): logger.info() import urllib - bookmarkfile = filetools.open_for_reading(filepath) + bookmarkfile = filetools.file_open(filepath) lines = bookmarkfile.readlines() diff --git a/plugin.video.alfa/channels/filesmonster_catalogue.py b/plugin.video.alfa/channels/filesmonster_catalogue.py index e10758a1..40c46019 100755 --- a/plugin.video.alfa/channels/filesmonster_catalogue.py +++ b/plugin.video.alfa/channels/filesmonster_catalogue.py @@ -3,10 +3,9 @@ import os import re -from core import config -from core import logger from core import scrapertools from core.item import Item +from platformcode import config, logger def strip_tags(value): diff --git a/plugin.video.alfa/channels/filtertools.py b/plugin.video.alfa/channels/filtertools.py index 26748ae3..4d606190 100755 --- a/plugin.video.alfa/channels/filtertools.py +++ b/plugin.video.alfa/channels/filtertools.py @@ -3,11 +3,9 @@ # filtertools - se encarga de filtrar resultados # ------------------------------------------------------------ -from core import config -from core import filetools from core import jsontools -from core import logger from core.item import Item +from platformcode import config, logger from platformcode import platformtools TAG_TVSHOW_FILTER = "TVSHOW_FILTER" diff --git a/plugin.video.alfa/channels/freecambay.py b/plugin.video.alfa/channels/freecambay.py index 2f2f7b22..f3cde98a 100755 --- a/plugin.video.alfa/channels/freecambay.py +++ b/plugin.video.alfa/channels/freecambay.py @@ -3,11 +3,10 @@ import re import urlparse -from core import config from core import httptools -from core import logger from core import scrapertools from core.item import Item +from platformcode import config, logger host = "http://www.freecambay.com" @@ -97,7 +96,7 @@ def lista(item): next_page = re.sub(r'&from=(\d+)', '&from=%s' % next_page, item.url) else: next_page = "%s?mode=async&function=get_block&block_id=list_videos_common_videos_list&sort_by=post_date&from=%s" % ( - item.url, next_page) + item.url, next_page) itemlist.append(item.clone(action="lista", title=">> Página Siguiente", url=next_page)) return itemlist @@ -250,7 +249,7 @@ def tags(item): bloque = scrapertools.find_single_match(data, '>%s(.*?)(?:(?!%s)(?!#)[A-Z#]{1}|
  • (.*?)h="ID.*?') @@ -903,14 +902,14 @@ class TextBox2(xbmcgui.WindowDialog): self.addControl(self.plot) self.plot.setAnimations( [('conditional', 'effect=zoom delay=2000 center=auto start=0 end=100 time=800 condition=true ',), ( - 'conditional', - 'effect=rotate delay=2000 center=auto aceleration=6000 start=0% end=360% time=800 condition=true',), + 'conditional', + 'effect=rotate delay=2000 center=auto aceleration=6000 start=0% end=360% time=800 condition=true',), ('WindowClose', 'effect=zoom center=auto start=100% end=-0% time=600 condition=true',)]) self.addControl(self.fanart) self.fanart.setAnimations( [('WindowOpen', 'effect=slide start=0,-700 delay=1000 time=2500 tween=bounce condition=true',), ( - 'conditional', - 'effect=rotate center=auto start=0% end=360% delay=3000 time=2500 tween=bounce condition=true',), + 'conditional', + 'effect=rotate center=auto start=0% end=360% delay=3000 time=2500 tween=bounce condition=true',), ('WindowClose', 'effect=slide end=0,-700% time=1000 condition=true',)]) self.addControl(self.title) self.title.setText(self.getTitle) diff --git a/plugin.video.alfa/channels/peliculashindu.py b/plugin.video.alfa/channels/peliculashindu.py index 7d4090d0..c8204155 100755 --- a/plugin.video.alfa/channels/peliculashindu.py +++ b/plugin.video.alfa/channels/peliculashindu.py @@ -3,12 +3,11 @@ import re import urlparse -from core import config from core import httptools -from core import logger from core import scrapertools from core import servertools from core.item import Item +from platformcode import config, logger host = "http://www.peliculashindu.com/" diff --git a/plugin.video.alfa/channels/peliculasmx.py b/plugin.video.alfa/channels/peliculasmx.py index 4b2a29fd..64b8fe2b 100755 --- a/plugin.video.alfa/channels/peliculasmx.py +++ b/plugin.video.alfa/channels/peliculasmx.py @@ -3,9 +3,9 @@ import re import urlparse -from core import logger from core import scrapertools from core.item import Item +from platformcode import logger def mainlist(item): diff --git a/plugin.video.alfa/channels/peliculasnu.py b/plugin.video.alfa/channels/peliculasnu.py index 91717d1d..002c4e6d 100755 --- a/plugin.video.alfa/channels/peliculasnu.py +++ b/plugin.video.alfa/channels/peliculasnu.py @@ -2,14 +2,13 @@ import urllib -from core import config from core import httptools from core import jsontools -from core import logger from core import scrapertools from core import servertools from core import tmdb from core.item import Item +from platformcode import config, logger __modo_grafico__ = config.get_setting("modo_grafico", "peliculasnu") __perfil__ = config.get_setting("perfil", "peliculasnu") diff --git a/plugin.video.alfa/channels/peliculasrey.py b/plugin.video.alfa/channels/peliculasrey.py index 3837b066..5e7312a3 100755 --- a/plugin.video.alfa/channels/peliculasrey.py +++ b/plugin.video.alfa/channels/peliculasrey.py @@ -3,10 +3,10 @@ import re import urlparse -from core import logger from core import scrapertools from core import servertools from core.item import Item +from platformcode import logger def mainlist(item): diff --git a/plugin.video.alfa/channels/pelis24.py b/plugin.video.alfa/channels/pelis24.py index fe135e12..15b3216a 100755 --- a/plugin.video.alfa/channels/pelis24.py +++ b/plugin.video.alfa/channels/pelis24.py @@ -4,9 +4,9 @@ import re import sys from core import httptools -from core import logger from core import scrapertools from core.item import Item +from platformcode import logger thumbnail_host = 'https://github.com/master-1970/resources/raw/master/images/squares/pelis24.PNG' diff --git a/plugin.video.alfa/channels/pelisadicto.py b/plugin.video.alfa/channels/pelisadicto.py index a4238985..93996336 100755 --- a/plugin.video.alfa/channels/pelisadicto.py +++ b/plugin.video.alfa/channels/pelisadicto.py @@ -3,11 +3,10 @@ import re import urlparse -from core import config -from core import logger from core import scrapertools from core import servertools from core.item import Item +from platformcode import config, logger def mainlist(item): diff --git a/plugin.video.alfa/channels/peliscity.py b/plugin.video.alfa/channels/peliscity.py index b9bb794d..75873f52 100755 --- a/plugin.video.alfa/channels/peliscity.py +++ b/plugin.video.alfa/channels/peliscity.py @@ -3,10 +3,10 @@ import re import urlparse -from core import logger from core import scrapertools from core import servertools from core.item import Item +from platformcode import logger def mainlist(item): diff --git a/plugin.video.alfa/channels/peliscon.py b/plugin.video.alfa/channels/peliscon.py index 7fc5ee89..973aeda7 100755 --- a/plugin.video.alfa/channels/peliscon.py +++ b/plugin.video.alfa/channels/peliscon.py @@ -5,13 +5,12 @@ from threading import Thread import xbmc import xbmcgui -from core import config from core import httptools -from core import logger from core import scrapertools from core import servertools from core import tmdb from core.item import Item +from platformcode import config, logger ACTION_SHOW_FULLSCREEN = 36 ACTION_GESTURE_SWIPE_LEFT = 511 @@ -596,14 +595,14 @@ class TextBox2(xbmcgui.WindowDialog): self.addControl(self.plot) self.plot.setAnimations( [('conditional', 'effect=zoom delay=2000 center=auto start=0 end=100 time=800 condition=true ',), ( - 'conditional', - 'effect=rotate delay=2000 center=auto aceleration=6000 start=0% end=360% time=800 condition=true',), + 'conditional', + 'effect=rotate delay=2000 center=auto aceleration=6000 start=0% end=360% time=800 condition=true',), ('WindowClose', 'effect=zoom center=auto start=100% end=-0% time=600 condition=true',)]) self.addControl(self.fanart) self.fanart.setAnimations( [('WindowOpen', 'effect=slide start=0,-700 delay=1000 time=2500 tween=bounce condition=true',), ( - 'conditional', - 'effect=rotate center=auto start=0% end=360% delay=3000 time=2500 tween=bounce condition=true',), + 'conditional', + 'effect=rotate center=auto start=0% end=360% delay=3000 time=2500 tween=bounce condition=true',), ('WindowClose', 'effect=slide end=0,-700% time=1000 condition=true',)]) self.addControl(self.title) self.title.setText(self.getTitle) @@ -678,14 +677,14 @@ def get_art(item): if id == None: if item.contentType == "movie": urlbing_imdb = "http://www.bing.com/search?q=%s+%s+tv+series+site:imdb.com" % ( - item.fulltitle.replace(' ', '+'), year) + item.fulltitle.replace(' ', '+'), year) data = browser(urlbing_imdb) data = re.sub(r"\n|\r|\t|\s{2}| |http://ssl-proxy.my-addr.org/myaddrproxy.php/", "", data) subdata_imdb = scrapertools.find_single_match(data, '
  • (.*?)h="ID.*?.*?TV Series') else: urlbing_imdb = "http://www.bing.com/search?q=%s+%s+site:imdb.com" % ( - item.fulltitle.replace(' ', '+'), year) + item.fulltitle.replace(' ', '+'), year) data = browser(urlbing_imdb) data = re.sub(r"\n|\r|\t|\s{2}| |http://ssl-proxy.my-addr.org/myaddrproxy.php/", "", data) subdata_imdb = scrapertools.find_single_match(data, '
  • (.*?)h="ID.*?') @@ -705,7 +704,7 @@ def get_art(item): title = scrapertools.find_single_match(item.fulltitle, '\(.*?\)') if item.contentType != "movie": urlbing_imdb = "http://www.bing.com/search?q=%s+%s+tv+series+site:imdb.com" % ( - title.replace(' ', '+'), year) + title.replace(' ', '+'), year) data = browser(urlbing_imdb) data = re.sub(r"\n|\r|\t|\s{2}| |http://ssl-proxy.my-addr.org/myaddrproxy.php/", "", data) @@ -713,7 +712,7 @@ def get_art(item): '
  • (.*?)h="ID.*?.*?TV Series') else: urlbing_imdb = "http://www.bing.com/search?q=%s+%s+site:imdb.com" % ( - title.replace(' ', '+'), year) + title.replace(' ', '+'), year) data = browser(urlbing_imdb) data = re.sub(r"\n|\r|\t|\s{2}| |http://ssl-proxy.my-addr.org/myaddrproxy.php/", "", data) diff --git a/plugin.video.alfa/channels/pelisencasa.py b/plugin.video.alfa/channels/pelisencasa.py index eef0db7a..1866c0ef 100755 --- a/plugin.video.alfa/channels/pelisencasa.py +++ b/plugin.video.alfa/channels/pelisencasa.py @@ -2,13 +2,12 @@ import re -from core import config from core import httptools -from core import logger from core import scrapertools from core import tmdb from core.item import Item from lib import jsunpack +from platformcode import config, logger host = 'http://pelisencasa.net' diff --git a/plugin.video.alfa/channels/pelisfox.py b/plugin.video.alfa/channels/pelisfox.py index a76d7e3b..19ab6dc0 100644 --- a/plugin.video.alfa/channels/pelisfox.py +++ b/plugin.video.alfa/channels/pelisfox.py @@ -2,15 +2,13 @@ import re -from core import config from core import httptools from core import jsontools -from core import logger from core import scrapertools +from core import servertools from core import tmdb from core.item import Item -from core import servertools - +from platformcode import config, logger tgenero = {"Drama": "https://s16.postimg.org/94sia332d/drama.png", u"Accción": "https://s3.postimg.org/y6o9puflv/accion.png", @@ -239,9 +237,9 @@ def findvideos(item): language=lang, url=url )) - logger.debug('templist: %s'%templist) + logger.debug('templist: %s' % templist) for videoitem in templist: - logger.debug('videoitem.language: %s'%videoitem.language) + logger.debug('videoitem.language: %s' % videoitem.language) data = httptools.downloadpage(videoitem.url).data data = re.sub(r'"|\n|\r|\t| |
    |\s{2,}', "", data) id = scrapertools.find_single_match(data, 'var _SOURCE =.*?source:(.*?),') @@ -255,21 +253,20 @@ def findvideos(item): data = httptools.downloadpage(new_url).data - url = scrapertools.find_single_match (data, '