diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..9cecc1d
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ {one line to give the program's name and a brief idea of what it does.}
+ Copyright (C) {year} {name of author}
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+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:
+
+ {project} Copyright (C) {year} {fullname}
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/conf/ampache.cfg.php b/conf/ampache.cfg.php
index fa494eb..bd8d12a 100644
--- a/conf/ampache.cfg.php
+++ b/conf/ampache.cfg.php
@@ -1,17 +1,17 @@
;###
-;###################
-; General Config #
-;###################
+;#########################################################
+; General Config #
+;#########################################################
; This value is used to detect quickly
; if this config file is up to date
; this is compared against a value hard-coded
; into the init script
-config_version = 29
+config_version = 34
-;###################
-; Path Vars #
-;###################
+;#########################################################
+; Path Vars #
+;#########################################################
; The public http host of your server.
; If not set, retrieved automatically from client request.
@@ -19,6 +19,11 @@ config_version = 29
; DEFAULT: ""
http_host = "DOMAINTOCHANGE"
+; The public http port of your server.
+; If not set, retrieved automatically from client request.
+; DEFAULT:
+;http_port = 80
+
; The public path to your ampache install
; Do not put a trailing / on this path
; For example if your site is located at http://localhost
@@ -26,25 +31,26 @@ http_host = "DOMAINTOCHANGE"
; if it is located at http://localhost/music you need to
; set web_path to /music
; DEFAULT: ""
-web_path = "PATHTOCHANGE"
+web_path = "PATHTOCHANGE"
; The local http url of your server.
; If not set, retrieved automatically from server information.
; DEFAULT: ""
;local_web_path = "http://localhost/ampache"
-;##############################
-; Session and Login Variables #
-;##############################
+
+;#########################################################
+; Database #
+;#########################################################
; Hostname of your database
; For socket authentication, set the path to socket file (e.g. /var/run/mysqld/mysqld.sock)
; DEFAULT: localhost
-database_hostname = "localhost"
+database_hostname = localhost
; Port to use when connecting to your database
; DEFAULT: none
-database_port = ""
+;database_port = 3306
; Name of your ampache database
; DEFAULT: ampache
@@ -60,9 +66,14 @@ database_username = "yunouser"
; DEFAULT: ""
database_password = "yunopass"
+
+;#########################################################
+; Session and Security #
+;#########################################################
+
; Cryptographic secret
; This MUST BE changed with your own secret key. Ampache-specific, just pick any random string you want.
-secret_key = "RANDOMKEYTOCHANGE"
+secret_key = "abcdefghijklmnoprqstuvwyz0123456"
; Length that a session will last expressed in seconds. Default is
; one hour.
@@ -95,7 +106,7 @@ session_cookielife = 0
; Is the cookie a "secure" cookie? This should only be set to 1 (true) if you are
; running a secure site (HTTPS).
; DEFAULT: 0
-session_cookiesecure = 0
+session_cookiesecure = 1
; Auth Methods
; This defines which auth methods Auth will attempt to use and in which order.
@@ -120,44 +131,7 @@ auth_methods = "ldap"
; Logout redirection target
; Defaults to our own login.php, but we can override it here if, for instance,
; we want to redirect to an SSO provider instead.
-; logout_redirect = "https://DOMAINTOCHANGE/yunohost/sso/?action=logout"
-
-;#####################
-; Program Settings #
-;#####################
-
-; File Pattern
-; This defines which file types Ampache will attempt to catalog
-; You can specify any file extension you want in here separating them
-; with a |
-; DEFAULT: mp3|mpc|m4p|m4a|aac|ogg|oga|wav|aif|aiff|rm|wma|asf|flac|opus|spx|ra|ape|shn|wv
-catalog_file_pattern = "mp3|mpc|m4p|m4a|aac|ogg|oga|wav|aif|aiff|rm|wma|asf|flac|opus|spx|ra|ape|shn|wv"
-
-; Video Pattern
-; This defines which video file types Ampache will attempt to catalog
-; You can specify any file extension you want in here seperating them with
-; a | but ampache may not be able to parse them
-; DEAFULT: avi|mpg|mpeg|flv|m4v|mp4|webm|mkv|wmv|ogv|mov|divx|m2ts
-catalog_video_pattern = "avi|mpg|mpeg|flv|m4v|mp4|webm|mkv|wmv|ogv|mov|divx|m2ts"
-
-; Playlist Pattern
-; This defines which playlist types Ampache will attempt to catalog
-; You can specify any file extension you want in here seperating them with
-; a | but ampache may not be able to parse them
-; DEFAULT: m3u|pls|asx|xspf
-catalog_playlist_pattern = "m3u|pls|asx|xspf"
-
-; Prefix Pattern
-; This defines which prefix Ampache will ignore when importing tags from
-; your music. You may add any prefix you want seperating them with a |
-; DEFAULT: The|An|A|Die|Das|Ein|Eine|Les|Le|La
-catalog_prefix_pattern = "The|An|A|Die|Das|Ein|Eine|Les|Le|La"
-
-; Catalog disable
-; This defines if catalog can be disabled without removing database entries
-; WARNING: this increase sensibly sql requests and slow down Ampache a lot
-; DEFAULT: false
-;catalog_disable = "false"
+; logout_redirect = "http://sso.example.com/logout"
; Use Access List
; Toggle this on if you want ampache to pay attention to the access list
@@ -189,6 +163,114 @@ require_localnet_session = "true"
; DEFAULT: false
;prevent_multiple_logins = "false"
+
+;#########################################################
+; Metadata #
+;#########################################################
+
+; This determines the tag order for all cataloged
+; music. If none of the listed tags are found then
+; ampache will randomly use whatever was found.
+; POSSIBLE VALUES: ape asf avi id3v1 id3v2 lyrics3 matroska mpeg quicktime riff
+; vorbiscomment
+; DEFAULT: id3v2 id3v1 vorbiscomment quicktime matroska ape asf avi mpeg riff
+getid3_tag_order = "id3v2,id3v1,vorbiscomment,quicktime,matroska,ape,asf,avi,mpeg,riff"
+
+; This determines whether we try to autodetect the encoding for id3v2 tags.
+; May break valid tags.
+; DEFAULT: false
+;getid3_detect_id3v2_encoding = "false"
+
+; This determines if we write the changes to files (as id3 tags) when modifying metadata, or only keep them in Ampache (the default).
+; DEFAULT: false
+;write_id3 = "false"
+
+; This determines if we write the changes to files (as id3 tags) when modifying album art, or only keep them in Ampache (the default)
+; as id3 metadata when updated.
+; DEFAULT: false
+;write_id3_art = "false"
+
+; This determines the order in which metadata sources are used (and in the
+; case of plugins, checked)
+; POSSIBLE VALUES (builtins): filename and getID3
+; POSSIBLE VALUES (plugins): MusicBrainz,TheAudioDb, plus any others you've installed.
+; DEFAULT: getID3 filename
+metadata_order = "getID3,filename"
+
+; This determines the order in which metadata sources are used (and in the
+; case of plugins, checked) for video files
+; POSSIBLE VALUES (builtins): filename and getID3
+; POSSIBLE VALUES (plugins): Tvdb,Tmdb,Omdb, plus any others you've installed.
+; DEFAULT: filename getID3
+metadata_order_video = "filename,getID3"
+
+; This determines if extended metadata grabbed from external services should be deferred.
+; If enabled, extended metadata is retrieved when browsing the library item.
+; If disabled, extended metadata is retrieved at catalog update.
+; Today, only Artist information (summary, place formed, ...) can be deferred.
+; DEFAULT: true
+deferred_ext_metadata = "true"
+
+; Some taggers use delimiters other than \0 for fields
+; This list specifies possible delimiters additional to \0
+; This setting takes a regex pattern.
+; DEFAULT: // / \ | , ;
+additional_genre_delimiters = "[/]{2}|[/|\\\\|\|,|;]"
+
+; Enable importing custom metadata from files.
+; This will need a bit of time during the import. So you may want to disable this
+; if you have troubles with huge databases.
+; DEFAULT: false
+;enable_custom_metadata = "false"
+
+
+;#########################################################
+; Catalog #
+;#########################################################
+
+; File Pattern
+; This defines which file types Ampache will attempt to catalog
+; You can specify any file extension you want in here separating them
+; with a |
+; DEFAULT: mp3|mpc|m4p|m4a|aac|ogg|oga|wav|aif|aiff|rm|wma|asf|flac|opus|spx|ra|ape|shn|wv
+catalog_file_pattern = "mp3|mpc|m4p|m4a|aac|ogg|oga|wav|aif|aiff|rm|wma|asf|flac|opus|spx|ra|ape|shn|wv"
+
+; Video Pattern
+; This defines which video file types Ampache will attempt to catalog
+; You can specify any file extension you want in here separating them with
+; a | but ampache may not be able to parse them
+; DEAFULT: avi|mpg|mpeg|flv|m4v|mp4|webm|mkv|wmv|ogv|mov|divx|m2ts
+catalog_video_pattern = "avi|mpg|mpeg|flv|m4v|mp4|webm|mkv|wmv|ogv|mov|divx|m2ts"
+
+; Playlist Pattern
+; This defines which playlist types Ampache will attempt to catalog
+; You can specify any file extension you want in here separating them with
+; a | but ampache may not be able to parse them
+; DEFAULT: m3u|m3u8|pls|asx|xspf
+catalog_playlist_pattern = "m3u|m3u8|pls|asx|xspf"
+
+; Prefix Pattern
+; This defines which prefix Ampache will ignore when importing tags from
+; your music. You may add any prefix you want separating them with a |
+; DEFAULT: The|An|A|Die|Das|Ein|Eine|Les|Le|La
+catalog_prefix_pattern = "The|An|A|Die|Das|Ein|Eine|Les|Le|La"
+
+; Catalog disable
+; This defines if catalog can be disabled without removing database entries
+; WARNING: this increase sensibly sql requests and slow down Ampache a lot
+; DEFAULT: false
+;catalog_disable = "false"
+
+; Delete from disk
+; This determines if catalog manager users can delete medias from disk.
+; DEFAULT: false
+;delete_from_disk = "false"
+
+
+;#########################################################
+; Program Settings #
+;#########################################################
+
; Downsample Remote
; If this is set to true and access control is on any users who are not
; coming from a defined 'network' ACL will be automatically downsampled
@@ -216,15 +298,15 @@ require_localnet_session = "true"
; still need to enabled downloading for the specific user you
; want to be able to use this function
; DEFAULT: false
-allow_zip_download = "true"
+;allow_zip_download = "false"
-Allow Zip Types
+; Allow Zip Types
; This setting allows/disallows zip download of specific object types
; If empty, all supported object types can be zipped.
; Otherwise, only the given object list can be zipped.
; POSSIBLE VALUES: artist, album, playlist, search, tmp_playlist
; DEFAULT: none
-allow_zip_types = "artist,album,playlist"
+;allow_zip_types = "album"
; File Zip Comment
; This is an optional configuration option that adds a comment
@@ -259,60 +341,6 @@ allow_zip_types = "artist,album,playlist"
; VALUES: any whole number (in bytes per second)
;throttle_download = 10
-; This determines the tag order for all cataloged
-; music. If none of the listed tags are found then
-; ampache will randomly use whatever was found.
-; POSSIBLE VALUES: ape asf avi id3v1 id3v2 lyrics3 matroska mpeg quicktime riff
-; vorbiscomment
-; DEFAULT: id3v2 id3v1 vorbiscomment quicktime matroska ape asf avi mpeg riff
-getid3_tag_order = "id3v2,id3v1,vorbiscomment,quicktime,matroska,ape,asf,avi,mpeg,riff"
-
-; Determines whether we try to autodetect the encoding for id3v2 tags.
-; May break valid tags.
-; DEFAULT: false
-;getid3_detect_id3v2_encoding = "false"
-
-; This determines if file metadata should be write back to files
-; as id3 metadata when updated.
-; DEFAULT: false
-write_id3 = "true"
-
-; This determines if album art should be write back to files
-; as id3 metadata when updated.
-; DEFAULT: false
-write_id3_art = "true"
-
-; This determines if catalog manager users can delete medias from disk.
-; DEFAULT: false
-delete_from_disk = "true"
-
-; This determines the order in which metadata sources are used (and in the
-; case of plugins, checked)
-; POSSIBLE VALUES (builtins): filename and getID3
-; POSSIBLE VALUES (plugins): MusicBrainz,TheAudioDb, plus any others you've installed.
-; DEFAULT: getID3 filename
-metadata_order = "getID3,filename"
-
-; This determines the order in which metadata sources are used (and in the
-; case of plugins, checked) for video files
-; POSSIBLE VALUES (builtins): filename and getID3
-; POSSIBLE VALUES (plugins): Tvdb,Tmdb,Omdb, plus any others you've installed.
-; DEFAULT: filename getID3
-metadata_order_video = "filename,getID3"
-
-; This determines if extended metadata grabbed from external services should be deferred.
-; If enabled, extended metadata is retrieved when browsing the library item.
-; If disabled, extended metadata is retrieved at catalog update.
-; Today, only Artist information (summary, place formed, ...) can be deferred.
-; DEFAULT: true
-deferred_ext_metadata = "true"
-
-; Some taggers use delimiters other than \0 for fields
-; This list specifies possible delimiters additional to \0
-; This setting takes a regex pattern.
-; DEFAULT: // / \ | , ;
-additional_genre_delimiters = "[/]{2}|[/|\\\\|\|,|;]"
-
; This determines if a preview image should be retrieved from video files
; It requires encode_get_image transcode settings.
; DEFAULT: false
@@ -328,7 +356,7 @@ additional_genre_delimiters = "[/]{2}|[/|\\\\|\|,|;]"
; will not ask you for a username and password. false is only
; recommended for internal only instances
; DEFAULT true
-use_auth = "true"
+use_auth = "true"
; Default Auth Level
; If use_auth is set to false then this option is used
@@ -337,7 +365,7 @@ use_auth = "true"
; if use_auth is false
; POSSIBLE VALUES: user, admin, manager, guest
; DEFAULT: guest
-default_auth_level = "user"
+default_auth_level = "guest"
; 5 Star Ratings
; This allows ratings for almost any object in ampache
@@ -367,7 +395,7 @@ sociable = "true"
; License
; This turns on / off all licensing features on Ampache
; DEFAULT: false
-licensing = "false"
+;licensing = "false"
; This options will turn on/off Demo Mode
; If Demo mode is on you can not play songs or update your catalog
@@ -382,7 +410,7 @@ licensing = "false"
; requirments on larger catalogs. If you have the memory this can create
; a 2-3x speed improvement.
; DEFAULT: false
-memory_cache = "true"
+;memory_cache = "false"
; Memory Limit
; This defines the "Min" memory limit for PHP if your php.ini
@@ -443,6 +471,13 @@ memory_cache = "true"
; DEFAULT: false
;resize_images = "false"
+; Playlist Cover Art
+; Set this to true if you want Ampache to generate
+; cover art for playlists automatically based on
+; the content.
+; DEFAULT: false
+;playlist_art = "false"
+
; Statistical Graphs * Requires PHP-GD *
; Set this to true if you want Ampache to generate statistical
; graphs on usages / users.
@@ -477,6 +512,11 @@ art_order = "db,tags,folder,musicbrainz,lastfm,google"
; recommendations and metadata.
lastfm_api_key = "d5df942424c71b754e54ce1832505ae2"
+; Last.FM API secret
+; Set this to your Last.FM api secret to actually use Last.FM for
+; scrobbling.
+lastfm_api_secret = ""
+
; Wanted
; Set this to true to enable display missing albums and the
; possibility for users to mark it as wanted.
@@ -520,11 +560,48 @@ channel = "true"
; DEFAULT: true
live_stream = "true"
+; Podcasts
+; Set this to true to enable podcasts and the
+; possibility for admins to subscribe to new podcasts.
+; DEFAULT: false
+;podcast = "false"
+
; Web Socket address
; Declare the web socket server address
; DEFAULT: determined automatically
;websocket_address = "ws://localhost:8100"
+; Refresh Limit
+; This defines the default refresh limit in seconds for
+; pages with dynamic content, such as now playing
+; DEFAULT: 60
+; Possible Values: Int > 5
+refresh_limit = "60"
+
+; Footer Statistics
+; This defines whether statistics (Queries, Cache Hits, Load Time)
+; are shown in the page footer.
+; DEFAULT: true
+; Possible values: true, false
+show_footer_statistics = "true"
+
+; RSS Feeds
+; Set this to true to enable rss feeds.
+; (latest albums, shouts, albums of artist, ...)
+; use_rss = false (values true | false)
+;DEFAULT: use_rss = false
+;use_rss = "false"
+
+; This setting allows themes to overwrite PHP template files. This can be really
+; dangerous. Do this only if you trust every theme in your themes/ directory.
+; DEFAULT: false
+;allow_php_themes = "false"
+
+
+;#########################################################
+; Debugging #
+;#########################################################
+
; Debug
; If this is enabled Ampache will write debugging information to the log file
; DEFAULT: false
@@ -548,19 +625,24 @@ debug_level = 5
; include trailing slash. You will need to make sure that
; the specified directory exists and your HTTP server has
; write access.
-; DEFAULT: NULL
+; DEFAULT: none
log_path = "/var/www/ampache/log"
; Log filename pattern
-; This defines where the log file name pattern.
+; This defines where the log file name pattern
; %name.%Y%m%d.log will create a different log file every day.
; DEFAULT: %name.%Y%m%d.log
log_filename = "%name.%Y%m%d.log"
+
+;#########################################################
+; Encoding Settings #
+;#########################################################
+
; Charset of generated HTML pages
; Default of UTF-8 should work for most people
; DEFAULT: UTF-8
-site_charset = "UTF-8"
+site_charset = UTF-8
; Locale Charset
; Local charset (mainly for file operations) if different
@@ -570,19 +652,13 @@ site_charset = "UTF-8"
; DEFAULT: ISO8859-1
;lc_charset = "ISO8859-1"
-; Refresh Limit
-; This defines the default refresh limit in seconds for
-; pages with dynamic content, such as now playing
-; DEFAULT: 60
-; Possible Values: Int > 5
-refresh_limit = "60"
+; Multibyte
+; See http://php.net/manual/mbstring.supported-encodings.php
+; If you want ID3v1 encoding detection to work, you should uncomment this line
+; so that the ordering is sane.
+; DEFAULT: auto
+;mb_detect_order = "ASCII,UTF-8,EUC-JP,ISO-2022-JP,SJIS,JIS"
-; Footer Statistics
-; This defines whether statistics (Queries, Cache Hits, Load Time)
-; are shown in the page footer.
-; DEFAULT: true
-; Possible values: true, false
-show_footer_statistics = "true"
;#########################################################
; Custom actions (optional) #
@@ -605,72 +681,106 @@ show_footer_statistics = "true"
;custom_play_action_icon_0 = "microphone"
;custom_play_action_run_0 = "sox \"%f\" -p oops | ffmpeg -i pipe:0 -f %c pipe:1"
+
;#########################################################
; LDAP login info (optional) #
;#########################################################
-; LDAP filter string to use (required)
-; For OpenLDAP use "uid"
-; For Microsoft Active Directory (MAD) use "sAMAccountName"
-; DEFAULT: null
-ldap_filter = "(uid=%v)"
+; LDAP server URL (required)
+; DEFAULT: none
+ldap_url = "ldap://localhost/"
+;ldap_url = "ldaps://localhost/"
-; LDAP objectclass (required)
-; OpanLDAP objectclass = "*"
-; MAD objectclass = "organizationalPerson"
-; DEFAULT null
-ldap_objectclass = "mailAccount"
-
-; Initial credentials to bind with for searching (optional)
-; DEFAULT: null
+; LDAP credentials (optional)
+; DEFAULT: none
;ldap_username = ""
;ldap_password = ""
-; Require that the user is in a specific group (optional)
-; DEFAULT: null
-;ldap_require_group = "cn=yourgroup,ou=yourorg,dc=yoursubdomain,dc=yourdomain,dc=yourtld"
-
-; This is the search dn used to find users (required)
-; DEFAULT: null
+; LDAP Base DN for the search (required)
+; DEFAULT: none
ldap_search_dn = "ou=users,dc=yunohost,dc=org"
-; This is the address of your ldap server (required)
-; DEFAULT: null
-ldap_url = "localhost"
+; LDAP objectClass (required)
+; DEFAULT: none
+ldap_objectclass = "mailAccount" ; OpenLDAP
+;ldap_objectclass = "organizationalPerson" ; Microsoft Active Directory
-; Attributes where additional user information is stored (optional)
-; OpenLDAP ldap_name_field = "cn"
-; MAD ldap_name_field = "displayname"
-; DEFAULT: null
+; LDAP filter for search (required)
+; DEFAULT: none
+ldap_filter = "(uid=%v)" ; OpenLDAP
+;ldap_filter = "(sAMAccountName=%v)" ; Microsoft Active Directory
+
+; Require that the user is in a specific group (optional)
+; DEFAULT: none
+;ldap_require_group = "cn=yourgroup,ou=yourorg,dc=yoursubdomain,dc=yourdomain,dc=yourtld"
+
+; LDAP name field
+; DEFAULT = "cn"
+ldap_name_field = "cn"
+;ldap_name_field = "displayName"
+
+; LDAP email field
+; DEFAULT = "mail"
;ldap_email_field = "mail"
-ldap_name_field = "cn"
+
+; LDAP avatar field
+; DEFAULT: none
+;ldap_avatar_field = "jpegPhoto"
+
+; LDAP avatar mime type
+; DEFAULT: image/jpeg
+;ldap_avatar_mime = "image/jpeg"
+
+; LDAP protocol version to use
+; DEFAULT: 3
+;ldap_protocol_version = 3
+
+; LDAP StartTLS
+; DEFAULT: false
+;ldap_start_tls = "false"
+
+; LDAP member attribute name.
+; That's the name of the attribute of the group that will contain
+; the usernames.
+; DEFAULT: member
+;ldap_member_attribute = "member"
+;ldap_member_attribute = "memberuid"
+
+
;#########################################################
; OpenID login info (optional) #
;#########################################################
; Requires specific OpenID Provider Authentication Policy
-; DEFAULT: null
+; DEFAULT: none
; VALUES: PAPE_AUTH_MULTI_FACTOR_PHYSICAL,PAPE_AUTH_MULTI_FACTOR,PAPE_AUTH_PHISHING_RESISTANT
;openid_required_pape = ""
+
;#########################################################
; Public Registration settings, defaults to disabled #
;#########################################################
; This setting will silently create an ampache account
-; for anyone who can login using ldap (or any other login
+; for anyone who can login using LDAP (or any other login
; extension). The default is to create new users as guests
; see auto_user config option if you would like to change this
; DEFAULT: false
-auto_create = "true"
+;auto_create = "false"
+
+; This setting will silently update an ampache account's
+; informations for anyone who can login using LDAP
+; (or any other login extension).
+; DEFAULT: false
+;external_auto_update = "false"
; This setting turns on/off public registration. It is
; recommended you leave this off, as it will allow anyone to
; sign up for an account on your server.
; REMEMBER: don't forget to set the mail from address further down in the config.
; DEFAULT: false
-allow_public_registration = "false"
+;allow_public_registration = "false"
; Require Captcha Text on Image confirmation
; Turning this on requires the user to correctly
@@ -695,7 +805,7 @@ allow_public_registration = "false"
; added as a guest and must be promoted by the admin.
; POSSIBLE VALUES: guest, user, admin
; DEFAULT: guest
-auto_user = "user"
+;auto_user = "guest"
; This will display the user agreement when registering
; For agreement text, edit config/registration_agreement.php
@@ -709,7 +819,7 @@ auto_user = "user"
; This will display the cookie disclaimer (EU Cookie Law)
; DEFAULT: false
-cookie_disclaimer = "false"
+;cookie_disclaimer = "false"
; The fields that will be shown on Registration page
; If a user wants to register.
@@ -725,6 +835,7 @@ registration_display_fields = "fullname,website"
; DEFAULT: fullname
registration_mandatory_fields = "fullname"
+
;########################################################
; These options control the dynamic downsampling based #
; on current usage #
@@ -737,12 +848,12 @@ registration_mandatory_fields = "fullname"
; double the configured value. It also only applies to streams that are
; transcoded.
; DEFAULT: none
-max_bit_rate = 576
+;max_bit_rate = 576
; New dynamically downsampled streams will be denied if they are forced below
; this value.
; DEFAULT: 8
-min_bit_rate = 48
+;min_bit_rate = 48
;######################################################
; These are commands used to transcode non-streaming
@@ -763,7 +874,7 @@ min_bit_rate = 48
; transcode_TYPE = {allowed|required|false}
; DEFAULT: false
;;; Audio
-transcode_m4a = required
+transcode_m4a = allowed
transcode_flac = required
transcode_mpc = required
transcode_ogg = required
@@ -797,18 +908,22 @@ encode_target = mp3
; DEFAULT: none
encode_video_target = webm
-; Override the default output format on a per-type basis
+; Override the default output format on a per-type basis, for example,
+; to stream lossless encoded files in lossy formats.
; encode_target_TYPE = TYPE
; DEFAULT: none
+;encode_target_flac = opus
encode_target_flac = ogg
-; Override the default TYPE transcoding behavior on a per-player basis
+; Override the default TYPE transcoding behavior on a per-player basis, for example,
+; to stream lossless using the api and lossy using the web interface.
; transcode_player_PLAYER_TYPE = TYPE
; Valid PLAYER is: webplayer, api
; DEFAULT: none
-transcode_player_webplayer_m4a = required
+;transcode_player_webplayer_m4a = required
;transcode_player_webplayer_flac = required
;transcode_player_webplayer_mpc = required
+transcode_player_webplayer_m4a = required
transcode_player_webplayer_avi = required
transcode_player_webplayer_mkv = required
transcode_player_webplayer_mpg = required
@@ -821,6 +936,7 @@ transcode_player_webplayer_ogv = required
transcode_player_webplayer_divx = required
transcode_player_webplayer_m2ts = required
+
; Override the default output format on a per-player basis
; encode_player_PLAYER_target = TYPE
; Valid PLAYER is: webplayer, api
@@ -834,7 +950,8 @@ transcode_player_customize = "true"
; Command configuration. Substitutions will be made as follows:
; %FILE% => filename
-; %SAMPLE% => target sample rate
+; %BITRATE% => target bit rate (as chosen by the admin or users in the
+; preferences, if transcode_player_customize = "true")
; You can do fancy things like VBR, but consider whether the consequences are
; acceptable in your environment.
@@ -863,13 +980,14 @@ transcode_input = "-i %FILE%"
; For each output format, you should provide the necessary arguments for
; your transcode_cmd.
; encode_args_TYPE = TRANSCODE_CMD_ARGS
-encode_args_mp3 = "-vn -b:a %SAMPLE%K -c:a libmp3lame -f mp3 pipe:1"
-encode_args_ogg = "-vn -b:a %SAMPLE%K -c:a libvorbis -f ogg pipe:1"
-encode_args_m4a = "-vn -b:a %SAMPLE%K -c:a libfdk_aac -f adts pipe:1"
-encode_args_wav = "-vn -b:a %SAMPLE%K -c:a pcm_s16le -f wav pipe:1"
-encode_args_flv = "-b:a %SAMPLE%K -ar 44100 -ac 2 -v 0 -f flv -c:v libx264 -preset superfast -threads 0 pipe:1"
-encode_args_webm = "-q %QUALITY% -f webm -c:v libvpx -maxrate %MAXBITRATE%k -preset superfast -threads 0 pipe:1"
-;encode_args_webm = "-q %QUALITY% -f webm -c:v libvpx -maxrate 800k -preset superfast -threads 0 pipe:1"
+encode_args_mp3 = "-vn -b:a %BITRATE%K -c:a libmp3lame -f mp3 pipe:1"
+encode_args_ogg = "-vn -b:a %BITRATE%K -c:a libvorbis -f ogg pipe:1"
+encode_args_opus = "-vn -b:a %BITRATE%K -c:a libopus -compression_level 10 -vsync 2 -f ogg pipe:1"
+encode_args_m4a = "-vn -b:a %BITRATE%K -c:a libfdk_aac -f adts pipe:1"
+encode_args_wav = "-vn -b:a %BITRATE%K -c:a pcm_s16le -f wav pipe:1"
+encode_args_flv = "-b:a %BITRATE%K -ar 44100 -ac 2 -v 0 -f flv -c:v libx264 -preset superfast -threads 0 pipe:1"
+encode_args_webm = "-q %QUALITY% -f webm -c:v libvpx -maxrate 800k -preset superfast -threads 0 pipe:1"
+;encode_args_webm = "-q %QUALITY% -f webm -c:v libvpx -maxrate %MAXBITRATE%k -preset superfast -threads 0 pipe:1"
encode_args_ts = "-q %QUALITY% -s %RESOLUTION% -f mpegts -c:v libx264 -c:a libmp3lame -maxrate %MAXBITRATE%k -preset superfast -threads 0 pipe:1"
; Encoding arguments to retrieve an image from a single frame
@@ -885,18 +1003,10 @@ encode_ss_frame = "-ss %TIME%"
encode_ss_duration = "-t %DURATION%"
-;######################################################
-; these options allow you to configure your rss-feed
-; layout. rss exists of two parts, main and song main is the information about the feed
-; song is the information in the feed. can be multiple items.
-; use_rss = false (values true | false)
-;DEFAULT: use_rss = false
-;use_rss = "false"
-;#####################################################
+;#########################################################
+; Proxy Settings (optional) #
+;#########################################################
-;#############################
-; Proxy Settings (optional) #
-;#############################
; If Ampache is behind an http proxy, specifiy the hostname or IP address
; port, proxyusername, and proxypassword here.
;DEFAULT: not in use
@@ -907,11 +1017,12 @@ encode_ss_duration = "-t %DURATION%"
; If Ampache is behind an https reverse proxy, force use HTTPS protocol.
;Default: false
-force_ssl = "true"
+;force_ssl = "true"
-;#############################
-; Mail Settings #
-;#############################
+
+;#########################################################
+; Mail Settings #
+;#########################################################
;Method used to send mail
;POSSIBLE VALUES: smtp sendmail php
@@ -940,16 +1051,17 @@ force_ssl = "true"
;mail_check = "strict"
-;############################
-; sendmail Settings #
-;############################
+;#########################################################
+; sendmail Settings #
+;#########################################################
;DEFAULT: /usr/sbin/sendmail
;sendmail_path = "/usr/sbin/sendmail"
-;#############################
-; SMTP Settings #
-;#############################
+
+;#########################################################
+; SMTP Settings #
+;#########################################################
;Mail server (hostname or IP address)
;DEFAULT: localhost
@@ -977,10 +1089,8 @@ force_ssl = "true"
;mail_auth_pass = ""
;#############################
-; Multibyte Settings #
+; Abbreviation Filter #
;#############################
-; See http://php.net/manual/mbstring.supported-encodings.php
-; If you want ID3v1 encoding detection to work, you should uncomment this line
-; so that the ordering is sane.
-; DEFAULT: auto
-;mb_detect_order = "ASCII,UTF-8,EUC-JP,ISO-2022-JP,SJIS,JIS"
+; For file name parsing. Any unecessary abbreviations in file names can be removed during parsing
+; by adding them to the list below so that they will be removed during the parsing process.
+common_abbr = "divx,xvid,dvdrip,hdtv,lol,axxo,repack,xor,pdtv,real,vtv,caph,2hd,proper,fqm,uncut,topaz,tvt,notv,fpn,fov,orenji,0tv,omicron,dsr,ws,sys,crimson,wat,hiqt,internal,brrip,boheme,vost,vostfr,fastsub,addiction,x264,LOL,720p,1080p,YIFY,evolve,fihtv,first,bokutox,bluray,tvboom,info"
diff --git a/conf/ampache.cfg.php.dist b/conf/ampache.cfg.php.dist
new file mode 100644
index 0000000..78a532a
--- /dev/null
+++ b/conf/ampache.cfg.php.dist
@@ -0,0 +1,1081 @@
+;###
+;#########################################################
+; General Config #
+;#########################################################
+
+; This value is used to detect quickly
+; if this config file is up to date
+; this is compared against a value hard-coded
+; into the init script
+config_version = 34
+
+;#########################################################
+; Path Vars #
+;#########################################################
+
+; The public http host of your server.
+; If not set, retrieved automatically from client request.
+; This setting is required for WebSocket server
+; DEFAULT: ""
+;http_host = "localhost"
+
+; The public http port of your server.
+; If not set, retrieved automatically from client request.
+; DEFAULT:
+;http_port = 80
+
+; The public path to your ampache install
+; Do not put a trailing / on this path
+; For example if your site is located at http://localhost
+; than you do not need to enter anything for the web_path
+; if it is located at http://localhost/music you need to
+; set web_path to /music
+; DEFAULT: ""
+;web_path = ""
+
+; The local http url of your server.
+; If not set, retrieved automatically from server information.
+; DEFAULT: ""
+;local_web_path = "http://localhost/ampache"
+
+
+;#########################################################
+; Database #
+;#########################################################
+
+; Hostname of your database
+; For socket authentication, set the path to socket file (e.g. /var/run/mysqld/mysqld.sock)
+; DEFAULT: localhost
+database_hostname = localhost
+
+; Port to use when connecting to your database
+; DEFAULT: none
+;database_port = 3306
+
+; Name of your ampache database
+; DEFAULT: ampache
+database_name = ampache
+
+; Username for your ampache database
+; DEFAULT: ""
+database_username = username
+
+; Password for your ampache database, this can not be blank
+; this is a 'forced' security precaution, the default value
+; will not work (except if using socket authentication)
+; DEFAULT: ""
+database_password = password
+
+
+;#########################################################
+; Session and Security #
+;#########################################################
+
+; Cryptographic secret
+; This MUST BE changed with your own secret key. Ampache-specific, just pick any random string you want.
+secret_key = "abcdefghijklmnoprqstuvwyz0123456"
+
+; Length that a session will last expressed in seconds. Default is
+; one hour.
+; DEFAULT: 3600
+session_length = 3600
+
+; Length that the session for a single streaming instance will last
+; the default is two hours. With some clients, and long songs this can
+; cause playback to stop, increase this value if you experience that
+; DEFAULT: 7200
+stream_length = 7200
+
+; This length defines how long a 'remember me' session and cookie will
+; last, the default is 86400, same as length. It is up to the administrator
+; of the box to increase this, for reference 86400 = 1 day,
+; 604800 = 1 week, and 2419200 = 1 month
+; DEFAULT: 604800
+remember_length = 604800
+
+; Name of the Session/Cookie that will sent to the browser
+; default should be fine
+; DEFAULT: ampache
+session_name = ampache
+
+; Lifetime of the Cookie, 0 == Forever (until browser close) , otherwise in terms of seconds
+; If you want cookies to last past a browser close set this to a value in seconds.
+; DEFAULT: 0
+session_cookielife = 0
+
+; Is the cookie a "secure" cookie? This should only be set to 1 (true) if you are
+; running a secure site (HTTPS).
+; DEFAULT: 0
+session_cookiesecure = 0
+
+; Auth Methods
+; This defines which auth methods Auth will attempt to use and in which order.
+; If auto_create isn't enabled the user must exist locally.
+; DEFAULT: mysql
+; VALUES: mysql,ldap,http,pam,external,openid
+auth_methods = "mysql"
+
+; External authentication
+; This sets the helper used for external authentication. It should conform to
+; the interface used by mod_authnz_external
+; DEFAULT: none
+;external_authenticator = "/usr/sbin/pwauth"
+
+; Automatic local password updating
+; Determines whether successful authentication against an external source
+; will result in an update to the password stored in the database.
+; A locally stored password is needed for API access.
+; DEFAULT: false
+;auth_password_save = "false"
+
+; Logout redirection target
+; Defaults to our own login.php, but we can override it here if, for instance,
+; we want to redirect to an SSO provider instead.
+; logout_redirect = "http://sso.example.com/logout"
+
+; Use Access List
+; Toggle this on if you want ampache to pay attention to the access list
+; and only allow streaming/downloading/api-rpc from known hosts api-rpc
+; will not work without this on.
+; NOTE: Default Behavior is DENY FROM ALL
+; DEFAULT: true
+access_control = "true"
+
+; Require Session
+; If this is set to true ampache will make sure that the URL passed when
+; attempting to retrieve a song contains a valid Session ID This prevents
+; others from guessing URL's. This setting is ignored if you have use_auth
+; disabled.
+; DEFAULT: true
+require_session = "true"
+
+; Require LocalNet Session
+; If this is set to true then ampache will require that a valid session
+; is passed even on hosts defined in the Local Network ACL. This setting
+; has no effect if access_control is not enabled
+; DEFAULT: true
+require_localnet_session = "true"
+
+; Multiple Logins
+; Added by Vlet 07/25/07
+; When this setting is enabled a user may only be logged in from a single
+; IP address at any one time, this is to prevent sharing of accounts
+; DEFAULT: false
+;prevent_multiple_logins = "false"
+
+
+;#########################################################
+; Metadata #
+;#########################################################
+
+; This determines the tag order for all cataloged
+; music. If none of the listed tags are found then
+; ampache will randomly use whatever was found.
+; POSSIBLE VALUES: ape asf avi id3v1 id3v2 lyrics3 matroska mpeg quicktime riff
+; vorbiscomment
+; DEFAULT: id3v2 id3v1 vorbiscomment quicktime matroska ape asf avi mpeg riff
+getid3_tag_order = "id3v2,id3v1,vorbiscomment,quicktime,matroska,ape,asf,avi,mpeg,riff"
+
+; This determines whether we try to autodetect the encoding for id3v2 tags.
+; May break valid tags.
+; DEFAULT: false
+;getid3_detect_id3v2_encoding = "false"
+
+; This determines if we write the changes to files (as id3 tags) when modifying metadata, or only keep them in Ampache (the default).
+; DEFAULT: false
+;write_id3 = "false"
+
+; This determines if we write the changes to files (as id3 tags) when modifying album art, or only keep them in Ampache (the default)
+; as id3 metadata when updated.
+; DEFAULT: false
+;write_id3_art = "false"
+
+; This determines the order in which metadata sources are used (and in the
+; case of plugins, checked)
+; POSSIBLE VALUES (builtins): filename and getID3
+; POSSIBLE VALUES (plugins): MusicBrainz,TheAudioDb, plus any others you've installed.
+; DEFAULT: getID3 filename
+metadata_order = "getID3,filename"
+
+; This determines the order in which metadata sources are used (and in the
+; case of plugins, checked) for video files
+; POSSIBLE VALUES (builtins): filename and getID3
+; POSSIBLE VALUES (plugins): Tvdb,Tmdb,Omdb, plus any others you've installed.
+; DEFAULT: filename getID3
+metadata_order_video = "filename,getID3"
+
+; This determines if extended metadata grabbed from external services should be deferred.
+; If enabled, extended metadata is retrieved when browsing the library item.
+; If disabled, extended metadata is retrieved at catalog update.
+; Today, only Artist information (summary, place formed, ...) can be deferred.
+; DEFAULT: true
+deferred_ext_metadata = "true"
+
+; Some taggers use delimiters other than \0 for fields
+; This list specifies possible delimiters additional to \0
+; This setting takes a regex pattern.
+; DEFAULT: // / \ | , ;
+additional_genre_delimiters = "[/]{2}|[/|\\\\|\|,|;]"
+
+; Enable importing custom metadata from files.
+; This will need a bit of time during the import. So you may want to disable this
+; if you have troubles with huge databases.
+; DEFAULT: false
+;enable_custom_metadata = "false"
+
+
+;#########################################################
+; Catalog #
+;#########################################################
+
+; File Pattern
+; This defines which file types Ampache will attempt to catalog
+; You can specify any file extension you want in here separating them
+; with a |
+; DEFAULT: mp3|mpc|m4p|m4a|aac|ogg|oga|wav|aif|aiff|rm|wma|asf|flac|opus|spx|ra|ape|shn|wv
+catalog_file_pattern = "mp3|mpc|m4p|m4a|aac|ogg|oga|wav|aif|aiff|rm|wma|asf|flac|opus|spx|ra|ape|shn|wv"
+
+; Video Pattern
+; This defines which video file types Ampache will attempt to catalog
+; You can specify any file extension you want in here separating them with
+; a | but ampache may not be able to parse them
+; DEAFULT: avi|mpg|mpeg|flv|m4v|mp4|webm|mkv|wmv|ogv|mov|divx|m2ts
+catalog_video_pattern = "avi|mpg|mpeg|flv|m4v|mp4|webm|mkv|wmv|ogv|mov|divx|m2ts"
+
+; Playlist Pattern
+; This defines which playlist types Ampache will attempt to catalog
+; You can specify any file extension you want in here separating them with
+; a | but ampache may not be able to parse them
+; DEFAULT: m3u|m3u8|pls|asx|xspf
+catalog_playlist_pattern = "m3u|m3u8|pls|asx|xspf"
+
+; Prefix Pattern
+; This defines which prefix Ampache will ignore when importing tags from
+; your music. You may add any prefix you want separating them with a |
+; DEFAULT: The|An|A|Die|Das|Ein|Eine|Les|Le|La
+catalog_prefix_pattern = "The|An|A|Die|Das|Ein|Eine|Les|Le|La"
+
+; Catalog disable
+; This defines if catalog can be disabled without removing database entries
+; WARNING: this increase sensibly sql requests and slow down Ampache a lot
+; DEFAULT: false
+;catalog_disable = "false"
+
+; Delete from disk
+; This determines if catalog manager users can delete medias from disk.
+; DEFAULT: false
+;delete_from_disk = "false"
+
+
+;#########################################################
+; Program Settings #
+;#########################################################
+
+; Downsample Remote
+; If this is set to true and access control is on any users who are not
+; coming from a defined 'network' ACL will be automatically downsampled
+; regardless of their preferences. Requires access_control to be enabled
+; DEFAULT: false
+;downsample_remote = "false"
+
+; Track User IPs
+; If this is enabled Ampache will log the IP of every completed login
+; it will store user,ip,time at one row per login. The results are
+; displayed in Admin --> Users
+; DEFAULT: false
+;track_user_ip = "false"
+
+; User IP Cardinality
+; This defines how many days worth of IP history Ampache will track
+; As it is one row per login on high volume sites you will want to
+; clear it every now and then.
+; DEFAULT: 42 days
+;user_ip_cardinality = "42"
+
+; Allow Zip Download
+; This setting allows/disallows using zlib to zip up an entire
+; playlist/album for download. Even if this is turned on you will
+; still need to enabled downloading for the specific user you
+; want to be able to use this function
+; DEFAULT: false
+;allow_zip_download = "false"
+
+; Allow Zip Types
+; This setting allows/disallows zip download of specific object types
+; If empty, all supported object types can be zipped.
+; Otherwise, only the given object list can be zipped.
+; POSSIBLE VALUES: artist, album, playlist, search, tmp_playlist
+; DEFAULT: none
+;allow_zip_types = "album"
+
+; File Zip Comment
+; This is an optional configuration option that adds a comment
+; to your zip files, this only applies if you've got allow_zip_downloads
+; DEFAULT: Ampache - Zip Batch Download
+;file_zip_comment = "Ampache - Zip Batch Download"
+
+; Waveform
+; This settings tells Ampache to attempt to generate a waveform
+; for each song. It requires transcode and encode_args_wav settings.
+; You must also set tmp_dir_path in order for this to work
+; DEFAULT: false
+;waveform = "false"
+
+; Waveform color
+; The waveform color.
+; DEFAULT: #FF0000
+;waveform_color = "#FF0000"
+
+; Temporary Directory Path
+; If Waveform is enabled this must be set to tell
+; Ampache which directory to save the temporary file to. Do not put a
+; trailing slash or this will not work.
+; DEFAULT: false
+;tmp_dir_path = "false"
+
+; This setting throttles a persons downloading to the specified
+; bytes per second. This is not a 100% guaranteed function, and
+; you should really use a server based rate limiter if you want
+; to do this correctly.
+; DEFAULT: off
+; VALUES: any whole number (in bytes per second)
+;throttle_download = 10
+
+; This determines if a preview image should be retrieved from video files
+; It requires encode_get_image transcode settings.
+; DEFAULT: false
+;generate_video_preview = "true"
+
+; Un comment if don't want ampache to follow symlinks
+; DEFAULT: false
+;no_symlinks = "false"
+
+; Use auth?
+; If this is set to "Yes" ampache will require a valid
+; Username and password. If this is set to false then ampache
+; will not ask you for a username and password. false is only
+; recommended for internal only instances
+; DEFAULT true
+use_auth = "true"
+
+; Default Auth Level
+; If use_auth is set to false then this option is used
+; to determine the permission level of the 'default' users
+; default is administrator. This setting only takes affect
+; if use_auth is false
+; POSSIBLE VALUES: user, admin, manager, guest
+; DEFAULT: guest
+default_auth_level = "guest"
+
+; 5 Star Ratings
+; This allows ratings for almost any object in ampache
+; POSSIBLE VALUES: false true
+; DEFAULT: true
+ratings = "true"
+
+; User flags/favorites
+; This allows user flags for almost any object in ampache as favorite
+; POSSIBLE VALUES: false true
+; DEFAULT: true
+userflags = "true"
+
+; Direct play
+; This allows user to play directly a song or album
+; POSSIBLE VALUES: false true
+; DEFAULT: true
+directplay = "true"
+
+; Sociable
+; This turns on / off all of the "social" features of ampache
+; default is on, but if you don't care and just want music
+; turn this off to disable all social features.
+; DEFAULT: true
+sociable = "true"
+
+; License
+; This turns on / off all licensing features on Ampache
+; DEFAULT: false
+;licensing = "false"
+
+; This options will turn on/off Demo Mode
+; If Demo mode is on you can not play songs or update your catalog
+; in other words.. leave this commented out
+; DEFAULT: false
+;demo_mode = "false"
+
+; Caching
+; This turns the caching mechanisms on or off, due to a large number of
+; problems with people with very large catalogs and low memory settings
+; this is off by default as it does significantly increase the memory
+; requirments on larger catalogs. If you have the memory this can create
+; a 2-3x speed improvement.
+; DEFAULT: false
+;memory_cache = "false"
+
+; Memory Limit
+; This defines the "Min" memory limit for PHP if your php.ini
+; has a lower value set Ampache will set it up to this. If you
+; set it below 16MB getid3() will not work!
+; DEFAULT: 32
+;memory_limit = 32
+
+; Album Art Preferred Filename
+; Specify a filename to look for if you always give the same filename
+; i.e. "folder.jpg" Ampache currently only supports jpg/gif and png
+; Especially useful if you have a front and a back image in a folder
+; comment out if ampache should search for any jpg,gif or png
+; DEFAULT: folder.jpg
+;album_art_preferred_filename = "folder.jpg"
+
+; Album Art Store on Disk
+; This defines if arts should be stored on disk instead of database.
+; DEFAULT: false
+;album_art_store_disk = "false"
+
+; Local Metadata Directory
+; This define a local metadata directory with write access where to store
+; heavy data if enabled (album arts, ...)
+; DEFAULT: none
+;local_metadata_dir = "/metadata"
+
+; Maximal upload size
+; Specify the maximal allowed upload size for images, in bytes.
+; DEFAULT: 1048576
+;max_upload_size = 1048576
+
+; Album Art Minimum Width
+; Specify the minimum width for arts (in pixel).
+; DEFAULT: none
+;album_art_min_width = 100
+
+; Album Art Maximum Width
+; Specify the maximum width for arts (in pixel).
+; DEFAULT: none
+;album_art_max_width = 1024
+
+; Album Art Minimum Height
+; Specify the minimum height for arts (in pixel).
+; DEFAULT: none
+;album_art_min_height = 100
+
+; Album Art Maximum Height
+; Specify the maximum height for arts (in pixel).
+; DEFAULT: none
+;album_art_max_height = 1024
+
+; Resize Images * Requires PHP-GD *
+; Set this to true if you want Ampache to resize the Album
+; art on the fly, this increases load time and CPU usage
+; and also requires the PHP-GD library. This is very useful
+; If you have high-quality album art and a small upload cap
+; DEFAULT: false
+;resize_images = "false"
+
+; Playlist Cover Art
+; Set this to true if you want Ampache to generate
+; cover art for playlists automatically based on
+; the content.
+; DEFAULT: false
+;playlist_art = "false"
+
+; Statistical Graphs * Requires PHP-GD *
+; Set this to true if you want Ampache to generate statistical
+; graphs on usages / users.
+; DEFAULT: false
+;statistical_graphs = "false"
+
+; Art Gather Order
+; Simply arrange the following in the order you would like
+; ampache to search. If you want to disable one of the search
+; methods simply leave it out. DB should be left as the first
+; method unless you want it to overwrite what's already in the
+; database
+; POSSIBLE VALUES (builtins): db tags folder lastfm musicbrainz google
+; POSSIBLE VALUES (plugins): Amazon,TheAudioDb,Tmdb,Omdb,Flickr
+; DEFAULT: db,tags,folder,musicbrainz,lastfm,google
+art_order = "db,tags,folder,musicbrainz,lastfm,google"
+
+; Recommendations
+; Set this to true to enable display of similar artists or albums
+; while browsing. Requires Last.FM.
+; DEFAULT: false
+;show_similar = "false"
+
+; Concerts
+; Set this to true to enable display of artist concerts
+; Requires Last.FM.
+; DEFAULT: false
+;show_concerts = "false"
+
+; Last.FM API Key
+; Set this to your Last.FM api key to actually use Last.FM for
+; recommendations and metadata.
+lastfm_api_key = "d5df942424c71b754e54ce1832505ae2"
+
+; Last.FM API secret
+; Set this to your Last.FM api secret to actually use Last.FM for
+; scrobbling.
+lastfm_api_secret = ""
+
+; Wanted
+; Set this to true to enable display missing albums and the
+; possibility for users to mark it as wanted.
+; DEFAULT: false
+wanted = "true"
+
+; Wanted types
+; Set the allowed types of wanted releases (album,compilation,single,ep,live,remix,promotion,official)
+; DEFAULT: album,official
+wanted_types = "album,official"
+
+; Wanted Auto Accept
+; Mark wanted requests as accepted by default (no content manager agreement required)
+; DEFAULT: false
+;wanted_auto_accept = "false"
+
+; EchoNest API key
+; EchoNest provides several music services. Currently used for missing song 30 seconds preview.
+;echonest_api_key = ""
+
+; Labels
+; Use labels to browse artists per label membership.
+; DEFAULT: false
+;label = "false"
+
+; Broadcasts
+; Allow users to broadcast music.
+; This feature requires advanced server configuration, please take a look on the wiki for more information.
+; DEFAULT: false
+;broadcast = "false"
+
+; Channels
+; Set this to true to enable channels and the
+; possibility for users to create channels from playlists
+; DEFAULT: true
+channel = "true"
+
+; Live Streams
+; Set this to true to enable live streams (radio) and the
+; possibility for users to add new live streams.
+; DEFAULT: true
+live_stream = "true"
+
+; Podcasts
+; Set this to true to enable podcasts and the
+; possibility for admins to subscribe to new podcasts.
+; DEFAULT: false
+;podcast = "false"
+
+; Web Socket address
+; Declare the web socket server address
+; DEFAULT: determined automatically
+;websocket_address = "ws://localhost:8100"
+
+; Refresh Limit
+; This defines the default refresh limit in seconds for
+; pages with dynamic content, such as now playing
+; DEFAULT: 60
+; Possible Values: Int > 5
+refresh_limit = "60"
+
+; Footer Statistics
+; This defines whether statistics (Queries, Cache Hits, Load Time)
+; are shown in the page footer.
+; DEFAULT: true
+; Possible values: true, false
+show_footer_statistics = "true"
+
+; RSS Feeds
+; Set this to true to enable rss feeds.
+; (latest albums, shouts, albums of artist, ...)
+; use_rss = false (values true | false)
+;DEFAULT: use_rss = false
+;use_rss = "false"
+
+; This setting allows themes to overwrite PHP template files. This can be really
+; dangerous. Do this only if you trust every theme in your themes/ directory.
+; DEFAULT: false
+;allow_php_themes = "false"
+
+
+;#########################################################
+; Debugging #
+;#########################################################
+
+; Debug
+; If this is enabled Ampache will write debugging information to the log file
+; DEFAULT: false
+;debug = "false"
+
+; Debug Level
+; This should always be set in conjunction with the
+; debug option, it defines how prolific you want the
+; debugging in ampache to be. values are 1-5.
+; 1 == Errors only
+; 2 == Error + Failures (login attempts etc.)
+; 3 == ??
+; 4 == ?? (Profit!)
+; 5 == Information (cataloging progress etc.)
+; DEFAULT: 5
+debug_level = 5
+
+; Path to Log File
+; This defines where you want ampache to log events to
+; this will only happen if debug is turned on. Do not
+; include trailing slash. You will need to make sure that
+; the specified directory exists and your HTTP server has
+; write access.
+; DEFAULT: none
+;log_path = "/var/log/ampache"
+
+; Log filename pattern
+; This defines where the log file name pattern
+; %name.%Y%m%d.log will create a different log file every day.
+; DEFAULT: %name.%Y%m%d.log
+log_filename = "%name.%Y%m%d.log"
+
+
+;#########################################################
+; Encoding Settings #
+;#########################################################
+
+; Charset of generated HTML pages
+; Default of UTF-8 should work for most people
+; DEFAULT: UTF-8
+site_charset = UTF-8
+
+; Locale Charset
+; Local charset (mainly for file operations) if different
+; from site_charset.
+; This is disabled by default, enable only if needed
+; (for Windows please set lc_charset to ISO8859-1)
+; DEFAULT: ISO8859-1
+;lc_charset = "ISO8859-1"
+
+; Multibyte
+; See http://php.net/manual/mbstring.supported-encodings.php
+; If you want ID3v1 encoding detection to work, you should uncomment this line
+; so that the ordering is sane.
+; DEFAULT: auto
+;mb_detect_order = "ASCII,UTF-8,EUC-JP,ISO-2022-JP,SJIS,JIS"
+
+
+;#########################################################
+; Custom actions (optional) #
+;#########################################################
+
+; Your custom play action title
+;custom_play_action_title_0 = ""
+; Your custom play action icon name (stored as /images/icon_[your_image].png)
+;custom_play_action_icon_0 = ""
+; Your custom action script, where:
+; - %f: the media file path
+; - %c: the excepted codec target (mp3, ogg, ...)
+; - %a: the artist name
+; - %A: the album name
+; - %t: the song title
+;custom_play_action_run_0 = ""
+
+; Example for Karaoke playing
+;custom_play_action_title_0 = "Karaoke"
+;custom_play_action_icon_0 = "microphone"
+;custom_play_action_run_0 = "sox \"%f\" -p oops | ffmpeg -i pipe:0 -f %c pipe:1"
+
+
+;#########################################################
+; LDAP login info (optional) #
+;#########################################################
+
+; LDAP server URL (required)
+; DEFAULT: none
+;ldap_url = "ldap://localhost/"
+;ldap_url = "ldaps://localhost/"
+
+; LDAP credentials (optional)
+; DEFAULT: none
+;ldap_username = ""
+;ldap_password = ""
+
+; LDAP Base DN for the search (required)
+; DEFAULT: none
+;ldap_search_dn = "ou=People,dc=yoursubdomain,dc=yourdomain,dc=yourtld"
+
+; LDAP objectClass (required)
+; DEFAULT: none
+;ldap_objectclass = "posixAccount" ; OpenLDAP
+;ldap_objectclass = "organizationalPerson" ; Microsoft Active Directory
+
+; LDAP filter for search (required)
+; DEFAULT: none
+;ldap_filter = "(uid=%v)" ; OpenLDAP
+;ldap_filter = "(sAMAccountName=%v)" ; Microsoft Active Directory
+
+; Require that the user is in a specific group (optional)
+; DEFAULT: none
+;ldap_require_group = "cn=yourgroup,ou=yourorg,dc=yoursubdomain,dc=yourdomain,dc=yourtld"
+
+; LDAP name field
+; DEFAULT = "cn"
+;ldap_name_field = "cn"
+;ldap_name_field = "displayName"
+
+; LDAP email field
+; DEFAULT = "mail"
+;ldap_email_field = "mail"
+
+; LDAP avatar field
+; DEFAULT: none
+;ldap_avatar_field = "jpegPhoto"
+
+; LDAP avatar mime type
+; DEFAULT: image/jpeg
+;ldap_avatar_mime = "image/jpeg"
+
+; LDAP protocol version to use
+; DEFAULT: 3
+;ldap_protocol_version = 3
+
+; LDAP StartTLS
+; DEFAULT: false
+;ldap_start_tls = "false"
+
+; LDAP member attribute name.
+; That's the name of the attribute of the group that will contain
+; the usernames.
+; DEFAULT: member
+;ldap_member_attribute = "member"
+;ldap_member_attribute = "memberuid"
+
+
+
+;#########################################################
+; OpenID login info (optional) #
+;#########################################################
+
+; Requires specific OpenID Provider Authentication Policy
+; DEFAULT: none
+; VALUES: PAPE_AUTH_MULTI_FACTOR_PHYSICAL,PAPE_AUTH_MULTI_FACTOR,PAPE_AUTH_PHISHING_RESISTANT
+;openid_required_pape = ""
+
+
+;#########################################################
+; Public Registration settings, defaults to disabled #
+;#########################################################
+
+; This setting will silently create an ampache account
+; for anyone who can login using LDAP (or any other login
+; extension). The default is to create new users as guests
+; see auto_user config option if you would like to change this
+; DEFAULT: false
+;auto_create = "false"
+
+; This setting will silently update an ampache account's
+; informations for anyone who can login using LDAP
+; (or any other login extension).
+; DEFAULT: false
+;external_auto_update = "false"
+
+; This setting turns on/off public registration. It is
+; recommended you leave this off, as it will allow anyone to
+; sign up for an account on your server.
+; REMEMBER: don't forget to set the mail from address further down in the config.
+; DEFAULT: false
+;allow_public_registration = "false"
+
+; Require Captcha Text on Image confirmation
+; Turning this on requires the user to correctly
+; type in the letters in the image created by Captcha
+; Default is off because its very hard to detect if it failed
+; to draw, or they failed to enter it.
+; DEFAULT: false
+;captcha_public_reg = "false"
+
+; This setting turns on/off admin notification of registration.
+; DEFAULT: false
+;admin_notify_reg = "false"
+
+; This setting determines whether the user will be created as a disabled user.
+; If this is on, an administrator will need to manually enable the account
+; before it's usable.
+; DEFAULT: false
+;admin_enable_required = "false"
+
+; This setting will allow all registrants/ldap/http users
+; to be auto-approved as a user. By default, they will be
+; added as a guest and must be promoted by the admin.
+; POSSIBLE VALUES: guest, user, admin
+; DEFAULT: guest
+;auto_user = "guest"
+
+; This will display the user agreement when registering
+; For agreement text, edit config/registration_agreement.php
+; User will need to accept the agreement before they can register
+; DEFAULT: false
+;user_agreement = "false"
+
+; This disable email confirmation when registering.
+; DEFAULT: false
+;user_no_email_confirm = "false"
+
+; This will display the cookie disclaimer (EU Cookie Law)
+; DEFAULT: false
+;cookie_disclaimer = "false"
+
+; The fields that will be shown on Registration page
+; If a user wants to register.
+; Username and email fields are forced.
+; POSSIBLE VALUES: fullname,website,state,city
+; DEFAULT: "fullname,website"
+registration_display_fields = "fullname,website"
+
+; The fields that will be mandatory
+; This controls which fields are mandatory for registration.
+; Username and email fields are forced mandatory.
+; POSSIBLE VALUES: fullname,website,state,city
+; DEFAULT: fullname
+registration_mandatory_fields = "fullname"
+
+
+;########################################################
+; These options control the dynamic downsampling based #
+; on current usage #
+; *Note* Transcoding must be enabled and working #
+;########################################################
+
+; Attempt to optimize bandwidth by dynamically lowering the bit rate of new
+; streams. Since the bit rate is only adjusted at the beginning of a song, the
+; actual cumulative bitrate for concurrent streams can be up to around
+; double the configured value. It also only applies to streams that are
+; transcoded.
+; DEFAULT: none
+;max_bit_rate = 576
+
+; New dynamically downsampled streams will be denied if they are forced below
+; this value.
+; DEFAULT: 8
+;min_bit_rate = 48
+
+;######################################################
+; These are commands used to transcode non-streaming
+; formats to the target file type for streaming.
+; This can be useful in re-encoding file types that don't stream
+; very well, or if your player doesn't support some file types.
+;
+; 'Downsampling' will also use these commands.
+;
+; To state the bleeding obvious, any programs referenced in the transcode
+; commands must be installed, in the web server's search path (or referenced
+; by their full path), and executable by the web server.
+
+; Input type selection
+; TYPE is the extension. 'allowed' certifies that transcoding works properly for
+; this input format. 'required' further forbids the direct streaming of a format
+; (e.g. if you store everything in FLAC, but don't want to ever stream that.)
+; transcode_TYPE = {allowed|required|false}
+; DEFAULT: false
+;;; Audio
+;transcode_m4a = allowed
+;transcode_flac = required
+;transcode_mpc = required
+;transcode_ogg = required
+;transcode_oga = required
+;transcode_wav = required
+;transcode_wma = required
+;transcode_aif = required
+;transcode_aiff = required
+;transcode_ape = required
+;transcode_shn = required
+;transcode_mp3 = allowed
+;;; Video
+;transcode_avi = allowed
+;transcode_mkv = allowed
+;transcode_mpg = allowed
+;transcode_mpeg = allowed
+;transcode_m4v = allowed
+;transcode_mp4 = allowed
+;transcode_mov = allowed
+;transcode_wmv = allowed
+;transcode_ogv = allowed
+;transcode_divx = allowed
+;transcode_m2ts = allowed
+;transcode_webm = allowed
+
+; Default audio output format
+; DEFAULT: none
+;encode_target = mp3
+
+; Default video output format
+; DEFAULT: none
+;encode_video_target = webm
+
+; Override the default output format on a per-type basis, for example,
+; to stream lossless encoded files in lossy formats.
+; encode_target_TYPE = TYPE
+; DEFAULT: none
+;encode_target_flac = opus
+
+; Override the default TYPE transcoding behavior on a per-player basis, for example,
+; to stream lossless using the api and lossy using the web interface.
+; transcode_player_PLAYER_TYPE = TYPE
+; Valid PLAYER is: webplayer, api
+; DEFAULT: none
+;transcode_player_webplayer_m4a = required
+;transcode_player_webplayer_flac = required
+;transcode_player_webplayer_mpc = required
+
+; Override the default output format on a per-player basis
+; encode_player_PLAYER_target = TYPE
+; Valid PLAYER is: webplayer, api
+; DEFAULT: none
+;encode_player_webplayer_target = mp3
+;encode_player_api_target = mp3
+
+; Allow clients to override transcode settings (output type, bitrate, codec ...)
+; DEFAULT: true
+transcode_player_customize = "true"
+
+; Command configuration. Substitutions will be made as follows:
+; %FILE% => filename
+; %BITRATE% => target bit rate (as chosen by the admin or users in the
+; preferences, if transcode_player_customize = "true")
+; You can do fancy things like VBR, but consider whether the consequences are
+; acceptable in your environment.
+
+; Master transcode command
+; transcode_cmd should be a single command that supports multiple file types,
+; such as ffmpeg or avconv. It's still possible to make a configuration that's
+; equivalent to the old default, but if you find that necessary you should be
+; clever enough to figure out how on your own.
+; DEFAULT: none
+;transcode_cmd = "ffmpeg"
+;transcode_cmd = "avconv"
+;transcode_cmd = "/usr/bin/neatokeen"
+
+; Transcode input file argument
+transcode_input = "-i %FILE%"
+
+; Specific transcode commands
+; It shouldn't be necessary in most cases, but you can override the transcode
+; command for specific source formats. It still needs to accept the
+; encoding arguments, so the easiest approach is to use your normal command as
+; a clearing-house.
+; transcode_cmd_TYPE = TRANSCODE_CMD
+;transcode_cmd_mid = "timidity -Or -o – %FILE% | ffmpeg -f s16le -i pipe:0"
+
+; Encoding arguments
+; For each output format, you should provide the necessary arguments for
+; your transcode_cmd.
+; encode_args_TYPE = TRANSCODE_CMD_ARGS
+encode_args_mp3 = "-vn -b:a %BITRATE%K -c:a libmp3lame -f mp3 pipe:1"
+encode_args_ogg = "-vn -b:a %BITRATE%K -c:a libvorbis -f ogg pipe:1"
+encode_args_opus = "-vn -b:a %BITRATE%K -c:a libopus -compression_level 10 -vsync 2 -f ogg pipe:1"
+encode_args_m4a = "-vn -b:a %BITRATE%K -c:a libfdk_aac -f adts pipe:1"
+encode_args_wav = "-vn -b:a %BITRATE%K -c:a pcm_s16le -f wav pipe:1"
+encode_args_flv = "-b:a %BITRATE%K -ar 44100 -ac 2 -v 0 -f flv -c:v libx264 -preset superfast -threads 0 pipe:1"
+encode_args_webm = "-q %QUALITY% -f webm -c:v libvpx -maxrate %MAXBITRATE%k -preset superfast -threads 0 pipe:1"
+encode_args_ts = "-q %QUALITY% -s %RESOLUTION% -f mpegts -c:v libx264 -c:a libmp3lame -maxrate %MAXBITRATE%k -preset superfast -threads 0 pipe:1"
+
+; Encoding arguments to retrieve an image from a single frame
+encode_get_image = "-ss %TIME% -f image2 -vframes 1 pipe:1"
+
+; Encoding argument to encrust subtitle
+encode_srt = "-vf \"subtitles='%SRTFILE%'\""
+
+; Encode segment frame argument
+encode_ss_frame = "-ss %TIME%"
+
+; Encode segment duration argument
+encode_ss_duration = "-t %DURATION%"
+
+
+;#########################################################
+; Proxy Settings (optional) #
+;#########################################################
+
+; If Ampache is behind an http proxy, specifiy the hostname or IP address
+; port, proxyusername, and proxypassword here.
+;DEFAULT: not in use
+;proxy_host = "192.168.0.1"
+;proxy_port = "8080"
+;proxy_user = ""
+;proxy_pass = ""
+
+; If Ampache is behind an https reverse proxy, force use HTTPS protocol.
+;Default: false
+;force_ssl = "true"
+
+
+;#########################################################
+; Mail Settings #
+;#########################################################
+
+;Method used to send mail
+;POSSIBLE VALUES: smtp sendmail php
+;DEFAULT: php
+;mail_type = "php"
+
+;Mail domain.
+;DEFAULT: example.com
+;mail_domain = "example.com"
+
+;This will be combined with mail_domain and used as the source address for
+;emails generated by Ampache. For example, setting this to 'me' will set the
+;sender to 'me@example.com'.
+;DEFAULT: info
+;mail_user = "info"
+
+;A name to go with the email address.
+;DEFAULT: Ampache
+;mail_name = "Ampache"
+
+;How strictly email addresses should be checked.
+;easy does a regex match, strict actually performs some SMTP transactions
+;to see if we can send to this address.
+;POSSIBLE VALUES: strict easy none
+; DEFAULT: strict
+;mail_check = "strict"
+
+
+;#########################################################
+; sendmail Settings #
+;#########################################################
+
+;DEFAULT: /usr/sbin/sendmail
+;sendmail_path = "/usr/sbin/sendmail"
+
+
+;#########################################################
+; SMTP Settings #
+;#########################################################
+
+;Mail server (hostname or IP address)
+;DEFAULT: localhost
+;mail_host = "localhost"
+
+; SMTP port
+;DEFAULT: 25
+;mail_port = 25
+
+;Secure SMTP
+;POSSIBLE VALUES: ssl tls
+;DEFAULT: none
+;mail_secure_smtp = tls
+
+;Enable SMTP authentication
+;DEFAULT: false
+;mail_auth = "true"
+
+;SMTP Username
+;your mail auth username.
+;mail_auth_user = ""
+
+; SMTP Password
+; your mail auth password.
+;mail_auth_pass = ""
+
+;#############################
+; Abbreviation Filter #
+;#############################
+; For file name parsing. Any unecessary abbreviations in file names can be removed during parsing
+; by adding them to the list below so that they will be removed during the parsing process.
+common_abbr = "divx,xvid,dvdrip,hdtv,lol,axxo,repack,xor,pdtv,real,vtv,caph,2hd,proper,fqm,uncut,topaz,tvt,notv,fpn,fov,orenji,0tv,omicron,dsr,ws,sys,crimson,wat,hiqt,internal,brrip,boheme,vost,vostfr,fastsub,addiction,x264,LOL,720p,1080p,YIFY,evolve,fihtv,first,bokutox,bluray,tvboom,info"
diff --git a/conf/ampache.cfg.php.old b/conf/ampache.cfg.php.old1
similarity index 100%
rename from conf/ampache.cfg.php.old
rename to conf/ampache.cfg.php.old1
diff --git a/conf/ampache.cfg.php.old2 b/conf/ampache.cfg.php.old2
new file mode 100644
index 0000000..fa494eb
--- /dev/null
+++ b/conf/ampache.cfg.php.old2
@@ -0,0 +1,986 @@
+;###
+;###################
+; General Config #
+;###################
+
+; This value is used to detect quickly
+; if this config file is up to date
+; this is compared against a value hard-coded
+; into the init script
+config_version = 29
+
+;###################
+; Path Vars #
+;###################
+
+; The public http host of your server.
+; If not set, retrieved automatically from client request.
+; This setting is required for WebSocket server
+; DEFAULT: ""
+http_host = "DOMAINTOCHANGE"
+
+; The public path to your ampache install
+; Do not put a trailing / on this path
+; For example if your site is located at http://localhost
+; than you do not need to enter anything for the web_path
+; if it is located at http://localhost/music you need to
+; set web_path to /music
+; DEFAULT: ""
+web_path = "PATHTOCHANGE"
+
+; The local http url of your server.
+; If not set, retrieved automatically from server information.
+; DEFAULT: ""
+;local_web_path = "http://localhost/ampache"
+
+;##############################
+; Session and Login Variables #
+;##############################
+
+; Hostname of your database
+; For socket authentication, set the path to socket file (e.g. /var/run/mysqld/mysqld.sock)
+; DEFAULT: localhost
+database_hostname = "localhost"
+
+; Port to use when connecting to your database
+; DEFAULT: none
+database_port = ""
+
+; Name of your ampache database
+; DEFAULT: ampache
+database_name = "yunobase"
+
+; Username for your ampache database
+; DEFAULT: ""
+database_username = "yunouser"
+
+; Password for your ampache database, this can not be blank
+; this is a 'forced' security precaution, the default value
+; will not work (except if using socket authentication)
+; DEFAULT: ""
+database_password = "yunopass"
+
+; Cryptographic secret
+; This MUST BE changed with your own secret key. Ampache-specific, just pick any random string you want.
+secret_key = "RANDOMKEYTOCHANGE"
+
+; Length that a session will last expressed in seconds. Default is
+; one hour.
+; DEFAULT: 3600
+session_length = 3600
+
+; Length that the session for a single streaming instance will last
+; the default is two hours. With some clients, and long songs this can
+; cause playback to stop, increase this value if you experience that
+; DEFAULT: 7200
+stream_length = 7200
+
+; This length defines how long a 'remember me' session and cookie will
+; last, the default is 86400, same as length. It is up to the administrator
+; of the box to increase this, for reference 86400 = 1 day,
+; 604800 = 1 week, and 2419200 = 1 month
+; DEFAULT: 604800
+remember_length = 604800
+
+; Name of the Session/Cookie that will sent to the browser
+; default should be fine
+; DEFAULT: ampache
+session_name = ampache
+
+; Lifetime of the Cookie, 0 == Forever (until browser close) , otherwise in terms of seconds
+; If you want cookies to last past a browser close set this to a value in seconds.
+; DEFAULT: 0
+session_cookielife = 0
+
+; Is the cookie a "secure" cookie? This should only be set to 1 (true) if you are
+; running a secure site (HTTPS).
+; DEFAULT: 0
+session_cookiesecure = 0
+
+; Auth Methods
+; This defines which auth methods Auth will attempt to use and in which order.
+; If auto_create isn't enabled the user must exist locally.
+; DEFAULT: mysql
+; VALUES: mysql,ldap,http,pam,external,openid
+auth_methods = "ldap"
+
+; External authentication
+; This sets the helper used for external authentication. It should conform to
+; the interface used by mod_authnz_external
+; DEFAULT: none
+;external_authenticator = "/usr/sbin/pwauth"
+
+; Automatic local password updating
+; Determines whether successful authentication against an external source
+; will result in an update to the password stored in the database.
+; A locally stored password is needed for API access.
+; DEFAULT: false
+;auth_password_save = "false"
+
+; Logout redirection target
+; Defaults to our own login.php, but we can override it here if, for instance,
+; we want to redirect to an SSO provider instead.
+; logout_redirect = "https://DOMAINTOCHANGE/yunohost/sso/?action=logout"
+
+;#####################
+; Program Settings #
+;#####################
+
+; File Pattern
+; This defines which file types Ampache will attempt to catalog
+; You can specify any file extension you want in here separating them
+; with a |
+; DEFAULT: mp3|mpc|m4p|m4a|aac|ogg|oga|wav|aif|aiff|rm|wma|asf|flac|opus|spx|ra|ape|shn|wv
+catalog_file_pattern = "mp3|mpc|m4p|m4a|aac|ogg|oga|wav|aif|aiff|rm|wma|asf|flac|opus|spx|ra|ape|shn|wv"
+
+; Video Pattern
+; This defines which video file types Ampache will attempt to catalog
+; You can specify any file extension you want in here seperating them with
+; a | but ampache may not be able to parse them
+; DEAFULT: avi|mpg|mpeg|flv|m4v|mp4|webm|mkv|wmv|ogv|mov|divx|m2ts
+catalog_video_pattern = "avi|mpg|mpeg|flv|m4v|mp4|webm|mkv|wmv|ogv|mov|divx|m2ts"
+
+; Playlist Pattern
+; This defines which playlist types Ampache will attempt to catalog
+; You can specify any file extension you want in here seperating them with
+; a | but ampache may not be able to parse them
+; DEFAULT: m3u|pls|asx|xspf
+catalog_playlist_pattern = "m3u|pls|asx|xspf"
+
+; Prefix Pattern
+; This defines which prefix Ampache will ignore when importing tags from
+; your music. You may add any prefix you want seperating them with a |
+; DEFAULT: The|An|A|Die|Das|Ein|Eine|Les|Le|La
+catalog_prefix_pattern = "The|An|A|Die|Das|Ein|Eine|Les|Le|La"
+
+; Catalog disable
+; This defines if catalog can be disabled without removing database entries
+; WARNING: this increase sensibly sql requests and slow down Ampache a lot
+; DEFAULT: false
+;catalog_disable = "false"
+
+; Use Access List
+; Toggle this on if you want ampache to pay attention to the access list
+; and only allow streaming/downloading/api-rpc from known hosts api-rpc
+; will not work without this on.
+; NOTE: Default Behavior is DENY FROM ALL
+; DEFAULT: true
+access_control = "true"
+
+; Require Session
+; If this is set to true ampache will make sure that the URL passed when
+; attempting to retrieve a song contains a valid Session ID This prevents
+; others from guessing URL's. This setting is ignored if you have use_auth
+; disabled.
+; DEFAULT: true
+require_session = "true"
+
+; Require LocalNet Session
+; If this is set to true then ampache will require that a valid session
+; is passed even on hosts defined in the Local Network ACL. This setting
+; has no effect if access_control is not enabled
+; DEFAULT: true
+require_localnet_session = "true"
+
+; Multiple Logins
+; Added by Vlet 07/25/07
+; When this setting is enabled a user may only be logged in from a single
+; IP address at any one time, this is to prevent sharing of accounts
+; DEFAULT: false
+;prevent_multiple_logins = "false"
+
+; Downsample Remote
+; If this is set to true and access control is on any users who are not
+; coming from a defined 'network' ACL will be automatically downsampled
+; regardless of their preferences. Requires access_control to be enabled
+; DEFAULT: false
+;downsample_remote = "false"
+
+; Track User IPs
+; If this is enabled Ampache will log the IP of every completed login
+; it will store user,ip,time at one row per login. The results are
+; displayed in Admin --> Users
+; DEFAULT: false
+;track_user_ip = "false"
+
+; User IP Cardinality
+; This defines how many days worth of IP history Ampache will track
+; As it is one row per login on high volume sites you will want to
+; clear it every now and then.
+; DEFAULT: 42 days
+;user_ip_cardinality = "42"
+
+; Allow Zip Download
+; This setting allows/disallows using zlib to zip up an entire
+; playlist/album for download. Even if this is turned on you will
+; still need to enabled downloading for the specific user you
+; want to be able to use this function
+; DEFAULT: false
+allow_zip_download = "true"
+
+Allow Zip Types
+; This setting allows/disallows zip download of specific object types
+; If empty, all supported object types can be zipped.
+; Otherwise, only the given object list can be zipped.
+; POSSIBLE VALUES: artist, album, playlist, search, tmp_playlist
+; DEFAULT: none
+allow_zip_types = "artist,album,playlist"
+
+; File Zip Comment
+; This is an optional configuration option that adds a comment
+; to your zip files, this only applies if you've got allow_zip_downloads
+; DEFAULT: Ampache - Zip Batch Download
+;file_zip_comment = "Ampache - Zip Batch Download"
+
+; Waveform
+; This settings tells Ampache to attempt to generate a waveform
+; for each song. It requires transcode and encode_args_wav settings.
+; You must also set tmp_dir_path in order for this to work
+; DEFAULT: false
+;waveform = "false"
+
+; Waveform color
+; The waveform color.
+; DEFAULT: #FF0000
+;waveform_color = "#FF0000"
+
+; Temporary Directory Path
+; If Waveform is enabled this must be set to tell
+; Ampache which directory to save the temporary file to. Do not put a
+; trailing slash or this will not work.
+; DEFAULT: false
+;tmp_dir_path = "false"
+
+; This setting throttles a persons downloading to the specified
+; bytes per second. This is not a 100% guaranteed function, and
+; you should really use a server based rate limiter if you want
+; to do this correctly.
+; DEFAULT: off
+; VALUES: any whole number (in bytes per second)
+;throttle_download = 10
+
+; This determines the tag order for all cataloged
+; music. If none of the listed tags are found then
+; ampache will randomly use whatever was found.
+; POSSIBLE VALUES: ape asf avi id3v1 id3v2 lyrics3 matroska mpeg quicktime riff
+; vorbiscomment
+; DEFAULT: id3v2 id3v1 vorbiscomment quicktime matroska ape asf avi mpeg riff
+getid3_tag_order = "id3v2,id3v1,vorbiscomment,quicktime,matroska,ape,asf,avi,mpeg,riff"
+
+; Determines whether we try to autodetect the encoding for id3v2 tags.
+; May break valid tags.
+; DEFAULT: false
+;getid3_detect_id3v2_encoding = "false"
+
+; This determines if file metadata should be write back to files
+; as id3 metadata when updated.
+; DEFAULT: false
+write_id3 = "true"
+
+; This determines if album art should be write back to files
+; as id3 metadata when updated.
+; DEFAULT: false
+write_id3_art = "true"
+
+; This determines if catalog manager users can delete medias from disk.
+; DEFAULT: false
+delete_from_disk = "true"
+
+; This determines the order in which metadata sources are used (and in the
+; case of plugins, checked)
+; POSSIBLE VALUES (builtins): filename and getID3
+; POSSIBLE VALUES (plugins): MusicBrainz,TheAudioDb, plus any others you've installed.
+; DEFAULT: getID3 filename
+metadata_order = "getID3,filename"
+
+; This determines the order in which metadata sources are used (and in the
+; case of plugins, checked) for video files
+; POSSIBLE VALUES (builtins): filename and getID3
+; POSSIBLE VALUES (plugins): Tvdb,Tmdb,Omdb, plus any others you've installed.
+; DEFAULT: filename getID3
+metadata_order_video = "filename,getID3"
+
+; This determines if extended metadata grabbed from external services should be deferred.
+; If enabled, extended metadata is retrieved when browsing the library item.
+; If disabled, extended metadata is retrieved at catalog update.
+; Today, only Artist information (summary, place formed, ...) can be deferred.
+; DEFAULT: true
+deferred_ext_metadata = "true"
+
+; Some taggers use delimiters other than \0 for fields
+; This list specifies possible delimiters additional to \0
+; This setting takes a regex pattern.
+; DEFAULT: // / \ | , ;
+additional_genre_delimiters = "[/]{2}|[/|\\\\|\|,|;]"
+
+; This determines if a preview image should be retrieved from video files
+; It requires encode_get_image transcode settings.
+; DEFAULT: false
+;generate_video_preview = "true"
+
+; Un comment if don't want ampache to follow symlinks
+; DEFAULT: false
+;no_symlinks = "false"
+
+; Use auth?
+; If this is set to "Yes" ampache will require a valid
+; Username and password. If this is set to false then ampache
+; will not ask you for a username and password. false is only
+; recommended for internal only instances
+; DEFAULT true
+use_auth = "true"
+
+; Default Auth Level
+; If use_auth is set to false then this option is used
+; to determine the permission level of the 'default' users
+; default is administrator. This setting only takes affect
+; if use_auth is false
+; POSSIBLE VALUES: user, admin, manager, guest
+; DEFAULT: guest
+default_auth_level = "user"
+
+; 5 Star Ratings
+; This allows ratings for almost any object in ampache
+; POSSIBLE VALUES: false true
+; DEFAULT: true
+ratings = "true"
+
+; User flags/favorites
+; This allows user flags for almost any object in ampache as favorite
+; POSSIBLE VALUES: false true
+; DEFAULT: true
+userflags = "true"
+
+; Direct play
+; This allows user to play directly a song or album
+; POSSIBLE VALUES: false true
+; DEFAULT: true
+directplay = "true"
+
+; Sociable
+; This turns on / off all of the "social" features of ampache
+; default is on, but if you don't care and just want music
+; turn this off to disable all social features.
+; DEFAULT: true
+sociable = "true"
+
+; License
+; This turns on / off all licensing features on Ampache
+; DEFAULT: false
+licensing = "false"
+
+; This options will turn on/off Demo Mode
+; If Demo mode is on you can not play songs or update your catalog
+; in other words.. leave this commented out
+; DEFAULT: false
+;demo_mode = "false"
+
+; Caching
+; This turns the caching mechanisms on or off, due to a large number of
+; problems with people with very large catalogs and low memory settings
+; this is off by default as it does significantly increase the memory
+; requirments on larger catalogs. If you have the memory this can create
+; a 2-3x speed improvement.
+; DEFAULT: false
+memory_cache = "true"
+
+; Memory Limit
+; This defines the "Min" memory limit for PHP if your php.ini
+; has a lower value set Ampache will set it up to this. If you
+; set it below 16MB getid3() will not work!
+; DEFAULT: 32
+;memory_limit = 32
+
+; Album Art Preferred Filename
+; Specify a filename to look for if you always give the same filename
+; i.e. "folder.jpg" Ampache currently only supports jpg/gif and png
+; Especially useful if you have a front and a back image in a folder
+; comment out if ampache should search for any jpg,gif or png
+; DEFAULT: folder.jpg
+;album_art_preferred_filename = "folder.jpg"
+
+; Album Art Store on Disk
+; This defines if arts should be stored on disk instead of database.
+; DEFAULT: false
+;album_art_store_disk = "false"
+
+; Local Metadata Directory
+; This define a local metadata directory with write access where to store
+; heavy data if enabled (album arts, ...)
+; DEFAULT: none
+;local_metadata_dir = "/metadata"
+
+; Maximal upload size
+; Specify the maximal allowed upload size for images, in bytes.
+; DEFAULT: 1048576
+;max_upload_size = 1048576
+
+; Album Art Minimum Width
+; Specify the minimum width for arts (in pixel).
+; DEFAULT: none
+;album_art_min_width = 100
+
+; Album Art Maximum Width
+; Specify the maximum width for arts (in pixel).
+; DEFAULT: none
+;album_art_max_width = 1024
+
+; Album Art Minimum Height
+; Specify the minimum height for arts (in pixel).
+; DEFAULT: none
+;album_art_min_height = 100
+
+; Album Art Maximum Height
+; Specify the maximum height for arts (in pixel).
+; DEFAULT: none
+;album_art_max_height = 1024
+
+; Resize Images * Requires PHP-GD *
+; Set this to true if you want Ampache to resize the Album
+; art on the fly, this increases load time and CPU usage
+; and also requires the PHP-GD library. This is very useful
+; If you have high-quality album art and a small upload cap
+; DEFAULT: false
+;resize_images = "false"
+
+; Statistical Graphs * Requires PHP-GD *
+; Set this to true if you want Ampache to generate statistical
+; graphs on usages / users.
+; DEFAULT: false
+;statistical_graphs = "false"
+
+; Art Gather Order
+; Simply arrange the following in the order you would like
+; ampache to search. If you want to disable one of the search
+; methods simply leave it out. DB should be left as the first
+; method unless you want it to overwrite what's already in the
+; database
+; POSSIBLE VALUES (builtins): db tags folder lastfm musicbrainz google
+; POSSIBLE VALUES (plugins): Amazon,TheAudioDb,Tmdb,Omdb,Flickr
+; DEFAULT: db,tags,folder,musicbrainz,lastfm,google
+art_order = "db,tags,folder,musicbrainz,lastfm,google"
+
+; Recommendations
+; Set this to true to enable display of similar artists or albums
+; while browsing. Requires Last.FM.
+; DEFAULT: false
+;show_similar = "false"
+
+; Concerts
+; Set this to true to enable display of artist concerts
+; Requires Last.FM.
+; DEFAULT: false
+;show_concerts = "false"
+
+; Last.FM API Key
+; Set this to your Last.FM api key to actually use Last.FM for
+; recommendations and metadata.
+lastfm_api_key = "d5df942424c71b754e54ce1832505ae2"
+
+; Wanted
+; Set this to true to enable display missing albums and the
+; possibility for users to mark it as wanted.
+; DEFAULT: false
+wanted = "true"
+
+; Wanted types
+; Set the allowed types of wanted releases (album,compilation,single,ep,live,remix,promotion,official)
+; DEFAULT: album,official
+wanted_types = "album,official"
+
+; Wanted Auto Accept
+; Mark wanted requests as accepted by default (no content manager agreement required)
+; DEFAULT: false
+;wanted_auto_accept = "false"
+
+; EchoNest API key
+; EchoNest provides several music services. Currently used for missing song 30 seconds preview.
+;echonest_api_key = ""
+
+; Labels
+; Use labels to browse artists per label membership.
+; DEFAULT: false
+;label = "false"
+
+; Broadcasts
+; Allow users to broadcast music.
+; This feature requires advanced server configuration, please take a look on the wiki for more information.
+; DEFAULT: false
+;broadcast = "false"
+
+; Channels
+; Set this to true to enable channels and the
+; possibility for users to create channels from playlists
+; DEFAULT: true
+channel = "true"
+
+; Live Streams
+; Set this to true to enable live streams (radio) and the
+; possibility for users to add new live streams.
+; DEFAULT: true
+live_stream = "true"
+
+; Web Socket address
+; Declare the web socket server address
+; DEFAULT: determined automatically
+;websocket_address = "ws://localhost:8100"
+
+; Debug
+; If this is enabled Ampache will write debugging information to the log file
+; DEFAULT: false
+;debug = "false"
+
+; Debug Level
+; This should always be set in conjunction with the
+; debug option, it defines how prolific you want the
+; debugging in ampache to be. values are 1-5.
+; 1 == Errors only
+; 2 == Error + Failures (login attempts etc.)
+; 3 == ??
+; 4 == ?? (Profit!)
+; 5 == Information (cataloging progress etc.)
+; DEFAULT: 5
+debug_level = 5
+
+; Path to Log File
+; This defines where you want ampache to log events to
+; this will only happen if debug is turned on. Do not
+; include trailing slash. You will need to make sure that
+; the specified directory exists and your HTTP server has
+; write access.
+; DEFAULT: NULL
+log_path = "/var/www/ampache/log"
+
+; Log filename pattern
+; This defines where the log file name pattern.
+; %name.%Y%m%d.log will create a different log file every day.
+; DEFAULT: %name.%Y%m%d.log
+log_filename = "%name.%Y%m%d.log"
+
+; Charset of generated HTML pages
+; Default of UTF-8 should work for most people
+; DEFAULT: UTF-8
+site_charset = "UTF-8"
+
+; Locale Charset
+; Local charset (mainly for file operations) if different
+; from site_charset.
+; This is disabled by default, enable only if needed
+; (for Windows please set lc_charset to ISO8859-1)
+; DEFAULT: ISO8859-1
+;lc_charset = "ISO8859-1"
+
+; Refresh Limit
+; This defines the default refresh limit in seconds for
+; pages with dynamic content, such as now playing
+; DEFAULT: 60
+; Possible Values: Int > 5
+refresh_limit = "60"
+
+; Footer Statistics
+; This defines whether statistics (Queries, Cache Hits, Load Time)
+; are shown in the page footer.
+; DEFAULT: true
+; Possible values: true, false
+show_footer_statistics = "true"
+
+;#########################################################
+; Custom actions (optional) #
+;#########################################################
+
+; Your custom play action title
+;custom_play_action_title_0 = ""
+; Your custom play action icon name (stored as /images/icon_[your_image].png)
+;custom_play_action_icon_0 = ""
+; Your custom action script, where:
+; - %f: the media file path
+; - %c: the excepted codec target (mp3, ogg, ...)
+; - %a: the artist name
+; - %A: the album name
+; - %t: the song title
+;custom_play_action_run_0 = ""
+
+; Example for Karaoke playing
+;custom_play_action_title_0 = "Karaoke"
+;custom_play_action_icon_0 = "microphone"
+;custom_play_action_run_0 = "sox \"%f\" -p oops | ffmpeg -i pipe:0 -f %c pipe:1"
+
+;#########################################################
+; LDAP login info (optional) #
+;#########################################################
+
+; LDAP filter string to use (required)
+; For OpenLDAP use "uid"
+; For Microsoft Active Directory (MAD) use "sAMAccountName"
+; DEFAULT: null
+ldap_filter = "(uid=%v)"
+
+; LDAP objectclass (required)
+; OpanLDAP objectclass = "*"
+; MAD objectclass = "organizationalPerson"
+; DEFAULT null
+ldap_objectclass = "mailAccount"
+
+; Initial credentials to bind with for searching (optional)
+; DEFAULT: null
+;ldap_username = ""
+;ldap_password = ""
+
+; Require that the user is in a specific group (optional)
+; DEFAULT: null
+;ldap_require_group = "cn=yourgroup,ou=yourorg,dc=yoursubdomain,dc=yourdomain,dc=yourtld"
+
+; This is the search dn used to find users (required)
+; DEFAULT: null
+ldap_search_dn = "ou=users,dc=yunohost,dc=org"
+
+; This is the address of your ldap server (required)
+; DEFAULT: null
+ldap_url = "localhost"
+
+; Attributes where additional user information is stored (optional)
+; OpenLDAP ldap_name_field = "cn"
+; MAD ldap_name_field = "displayname"
+; DEFAULT: null
+;ldap_email_field = "mail"
+ldap_name_field = "cn"
+
+;#########################################################
+; OpenID login info (optional) #
+;#########################################################
+
+; Requires specific OpenID Provider Authentication Policy
+; DEFAULT: null
+; VALUES: PAPE_AUTH_MULTI_FACTOR_PHYSICAL,PAPE_AUTH_MULTI_FACTOR,PAPE_AUTH_PHISHING_RESISTANT
+;openid_required_pape = ""
+
+;#########################################################
+; Public Registration settings, defaults to disabled #
+;#########################################################
+
+; This setting will silently create an ampache account
+; for anyone who can login using ldap (or any other login
+; extension). The default is to create new users as guests
+; see auto_user config option if you would like to change this
+; DEFAULT: false
+auto_create = "true"
+
+; This setting turns on/off public registration. It is
+; recommended you leave this off, as it will allow anyone to
+; sign up for an account on your server.
+; REMEMBER: don't forget to set the mail from address further down in the config.
+; DEFAULT: false
+allow_public_registration = "false"
+
+; Require Captcha Text on Image confirmation
+; Turning this on requires the user to correctly
+; type in the letters in the image created by Captcha
+; Default is off because its very hard to detect if it failed
+; to draw, or they failed to enter it.
+; DEFAULT: false
+;captcha_public_reg = "false"
+
+; This setting turns on/off admin notification of registration.
+; DEFAULT: false
+;admin_notify_reg = "false"
+
+; This setting determines whether the user will be created as a disabled user.
+; If this is on, an administrator will need to manually enable the account
+; before it's usable.
+; DEFAULT: false
+;admin_enable_required = "false"
+
+; This setting will allow all registrants/ldap/http users
+; to be auto-approved as a user. By default, they will be
+; added as a guest and must be promoted by the admin.
+; POSSIBLE VALUES: guest, user, admin
+; DEFAULT: guest
+auto_user = "user"
+
+; This will display the user agreement when registering
+; For agreement text, edit config/registration_agreement.php
+; User will need to accept the agreement before they can register
+; DEFAULT: false
+;user_agreement = "false"
+
+; This disable email confirmation when registering.
+; DEFAULT: false
+;user_no_email_confirm = "false"
+
+; This will display the cookie disclaimer (EU Cookie Law)
+; DEFAULT: false
+cookie_disclaimer = "false"
+
+; The fields that will be shown on Registration page
+; If a user wants to register.
+; Username and email fields are forced.
+; POSSIBLE VALUES: fullname,website,state,city
+; DEFAULT: "fullname,website"
+registration_display_fields = "fullname,website"
+
+; The fields that will be mandatory
+; This controls which fields are mandatory for registration.
+; Username and email fields are forced mandatory.
+; POSSIBLE VALUES: fullname,website,state,city
+; DEFAULT: fullname
+registration_mandatory_fields = "fullname"
+
+;########################################################
+; These options control the dynamic downsampling based #
+; on current usage #
+; *Note* Transcoding must be enabled and working #
+;########################################################
+
+; Attempt to optimize bandwidth by dynamically lowering the bit rate of new
+; streams. Since the bit rate is only adjusted at the beginning of a song, the
+; actual cumulative bitrate for concurrent streams can be up to around
+; double the configured value. It also only applies to streams that are
+; transcoded.
+; DEFAULT: none
+max_bit_rate = 576
+
+; New dynamically downsampled streams will be denied if they are forced below
+; this value.
+; DEFAULT: 8
+min_bit_rate = 48
+
+;######################################################
+; These are commands used to transcode non-streaming
+; formats to the target file type for streaming.
+; This can be useful in re-encoding file types that don't stream
+; very well, or if your player doesn't support some file types.
+;
+; 'Downsampling' will also use these commands.
+;
+; To state the bleeding obvious, any programs referenced in the transcode
+; commands must be installed, in the web server's search path (or referenced
+; by their full path), and executable by the web server.
+
+; Input type selection
+; TYPE is the extension. 'allowed' certifies that transcoding works properly for
+; this input format. 'required' further forbids the direct streaming of a format
+; (e.g. if you store everything in FLAC, but don't want to ever stream that.)
+; transcode_TYPE = {allowed|required|false}
+; DEFAULT: false
+;;; Audio
+transcode_m4a = required
+transcode_flac = required
+transcode_mpc = required
+transcode_ogg = required
+transcode_oga = required
+transcode_wav = required
+transcode_wma = required
+transcode_aif = required
+transcode_aiff = required
+transcode_ape = required
+transcode_shn = required
+transcode_mp3 = allowed
+;;; Video
+transcode_avi = allowed
+transcode_mkv = allowed
+transcode_mpg = allowed
+transcode_mpeg = allowed
+transcode_m4v = allowed
+transcode_mp4 = allowed
+transcode_mov = allowed
+transcode_wmv = allowed
+transcode_ogv = allowed
+transcode_divx = allowed
+transcode_m2ts = allowed
+transcode_webm = allowed
+
+; Default audio output format
+; DEFAULT: none
+encode_target = mp3
+
+; Default video output format
+; DEFAULT: none
+encode_video_target = webm
+
+; Override the default output format on a per-type basis
+; encode_target_TYPE = TYPE
+; DEFAULT: none
+encode_target_flac = ogg
+
+; Override the default TYPE transcoding behavior on a per-player basis
+; transcode_player_PLAYER_TYPE = TYPE
+; Valid PLAYER is: webplayer, api
+; DEFAULT: none
+transcode_player_webplayer_m4a = required
+;transcode_player_webplayer_flac = required
+;transcode_player_webplayer_mpc = required
+transcode_player_webplayer_avi = required
+transcode_player_webplayer_mkv = required
+transcode_player_webplayer_mpg = required
+transcode_player_webplayer_mpeg = required
+transcode_player_webplayer_m4v = required
+transcode_player_webplayer_mp4 = required
+transcode_player_webplayer_mov = required
+transcode_player_webplayer_wmv = required
+transcode_player_webplayer_ogv = required
+transcode_player_webplayer_divx = required
+transcode_player_webplayer_m2ts = required
+
+; Override the default output format on a per-player basis
+; encode_player_PLAYER_target = TYPE
+; Valid PLAYER is: webplayer, api
+; DEFAULT: none
+;encode_player_webplayer_target = mp3
+;encode_player_api_target = mp3
+
+; Allow clients to override transcode settings (output type, bitrate, codec ...)
+; DEFAULT: true
+transcode_player_customize = "true"
+
+; Command configuration. Substitutions will be made as follows:
+; %FILE% => filename
+; %SAMPLE% => target sample rate
+; You can do fancy things like VBR, but consider whether the consequences are
+; acceptable in your environment.
+
+; Master transcode command
+; transcode_cmd should be a single command that supports multiple file types,
+; such as ffmpeg or avconv. It's still possible to make a configuration that's
+; equivalent to the old default, but if you find that necessary you should be
+; clever enough to figure out how on your own.
+; DEFAULT: none
+;transcode_cmd = "ffmpeg"
+transcode_cmd = "avconv"
+;transcode_cmd = "/usr/bin/neatokeen"
+
+; Transcode input file argument
+transcode_input = "-i %FILE%"
+
+; Specific transcode commands
+; It shouldn't be necessary in most cases, but you can override the transcode
+; command for specific source formats. It still needs to accept the
+; encoding arguments, so the easiest approach is to use your normal command as
+; a clearing-house.
+; transcode_cmd_TYPE = TRANSCODE_CMD
+;transcode_cmd_mid = "timidity -Or -o – %FILE% | ffmpeg -f s16le -i pipe:0"
+
+; Encoding arguments
+; For each output format, you should provide the necessary arguments for
+; your transcode_cmd.
+; encode_args_TYPE = TRANSCODE_CMD_ARGS
+encode_args_mp3 = "-vn -b:a %SAMPLE%K -c:a libmp3lame -f mp3 pipe:1"
+encode_args_ogg = "-vn -b:a %SAMPLE%K -c:a libvorbis -f ogg pipe:1"
+encode_args_m4a = "-vn -b:a %SAMPLE%K -c:a libfdk_aac -f adts pipe:1"
+encode_args_wav = "-vn -b:a %SAMPLE%K -c:a pcm_s16le -f wav pipe:1"
+encode_args_flv = "-b:a %SAMPLE%K -ar 44100 -ac 2 -v 0 -f flv -c:v libx264 -preset superfast -threads 0 pipe:1"
+encode_args_webm = "-q %QUALITY% -f webm -c:v libvpx -maxrate %MAXBITRATE%k -preset superfast -threads 0 pipe:1"
+;encode_args_webm = "-q %QUALITY% -f webm -c:v libvpx -maxrate 800k -preset superfast -threads 0 pipe:1"
+encode_args_ts = "-q %QUALITY% -s %RESOLUTION% -f mpegts -c:v libx264 -c:a libmp3lame -maxrate %MAXBITRATE%k -preset superfast -threads 0 pipe:1"
+
+; Encoding arguments to retrieve an image from a single frame
+encode_get_image = "-ss %TIME% -f image2 -vframes 1 pipe:1"
+
+; Encoding argument to encrust subtitle
+encode_srt = "-vf \"subtitles='%SRTFILE%'\""
+
+; Encode segment frame argument
+encode_ss_frame = "-ss %TIME%"
+
+; Encode segment duration argument
+encode_ss_duration = "-t %DURATION%"
+
+
+;######################################################
+; these options allow you to configure your rss-feed
+; layout. rss exists of two parts, main and song main is the information about the feed
+; song is the information in the feed. can be multiple items.
+; use_rss = false (values true | false)
+;DEFAULT: use_rss = false
+;use_rss = "false"
+;#####################################################
+
+;#############################
+; Proxy Settings (optional) #
+;#############################
+; If Ampache is behind an http proxy, specifiy the hostname or IP address
+; port, proxyusername, and proxypassword here.
+;DEFAULT: not in use
+;proxy_host = "192.168.0.1"
+;proxy_port = "8080"
+;proxy_user = ""
+;proxy_pass = ""
+
+; If Ampache is behind an https reverse proxy, force use HTTPS protocol.
+;Default: false
+force_ssl = "true"
+
+;#############################
+; Mail Settings #
+;#############################
+
+;Method used to send mail
+;POSSIBLE VALUES: smtp sendmail php
+;DEFAULT: php
+;mail_type = "php"
+
+;Mail domain.
+;DEFAULT: example.com
+;mail_domain = "example.com"
+
+;This will be combined with mail_domain and used as the source address for
+;emails generated by Ampache. For example, setting this to 'me' will set the
+;sender to 'me@example.com'.
+;DEFAULT: info
+;mail_user = "info"
+
+;A name to go with the email address.
+;DEFAULT: Ampache
+;mail_name = "Ampache"
+
+;How strictly email addresses should be checked.
+;easy does a regex match, strict actually performs some SMTP transactions
+;to see if we can send to this address.
+;POSSIBLE VALUES: strict easy none
+; DEFAULT: strict
+;mail_check = "strict"
+
+
+;############################
+; sendmail Settings #
+;############################
+
+;DEFAULT: /usr/sbin/sendmail
+;sendmail_path = "/usr/sbin/sendmail"
+
+;#############################
+; SMTP Settings #
+;#############################
+
+;Mail server (hostname or IP address)
+;DEFAULT: localhost
+;mail_host = "localhost"
+
+; SMTP port
+;DEFAULT: 25
+;mail_port = 25
+
+;Secure SMTP
+;POSSIBLE VALUES: ssl tls
+;DEFAULT: none
+;mail_secure_smtp = tls
+
+;Enable SMTP authentication
+;DEFAULT: false
+;mail_auth = "true"
+
+;SMTP Username
+;your mail auth username.
+;mail_auth_user = ""
+
+; SMTP Password
+; your mail auth password.
+;mail_auth_pass = ""
+
+;#############################
+; Multibyte Settings #
+;#############################
+; See http://php.net/manual/mbstring.supported-encodings.php
+; If you want ID3v1 encoding detection to work, you should uncomment this line
+; so that the ordering is sane.
+; DEFAULT: auto
+;mb_detect_order = "ASCII,UTF-8,EUC-JP,ISO-2022-JP,SJIS,JIS"
diff --git a/manifest.json b/manifest.json
index c92d242..be4474f 100644
--- a/manifest.json
+++ b/manifest.json
@@ -6,12 +6,13 @@
"fr": "Une application de streaming audio et vidéo"
},
"url": "http://ampache.org",
+ "packaging_format": 1,
"license": "free",
"maintainer": {
- "name": "beudbeud",
- "email": "beudbeud@beudibox.fr"
+ "name": "aymhce",
+ "email": "aymhce@gmail.com"
},
- "multi_instance": "true",
+ "multi_instance": true,
"requirements": {
"yunohost": ">> 2.3.12.1"
},
diff --git a/scripts/_common b/scripts/_common
new file mode 100644
index 0000000..1e02f42
--- /dev/null
+++ b/scripts/_common
@@ -0,0 +1,60 @@
+#!/bin/bash
+
+# Copy files to the right place
+ampache_ynh_getsources () {
+ version=$(cat upstream_version)
+
+ final_path=/var/www/$app
+ sudo mkdir -p $final_path/log
+
+ sudo wget -O ../ampache.tar.gz https://github.com/ampache/ampache/archive/$version.tar.gz > /dev/null 2>&1
+ sudo tar xvzf ../ampache.tar.gz -C .. > /dev/null 2>&1
+ sudo cp -ar ../ampache-$version/. $final_path
+
+ sudo cp ../conf/ampache.cfg.php $final_path/config/ampache.cfg.php
+}
+
+# Change variables in Ampache configuration
+ampache_ynh_prepareconfig () {
+ sudo sed -i "s/yunouser/$app/g" $final_path/config/ampache.cfg.php
+ sudo sed -i "s/yunopass/$db_pwd/g" $final_path/config/ampache.cfg.php
+ sudo sed -i "s/yunobase/$app/g" $final_path/config/ampache.cfg.php
+ sudo sed -i "s@PATHTOCHANGE@${path%/}@g" $final_path/config/ampache.cfg.php
+ sudo sed -i "s@DOMAINTOCHANGE@$domain@g" $final_path/config/ampache.cfg.php
+}
+
+# Modify Nginx configuration file and copy it to Nginx conf directory
+ampache_ynh_preparenginx () {
+ sed -i "s@PATHTOCHANGE@${path%/}@g" ../conf/nginx.conf*
+ sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf*
+ sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
+}
+
+# Ampache installation
+ampache_ynh_install () {
+ ORIPATH=$(pwd)
+ cd $final_path
+ sudo php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
+ sudo php composer-setup.php
+ sudo php composer.phar install --prefer-source --no-interaction
+ # Set permissions to ampache directory
+ sudo chown -R www-data: $final_path
+ cd $ORIPATH
+}
+
+# Reload Nginx and regenerate SSOwat conf
+ampache_ynh_reloadservices () {
+ sudo service nginx reload
+ ynh_app_setting_set $app skipped_uris "/"
+ sudo yunohost app ssowatconf
+}
+
+# Pre config ampache
+ampache_ynh_doconfig () {
+ echo "127.0.0.1 $domain #yunoampache" | sudo tee -a /etc/hosts
+ sleep 1
+ curl -kL -X POST http://$domain${path%/}/update.php?action=update > /dev/null 2>&1
+ sleep 5
+ sudo sed '/yunoampache/d' /etc/hosts > /tmp/hosts.tmp
+ sudo cp /tmp/hosts.tmp /etc/hosts ; sudo rm -f /tmp/hosts.tmp
+}
diff --git a/scripts/backup b/scripts/backup
new file mode 100755
index 0000000..51981ca
--- /dev/null
+++ b/scripts/backup
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+set -eu
+
+. /usr/share/yunohost/helpers
+
+app=$YNH_APP_INSTANCE_NAME
+
+domain=$(ynh_app_setting_get "$app" domain)
+path=$(ynh_app_setting_get "$app" path)
+admin=$(ynh_app_setting_get "$app" admin)
+
+ynh_backup "/var/www/$app" "sources" 1
+
+ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" "conf/nginx.conf"
+
+ynh_mysql_dump_db "$app" > db.sql
+#ynh_backup "db.sql" "db.sql"
diff --git a/scripts/install b/scripts/install
index 9e151eb..219a441 100644
--- a/scripts/install
+++ b/scripts/install
@@ -1,92 +1,65 @@
#!/bin/bash
+set -eu
+
# Retrieve arguments
app=$YNH_APP_INSTANCE_NAME
-domain=$1
-path=$2
-admin_ampache=$3
+domain=$YNH_APP_ARG_DOMAIN
+path=$YNH_APP_ARG_PATH
+admin_ampache=$YNH_APP_ARG_ADMIN
-# Source YunoHost helpers
+# Source helpers
. /usr/share/yunohost/helpers
-
-#debianversionname=$(lsb_release -a | grep Codename | awk -F' ' '{print $2}')
-
-# Check domain/path availability
-sudo yunohost app checkurl $domain$path -a $app
-if [[ ! $? -eq 0 ]]; then
- exit 1
-fi
+. _common
# Check if admin exists
-sudo yunohost user list --json | grep -qi "\"username\": \"$admin_ampache\""
-if [[ ! $? -eq 0 ]]; then
- echo "Wrong admin"
- exit 1
-fi
+sudo yunohost user list --json | grep -qi "\"username\": \"$admin_ampache\"" || ynh_die "wrong admin username"
-sudo yunohost app setting ampache admin -v $admin_ampache
+ynh_app_setting_set $app admin $admin_ampache
+
+# Check domain/path availability
+path=$(ynh_normalize_url_path $path)
+ynh_webpath_available $domain $path
+ynh_webpath_register $app $domain $path
+
+# get sources and copy files to the right place
+ampache_ynh_getsources
+
+sudo cp ../conf/admin.sql /tmp/
# Generate random password
db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{24\}\).*/\1/p')
-# Use 'ampache' as database name and user
-db_user=$app
-
# Initialize database and store mysql password for upgrade
-#sudo yunohost app initdb $db_user -p $db_pwd -s $(readlink -e ../sources/sql/ampache.sql)
-sudo yunohost app setting $app mysqlpwd -v $db_pwd
-ynh_mysql_create_db "$app" "$db_user" "$db_pwd"
-ynh_mysql_connect_as "$db_user" "$db_pwd" "$app" < "../sources/sql/ampache.sql"
-
-# Copy files to the right place
-final_path=/var/www/$app
-sudo mkdir -p $final_path/log
-sudo cp -a ../sources/* $final_path
-sudo cp ../conf/ampache.cfg.php $final_path/config/ampache.cfg.php
-sudo cp ../conf/admin.sql /tmp/
+ynh_app_setting_set $app mysqlpwd $db_pwd
+ynh_mysql_setup_db "$app" "$app" "$db_pwd"
+ynh_mysql_connect_as "$app" "$db_pwd" "$app" < "$final_path/sql/ampache.sql"
# Change variables in Ampache configuration
-sudo sed -i "s/yunouser/$db_user/g" $final_path/config/ampache.cfg.php
-sudo sed -i "s/yunopass/$db_pwd/g" $final_path/config/ampache.cfg.php
-sudo sed -i "s/yunobase/$db_user/g" $final_path/config/ampache.cfg.php
+ampache_ynh_prepareconfig
+
sudo sed -i "s/yunoadmin/$admin_ampache/g" /tmp/admin.sql
-sudo sed -i "s@PATHTOCHANGE@${path%/}@g" $final_path/config/ampache.cfg.php
-sudo sed -i "s@DOMAINTOCHANGE@$domain@g" $final_path/config/ampache.cfg.php
random_key=db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{24\}\).*/\1/p')
sudo sed -i "s@RANDOMKEYTOCHANGE@$random_key@g" $final_path/config/ampache.cfg.php
# Modify Nginx configuration file and copy it to Nginx conf directory
-sed -i "s@PATHTOCHANGE@${path%/}@g" ../conf/nginx.conf*
-sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf*
-sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
+ampache_ynh_preparenginx
# Install dependency
+sudo apt-get update
sudo apt-get install libav-tools -y
# Ampache installation
-cd $final_path
-sudo php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
-sudo php composer-setup.php
-sudo php composer.phar install --prefer-source --no-interaction
-
-# Set permissions to ampache directory
-sudo chown -R www-data: $final_path
+ampache_ynh_install
# Reload Nginx and regenerate SSOwat conf
-sudo service nginx reload
-sudo yunohost app setting $app skipped_uris -v "/"
-sudo yunohost app ssowatconf
+ampache_ynh_reloadservices
# Pre config ampache
-echo "127.0.0.1 $domain #yunoampache" | sudo tee -a /etc/hosts
-sleep 1
-curl -kL -X POST http://$domain${path%/}/update.php?action=update > /dev/null 2>&1
-sleep 5
+ampache_ynh_doconfig
+
+ynh_mysql_connect_as "$app" "$db_pwd" "$app" < /tmp/admin.sql
# Clean install
-sudo sed '/yunoampache/d' /etc/hosts > /tmp/hosts.tmp
-sudo cp /tmp/hosts.tmp /etc/hosts ; sudo rm -f /tmp/hosts.tmp
-ynh_mysql_connect_as "$db_user" "$db_pwd" "$app" < /tmp/admin.sql
+sudo rm -rf ../ampache-$version
sudo rm /tmp/admin.sql
-
-
diff --git a/scripts/remove b/scripts/remove
index e763135..4858599 100644
--- a/scripts/remove
+++ b/scripts/remove
@@ -1,13 +1,14 @@
#!/bin/bash
-app=$YNH_APP_INSTANCE_NAME
-db_user=$app
-db_name=$app
-root_pwd=$(sudo cat /etc/yunohost/mysql)
-domain=$(sudo yunohost app setting $app domain)
+set -u
-# Drop MySQL database
-mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;"
+. /usr/share/yunohost/helpers
+
+app=$YNH_APP_INSTANCE_NAME
+domain=$(ynh_app_setting_get $app domain)
+
+ynh_mysql_drop_db $app
+ynh_mysql_drop_user $app
# Remove sources
sudo rm -rf /var/www/$app
diff --git a/scripts/restore b/scripts/restore
new file mode 100755
index 0000000..98a9c55
--- /dev/null
+++ b/scripts/restore
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+set -eu
+
+. /usr/share/yunohost/helpers
+
+app=$YNH_APP_INSTANCE_NAME
+
+domain=$(ynh_app_setting_get "$app" domain)
+path=$(ynh_app_setting_get "$app" path)
+admin=$(ynh_app_setting_get "$app" admin)
+
+# Check domain/path availability
+test ! -d /var/www/$app \
+ || ynh_die "There is already a directory: /var/www/$app "
+
+path=$(ynh_normalize_url_path $path)
+ynh_webpath_available $domain $path
+ynh_webpath_register $app $domain $path
+
+# Install dependency
+sudo apt-get update
+sudo apt-get install libav-tools -y
+
+sudo cp -a ./sources "/var/www/$app"
+
+sudo cp -a ./conf/nginx.conf "/etc/nginx/conf.d/$domain.d/$app.conf"
+
+db_pwd=$(ynh_app_setting_get $app mysqlpwd)
+ynh_mysql_setup_db $app $app $db_pwd
+ynh_mysql_connect_as $app $db_pwd $app < ./db.sql
+
+sudo service nginx reload
diff --git a/scripts/upgrade b/scripts/upgrade
index d2454c5..691a99f 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -1,54 +1,37 @@
#!/bin/bash
+set -eu
+
+. /usr/share/yunohost/helpers
+. _common
+
# Retrieve arguments
app=$YNH_APP_INSTANCE_NAME
-domain=$(sudo yunohost app setting $app domain)
-path=$(sudo yunohost app setting $app path)
-db_user=$app
-db_pwd=$(sudo yunohost app setting $app mysqlpwd)
-admin_ampache=$(sudo yunohost app setting $app admin)
+domain=$(ynh_app_setting_get $app domain)
+path=$(ynh_app_setting_get $app path)
+db_pwd=$(ynh_app_setting_get $app mysqlpwd)
+admin_ampache=$(ynh_app_setting_get $app admin)
-# first make a copy of the db
-# mysqldump -u $db_user -p$db_pwd --add-drop-table --allow-keywords $app > $final_path/ampache-db-backup.sql
+path=$(ynh_normalize_url_path $path)
-# Copy files to the right place
-final_path=/var/www/$app
-sudo cp -a ../sources/* $final_path
-sudo cp ../conf/ampache.cfg.php $final_path/config/ampache.cfg.php
+# Get sources and copy files to the right place
+ampache_ynh_getsources
# Change variables in Ampache configuration
-sudo sed -i "s/yunouser/$db_user/g" $final_path/config/ampache.cfg.php
-sudo sed -i "s/yunopass/$db_pwd/g" $final_path/config/ampache.cfg.php
-sudo sed -i "s/yunobase/$db_user/g" $final_path/config/ampache.cfg.php
-sudo sed -i "s@PATHTOCHANGE@${path%/}@g" $final_path/config/ampache.cfg.php
-sudo sed -i "s@DOMAINTOCHANGE@$domain@g" $final_path/config/ampache.cfg.php
-
-
-# Set permissions to roundcube directory
-sudo chown -R www-data: $final_path
+ampache_ynh_prepareconfig
# Modify Nginx configuration file and copy it to Nginx conf directory
-sed -i "s@PATHTOCHANGE@${path%/}@g" ../conf/nginx.conf*
-sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf*
-sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
-
-
-# Reload Nginx and regenerate SSOwat conf
-sudo service nginx reload
-sudo yunohost app setting $app skipped_uris -v "/"
-sudo yunohost app ssowatconf
+ampache_ynh_preparenginx
# Ampache installation
-cd $final_path
-sudo -u www-data php composer.phar install --prefer-source --no-interaction
+ampache_ynh_install
-echo "127.0.0.1 $domain #yunoampache" | sudo tee -a /etc/hosts
-sleep 1
-curl -kL -X POST http://$domain${path%/}/update.php?action=update > /dev/null 2>&1
-sleep 5
+# Reload Nginx and regenerate SSOwat conf
+ampache_ynh_reloadservices
-sudo yunohost app setting $app skipped_uris -d
-sudo yunohost app setting $app skipped_uris -v "/rest"
-sudo yunohost app ssowatconf
-sudo sed '/yunoampache/d' /etc/hosts > /tmp/hosts.tmp
-sudo cp /tmp/hosts.tmp /etc/hosts ; sudo rm -f /tmp/hosts.tmp
+# Pre config ampache
+ampache_ynh_doconfig
+
+# Clean install
+sudo rm -rf ../ampache-$version
+sudo rm /tmp/admin.sql
diff --git a/scripts/upstream_version b/scripts/upstream_version
new file mode 100644
index 0000000..269aa9c
--- /dev/null
+++ b/scripts/upstream_version
@@ -0,0 +1 @@
+3.8.3