mythexport/0000775000000000000000000000000014766560076010212 5ustar mythexport/COPYING0000664000000000000000000010437414766557364011264 0ustar 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 . mythexport/debian/0000775000000000000000000000000014766560076011434 5ustar mythexport/debian/changelog0000664000000000000000000002474514766560076013322 0ustar mythexport (2.2.4-0ubuntu8) plucky; urgency=medium * No-change rebuild against mysql-8.4 and libmysqlclient24 (LP: #2089059) -- Lena Voytek Wed, 19 Mar 2025 11:18:22 -0400 mythexport (2.2.4-0ubuntu7) jammy; urgency=medium * d/control: Build-Depend on mythtv-common so the package does not build on architectures where it will not be installable. -- Michael Hudson-Doyle Wed, 06 Apr 2022 14:10:14 +1200 mythexport (2.2.4-0ubuntu6) bionic; urgency=medium * Depend on ffmpeg instead of the transitional package libav-tools. -- Simon Quigley Thu, 19 Apr 2018 20:36:19 -0500 mythexport (2.2.4-0ubuntu5) xenial; urgency=medium * Bump libav dependency: libavcodec-extra-56 -> libavcodec-extra. -- Colin Watson Wed, 20 Apr 2016 13:31:28 +0100 mythexport (2.2.4-0ubuntu4) utopic; urgency=medium * Bump libav dependency: libavcodec-extra-55 -> libavcodec-extra-56. -- Colin Watson Fri, 05 Sep 2014 03:00:51 +0100 mythexport (2.2.4-0ubuntu3) utopic; urgency=medium * Bump libav dependencies: libavcodec-extra-54 -> libavcodec-extra-55, and drop libavdevice-extra-53, libavformat-extra-54, libavutil-extra-52, and libswscale-extra-2 since none of those are built by libav 10. -- Colin Watson Mon, 07 Jul 2014 16:16:26 +0100 mythexport (2.2.4-0ubuntu2) trusty; urgency=medium * Bump libav dependencies: libavcodec-extra-53 -> libavcodec-extra-54, libavformat-extra-53 -> libavformat-extra-54, libavutil-extra-51 -> libavutil-extra-52, and drop libpostproc-extra-52 since there is no longer a libpostproc-extra-* in the archive. -- Colin Watson Mon, 03 Feb 2014 16:28:56 +0000 mythexport (2.2.4-0ubuntu1) precise; urgency=low * usr/bin/mythexport-daemon - Fixed bug where file extension gets truncated (LP: #688049) - Remove extra ffmpeg files left behind (LP: #734103) * usr/share/mythexport/configs - s/ffmpeg/avconv/g; - adjusted for latest presets and flags * debian/mythexport.postinst - Fixed issue where broken symlinks break installation (LP: #806519) - MySQL failures will now fail gracefully - Allow database names other than mythconverg (LP: #920210) * debian/mythexport.templates - Added template for MySQL failure * debian/mythexport.config - Allow database names other than mythconverg (LP: #920210) * debian/control - Updated dependencies - s/ffmpeg/libav-tools/ -- John Baab Fri, 09 Mar 2012 15:39:09 -0500 mythexport (2.2.3-0ubuntu1) natty; urgency=low [ John Baab ] * Added link to file on file page, useful for manual downloads. * Fixed an issue where delete period and podcast name were ignored (LP: #663314) -- John Baab Tue, 26 Apr 2011 01:03:24 -0500 mythexport (2.2.2-0ubuntu1) maverick; urgency=low [ John Baab ] * debian/mythexport.config and debian/mythexport.templates - Added warning about new configuration * usr/bin/mythexport-daemon - Fixed issue with OTG exports (LP #598439) - Added lockfile, to keep mythtv-backend informed of the job status (LP: #596251) - Removed commented out code from past release * usr/bin/mythexport_addjob - Added lockfile, to keep mythtv-backend informed of the job status (LP: #596251) * usr/share/mythtv/mythexport.sql - Changed param column to longtext (LP #647908) * usr/share/mythtv/mythexport/otg.cgi - Fixed issue where old configuration file was still in use (LP: #652322) * usr/share/mythtv/mythexport/otg_job.cgi - Renamed variable, no longer using "block" from old configuration * usr/share/mythtv/mythexport/setup.cgi - Fixed issue where form was submitting to the wrong page (LP: #652322) - Changed configuration input to radio buttons * usr/share/mythtv/mythexport/save_system_setup.cgi - Fixed typo * usr/share/mythtv/mythexport/otg.cgi - Fixed issue where old configuration file was still in use * usr/share/mythtv/mythexport/setupsave.cgi - Removed debugging line * debial/rules: - Synced BZR_REVISION [ Angel Abad ] * debian/rules: Fix typo in TARFILE rule (LP: #654088) -- John Baab Sun, 03 Oct 2010 22:46:48 -0400 mythexport (2.2.1-0ubuntu2) maverick; urgency=low * debian/control: update dependency from libavutil-extra-49 to libavutil-extra-50. This allow the mythexport package to be installable. -- Fabrice Coutadeur Thu, 23 Sep 2010 21:20:56 +0200 mythexport (2.2.1-0ubuntu1) maverick; urgency=low [ John Baab ] * Added link to baablogic.net for additional configs. * Added version number to configs and web interface. * Modified config notes to include link for Medibuntu. [ Mario Limonciello ] * Update vcs-bzr to be on ~mythbuntu-dev. -- John Baab Wed, 15 Sep 2010 20:41:11 -0400 mythexport (2.2.0-0ubuntu2) maverick; urgency=low * Fixed issue reading from mysql.txt (LP: #617828) * Fixed config files being overwritten on upgrade (LP: #507019) -- John Baab Wed, 18 Aug 2010 10:56:08 -0400 mythexport (2.2.0-0ubuntu1) maverick; urgency=low * FFe (LP: #617570). * Added HTML5 streaming page to web interface. * New device config method. -- John Baab Fri, 13 Aug 2010 01:53:54 -0400 mythexport (2.1.5-0ubuntu1) lucid; urgency=low * Modified help link to point at new wiki page. * Fixed cgi permission issue. (LP: #560379) * Adjusted ffmpeg lines to match current ffmpeg args. (LP: #373359) * Tweaked web UI options to avoid bad settings. * Added regex to remove whitespace when saving config. (LP: #393492) -- John Baab Sat, 10 Apr 2010 19:00:18 -0400 mythexport (2.1.4-0ubuntu1) lucid; urgency=low * Added extra ffmpeg check to daemon * Added android and cowon choices * Fixed dependencies for libmythtv-perl rename (LP: #548551). * Fixed misplaced aspect ratio (LP: #500224). * Fixed bug where AP is run on non mp4 files (LP: #501279). * Adjusted ffmpeg lines to produce better mp3 videos for itunes. -- John Baab Sun, 28 Mar 2010 19:39:18 -0400 mythexport (2.1.3-0ubuntu1) karmic; urgency=low * Replaced libfaac with libmp3lame, we can't do aac in Karmic. -- John Baab Sat, 24 Oct 2009 18:37:30 -0400 mythexport (2.1.2-0ubuntu1) karmic; urgency=low * Added starting values div to web interface. * Fixed commercial removal. * Modified daemon to retry MythTV connection before failing. * Fixed SQL error that occurs on installation (LP: #443158). * Fixed archos ffmpeg line (LP: #393457). * Fixed AP avi errors (LP: #393609). * Fixed read only export directory issue (LP: #220087). -- John Baab Mon, 05 Oct 2009 01:06:33 -0400 mythexport (2.1.1-0ubuntu2) karmic; urgency=low * Fixed ffmpeg dependencies (LP: #427508). * Made changes to postinst for MCC. * Fixed postrm file directory issue (LP: #397691). * Fixed mysql empty password issue (LP: #395827). -- John Baab Thu, 27 Aug 2009 01:45:00 -0400 mythexport (2.0-0ubuntu1) jaunty; urgency=low * Adjusted init priority so the MythTV backend is started first * Fixed XML styling * Modified init script for easier debugging * Fixed error where SSL connection would point to http files * Fixed RSS mime type issue * Fixed invalid RSS data * Fixed init script issue * Fixed connection issue in daemon * debian/mythexport.postinst - Chmod config.xml if it exists -- John Baab Tue, 07 Apr 2009 02:06:15 -0400 mythexport (1.99.3-0ubuntu1) jaunty; urgency=low * debian/rules: - Added missing dependency libhtml-template-perl * debian/mythexport.postinst,mythexport.postrm - Moved configs * Moved configs in daemon and cgi pages * Fixed issue where only the first userjob was updated -- John Baab Wed, 11 Mar 2009 09:22:55 -0400 mythexport (1.99.2-0ubuntu1) jaunty; urgency=low * Fixed ffmpeg changed flags * debian/control: - Modified dependencies, naming changed from intrepid to jaunty -- John Baab Wed, 04 Mar 2009 16:43:25 -0500 mythexport (1.99.1-0ubuntu1) jaunty; urgency=low * Fixed init script issues * Fixed aspect not being saved * Fixed installation error * Fixed AJAX issue on RSS page * Cleaned up daemon logging -- John Baab Tue, 24 Feb 2009 21:49:28 -0500 mythexport (1.99-0ubuntu1) jaunty; urgency=low * FFe (LP: #332222). * Main script is now a daemon. * Added file maintenance functionality. * Added "On The Go" functionality. * Added new web interface for management. * Fixed symlink errors on installation (LP: #330624). -- John Baab Thu, 19 Feb 2009 22:41:15 -0500 mythexport (1.0.7-0ubuntu1) jaunty; urgency=low * Added MythImport binary (LP: #328882). -- John Baab Sun, 15 Feb 2009 11:50:49 -0500 mythexport (1.0.6-0ubuntu1) jaunty; urgency=low * Fixed ffmpeg codec naming issues. -- John Baab Wed, 26 November 2008 12:45:00 -0500 mythexport (1.0.5-0ubuntu1) jaunty; urgency=low * Fixed ffmpeg bug (LP: #297019). * Fixed whitespace in file bug (LP: #288184). * Fixed reverse proxy bug (thanks to smalcolm) (LP: #288186). * Fixed install bug (LP: #282498). * Fixed archos aspect bug (LP: #297016) -- John Baab Wed, 11 November 2008 07:30:00 -0500 mythexport (1.0.3-0ubuntu1) intrepid; urgency=low * Fixed videoless recording bug (LP: #271409). * Fixed illegal character bug (LP: #260393). * Fixed RSS grouping bug (LP: #271407). -- John Baab Wed, 17 September 2008 01:30:00 -0500 mythexport (1.0.2-0ubuntu2) intrepid; urgency=low * Fixed dependency bug (LP: #262873). * Added RSS, cron clean up support and a new device (LP: #261883). -- John Baab Fri, 29 August 2008 10:57:00 -0500 mythexport (1.0.1-0ubuntu1) intrepid; urgency=low * Added get-orig-source rule to debian/rules * Added vcs info to debian/control * Fixed bug: recording is pulled from the incorrect dir (LP: #220884) * Fixed bug: ipod mpeg4/xvid did not get an aspect (LP: #220881) * Added new device archos -- John Baab Tue, 22 April 2008 09:39:55 -0400 mythexport (1.0-0ubuntu1) hardy; urgency=low * Initial Release (LP: #191337). -- John Baab Sun, 10 Feb 2008 23:05:55 -0400 mythexport/debian/compat0000664000000000000000000000000214766557364012640 0ustar 7 mythexport/debian/control0000664000000000000000000000327014766557364013047 0ustar Source: mythexport Section: misc Priority: optional Maintainer: Ubuntu MythTV Team XSBC-Original-Maintainer: John Baab Build-Depends: debhelper (>= 7.0.0), cdbs, mythtv-common, po-debconf XS-Vcs-Bzr: http://bazaar.launchpad.net/~mythbuntu-dev/mythexport/ubuntu XS-Vcs-Browser: http://codebrowse.launchpad.net/~mythbuntu-dev/mythexport/ubuntu Standards-Version: 3.9.2 Homepage: http://www.mythbuntu.org Package: mythexport Architecture: any Pre-Depends: mythtv-database Depends: ${misc:Depends}, ${shlibs:Depends}, perl, atomicparsley, libmythtv-perl, libdbi-perl, libdbd-mysql-perl, debconf, apache2, libhtml-template-perl, libconfig-simple-perl, libxml-rss-perl, libproc-daemon-perl, libproc-pid-file-perl, liblog-dispatch-perl, libxml-writer-perl, mysql-client, libavcodec-extra, ffmpeg Description: Export MythTV recording to portable media players MythExport is a Perl daemon that can be used with MythTV to export recordings into a format playable on portable devices such as iPod Video, iPod Touch, PSP, and other devices. Besides converting your recordings, this script also grabs data from the MythTV MySQL database and injects it as iTunes data into the exported video so that it will show up correctly on your iPod. MythExport may also be used to take your recordings "On The Go" and provides a RSS feed to all exported recordings. Package: mythimport Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, perl, libmythtv-perl, debconf, mysql-client, mythtv-backend | mythtv-database Description: Import On The Go recordings from MythExport MythImport is a script that can be used to import recordings into an On The Go backend. mythexport/debian/copyright0000664000000000000000000000224314766557364013376 0ustar This package was debianized by John Baab on Thu, 12 February 2009 1:40:23 -0500 Copyright: Copyright 2009 John Baab Upstream Author: Copyright 2009 John Baab License: This Package 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 package 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 package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian & Ubuntu systems, a complete copy of the GPL can be found under /usr/share/common-licenses/GPL-3 The Debian packaging is Copyright 2009, John Baab and is licensed under the GPL-3, or (at your option) any later version. mythexport/debian/mythexport.config0000664000000000000000000000240614766557364015056 0ustar #!/bin/sh -e . /usr/share/debconf/confmodule db_input high mythexport/warn || true db_input high mythexport/configs || true if [ -e /etc/default/mythexport-install ]; then db_set mythexport/dir `grep "dir = " /etc/default/mythexport-install | perl -p -e 's/dir\s=\s//'` fi if which mysql >/dev/null; then if echo "show databases;" | mysql --defaults-file=/etc/mysql/debian.cnf >/dev/null 2>&1; then db_set mythexport/user "debian-sys-maint" db_set mythexport/password "" else if [ -e /etc/mythtv/mysql.txt ]; then db_set mythexport/user `grep "^DBUserName=" /etc/mythtv/mysql.txt | perl -p -e 's/DBUserName=//'` db_set mythexport/password `grep "^DBPassword=" /etc/mythtv/mysql.txt | perl -p -e 's/DBPassword=//'` db_set mythexport/host `grep "^DBHostName=" /etc/mythtv/mysql.txt | perl -p -e 's/DBHostName=//'` db_set mythexport/dbname `grep "^DBName=" /etc/mythtv/mysql.txt | perl -p -e 's/DBName=//'` else db_input high mythexport/user || true db_input high mythexport/password || true db_input high mythexport/host || true db_input high mythexport/dbname || true fi fi fi db_input high mythexport/dir || true db_go exit 0 mythexport/debian/mythexport.cron.daily0000664000000000000000000000402514766557364015652 0ustar #!/usr/bin/perl # mythexport_cleanup v1.0 # By: John Baab # Email: rhpot1991@ubuntu.com # Purpose: Script for exporting mythtv recordings into formats used by portable devices. # Requirements: perl and the DBI & DBD::mysql modules, MythTV perl bindings # # License: # # This Package 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 2 of the License, or (at your option) any later version. # # This package 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 package; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # On Debian & Ubuntu systems, a complete copy of the GPL can be found under # /usr/share/common-licenses/GPL-2, or (at your option) any later version use DBI; use DBD::mysql; use Config::Simple; use MythTV; use strict; my $connect = undef; my $cfg = new Config::Simple(); $cfg->read('/etc/mythtv/mythexport/mythexport.cfg') || die "cannot read config file: /etc/mythtv/mythexport/mythexport.cfg"; my $dir = $cfg->param("dir"); $dir =~ s/\/$//; my $myth = new MythTV(); # connect to database $connect = $myth->{'dbh'}; # find the old recordings my $query = "SELECT id, file FROM mythexport WHERE delDate < NOW()"; my $query_handle = $connect->prepare($query); $query_handle->execute() || die "Unable to query mythexport table"; while ( my ($id,$file) = $query_handle->fetchrow_array() ) { #remove file my $location = "$dir\/$file"; unlink($location); #remove db entry my $query2 = "DELETE FROM mythexport WHERE id=?"; my $query_handle2 = $connect->prepare($query2); $query_handle2->execute($id) || die "Unable to delete entries from the mythexport table"; } mythexport/debian/mythexport.init0000664000000000000000000000437014766557364014556 0ustar #! /bin/sh ### BEGIN INIT INFO # Provides: mythexport # Required-Start: $local_fs $remote_fs $network # Required-Stop: $local_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/Stop the MythExport Daemon. ### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/bin/mythexport-daemon NAME="mythexport" COMMAND=/usr/bin/perl ARGS="" DESC="MythExport Daemon" test -x $DAEMON || exit 0 . /lib/lsb/init-functions set -e USER=mythtv USER_HOME=$(grep ^$USER /etc/passwd | awk -F : '{print $6}') RUNDIR=/var/run/mythtv NICE=0 mkdir -p $RUNDIR chown -R $USER $RUNDIR unset DISPLAY unset SESSION_MANAGER case "$1" in start) if [ -e $RUNDIR/$NAME.pid ]; then PIDDIR=/proc/$(cat $RUNDIR/$NAME.pid) if [ -d ${RUNDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${COMMAND}" ]; then log_success_msg "$DESC already started; use restart instead." exit 0 else log_success_msg "Removing stale PID file $RUNDIR/$NAME" rm -f $RUNDIR/$NAME.pid fi fi log_daemon_msg "Starting $DESC: $NAME " start-stop-daemon --start --pidfile $RUNDIR/$NAME.pid \ --chuid $USER --nicelevel $NICE --exec $COMMAND --startas $DAEMON $ARGS log_end_msg $? ;; stop) log_daemon_msg "Stopping $DESC: $NAME " start-stop-daemon --stop --oknodo --pidfile $RUNDIR/$NAME.pid \ --chuid $USER --exec $COMMAND --startas $DAEMON $ARGS log_end_msg $? test -e $RUNDIR/$NAME.pid && rm $RUNDIR/$NAME.pid ;; restart|force-reload) log_daemon_msg "Restarting $DESC: $NAME " start-stop-daemon --stop --oknodo --pidfile $RUNDIR/$NAME.pid \ --chuid $USER --exec $COMMAND --startas $DAEMON $ARGS sleep 3 start-stop-daemon --start --pidfile $RUNDIR/$NAME.pid \ --chuid $USER --nicelevel $NICE --exec $COMMAND --startas $DAEMON $ARGS log_end_msg $? ;; status) # We want to maintain backward compatibility with Hardy, # so we're not going to use status_of_proc() pidofproc -p $RUNDIR/$NAME.pid $DAEMON >/dev/null && status=0 || status=$? if [ $status -eq 0 ]; then log_success_msg "$NAME is running" else log_failure_msg "$NAME is not running" fi exit $status ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|force-reload|status}" >&2 exit 2 ;; esac exit 0 mythexport/debian/mythexport.install0000664000000000000000000000024314766557364015254 0ustar etc/* /etc usr/bin/mythexport-daemon /usr/bin usr/bin/mythexport_addjob /usr/bin usr/share/mythtv/* /usr/share/mythtv usr/share/mythexport/* /usr/share/mythexport mythexport/debian/mythexport.manpages0000664000000000000000000000001514766557364015376 0ustar mythexport.1 mythexport/debian/mythexport.postinst0000664000000000000000000000674314766557364015504 0ustar #! /bin/sh -e reload_apache() { if apache2ctl configtest 2>/dev/null; then invoke-rc.d apache2 force-reload || true else echo "Your apache2 configuration is broken, so we're not restarting it for you." fi } #Used to fail at some point but not abort postinst fail_database() { echo "Failed to create or modify database (incorrect MySQL username/password?)" >&2 echo "Verify /etc/mythtv/mysql.txt then try:" >&2 echo "sudo dpkg-reconfigure mythexport" >&2 db_input high mythexport/mysql_error || true db_set mythexport/password "" exit 0 } case "$1" in configure) . /usr/share/debconf/confmodule db_get mythexport/dir dir="$RET" if [ -n $dir ]; then mkdir -p $dir chown mythtv:mythtv $dir || true chmod 775 $dir || true if [ ! -e /usr/share/mythtv/mythexport/video ]; then # remove broken symlink if it exists if [ -h /usr/share/mythtv/mythexport/video ]; then rm /usr/share/mythtv/mythexport/video fi ln -s $dir /usr/share/mythtv/mythexport/video fi fi mkdir -p /var/www/.mythtv mkdir -p /home/mythtv/.mythtv if [ ! -e /var/www/.mythtv/config.xml ]; then ln -s /etc/mythtv/config.xml /var/www/.mythtv/config.xml fi if [ ! -e /home/mythtv/.mythtv/config.xml ]; then ln -s /etc/mythtv/config.xml /home/mythtv/.mythtv/config.xml fi if [ ! -e /var/www/mythexport ]; then ln -s /usr/share/mythtv/mythexport /var/www/mythexport fi if [ -e /etc/mythtv/config.xml ]; then chown www-data:mythtv /etc/mythtv/config.xml fi mkdir -p /etc/mythtv/mythexport chmod 775 /etc/mythtv/mythexport chown www-data:www-data /etc/mythtv/mythexport if [ -e /etc/mythtv/mythexport.cfg ]; then mv -f /etc/mythtv/mythexport.cfg /etc/mythtv/mythexport/mythexport.cfg elif [ ! -e /etc/mythtv/mythexport/mythexport.cfg ]; then touch /etc/mythtv/mythexport/mythexport.cfg chmod 644 /etc/mythtv/mythexport/mythexport.cfg chown www-data:www-data /etc/mythtv/mythexport/mythexport.cfg echo "dir=$dir" > /etc/mythtv/mythexport/mythexport.cfg fi if [ -e /etc/mythtv/mythexport_settings.cfg ]; then mv -f /etc/mythtv/mythexport_settings.cfg /etc/mythtv/mythexport/mythexport_settings.cfg chmod 644 /etc/mythtv/mythexport/mythexport_settings.cfg chown www-data:www-data /etc/mythtv/mythexport/mythexport_settings.cfg fi db_get mythexport/user admin_username="$RET" db_get mythexport/password admin_password="$RET" db_get mythexport/host hostname="$RET" if [ "$admin_username" = "debian-sys-maint" ]; then SECURITY_INFO="--defaults-file=/etc/mysql/debian.cnf" else if [ -n $admin_password ]; then admin_password="-p$admin_password" fi SECURITY_INFO="--host=\"$hostname\" --user=\"$admin_username\" $admin_password" fi db_get mythexport/dbname dbname="$RET" if ! mysql $SECURITY_INFO $dbname < /usr/share/mythtv/mythexport.sql >/dev/null 2>&1; then fail_database fi if [ -e /etc/apache2/apache2.conf ]; then a2ensite mythexport.conf >/dev/null || true reload_apache fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# db_set mythexport/password "" exit 0 mythexport/debian/mythexport.postrm0000664000000000000000000000071214766557364015133 0ustar #!/bin/sh set -e . /usr/share/debconf/confmodule case "$1" in purge) #These files may have been created during installation rm -rf /var/www/.mythtv rm -rf /var/www/mythexport rm -rf /etc/mythtv/mythexport rm -f /etc/mythtv/mythexport/mythexport.cfg ;; remove|upgrade|abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# exit 0 mythexport/debian/mythexport.prerm0000664000000000000000000000140214766557364014731 0ustar #!/bin/sh set -e reload_apache() { if apache2ctl configtest 2>/dev/null; then invoke-rc.d apache2 force-reload || true else echo "Your apache2 configuration is broken, so we're not restarting it for you." fi } case "$1" in remove|purge) #Disable site if [ -e /etc/apache2/apache2.conf ]; then a2dissite mythexport.conf >/dev/null || true reload_apache fi #Remove links created during postinst CLEANUP="/usr/share/mythtv/mythexport/" for item in `ls ${CLEANUP}` do rm -rf ${CLEANUP}/${item} done ;; upgrade|abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "prerm called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# exit 0 mythexport/debian/mythexport.templates0000664000000000000000000000315214766557364015606 0ustar Template: mythexport/warn Type: note _Description: Additional install directions MythExport can now be completely setup via the web interface, just browse to http://localhost/mythexport . For more information please visit: . https://help.ubuntu.com/community/MythExport Template: mythexport/dir Type: string Default: /var/lib/mythtv/mythexport/ _Description: Export Recordings to: This is where you are currently, or plan to, export your recordings to. Template: mythexport/user Type: string Default: mythtv _Description:MySQL Admin Account: This information will be used to create a database and user for MythTV. . Unless you have explicitly changed this on the MySQL server, and understand MySQL's privilege system, use the default of 'mythtv' or 'root'. Template: mythexport/password Type: password _Description:MySQL Admin Password: This information will be used to create a database and user for MythTV. Template: mythexport/host Type: string Default: localhost _Description: MySQL Server Location: On what host does the MySQL server reside: Template: mythexport/dbname Type: string Default: mythconverg _Description: Database which holds MythTV data: Which database holds MythTV data: Template: mythexport/configs Type: note _Description: Changes in configuration files MythExport's configuration files have changed, For more information please visit: . https://help.ubuntu.com/community/MythExport Template: mythexport/mysql_error Type: note _Description: Failed to create or modify database (incorrect MySQL username/password?) Verify /etc/mythtv/mysql.txt then try: . sudo dpkg-reconfigure mythexport mythexport/debian/mythimport.install0000664000000000000000000000003414766557364015243 0ustar usr/bin/mythimport /usr/bin mythexport/debian/mythimport.manpages0000664000000000000000000000001514766557364015367 0ustar mythimport.1 mythexport/debian/po/0000775000000000000000000000000014766557364012060 5ustar mythexport/debian/po/POTFILES.in0000664000000000000000000000005714766557364013637 0ustar [type: gettext/rfc822deb] mythexport.templates mythexport/debian/po/templates.pot0000664000000000000000000000461614766557364014611 0ustar # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: mythexport@packages.debian.org\n" "POT-Creation-Date: 2009-02-15 13:21-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #. Type: note #. Description #: ../mythexport.templates:1001 msgid "Additional install directions" msgstr "" #. Type: note #. Description #: ../mythexport.templates:1001 msgid "" "Although this script can be run on its own, it is best used when configured " "as a user job withing MythTv." msgstr "" #. Type: note #. Description #: ../mythexport.templates:1001 msgid "For more information please visit:" msgstr "" #. Type: note #. Description #: ../mythexport.templates:1001 msgid "https://help.ubuntu.com/community/MythExport" msgstr "" #. Type: string #. Description #: ../mythexport.templates:2001 msgid "Export Recordings to:" msgstr "" #. Type: string #. Description #: ../mythexport.templates:2001 msgid "This is where you are currently, or plan to, export your recordings to." msgstr "" #. Type: string #. Description #: ../mythexport.templates:3001 msgid "MySQL Admin Account:" msgstr "" #. Type: string #. Description #. Type: password #. Description #: ../mythexport.templates:3001 ../mythexport.templates:4001 msgid "This information will be used to create a database and user for MythTV." msgstr "" #. Type: string #. Description #: ../mythexport.templates:3001 msgid "" "Unless you have explicitly changed this on the MySQL server, and understand " "MySQL's privilege system, use the default of 'root'." msgstr "" #. Type: password #. Description #: ../mythexport.templates:4001 msgid "MySQL Admin Password:" msgstr "" #. Type: password #. Description #: ../mythexport.templates:4001 msgid "" "Unless you have explicitly changed the password on the MySQL server, leave " "this blank." msgstr "" #. Type: string #. Description #: ../mythexport.templates:5001 msgid "MySQL Server Location:" msgstr "" #. Type: string #. Description #: ../mythexport.templates:5001 msgid "On what host does the MySQL server reside:" msgstr "" mythexport/debian/rules0000775000000000000000000000102414766557364012517 0ustar #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk BZR_REVISION+=105 BZR_BRANCH+=http://bazaar.launchpad.net/~mythbuntu/$(DEB_SOURCE_PACKAGE)/trunk TARFILE+=$(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz get-orig-source:: bzr export -r $(BZR_REVISION) $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION) $(BZR_BRANCH) tar czf $(CURDIR)/../$(TARFILE) $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION) --exclude debian rm -rf $(CURDIR)/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION) ../$(TARFILE):: get-orig-source mythexport/etc/0000775000000000000000000000000014766557364010773 5ustar mythexport/etc/apache2/0000775000000000000000000000000014766557364012276 5ustar mythexport/etc/apache2/sites-available/0000775000000000000000000000000014766557364015343 5ustar mythexport/etc/apache2/sites-available/mythexport.conf0000664000000000000000000000110614766557364020433 0ustar AllowOverride None Options +ExecCGI -MultiViews +FollowSymLinks Order allow,deny Allow from all SetHandler cgi-script Options +ExecCGI DirectoryIndex file.cgi # Turned off as we are now hosting up more than just a RSS feed #RewriteEngine on #RewriteRule ^([A-Za-z0-9-_]+)/?$ mythexportRSS.cgi?podcastName=$1 [L] AllowOverride None Deny from all mythexport/mythexport.10000664000000000000000000000146614766557364012534 0ustar .TH "MYTHEXPORT" "1" "19 February 2008" "" "" .SH "NAME" MythExport \- MythTV recordings export daemon .SH "DESCRIPTION" MythExport is a Perl daemon that can be used with MythTV to export recordings into a format playable on portable devices such as iPod Video, iPod Touch, PSP, and other devices. Besides converting your recordings, this script also grabs data from the MythTV MySQL database and injects it as iTunes data into the exported video so that it will show up correctly on your iPod. MythExport may also be used to take your recordings "On The Go" and provides a RSS feed to all exported recordings. For more information please see the wiki link below. .SH "HELP" .PP For help please visit: .br https://help.ubuntu.com/community/MythExport .SH "AUTHOR" \fBmythexport\fP is by John Baab mythexport/mythimport.10000664000000000000000000000142514766557364012520 0ustar .TH "MYTHIMPORT" "1" "21 August 2008" "" "" .SH "NAME" MythImport \- MythTV "On The Go" importing script .SH "DESCRIPTION" MythImport is a Perl script that can be used to add recordings to an "on the go" backend. .SH "EXAMPLES" .PP mythimport input=/mnt/usb/mythtv/ output=/var/lib/mythtv/recordings/ cleanup=all .SH "OPTIONS" .TP \fBinput\fR Input directory where exported recordings and sql live. .TP \fBoutput\fR Output directory, use this if you want to transfer the recordings to a different directory. .TP \fBcleanup\fR Specify what files to delete upon sucess (available options: all, recordings, sql). .br .br For the most updated information please visit: .br https://help.ubuntu.com/community/MythImport .SH "AUTHOR" \fBmythimport\fP is by John Baab mythexport/usr/0000775000000000000000000000000014766557364011031 5ustar mythexport/usr/bin/0000775000000000000000000000000014766557364011601 5ustar mythexport/usr/bin/mythexport-daemon0000775000000000000000000004336214766557364015223 0ustar #!/usr/bin/perl # mythexport-daemon v2.2.3 # By: John Baab # Email: rhpot1991@ubuntu.com # Purpose: daemon for exporting mythtv recordings into formats used by portable devices. # Requirements: perl and the DBI & DBD::mysql modules, MythTV perl bindings, AtomicParsley # # License: # # This Package 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 package 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 package; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # On Debian & Ubuntu systems, a complete copy of the GPL can be found under # /usr/share/common-licenses/GPL-3, or (at your option) any later version use strict; use POSIX qw(setsid); use DBI; use DBD::mysql; use Config::Simple; use MythTV; use Proc::Daemon; use Proc::PID::File; use Log::Dispatch; use Log::Dispatch::File; use Date::Format; use File::Spec; use File::Copy; use XML::Writer; use IO::File; use lib '/usr/share/mythexport'; use lib '/usr/share/mythexport/configs'; &startDaemon; my $debug = ""; my $level = "notice"; foreach (@ARGV){ if ($_ =~ m/debug/) { $debug = 1; } } if($debug == 1){ $level = "debug"; } use constant LOG_DIR => '/var/log/mythtv/'; use constant LOG_FILE => 'mythexport.log'; our $HOSTNAME = `hostname`; chomp $HOSTNAME; my $log = new Log::Dispatch( callbacks => sub { my %h=@_; return Date::Format::time2str('%B %e %T', time)." ".$HOSTNAME." $0\[$$]: ".$h{message}."\n"; } ); $log->add( Log::Dispatch::File->new( name => 'file1', min_level => $level, mode => 'append', filename => File::Spec->catfile(LOG_DIR, LOG_FILE), ) ); $log->warning("Starting Processing: ".time()); open STDERR, '>>', File::Spec->catfile(LOG_DIR, LOG_FILE); my $connect = undef; my $myth = undef; my $tries = 5; while ($connect == undef && --$tries > 0) { eval { $myth = new MythTV(); # connect to database $connect = $myth->{'dbh'}; 1; } or do { logerror("Can't connect to MythTV: $@"); logdebug("Sleeping 5 seconds..."); sleep(5); }; } if ($connect == undef) { die "Couldn't connect to MythTV."; } my $keep_going = 1; $SIG{HUP} = sub { $log->warning("Caught SIGHUP: exiting gracefully"); $keep_going = 0; }; $SIG{INT} = sub { $log->warning("Caught SIGINT: exiting gracefully"); $keep_going = 0; }; $SIG{QUIT} = sub { $log->warning("Caught SIGQUIT: exiting gracefully"); $keep_going = 0; }; $SIG{TERM} = sub { $log->warning("Caught SIGTERM: exiting gracefully"); $keep_going = 0; }; sub startDaemon{ Proc::Daemon::Init; dienice("Already running!") if Proc::PID::File->running(dir => "/var/run/mythtv",name => "mythexport"); } sub dienice($) { my ($package, $filename, $line) = caller; $log->critical("$_[0] at line $line in $filename"); die $_[0]; } sub logerror($) { my ($package, $filename, $line) = caller; $log->critical("$_[0] at line $line in $filename"); } sub logdebug($){ my ($package, $filename, $line) = caller; $log->debug("$_[0] at line $line in $filename"); } sub getExportDir(){ # Set default values my $cfg = new Config::Simple(); $cfg->read('/etc/mythtv/mythexport/mythexport.cfg') || logerror("Cannot read config file: /etc/mythtv/mythexport/mythexport.cfg"); my $exportdir = $cfg->param("dir"); $exportdir =~ s/\/$//; return $exportdir; } sub createXML($){ my @params = split('&',$_[0]); my ($exportdir, @starttime, @chanid, $config, $sql_where) = ""; foreach (@params){ if ($_ =~ m/exportdir/) { $exportdir = (split(/\=/,$_))[1]; } elsif ($_ =~ m/starttime/) { @starttime = split('\|',(split(/\=/,$_))[1]); } elsif ($_ =~ m/chanid/) { @chanid = split('\|',(split(/\=/,$_))[1]); } elsif ($_ =~ m/config/) { $config = (split(/\=/,$_))[1]; } } # debugging logging logdebug("exportdir = $exportdir"); logdebug("starttime = @starttime"); logdebug("chanid = @chanid"); logdebug("config = $config"); $exportdir =~ s/\/$//; require "$config.pm"; my $object = new $config(); my $extension = $object->Extension; #test that the directory has the correct permissions -w $exportdir || logerror("ERROR: Directory $exportdir is not writeable.\n"); my $output = new IO::File(">$exportdir/mythimport.xml"); # create sql where clause foreach my $i (0..scalar(@chanid)-1) { $sql_where .= "(rec.chanid=\'$chanid[$i]\' and rec.starttime=\'$starttime[$i]\') or "; } $sql_where =~ s/\sor\s$//; print $output ""; my $writer = new XML::Writer(OUTPUT => $output); $writer->startTag("channel"); my $query = "SELECT rec.title, rec.subtitle, rec.description, pg.syndicatedepisodenumber, pg.showtype, rec.programid, rec.basename, rec.chanid, rec.starttime FROM recorded rec LEFT JOIN program pg ON pg.starttime = rec.starttime AND pg.chanid = rec.chanid WHERE $sql_where"; my $query_handle = $connect->prepare($query); logdebug("query = $query"); $query_handle->execute() || logerror("Unable to query mythexport table"); $log->notice("Creating xml file"); while ( my ($title,$subtitle,$description,$syndicatedepisodenumber,$showtype,$programid,$basename,$currentchanid,$currentstarttime) = $query_handle->fetchrow_array() ) { # FIND OUT THE CHANNEL NAME my $subquery = "SELECT callsign FROM channel WHERE chanid=?"; my $subquery_handle = $connect->prepare($subquery); $subquery_handle->execute($currentchanid) || logerror("ERROR: Unable to query settings table"); my $channame = $subquery_handle->fetchrow_array; # replace non-word characters in channame with dashes $channame =~ s/\W+/-/g; # replace non-word characters in title with underscores $title =~ s/\W+/_/g; # replace non-word characters in subtitle with underscores $subtitle =~ s/\W+/_/g; # Remove non alphanumeric chars from $starttime & $endtime $currentstarttime =~ s/[|^\W|\s|-|]//g; my $newfilename = $channame."-".$title."-".$subtitle."-".$currentstarttime; $newfilename =~ s/\..*?$//; $writer->startTag("item"); $writer->startTag("title"); $writer->characters("$title - $subtitle"); $writer->endTag("title"); $writer->startTag("description"); $writer->characters("$description"); $writer->endTag("description"); $writer->startTag("link"); $writer->characters("$newfilename.$extension"); $writer->endTag("link"); $writer->startTag("guid"); $writer->characters("$newfilename"); $writer->endTag("guid"); $writer->endTag("item"); $log->notice("Creating mysql dump"); export("starttime=$currentstarttime&chanid=$currentchanid&config=$config&otg=true"); } $writer->endTag("channel"); $writer->end(); $output->close(); copy("/usr/share/mythtv/mythimport.xslt","$exportdir/mythimport.xslt") || logerror("ERROR: Cannot copy /usr/share/mythtv/mythimport.xslt to $exportdir/mythimport.xslt"); } sub createSQL($){ my @params = split('&',$_[0]); my ($exportdir, @starttime, @chanid, $config, $sql_where) = ""; foreach (@params){ if ($_ =~ m/exportdir/) { $exportdir = (split(/\=/,$_))[1]; } elsif ($_ =~ m/starttime/) { @starttime = split('\|',(split(/\=/,$_))[1]); } elsif ($_ =~ m/chanid/) { @chanid = split('\|',(split(/\=/,$_))[1]); } elsif ($_ =~ m/config/) { $config = (split(/\=/,$_))[1]; } } # debugging logging logdebug("exportdir = $exportdir"); logdebug("starttime = @starttime"); logdebug("chanid = @chanid"); logdebug("config = $config"); $exportdir =~ s/\/$//; my $dbuser = $myth->{'db_user'}; my $dbpass = $myth->{'db_pass'}; my $dbhost = $myth->{'db_host'}; my $dbname = $myth->{'db_name'}; my $dbport = $myth->{'db_port'}; # debugging logging logdebug("dbuser = $dbuser"); logdebug("dbpass = $dbpass"); logdebug("dbhost = $dbhost"); logdebug("dbname = $dbname"); logdebug("dbport = $dbport"); #test that the directory has the correct permissions -w $exportdir || logerror("ERROR: Directory $exportdir is not writeable.\n"); # create sql where clause foreach my $i (0..scalar(@chanid)-1) { $sql_where .= "(chanid=\'$chanid[$i]\' and starttime=\'$starttime[$i]\') or "; } $sql_where =~ s/\sor\s$//; my $command = "mysqldump -h$dbhost -u$dbuser -p$dbpass -P$dbport $dbname recorded recordedseek recordedrating recordedprogram recordedmarkup recordedcredits --where=\"$sql_where\" --no-create-db --no-create-info > $exportdir/mythimport.sql 2>&1"; $log->notice("Creating mysql dump"); logdebug("mysqldump command = $command"); system($command) == 0 || logerror("ERROR: $command failed."); my $query = "SELECT basename FROM recorded where $sql_where"; my $query_handle = $connect->prepare($query); logdebug("query = $query"); $query_handle->execute() || logerror("Unable to query mythexport table"); my $schemaVer = $myth->backend_setting('DBSchemaVer'); #copy files while ( my $basename = $query_handle->fetchrow_array() ) { my $dir = 'UNKNOWN'; if ($schemaVer < 1171) { $dir = $myth->backend_setting('RecordFilePrefix'); } else { my $storagegroup = new MythTV::StorageGroup(); $dir = $storagegroup->FindRecordingDir($basename); } $log->notice("Copying $dir/$basename to $exportdir/$basename"); copy("$dir/$basename","$exportdir/$basename") || logerror("Unable to copy $dir/$basename to $exportdir/$basename"); } } sub export($){ my @params = split("&",$_[0]); my ($debug,$starttime,$chanid,$config,$deleteperiod,$otg,$podcastname) = ""; foreach (@params){ if ($_ =~ m/starttime/) { $starttime = (split(/\=/,$_))[1]; } elsif ($_ =~ m/chanid/) { $chanid = (split(/\=/,$_))[1]; } elsif ($_ =~ m/config/) { $config = (split(/\=/,$_))[1]; } elsif ($_ =~ m/deleteperiod/) { $deleteperiod = (split(/\=/,$_))[1]; } elsif ($_ =~ m/otg/) { $otg = (split(/\=/,$_))[1]; } elsif ($_ =~ m/podcastname/) { $podcastname = (split(/\=/,$_))[1]; } } my ($title, $subtitle, $description, $syndicatedepisodenumber, $showtype, $programid, $basename, $airdate) = ""; my $exportdir = getExportDir(); # debugging logging logdebug("exportdir = $exportdir"); logdebug("starttime = $starttime"); logdebug("chanid = $chanid"); logdebug("config = $config"); #test that the directory has the correct permissions -w $exportdir || logerror("ERROR: Directory $exportdir is not writeable.\n"); my $query = "SELECT rec.title, rec.subtitle, rec.description, pg.syndicatedepisodenumber, pg.showtype, rec.programid, rec.basename, rec.starttime FROM recorded rec LEFT JOIN program pg ON pg.starttime = rec.starttime AND pg.chanid = rec.chanid WHERE rec.chanid=? AND rec.starttime=?"; my $query_handle = $connect->prepare($query); logdebug("query = $query"); $query_handle->execute($chanid,$starttime) || logerror("ERROR: Cannot connect to database \n"); $query_handle->bind_columns(undef, \$title, \$subtitle, \$description, \$syndicatedepisodenumber, \$showtype, \$programid, \$basename, \$airdate); $query_handle->fetch(); my $schemaVer = $myth->backend_setting('DBSchemaVer'); # Storage Groups were added in DBSchemaVer 1171 # FIND WHERE THE RECORDINGS LIVE my $dir = 'UNKNOWN'; if ($schemaVer < 1171) { logdebug("Using compatibility mode"); $dir = $myth->backend_setting('RecordFilePrefix'); } else { logdebug("Going into new mode\n"); my $storagegroup = new MythTV::StorageGroup(); $dir = $storagegroup->FindRecordingDir($basename); } # FIND OUT THE CHANNEL NAME $query = "SELECT callsign FROM channel WHERE chanid=?"; $query_handle = $connect->prepare($query); logdebug("query = $query"); $query_handle->execute($chanid) || logerror("ERROR: Unable to query channel table"); my $channame = $query_handle->fetchrow_array; # replace non-word characters in channame with dashes $channame =~ s/\W+/-/g; # replace non-word characters in title with underscores my $title_old = $title; $title =~ s/\W+/_/g; # replace non-word characters in subtitle with underscores my $subtitle_old = $subtitle; $subtitle =~ s/\W+/_/g; # Remove non alphanumeric chars from $starttime & $endtime my $newstarttime = $starttime; $newstarttime =~ s/[|^\W|\s|-|]//g; my $filename = $dir."/".$basename; my $newfilename = $exportdir."/".$channame."-".$title."-".$subtitle."-".$newstarttime; $newfilename =~ s/\..*?$//; $syndicatedepisodenumber =~ m/^.*?(\d*)(\d{2})$/; my $seasonnumber = $1; my $episodenumber = $2; require "$config.pm"; # need the extension to calculate our file name my $object = new $config(); my $extension = $object->Extension(); # Trim any characters over 63, # it seems iTunes does not like files with lengths this long. my $x = 63 - $extension; $newfilename =~ s/^(.*\/(.{1,$x})).*$/$1/g; my $webfilename = "$2"; if ($debug) { print "\n\n Source filename:$filename \nDestination filename:$newfilename\n \n"; } # move to the export directory incase any logs get written chdir $exportdir; # create new object with our file names my $object = new $config($filename, $newfilename); $object->export(); my $returnCode = $object->checkOutput(); # only continue if encoding didn't fail if ($returnCode == 1){ if (!$debug){ # clean up any log files left behind by ffmpeg system "rm *.log"; system "rm *.mbtree"; } if($otg ne "true"){ # Save Data $query = "INSERT into mythexport VALUES(NULL,?,?,?,?,NOW(),DATE_ADD(NOW(),INTERVAL ? DAY),?,?)"; $query_handle = $connect->prepare($query); logdebug("query = $query"); $query_handle->execute("$webfilename$extension",$title_old,$subtitle,$description,$deleteperiod,$airdate,$podcastname) || logerror("ERROR: Unable to update table."); } } else{ logerror("ERROR: No resulting file from ffmpeg, most likely your ffmpeg failed. Enable debugging and test by hand."); } } sub delete($){ my $param = $_[0]; my $cfg = new Config::Simple(); $cfg->read('/etc/mythtv/mythexport/mythexport.cfg') || logerror("Cannot read config file: /etc/mythtv/mythexport/mythexport.cfg"); my $dir = $cfg->param("dir"); $dir =~ s/\/$//; my $delete_query = "SELECT file FROM mythexport where id=?"; my $delete_query_handle = $connect->prepare($delete_query); logdebug("query = $delete_query"); $delete_query_handle->execute($param) || logerror("ERROR: Unable to query mythexport table"); my $file = $delete_query_handle->fetchrow_array(); my $location = "$dir\/$file"; $log->notice("Deleting $file"); logdebug("file = $location"); unlink($location) || logerror("ERROR: Unable to find file: $location"); my $query = "delete from mythexport where id=?"; my $query_handle = $connect->prepare($query); logdebug("query = $query"); $query_handle->execute($param) || logerror("Unable to delete from mythexport table"); } # our infinite loop while($keep_going) { my $query = "select id, type, param from mythexport_job_queue order by id"; my $query_handle = $connect->prepare($query); logdebug("query = $query"); $query_handle->execute() || logerror("Unable to query mythexport_job_queue table"); while(my ($id, $type, $param) = $query_handle->fetchrow_array()){ if($type eq "delete"){ &delete($param); } elsif($type eq "export"){ &export($param); } elsif($type eq "otg-lightweight"){ createXML($param); } elsif($type eq "otg-full"){ createSQL($param); } else{ logerror("ERROR: job type unknown."); } my $job_query = "delete from mythexport_job_queue where id=?"; my $job_query_handle = $connect->prepare($job_query); logdebug("query = $job_query"); $job_query_handle->execute($id) || logerror("Unable to delete from mythexport_job_queue table"); # remove lock file so the userjob knows that it's work is done my $lockfile = getExportDir() . "/mythexport.$id"; if (-e $lockfile){ unlink($lockfile); } } # wait for 60 seconds sleep(60); } $log->warning("Stopping Processing: ".time()); mythexport/usr/bin/mythexport_addjob0000775000000000000000000000664314766557364015266 0ustar #!/usr/bin/perl # mythexport_addjob v2.2.3 # By: John Baab # Email: rhpot1991@ubuntu.com # Purpose: Script for creating a mythexport job. # Requirements: perl and the DBI & DBD::mysql modules, MythTV perl bindings # # License: # # This Package 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 package 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 package; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # On Debian & Ubuntu systems, a complete copy of the GPL can be found under # /usr/share/common-licenses/GPL-3, or (at your option) any later version use DBI; use DBD::mysql; use MythTV; use Config::Simple; use strict; my $connect = undef; my $debug = 0; # Set default values my $cfg = new Config::Simple(); $cfg->read('/etc/mythtv/mythexport/mythexport.cfg') || logerror("Cannot read config file: /etc/mythtv/mythexport/mythexport.cfg"); my $exportdir = $cfg->param("dir"); $exportdir =~ s/\/$//; my ($starttime, $chanid, $config, $deleteperiod, $podcastname) = ""; my $usage = "\nHow to use mythexport : \n" ."\nchanid = Channel ID associated with the recording to export.\n" ."starttime = Recording start time in either 'yyyy-mm-dd hh:mm:ss' or 'yyyymmddhhmmss' format.\n" ."config = Name of configuration settings.\n" ."\nExample: mythexport_add starttime=20060803205900 chanid=1006 config=ipod\n"; # get this script's ARGS my $num = $#ARGV + 1; # if user hasn't passed enough arguments, die and print the usage info if ($num <= 2) { die "$usage"; } # Get all the arguments foreach (@ARGV){ if ($_ =~ m/debug/) { $debug = 1; } elsif ($_ =~ m/starttime/) { $starttime = (split(/\=/,$_))[1]; } elsif ($_ =~ m/chanid/) { $chanid = (split(/\=/,$_))[1]; } elsif ($_ =~ m/config/) { $config = (split(/\=/,$_))[1]; } elsif ($_ =~ m/deleteperiod/) { $deleteperiod = (split(/\=/,$_))[1]; } elsif ($_ =~ m/podcastname/) { $podcastname = (split(/\=/,$_))[1]; } } my $myth = new MythTV(); # connect to database $connect = $myth->{'dbh'}; my $query = "SELECT title, subtitle from recorded where chanid=? and starttime=?"; my $query_handle = $connect->prepare($query); $query_handle->execute($chanid,$starttime) || die("Unable to query recordings table"); my ($title, $subtitle) = $query_handle->fetchrow_array; my $param = "starttime=$starttime&chanid=$chanid&config=$config&deleteperiod=$deleteperiod&podcastname=$podcastname"; # add export job $query = "insert into mythexport_job_queue(type,param,id,description) values ('export',?,NULL,?)"; $query_handle = $connect->prepare($query); $query_handle->execute($param,"$title:$subtitle") || die "Unable to query mythexport_job_queue table"; my $id = $query_handle->{mysql_insertid}; my $lockfile = "$exportdir/mythexport.$id"; # create a lock file and wait for it to be deleted by the daemon before we complete the user job system("touch $lockfile"); while (-e $lockfile) {sleep(60);} mythexport/usr/bin/mythimport0000775000000000000000000000603314766557364013745 0ustar #!/usr/bin/perl # mythimport v2.0 # By: John Baab # Email: john.baab@gmail.com # Purpose: Imports recordings into an On The Go backend. # Requirements: MythTV perl bindings # # # License: # # This Package 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 package 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 package; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # On Debian & Ubuntu systems, a complete copy of the GPL can be found under # /usr/share/common-licenses/GPL-3, or (at your option) any later version use MythTV; use File::Copy; use strict; my ($input, $output, $cleanup) = ""; my $usage = "\nHow to use mythimport : \n" ."\ninput = Input directory where exported recordings and sql live. These are generated using MythExport. This option is mandatory.\n" ."output = Output directory, use this if you want to transfer the recordings to a different directory.\n" ."cleanup = Specify what files to delete upon success (available options: all, recordings, sql). Do not speficy to leave files in place.\n" ."\nExample: mythimport input=/mnt/usb/mythtv/ output=/var/lib/mythtv/recordings/ cleanup=all\n"; # get this script's ARGS my $num = $#ARGV + 1; # if user hasn't passed enough arguments, die and print the usage info if ($num <= 0) { die "$usage"; } foreach (@ARGV){ if ($_ =~ m/input/) { $input = (split(/\=/,$_))[1]; } elsif ($_ =~ m/output/) { $output = (split(/\=/,$_))[1]; } elsif ($_ =~ m/cleanup/) { $cleanup = (split(/\=/,$_))[1]; } } #remove trailing / $input =~ s/\/$//; $output =~ s/\/$//; my $myth = new MythTV(); #get mysql info my $dbuser = $myth->{'db_user'}; my $dbpass = $myth->{'db_pass'}; my $dbhost = $myth->{'db_host'}; my $dbname = $myth->{'db_name'}; my $dbport = $myth->{'db_port'}; chdir $input || die "ERROR: input directory is not accessable.\n"; #build mysql command my $command = "mysql -h$dbhost -u$dbuser -p$dbpass -P$dbport $dbname < mythimport.sql"; #test that the directory has the correct permissions if($output ne ""){ -w $output || die "ERROR: $output is not writeable.\n"; } system ("$command") == 0 || die "ERROR: MySQL command failed.\n"; if($output ne ""){ copy("*.mpg", "$output/."); copy("*.nuv","$output/."); print "Make sure that $output is in your MythTV storage groups, otherwise MythTV will not be able to find your files."; } if($cleanup eq "all"){ unlink("*"); } elsif($cleanup eq "recordings"){ unlink("*.mpg"); unlink("*.nuv"); } elsif($cleanup eq "sql"){ unlink("mythimport.sql"); } mythexport/usr/share/0000775000000000000000000000000014766557364012133 5ustar mythexport/usr/share/mythexport/0000775000000000000000000000000014766557364014356 5ustar mythexport/usr/share/mythexport/ExportBase.pm0000664000000000000000000000175214766557364016775 0ustar #!/usr/bin/perl package ExportBase; sub new { my $class = shift; my $self = { _inputFile => shift, _outputFile => shift, _description => shift, _devices => shift, _notes => shift, _version => shift, _extension => ".m4v", }; bless $self, $class; return $self; } sub checkOutput{ my( $self ) = @_; if (-e "$self->{_outputFile}$self->{_extension}"){ return 1; } else{ return 0; } } sub Description { my $self = shift; $self->{_description} = shift if @_; return $self->{_description}; } sub Devices { my $self = shift; $self->{_devices} = shift if @_; return $self->{_devices}; } sub Notes { my $self = shift; $self->{_notes} = shift if @_; return $self->{_notes}; } sub Extension { my $self = shift; $self->{_extension} = shift if @_; return $self->{_extension}; } sub Version { my $self = shift; $self->{_version} = shift if @_; return $self->{_version}; } 1; mythexport/usr/share/mythexport/configs/0000775000000000000000000000000014766557364016006 5ustar mythexport/usr/share/mythexport/configs/PortableH264HighRes.pm0000664000000000000000000000203314766557364021730 0ustar #!/usr/bin/perl package PortableH264HighRes; use ExportBase; our @ISA = qw(ExportBase); my $description = "High Resolution (800x400) Portable H264 Settings."; my $devices = "High Resolution Android Devices (example Droid, Evo, N1), iPod Touch, iPhone, iPad"; my $notes = "Requires AAC, activate Medibuntu"; my $version = "1.0"; sub new{ my $class = shift; my $self = $class->SUPER::new(shift, shift, $description, $devices, $notes, $version); bless $self, $class; return $self; } sub export{ my( $self ) = @_; system("avconv -i \'$self->{_inputFile}\' -y -pass 1 -an -vcodec libx264 -pre slow_firstpass -pre ipod640 -b 1500k -bt 1000k -threads 0 -s 800x480 -aspect 16:9 -f ipod \'$self->{_outputFile}$self->{_extension}\' && avconv -i \'$self->{_inputFile}\' -y -pass 2 -vcodec libx264 -pre medium -pre ipod640 -b 1500k -bt 1000k -threads 0 -s 800x480 -acodec libfaac -ab 192kb -ac 2 -aspect 16:9 -f ipod \'$self->{_outputFile}$self->{_extension}\'"); } 1; mythexport/usr/share/mythexport/configs/PortableH264LowRes.pm0000664000000000000000000000202114766557364021607 0ustar #!/usr/bin/perl package PortableH264LowRes; use ExportBase; our @ISA = qw(ExportBase); my $description = "Low Resolution (480x320) Portable H264 Settings."; my $devices = "Low Resolution Android Devices (example HTC Hero), iPod Classic, iPod Nano"; my $notes = "Requires AAC, activate Medibuntu"; my $version = "1.0"; sub new{ my $class = shift; my $self = $class->SUPER::new(shift, shift, $description, $devices, $notes, $version); bless $self, $class; return $self; } sub export{ my( $self ) = @_; system("avconv -i \'$self->{_inputFile}\' -y -pass 1 -an -vcodec libx264 -pre slow_firstpass -pre ipod320 -b 1500k -bt 1000k -threads 0 -s 480x320 -aspect 16:9 -f ipod \'$self->{_outputFile}$self->{_extension}\' && avconv -i \'$self->{_inputFile}\' -y -pass 2 -vcodec libx264 -pre medium -pre ipod320 -b 1500k -bt 1000k -threads 0 -s 480x320 -acodec libfaac -ab 192kb -ac 2 -aspect 16:9 -f ipod \'$self->{_outputFile}$self->{_extension}\'"); } 1; mythexport/usr/share/mythtv/0000775000000000000000000000000014766557364013466 5ustar mythexport/usr/share/mythtv/mythexport/0000775000000000000000000000000014766557364015711 5ustar mythexport/usr/share/mythtv/mythexport/deleteFile.cgi0000775000000000000000000000211714766557364020443 0ustar #!/usr/bin/perl use strict; use CGI qw(:standard); use HTML::Template; use Config::Simple; use MythTV; require includes; my $connect = undef; my $id = param("id"); my $file = "/etc/mythtv/mythexport/mythexport.cfg"; my $cfg = new Config::Simple(); $cfg->read($file) || die $cfg->error(); my $dir = $cfg->param("dir"); $dir =~ s/\/$//; my $myth = new MythTV(); # connect to database $connect = $myth->{'dbh'}; my $template = HTML::Template->new(filename => 'template/template.tmpl'); my $query = "SELECT file FROM mythexport where id=?"; my $query_handle = $connect->prepare($query); $query_handle->execute($id) || die "Unable to query mythexport table"; my $file = $query_handle->fetchrow_array(); # add delete job $query = "insert into mythexport_job_queue(type,param,id,description) values ('delete',?,NULL,?)"; $query_handle = $connect->prepare($query); $query_handle->execute($id,$file) || die "Unable to query mythexport table"; my $content = "DONE"; $template->param(CONTENT => $content); $template->param(LOCATION => "file"); print generateContentType(), $template->output; exit(0); mythexport/usr/share/mythtv/mythexport/deleteJob.cgi0000775000000000000000000000123614766557364020277 0ustar #!/usr/bin/perl use strict; use CGI qw(:standard); use HTML::Template; use Config::Simple; use MythTV; require includes; my $connect = undef; my $id = param("id"); my $myth = new MythTV(); # connect to database $connect = $myth->{'dbh'}; my $template = HTML::Template->new(filename => 'template/template.tmpl'); # add delete job my $query = "delete from mythexport_job_queue where id=?"; my $query_handle = $connect->prepare($query); $query_handle->execute($id) || die "Unable to query mythexport table"; my $content = "DONE"; $template->param(CONTENT => $content); $template->param(LOCATION => "file"); print generateContentType(), $template->output; exit(0); mythexport/usr/share/mythtv/mythexport/file.cgi0000775000000000000000000000371514766557364017325 0ustar #!/usr/bin/perl use strict; use CGI qw(:standard); use HTML::Template; use Config::Simple; use MythTV; require includes; my $connect = undef; my $file = "/etc/mythtv/mythexport/mythexport.cfg"; my ($script,$content) = ""; my $template = HTML::Template->new(filename => 'template/template.tmpl'); # if we have a valid config if(-e $file && -s $file > 5){ my $cfg = new Config::Simple(); $cfg->read($file) || die $cfg->error(); my $myth = new MythTV(); # connect to database $connect = $myth->{'dbh'}; $script = " "; # find the old recordings my $query = "SELECT file, title, subtitle, airDate, podcastName, id, file FROM mythexport order by pubDate desc"; my $query_handle = $connect->prepare($query); $query_handle->execute() || die "Unable to query mythexport table"; $content = "

Exported Files
"; while ( my ($file,$title,$subtitle,$airDate,$podcastName,$id,$file) = $query_handle->fetchrow_array() ) { $content .= ""; } $content .= "

RecordingPodcastDelete?
$title"; if ($subtitle) { $content .= ": $subtitle"; } else{ $content .= ": $airDate"; } $content .= "$podcastNameDelete
"; } else{ $content = "

Missing or Invalid configuration file, please create one.

"; } $template->param(SCRIPT => $script); $template->param(CONTENT => $content); $template->param(LOCATION => "file"); print generateContentType(), $template->output; exit(0); mythexport/usr/share/mythtv/mythexport/images/0000775000000000000000000000000014766557364017156 5ustar mythexport/usr/share/mythtv/mythexport/images/powered_apache_80x15_2.png0000664000000000000000000000721314766557364023723 0ustar PNG  IHDRP pHYs  tIME 81u*IDATfffgggf>>>$ -( *)*zzz   * ?7 YG ))eeefeeee +.̴" L<9.  eeeeed234?ױ,)#  06="4";;eeee E@=2/;. DY';<e !t»O".68Keffeeee fff %1fggg7ffffO* IENDB`mythexport/usr/share/mythtv/mythexport/images/powered_mysql_80x15_2.png0000664000000000000000000000144014766557364023643 0ustar PNG  IHDRPgAMAOX2tEXtSoftwareAdobe ImageReadyqe<IDATxbLKKcI Xx̙p"n]Z pmzz:@ }矿+yV'+K1&2fN?H'ʳ&ڗpڲĄ)it~dgnб{/J1 j0BUĂUXVg|@.0'Ow🾹vӱ`;"sZ5P Dԯ$Gӈţ7FĄUFUf} Lߧt:C|:2D<9X}yj!A'v rGjL;x %1015Z;rΫG2ē4F<)_1 XpIH ps Yjmx՘&hAӈ(0MfcOĄKbŻ|⑦Go?/N(x9 Hօg`\g$L5Lq*ZD_rm?2Ʃع:Vs]֞aYD"]#kDM#[3v9eY#ȸ[,DA 42<;ĉ]ͯdOa0cd?D%'0;;S.AS<ۗ|_+DݜEڔJ3d[\&H$8xwΏ}}>ZܜCSx#-pBD$'iIrI1-- k xEmYDBNM0r LU!Vq````dd6ި?_902_+&IK ELZAoo//FFƿooRaUmiˈF2 1W|̀qhl5rIENDB`mythexport/usr/share/mythtv/mythexport/includes/0000775000000000000000000000000014766557364017517 5ustar mythexport/usr/share/mythtv/mythexport/includes/ajax.js0000664000000000000000000000452714766557364021010 0ustar /*################################################# # copyright 2008 # insert gpl license #################################################*/ // ajax.js // Created by: John Baab // E-mail: john.baab@gmail.com var req; var dowhatnow; function retrieveURL(url) { if (window.XMLHttpRequest) { // Non-IE browsers req = new XMLHttpRequest(); req.onreadystatechange = processStateChange; try { req.open("GET", url, true); } catch (e) { alert(e); } req.send(null); } else if (window.ActiveXObject) { // IE req = new ActiveXObject("Microsoft.XMLHTTP"); if (req) { req.onreadystatechange = processStateChange; req.open("GET", url, true); req.send(); } } } function processStateChange() { if (req.readyState == 4) { // Complete if (req.status == 200) { // OK response //alert("done"); //alert(req.responseText); //alert(req.responseText); if (dowhatnow == "rss") document.getElementById("feed").innerHTML = req.responseText; else if(dowhatnow == "deleteFile"){ alert("File Delete Job has been added to the queue."); //location.reload() } else if(dowhatnow == "deleteJob"){ alert("Job has been removed from the queue."); location.reload() } //var newtext = document.createTextNode(req.responseText); //document.getElementById("feed").appendChild(newtext); //transformData(req.responseText); } else { alert("Problem: " + req.statusText); } } } function openRSS() { //document.getElementById("feed").innerHTML = "SOMETHING!!!"; //alert("test"); //alert("mythexportRSS.cgi?podcastName=" + document.getElementById("podcast").value); //retrieveURL("mythexportRSS.cgi?podcastName=" + document.getElementById("podcast").value); dowhatnow = "rss"; retrieveURL("wrapper.cgi?podcastName=" + document.getElementById("podcast").value); document.getElementById("link").href = "mythexportRSS.cgi?podcastName=" + document.getElementById("podcast").value; //retrieveURL("rss.cgi"); //document.getElementById("test").innerHTML="image.cgi?image=" + image; } function deleteFile(id) { //alert("test2"); dowhatnow = "deleteFile"; retrieveURL("deleteFile.cgi?id=" + id); return true; } function deleteJob(id) { //alert("test2"); dowhatnow = "deleteJob"; retrieveURL("deleteJob.cgi?id=" + id); return true; } mythexport/usr/share/mythtv/mythexport/includes/global.css0000664000000000000000000000724714766557364021503 0ustar html, form { padding:0px; margin:0px; } html>body {font-size: 83.3%;} html, body { background-color: rgb(97,140,175); } body { background-color: rgb(97,140,175); font-family: Verdana, Arial, SunSans-Regular, Sans-Serif; font-size: 83.3%; padding:0px; margin:0px; } p, h2 { padding:10px; margin:0px; } h2 { padding-top:10px; text-transform:uppercase; background-color:transparent; } #menu { position:absolute; width:180px; left:5px; bottom:5px; /*top:100px;*/ top:5px; background-color:rgb(209,215,222); border-right:solid 2px rgb(191,195,200); border-bottom:solid 2px rgb(191,195,200); padding:0px; margin:0px; } /* OLD CONTENT #content { position:relative; top:5px; margin-left:127px; background-color:#fafafa; min-width:615px; max-width:1153px; margin-right:10px; border:solid 2px rgb(191,195,200); overflow:visible; padding-bottom:15px; } */ #content{ position:absolute; /*top:105px;*/ top:5px; bottom:30px; left:192px; right:5px; margin:0px; border:solid 2px rgb(191,195,200); border-bottom:0px; overflow:auto; background-color:#fafafa; min-width:615px; /*max-width:1153px;*/ } ul.navigation, ul.externalNav{ list-style:none; padding:0px; } ul.navigation{ margin:15px 0px 10px 0px; } ul.externalNav{ /*margin:0px 0px 25px 0px; max-height:150px; min-height:120px;*/ } ul.navigation li, ul.externalNav li { margin-left:15px; } ul.externalNav li { margin-bottom: 15px; } ul.navigation li:hover, ul.externalNav li:hover { background-color:rgb(241, 207, 117); } #externalTxt{ padding-left:7px; color:rgb(53,80,111); font-weight:bold; } ul.navigation a, ul.externalNav a { color:rgb(97,140,175); background-color:transparent; text-decoration:none; font-weight:bold; } #header { /*max-width:800px;*/ background-repeat: no-repeat; width:100%; /*height:100px;*/ height:0px; background-color:rgb(97,140,175); background-repeat:no-repeat; padding:0px; margin:0px; } #home .home, #about .about, #news .news, #directions .directions, #images .images, #forums .forums, #links .links, #tag .tag, #files .files { list-style:disc inside; color:rgb(241, 207, 117); background-color:#fafafa; padding-left:15px; margin-left:0px; } #buttons { /*display:none;*/ /*margin-left:127px; margin-right:10px;*/ right:5px; left:192px; bottom:5px; border:2px solid rgb(191,195,200); min-width:615px; /*max-width:1153px;*/ position:absolute; bottom:0px; height:15px; background-color:#fafafa; padding:3px 0px; margin-bottom:5px; } #buttons img { border:none; } #buttons a { margin-left:10px; } object { border:0px; padding:0px; margin:0px; width:100%; height:100%; position:absolute; } table.tagTable { width:100%; margin-bottom:25px; } table.tagTable tr td { text-align:center; } table.tagTable th a{ color:black; } tr.greyColored { background-color:rgb(225,225,225); } tr.yellowColored { background-color:rgb(241, 207, 117); } img.tagImage{ /*width:100%;*/ max-width:600px; display:block; } img.hiddenImage{ /*width:100%;*/ max-width:600px; display:none; } INPUT, table, TH, LI LI, LI P, TD P, BLOCKQUOTE P, P, TD, form {font-size:1em;} select, input.selectButton {font-size:.85em;} object.rssFrame{ overflow:auto; /*position:relative; top:25px; bottom:0px; left:0px; right:0px;*/ height:90%; width:100%; } div#feed{ /*width:100%; height:100%;*/ } span.red{ color:red; } #corner{ float:right; border:2px solid; background-color:rgb(241,200,35); width:250px; padding:10px; margin:5px; } mythexport/usr/share/mythtv/mythexport/includes.pm0000775000000000000000000000057214766557364020064 0ustar #!/usr/bin/perl use strict; use CGI qw(:standard); sub generateContentType{ if ($ENV{HTTP_ACCEPT} =~ /(^|,)(\s)*application\/xhtml\+xml(\s)*(,|$)/ || $ENV{HTTP_USER_AGENT} =~ /W3C_Validator/){ #return "Content-Type: application/xhtml+xml\n\n"; return "Content-Type: text/html\n\n"; } else{ return "Content-Type: text/html\n\n"; } } 1; mythexport/usr/share/mythtv/mythexport/job_queue.cgi0000775000000000000000000000310214766557364020352 0ustar #!/usr/bin/perl use strict; use CGI qw(:standard); use HTML::Template; use MythTV; require includes; my $connect = undef; my $myth = new MythTV(); # connect to database $connect = $myth->{'dbh'}; my $template = HTML::Template->new(filename => 'template/template.tmpl'); my $script = " "; # find the old recordings my $query = "SELECT id, type, description FROM mythexport_job_queue order by id"; my $query_handle = $connect->prepare($query); $query_handle->execute() || die "Unable to query mythexport_job_queue table"; my $content = "

Job Queue

"; while ( my ($id,$type, $description) = $query_handle->fetchrow_array() ) { $content .= ""; #if($type eq "delete"){ # my $sub_query = "SELECT type FROM mythexport_job_queue order by id"; # my $sub_query_handle = $connect->prepare($sub_query); # $query_handle->execute() || die "Unable to query mythexport_job_queue table"; #} } $content .= "

JobDescription
$type$description Delete
"; $template->param(SCRIPT => $script); $template->param(CONTENT => $content); $template->param(LOCATION => "file"); print generateContentType(), $template->output; exit(0); mythexport/usr/share/mythtv/mythexport/mythexportRSS.cgi0000775000000000000000000000522414766557364021216 0ustar #!/usr/bin/perl use DBI; use DBD::mysql; use MythTV; use XML::RSS; use CGI qw(:standard); use HTTP::Date; use strict; # create an RSS 2.0 file my $rss = new XML::RSS (version => '2.0'); my $connect = undef; my $myth = new MythTV(); # connect to database $connect = $myth->{'dbh'}; my $ip = $ENV{'HTTP_HOST'}; my $http = "http://"; # Fixes bug LP:288186 if($ENV{'HTTP_X_FORWARDED_HOST'} ne ""){ $ip = $ENV{'HTTP_X_FORWARDED_HOST'}; } if($ENV{'HTTPS'} eq "on"){ $http = "https://"; } my $podcast_name = param("podcastName"); my $title = "MythCast"; my $currentDate = time2str(time()); my ($query, $query_handle); if($podcast_name ne ""){ $title .= " [$podcast_name]"; $query = "select file, title, subtitle, description, pubDate, airDate from mythexport where podcastName like ? order by pubDate desc"; $query_handle = $connect->prepare($query); $query_handle->execute($podcast_name) || die "Unable to get exported recordings from database."; } else{ $query = "select file, title, subtitle, description, pubDate, airDate from mythexport order by pubDate desc"; $query_handle = $connect->prepare($query); $query_handle->execute() || die "Unable to get exported recordings from database."; } $rss->channel(title => "$title", link => "$http$ip/mythexport/video/", language => 'en', description => 'Exported MythTV Recordings', rating => '(PICS-1.1 "http://www.classify.org/safesurf/" 1 r (SS~~000 1))', pubDate => $currentDate, lastBuildDate => $currentDate ); while (my @data = $query_handle->fetchrow_array()) { #print "LOOP!"; my $rss_file=$data[0]; my $rss_title=$data[1]; my $rss_subtitle=$data[2]; my $rss_desc=$data[3]; my $rss_pubDate = $data[4]; my $rss_airDate = $data[5]; my $title = "$rss_title - $rss_subtitle"; my $file_len = -s "/var/www/mythexport/video/$rss_file"; if ($rss_subtitle eq ""){ my $temp_date = $rss_airDate; $temp_date =~ s/\-/\//g; $temp_date =~ s/\s00\:00\:00//; $title .= $temp_date; } my $temp_pubDate = str2time($rss_pubDate); $temp_pubDate = time2str($temp_pubDate); $rss->add_item(title => "$title", # creates a guid field with permaLink=true # alternately creates a guid field with permaLink=false # guid => "gtkeyboard-0.85" enclosure => { url=>"$http$ip/mythexport/video/$rss_file", type=>"video/mpeg", length=>"$file_len"}, description => "$rss_desc", pubDate => "$temp_pubDate", guid => "$rss_file", ); } print "Content-Type: application/rss+xml\n\n", $rss->as_string; exit(0); mythexport/usr/share/mythtv/mythexport/otg.cgi0000775000000000000000000000510714766557364017174 0ustar #!/usr/bin/perl use strict; use CGI qw(:standard); use HTML::Template; use MythTV; require includes; my $connect = undef; my $template = HTML::Template->new(filename => 'template/template.tmpl'); my ($script,$content) = ""; my $dir = '/usr/share/mythexport/configs'; opendir(my $dh, $dir) || die "can't opendir $dir: $!"; my @modules = grep { /\.pm/ && -f "$dir/$_" } readdir($dh); $script = ""; my $myth = new MythTV(); # connect to database $connect = $myth->{'dbh'}; # find all recordings my $query = "SELECT title,subtitle,description,starttime,chanid FROM recorded order by title, subtitle, starttime"; my $query_handle = $connect->prepare($query); $query_handle->execute() || die "Unable to query mythexport table"; $content = "

Choose a Location:  *
Full Featured Lightweight
Choose an export profile:
Choose recordings to take on the go: "; while ( my ($title,$subtitle,$description,$starttime,$chanid) = $query_handle->fetchrow_array() ) { $content .= ""; } $content .= "
TitleDescriptionStart Time
$title"; if ($subtitle) { $content .= ": $subtitle"; } $content .= "$description$starttime

* Are required

"; $template->param(SCRIPT => $script); $template->param(CONTENT => $content); $template->param(LOCATION => "otg"); print generateContentType(), $template->output; exit(0); mythexport/usr/share/mythtv/mythexport/otg_job.cgi0000775000000000000000000000244514766557364020030 0ustar #!/usr/bin/perl use strict; use CGI qw(:standard); use HTML::Template; use Config::Simple; use MythTV; require includes; my $connect = undef; my $location = param("location"); my $type = param("type"); my $config = param("config"); my @recordings = param("recordings"); my ($chanid,$starttime) = ""; my $counter = 0; foreach (@recordings){ if($_ =~ m/(.*)\|(.*)/){ $chanid .= "$1|"; $starttime .= "$2|"; } $counter++; } $chanid =~ s/\|$//; $starttime =~ s/\|$//; my $param = "chanid=$chanid&starttime=$starttime&config=$config&exportdir=$location"; my $otgVersion = ""; if($type eq "otgFull"){ $otgVersion = "otg-full"; } elsif($type eq "otgLight"){ $otgVersion = "otg-lightweight"; } my $myth = new MythTV(); # connect to database $connect = $myth->{'dbh'}; my $template = HTML::Template->new(filename => 'template/template.tmpl'); # add OTG job my $query = "insert into mythexport_job_queue(type,param,id,description) values (?,?,NULL,?)"; my $query_handle = $connect->prepare($query); $query_handle->execute($otgVersion,$param,"Total Recordings: $counter") || die "Unable to add OTG job to queue table"; my $content = "OTG Job has been added to the Queue."; $template->param(CONTENT => $content); $template->param(LOCATION => "otg"); print generateContentType(), $template->output; exit(0); mythexport/usr/share/mythtv/mythexport/player.cgi0000775000000000000000000000245014766557364017675 0ustar #!/usr/bin/perl use strict; use CGI qw(:standard); use HTML::Template; use Config::Simple; use MythTV; require includes; my $connect = undef; my $file = "/etc/mythtv/mythexport/mythexport.cfg"; my ($script,$content) = ""; my $template = HTML::Template->new(filename => 'template/html5.tmpl'); # if we have a valid config if(-e $file && -s $file > 5){ my $cfg = new Config::Simple(); $cfg->read($file) || die $cfg->error(); my $myth = new MythTV(); # connect to database $connect = $myth->{'dbh'}; my $id = param("id"); # find the exported recordings my $query = "SELECT file FROM mythexport where id=?"; my $query_handle = $connect->prepare($query); $query_handle->execute($id) || die "Unable to query mythexport table"; $content = "

This page is a work in progress, it may work for your Anroid device or iPhone.
"; while ( my $file = $query_handle->fetchrow_array() ) { $content .= ""; } $content .= "

"; } else{ $content = "

Missing or Invalid configuration file, please create one.

"; } $template->param(CONTENT => $content); print generateContentType(), $template->output; exit(0); mythexport/usr/share/mythtv/mythexport/rss.cgi0000775000000000000000000000342514766557364017213 0ustar #!/usr/bin/perl use strict; use CGI qw(:standard); use HTML::Template; use MythTV; require includes; my $connect = undef; my $podcast_name = param("podcastName"); my $myth = new MythTV(); # connect to database $connect = $myth->{'dbh'}; my $template = HTML::Template->new(filename => 'template/template.tmpl'); #my $script = ""; my $bodyLoad = " onload=\"javascript:openRSS();\""; my $script = ""; # find all podcast names my $query = "SELECT distinct(podcastName) FROM mythexport"; my $query_handle = $connect->prepare($query); $query_handle->execute() || die "Unable to query mythexport table"; my $content = "

Link to this feed  Filter by Podcast Name:  $class$version$description$devices$notes"; } $content .= "
Don't see a usable config? Check here for new configuration releases and updates

"; $content .= "Select a User Jobs:
"; my $i = 1; while(my ($description) = $query_handle->fetchrow_array()) { $content .= "$description
"; $i++; } $content .= "Description:
*WARNING: Proceeding will overwrite any data for this User Job

Delete Period:  (number of days to keep exported files, empty will never delete)
Podcast Name:  (optional)

"; $template->param(CONTENT => $content); $template->param(LOCATION => "setup"); print generateContentType(), $template->output; exit(0); mythexport/usr/share/mythtv/mythexport/setupsave.cgi0000775000000000000000000000266514766557364020430 0ustar #!/usr/bin/perl use strict; use CGI qw(:standard); use HTML::Template; use MythTV; require includes; my $description = param("description"); my $userjob = param("userjob"); my $config = param("config"); my $deletePeriod = param("deletePeriod"); my $podcastName = param("podcastName"); my $hostname = `hostname`; $hostname =~ s/\s//g; my $connect = undef; my $myth = new MythTV(); # connect to database $connect = $myth->{'dbh'}; my $template = HTML::Template->new(filename => 'template/template.tmpl'); my $query = "update settings set data=? where value=?"; my $query_handle = $connect->prepare($query); $query_handle->execute($description,"UserJobDesc$userjob") || die "Unable to update user job description"; my $command = "mythexport_addjob starttime=%STARTTIME% chanid=%CHANID% config=$config deleteperiod=$deletePeriod podcastname=$podcastName"; $query = "update settings set data=? where value=?"; $query_handle = $connect->prepare($query); $query_handle->execute($command,"UserJob$userjob") || die "Unable to update user job command"; $query = "update settings set data='1' where value=? and hostname=?"; $query_handle = $connect->prepare($query); $query_handle->execute("JobAllowUserJob$userjob",$hostname) || die "Unable activate user job"; my $content = "

User Job has been sucessfully saved.

"; $template->param(CONTENT => $content); $template->param(LOCATION => "setup"); print generateContentType(), $template->output; exit(0); mythexport/usr/share/mythtv/mythexport/stream.cgi0000775000000000000000000000267314766557364017703 0ustar #!/usr/bin/perl use strict; use CGI qw(:standard); use HTML::Template; use Config::Simple; use MythTV; require includes; my $connect = undef; my $file = "/etc/mythtv/mythexport/mythexport.cfg"; my ($script,$content) = ""; my $template = HTML::Template->new(filename => 'template/template.tmpl'); # if we have a valid config if(-e $file && -s $file > 5){ my $cfg = new Config::Simple(); $cfg->read($file) || die $cfg->error(); my $myth = new MythTV(); # connect to database $connect = $myth->{'dbh'}; # find the exported recordings my $query = "SELECT title, subtitle, airDate, podcastName, id, file FROM mythexport order by pubDate desc"; my $query_handle = $connect->prepare($query); $query_handle->execute() || die "Unable to query mythexport table"; $content = "

Exported Files
"; while ( my ($title,$subtitle,$airDate,$podcastName,$id,$file) = $query_handle->fetchrow_array() ) { $content .= ""; } $content .= "

Recording
$title"; if ($subtitle) { $content .= ": $subtitle"; } else{ $content .= ": $airDate"; } $content .= "
"; } else{ $content = "

Missing or Invalid configuration file, please create one.

"; } $template->param(CONTENT => $content); $template->param(LOCATION => "file"); print generateContentType(), $template->output; exit(0); mythexport/usr/share/mythtv/mythexport/system_setup.cgi0000775000000000000000000000202214766557364021140 0ustar #!/usr/bin/perl use strict; use CGI qw(:standard); use HTML::Template; use Config::Simple; require includes; my $file = "/etc/mythtv/mythexport/mythexport.cfg"; my $template = HTML::Template->new(filename => 'template/template.tmpl'); my $location = ""; # if we have a valid config if(-e $file && -s $file > 5){ my $cfg = new Config::Simple(); $cfg->read($file) || die $cfg->error();; $location = $cfg->param("dir"); } my $content = "

Update the location where you would like MythExport to store exported recordings:
"; $content .= " *

* Are required

"; $template->param(CONTENT => $content); $template->param(LOCATION => "file"); print generateContentType(), $template->output; exit(0); mythexport/usr/share/mythtv/mythexport/template/0000775000000000000000000000000014766557364017524 5ustar mythexport/usr/share/mythtv/mythexport/template/html5.tmpl0000775000000000000000000000013714766557364021457 0ustar MythExport mythexport/usr/share/mythtv/mythexport/template/template.tmpl0000775000000000000000000000361214766557364022242 0ustar > MythExport >