├── .gitignore ├── FAQ.md ├── LICENSES ├── Apache-2.0.txt ├── GPL-2.0-only.txt ├── GPL-3.0-only.txt ├── GPL-3.0-or-later.txt └── MIT.txt ├── Makefile ├── PRIVACY.md ├── README.md ├── app.mk ├── components ├── home_scene.brs ├── home_scene.xml ├── models │ ├── category_node.xml │ └── summary_node.xml ├── screens │ ├── MyOverhang │ │ ├── MyOverhang.brs │ │ └── MyOverhang.xml │ ├── SummaryDisplay │ │ ├── SummaryDisplay.brs │ │ └── SummaryDisplay.xml │ ├── background │ │ ├── background.brs │ │ └── background.xml │ ├── content_screen │ │ ├── content_screen.brs │ │ └── content_screen.xml │ ├── details_screen │ │ ├── details_screen.brs │ │ └── details_screen.xml │ ├── search_screen │ │ ├── search_screen.brs │ │ └── search_screen.xml │ ├── server_select │ │ ├── server_select.brs │ │ └── server_select.xml │ ├── side_icons │ │ └── side_icons.xml │ └── sidebar │ │ ├── sidebar.brs │ │ └── sidebar.xml └── tasks │ ├── load_config_task │ ├── load_config_task.brs │ └── load_config_task.xml │ ├── load_url_task │ ├── load_url_task.brs │ └── load_url_task.xml │ ├── load_video_info_task │ ├── load_video_info_task.brs │ └── load_video_info_task.xml │ └── search_task │ ├── search_task.brs │ └── search_task.xml ├── fonts ├── UKIJCJK.ttf └── UKIJCJK.ttf.license ├── images ├── channel-icon_FHD.png ├── channel-icon_FHD.png.license ├── channel-icon_HD.png ├── channel-icon_HD.png.license ├── channel-icon_SD.png ├── channel-icon_SD.png.license ├── channel-poster_fhd.png.license ├── logo.png ├── logo.png.license ├── search-icon.png ├── search-icon.png.license ├── settings-icon.png ├── settings-icon.png.license ├── splash-screen_FHD.png ├── splash-screen_FHD.png.license ├── splash-screen_HD.png ├── splash-screen_HD.png.license ├── splash-screen_SD.png ├── splash-screen_SD.png.license └── splash-screen_fhd.jpg.license ├── locale ├── de_DE │ └── translations.ts ├── default │ └── translations.ts ├── en_GB │ └── translations.ts ├── en_US │ └── translations.ts ├── es_ES │ └── translations.ts ├── fr_CA │ └── translations.ts ├── it_IT │ └── translations.ts └── pt_BR │ └── translations.ts ├── manifest ├── resources └── config.json ├── screenshots ├── content_screen.jpg ├── detail_screen.jpg └── setting_screen.jpg └── source ├── main.brs └── utils ├── config.brs └── get_feed.brs /.gitignore: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2020 Tod Fitch 2 | # 3 | # SPDX-License-Identifier: MIT 4 | 5 | logo.svg* 6 | .DS_Store 7 | out/* 8 | TODO.txt 9 | build-number.txt 10 | -------------------------------------------------------------------------------- /FAQ.md: -------------------------------------------------------------------------------- 1 | **PeerVue - Frequently Asked Questions (FAQ)** 2 | 3 | This FAQ will be updated to accommodate new information with respect to updates and changes. 4 | 5 | **What is PeerVue?** 6 | 7 | PeerVue is an “channel” (a.k.a. app) for a [Roku Media Streaming player](https://en.wikipedia.org/wiki/Roku#Roku_streaming_players). With it you can watch content being served from a [PeerTube instance](https://joinpeertube.org/). 8 | 9 | **How Do I Install It** 10 | Roku provides three ways that a channel can be installed: 11 | 12 | 1. Through their channel store. 13 | 2. Via a private/uncertified channel code. 14 | 3. By setting the device into “developer mode” and side loading. 15 | 16 | We support adding PeerVue via side loading and with a private channel code. 17 | 18 | **What is the private channel code?** 19 | 20 | The code is [PEERVUE](https://my.roku.com/add/PEERVUE). 21 | 22 | **The Private Channel Code Doesn’t Work** 23 | 24 | There seems to be some oddness about this. I have tried to allow the code to work in all regions. But apparently Roku blocks private channels in some regions. 25 | 26 | If you are unable to add the private channel then please submit a GitHub issue with your Roku region information. 27 | 28 | **How does Roku determine my region?** 29 | 30 | The region is associated with your account and is set when you created your account based on the IP address used at that time. 31 | 32 | **Why not have it in the Roku channel Store?** 33 | 34 | Short answer is we cannot. 35 | 36 | The longer answer is that Roku’s certification and developer’s terms are incompatible with a generic channel accessing a server not controlled by the channel author. Since we have little control over what PeerTube instance you decide to connect to we cannot: 37 | * Guarantee the videos meet Roku’s technical quality standards (resolution, closed captioning, speed of loading, etc.) 38 | * Guarantee the videos meet Roku’s content standards (family friendly, honoring copyrights, etc.) 39 | 40 | The only way we could meet Roku’s requirements would be to lock this channel to a single PeerTube instance controlled by the PeerVue author, tightly control the videos on that server and probably not have it federated with any other instance. 41 | 42 | **Why I can’t just type the URL in the PeerTube instance URL?** 43 | 44 | My reading of the Roku developer agreement forbids a channel or app from allowing the end user to type in a URL. 45 | 46 | **The PeerTube instance I want to connect to is not listed** 47 | 48 | Either it is new and I've not rebuilt the list (create an issue on GitHub to get my attention). 49 | 50 | Or that is an instance that I’ve decided not so support. If you don’t like it, you can fork this project and side load your own channel app. 51 | 52 | **When I connect to an instance I don’t see any videos** 53 | 54 | It could be the server is down. Or it could be that there is an issue with the definition for that server in PeerVue. Submit an issue on GitHub against PeerVue to notify me of the problem and name of instance and I will investigate it. 55 | -------------------------------------------------------------------------------- /LICENSES/Apache-2.0.txt: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, 10 | reproduction, and distribution as defined by Sections 1 11 | through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity 14 | authorized by the copyright owner that is granting the 15 | License. 16 | 17 | "Legal Entity" shall mean the union of the acting entity and 18 | all other entities that control, are controlled by, or are 19 | under common control with that entity. For the purposes of 20 | this definition, "control" means (i) the power, direct or 21 | indirect, to cause the direction or management of such 22 | entity, whether by contract or otherwise, or (ii) ownership 23 | of fifty percent (50%) or more of the outstanding shares, or 24 | (iii) beneficial ownership of such entity. 25 | 26 | "You" (or "Your") shall mean an individual or Legal Entity 27 | exercising permissions granted by this License. 28 | 29 | "Source" form shall mean the preferred form for making 30 | modifications, including but not limited to software source 31 | code, documentation source, and configuration files. 32 | 33 | "Object" form shall mean any form resulting from mechanical 34 | transformation or translation of a Source form, including 35 | but not limited to compiled object code, generated 36 | documentation, and conversions to other media types. 37 | 38 | "Work" shall mean the work of authorship, whether in Source 39 | or Object form, made available under the License, as 40 | indicated by a copyright notice that is included in or 41 | attached to the work (an example is provided in the Appendix 42 | below). 43 | 44 | "Derivative Works" shall mean any work, whether in Source or 45 | Object form, that is based on (or derived from) the Work and 46 | for which the editorial revisions, annotations, 47 | elaborations, or other modifications represent, as a whole, 48 | an original work of authorship. For the purposes of this 49 | License, Derivative Works shall not include works that 50 | remain separable from, or merely link (or bind by name) to 51 | the interfaces of, the Work and Derivative Works thereof. 52 | 53 | "Contribution" shall mean any work of authorship, including 54 | the original version of the Work and any modifications or 55 | additions to that Work or Derivative Works thereof, that is 56 | intentionally submitted to Licensor for inclusion in the 57 | Work by the copyright owner or by an individual or Legal 58 | Entity authorized to submit on behalf of the copyright 59 | owner. For the purposes of this definition, "submitted" 60 | means any form of electronic, verbal, or written 61 | communication sent to the Licensor or its representatives, 62 | including but not limited to communication on electronic 63 | mailing lists, source code control systems, and issue 64 | tracking systems that are managed by, or on behalf of, the 65 | Licensor for the purpose of discussing and improving the 66 | Work, but excluding communication that is conspicuously 67 | marked or otherwise designated in writing by the copyright 68 | owner as "Not a Contribution." 69 | 70 | "Contributor" shall mean Licensor and any individual or 71 | Legal Entity on behalf of whom a Contribution has been 72 | received by Licensor and subsequently incorporated within 73 | the Work. 74 | 2. Grant of Copyright License. Subject to the terms and 75 | conditions of this License, each Contributor hereby grants to 76 | You a perpetual, worldwide, non-exclusive, no-charge, 77 | royalty-free, irrevocable copyright license to reproduce, 78 | prepare Derivative Works of, publicly display, publicly 79 | perform, sublicense, and distribute the Work and such 80 | Derivative Works in Source or Object form. 81 | 3. Grant of Patent License. Subject to the terms and conditions 82 | of this License, each Contributor hereby grants to You a 83 | perpetual, worldwide, non-exclusive, no-charge, royalty-free, 84 | irrevocable (except as stated in this section) patent license 85 | to make, have made, use, offer to sell, sell, import, and 86 | otherwise transfer the Work, where such license applies only 87 | to those patent claims licensable by such Contributor that 88 | are necessarily infringed by their Contribution(s) alone or 89 | by combination of their Contribution(s) with the Work to 90 | which such Contribution(s) was submitted. If You institute 91 | patent litigation against any entity (including a cross-claim 92 | or counterclaim in a lawsuit) alleging that the Work or a 93 | Contribution incorporated within the Work constitutes direct 94 | or contributory patent infringement, then any patent licenses 95 | granted to You under this License for that Work shall 96 | terminate as of the date such litigation is filed. 97 | 4. Redistribution. You may reproduce and distribute copies of 98 | the Work or Derivative Works thereof in any medium, with or 99 | without modifications, and in Source or Object form, provided 100 | that You meet the following conditions: 101 | (a) You must give any other recipients of the Work or 102 | Derivative Works a copy of this License; and 103 | (b) You must cause any modified files to carry prominent 104 | notices stating that You changed the files; and 105 | (c) You must retain, in the Source form of any Derivative 106 | Works that You distribute, all copyright, patent, 107 | trademark, and attribution notices from the Source form 108 | of the Work, excluding those notices that do not pertain 109 | to any part of the Derivative Works; and 110 | (d) If the Work includes a "NOTICE" text file as part of its 111 | distribution, then any Derivative Works that You 112 | distribute must include a readable copy of the 113 | attribution notices contained within such NOTICE file, 114 | excluding those notices that do not pertain to any part 115 | of the Derivative Works, in at least one of the 116 | following places: within a NOTICE text file distributed 117 | as part of the Derivative Works; within the Source form 118 | or documentation, if provided along with the Derivative 119 | Works; or, within a display generated by the Derivative 120 | Works, if and wherever such third-party notices normally 121 | appear. The contents of the NOTICE file are for 122 | informational purposes only and do not modify the 123 | License. You may add Your own attribution notices within 124 | Derivative Works that You distribute, alongside or as an 125 | addendum to the NOTICE text from the Work, provided that 126 | such additional attribution notices cannot be construed 127 | as modifying the License. 128 | 129 | You may add Your own copyright statement to Your 130 | modifications and may provide additional or different 131 | license terms and conditions for use, reproduction, or 132 | distribution of Your modifications, or for any such 133 | Derivative Works as a whole, provided Your use, 134 | reproduction, and distribution of the Work otherwise 135 | complies with the conditions stated in this License. 136 | 5. Submission of Contributions. Unless You explicitly state 137 | otherwise, any Contribution intentionally submitted for 138 | inclusion in the Work by You to the Licensor shall be under 139 | the terms and conditions of this License, without any 140 | additional terms or conditions. Notwithstanding the above, 141 | nothing herein shall supersede or modify the terms of any 142 | separate license agreement you may have executed with 143 | Licensor regarding such Contributions. 144 | 6. Trademarks. This License does not grant permission to use the 145 | trade names, trademarks, service marks, or product names of 146 | the Licensor, except as required for reasonable and customary 147 | use in describing the origin of the Work and reproducing the 148 | content of the NOTICE file. 149 | 7. Disclaimer of Warranty. Unless required by applicable law or 150 | agreed to in writing, Licensor provides the Work (and each 151 | Contributor provides its Contributions) on an "AS IS" BASIS, 152 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 153 | or implied, including, without limitation, any warranties or 154 | conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or 155 | FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible 156 | for determining the appropriateness of using or 157 | redistributing the Work and assume any risks associated with 158 | Your exercise of permissions under this License. 159 | 8. Limitation of Liability. In no event and under no legal 160 | theory, whether in tort (including negligence), contract, or 161 | otherwise, unless required by applicable law (such as 162 | deliberate and grossly negligent acts) or agreed to in 163 | writing, shall any Contributor be liable to You for damages, 164 | including any direct, indirect, special, incidental, or 165 | consequential damages of any character arising as a result of 166 | this License or out of the use or inability to use the Work 167 | (including but not limited to damages for loss of goodwill, 168 | work stoppage, computer failure or malfunction, or any and 169 | all other commercial damages or losses), even if such 170 | Contributor has been advised of the possibility of such 171 | damages. 172 | 9. Accepting Warranty or Additional Liability. While 173 | redistributing the Work or Derivative Works thereof, You may 174 | choose to offer, and charge a fee for, acceptance of support, 175 | warranty, indemnity, or other liability obligations and/or 176 | rights consistent with this License. However, in accepting 177 | such obligations, You may act only on Your own behalf and on 178 | Your sole responsibility, not on behalf of any other 179 | Contributor, and only if You agree to indemnify, defend, and 180 | hold each Contributor harmless for any liability incurred by, 181 | or claims asserted against, such Contributor by reason of 182 | your accepting any such warranty or additional liability. 183 | 184 | -------------------------------------------------------------------------------- /LICENSES/GPL-2.0-only.txt: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {{description}} 294 | Copyright (C) {{year}} {{fullname}} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /LICENSES/GPL-3.0-only.txt: -------------------------------------------------------------------------------- 1 | 2 | GNU GENERAL PUBLIC LICENSE 3 | 4 | Version 3, 29 June 2007 5 | 6 | Copyright © 2007 Free Software Foundation, Inc. 7 | 8 | Everyone is permitted to copy and distribute verbatim copies of this 9 | license document, but changing it is not allowed. Preamble 10 | 11 | The GNU General Public License is a free, copyleft license for 12 | software and other kinds of works. 13 | 14 | The licenses for most software and other practical works are 15 | designed to take away your freedom to share and change the works. By 16 | contrast, the GNU General Public License is intended to guarantee 17 | your freedom to share and change all versions of a program--to make 18 | sure it remains free software for all its users. We, the Free 19 | Software Foundation, use the GNU General Public License for most of 20 | our software; it applies also to any other work released this way by 21 | its authors. You can apply it to your programs, too. 22 | 23 | When we speak of free software, we are referring to freedom, not 24 | price. Our General Public Licenses are designed to make sure that 25 | you have the freedom to distribute copies of free software (and 26 | charge for them if you wish), that you receive source code or can 27 | get it if you want it, that you can change the software or use 28 | pieces of it in new free programs, and that you know you can do 29 | these things. 30 | 31 | To protect your rights, we need to prevent others from denying you 32 | these rights or asking you to surrender the rights. Therefore, you 33 | have certain responsibilities if you distribute copies of the 34 | software, or if you modify it: responsibilities to respect the 35 | freedom of others. 36 | 37 | For example, if you distribute copies of such a program, whether 38 | gratis or for a fee, you must pass on to the recipients the same 39 | freedoms that you received. You must make sure that they, too, 40 | receive or can get the source code. And you must show them these 41 | terms so they know their rights. 42 | 43 | Developers that use the GNU GPL protect your rights with two steps: 44 | (1) assert copyright on the software, and (2) offer you this License 45 | giving you legal permission to copy, distribute and/or modify it. 46 | 47 | For the developers' and authors' protection, the GPL clearly 48 | explains that there is no warranty for this free software. For both 49 | users' and authors' sake, the GPL requires that modified versions be 50 | marked as changed, so that their problems will not be attributed 51 | erroneously to authors of previous versions. 52 | 53 | Some devices are designed to deny users access to install or run 54 | modified versions of the software inside them, although the 55 | manufacturer can do so. This is fundamentally incompatible with the 56 | aim of protecting users' freedom to change the software. The 57 | systematic pattern of such abuse occurs in the area of products for 58 | individuals to use, which is precisely where it is most 59 | unacceptable. Therefore, we have designed this version of the GPL to 60 | prohibit the practice for those products. If such problems arise 61 | substantially in other domains, we stand ready to extend this 62 | provision to those domains in future versions of the GPL, as needed 63 | to protect the freedom of users. 64 | 65 | Finally, every program is threatened constantly by software patents. 66 | States should not allow patents to restrict development and use of 67 | software on general-purpose computers, but in those that do, we wish 68 | to avoid the special danger that patents applied to a free program 69 | could make it effectively proprietary. To prevent this, the GPL 70 | assures that patents cannot be used to render the program non-free. 71 | 72 | The precise terms and conditions for copying, distribution and modification follow. 73 | TERMS AND CONDITIONS 74 | 0. Definitions. 75 | 76 | “This License” refers to version 3 of the GNU General Public 77 | License. 78 | 79 | “Copyright” also means copyright-like laws that apply to other kinds 80 | of works, such as semiconductor masks. 81 | 82 | “The Program” refers to any copyrightable work licensed under this 83 | License. Each licensee is addressed as “you”. “Licensees” and 84 | “recipients” may be individuals or organizations. 85 | 86 | To “modify” a work means to copy from or adapt all or part of the 87 | work in a fashion requiring copyright permission, other than the 88 | making of an exact copy. The resulting work is called a “modified 89 | version” of the earlier work or a work “based on” the earlier work. 90 | 91 | A “covered work” means either the unmodified Program or a work based 92 | on the Program. 93 | 94 | To “propagate” a work means to do anything with it that, without 95 | permission, would make you directly or secondarily liable for 96 | infringement under applicable copyright law, except executing it on 97 | a computer or modifying a private copy. Propagation includes 98 | copying, distribution (with or without modification), making 99 | available to the public, and in some countries other activities as 100 | well. 101 | 102 | To “convey” a work means any kind of propagation that enables other 103 | parties to make or receive copies. Mere interaction with a user 104 | through a computer network, with no transfer of a copy, is not 105 | conveying. 106 | 107 | An interactive user interface displays “Appropriate Legal Notices” 108 | to the extent that it includes a convenient and prominently visible 109 | feature that (1) displays an appropriate copyright notice, and (2) 110 | tells the user that there is no warranty for the work (except to the 111 | extent that warranties are provided), that licensees may convey the 112 | work under this License, and how to view a copy of this License. If 113 | the interface presents a list of user commands or options, such as a 114 | menu, a prominent item in the list meets this criterion. 115 | 1. Source Code. 116 | 117 | The “source code” for a work means the preferred form of the work 118 | for making modifications to it. “Object code” means any non-source 119 | form of a work. 120 | 121 | A “Standard Interface” means an interface that either is an official 122 | standard defined by a recognized standards body, or, in the case of 123 | interfaces specified for a particular programming language, one that 124 | is widely used among developers working in that language. 125 | 126 | The “System Libraries” of an executable work include anything, other 127 | than the work as a whole, that (a) is included in the normal form of 128 | packaging a Major Component, but which is not part of that Major 129 | Component, and (b) serves only to enable use of the work with that 130 | Major Component, or to implement a Standard Interface for which an 131 | implementation is available to the public in source code form. A 132 | “Major Component”, in this context, means a major essential 133 | component (kernel, window system, and so on) of the specific 134 | operating system (if any) on which the executable work runs, or a 135 | compiler used to produce the work, or an object code interpreter 136 | used to run it. 137 | 138 | The “Corresponding Source” for a work in object code form means all 139 | the source code needed to generate, install, and (for an executable 140 | work) run the object code and to modify the work, including scripts 141 | to control those activities. However, it does not include the work's 142 | System Libraries, or general-purpose tools or generally available 143 | free programs which are used unmodified in performing those 144 | activities but which are not part of the work. For example, 145 | Corresponding Source includes interface definition files associated 146 | with source files for the work, and the source code for shared 147 | libraries and dynamically linked subprograms that the work is 148 | specifically designed to require, such as by intimate data 149 | communication or control flow between those subprograms and other 150 | parts of the work. 151 | 152 | The Corresponding Source need not include anything that users can 153 | regenerate automatically from other parts of the Corresponding 154 | Source. 155 | 156 | The Corresponding Source for a work in source code form is that same 157 | work. 158 | 2. Basic Permissions. 159 | 160 | All rights granted under this License are granted for the term of 161 | copyright on the Program, and are irrevocable provided the stated 162 | conditions are met. This License explicitly affirms your unlimited 163 | permission to run the unmodified Program. The output from running a 164 | covered work is covered by this License only if the output, given 165 | its content, constitutes a covered work. This License acknowledges 166 | your rights of fair use or other equivalent, as provided by 167 | copyright law. 168 | 169 | You may make, run and propagate covered works that you do not 170 | convey, without conditions so long as your license otherwise remains 171 | in force. You may convey covered works to others for the sole 172 | purpose of having them make modifications exclusively for you, or 173 | provide you with facilities for running those works, provided that 174 | you comply with the terms of this License in conveying all material 175 | for which you do not control copyright. Those thus making or running 176 | the covered works for you must do so exclusively on your behalf, 177 | under your direction and control, on terms that prohibit them from 178 | making any copies of your copyrighted material outside their 179 | relationship with you. 180 | 181 | Conveying under any other circumstances is permitted solely under 182 | the conditions stated below. Sublicensing is not allowed; section 10 183 | makes it unnecessary. 184 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 185 | 186 | No covered work shall be deemed part of an effective technological 187 | measure under any applicable law fulfilling obligations under 188 | article 11 of the WIPO copyright treaty adopted on 20 December 1996, 189 | or similar laws prohibiting or restricting circumvention of such 190 | measures. 191 | 192 | When you convey a covered work, you waive any legal power to forbid 193 | circumvention of technological measures to the extent such 194 | circumvention is effected by exercising rights under this License 195 | with respect to the covered work, and you disclaim any intention to 196 | limit operation or modification of the work as a means of enforcing, 197 | against the work's users, your or third parties' legal rights to 198 | forbid circumvention of technological measures. 199 | 4. Conveying Verbatim Copies. 200 | 201 | You may convey verbatim copies of the Program's source code as you 202 | receive it, in any medium, provided that you conspicuously and 203 | appropriately publish on each copy an appropriate copyright notice; 204 | keep intact all notices stating that this License and any 205 | non-permissive terms added in accord with section 7 apply to the 206 | code; keep intact all notices of the absence of any warranty; and 207 | give all recipients a copy of this License along with the Program. 208 | 209 | You may charge any price or no price for each copy that you convey, 210 | and you may offer support or warranty protection for a fee. 211 | 5. Conveying Modified Source Versions. 212 | 213 | You may convey a work based on the Program, or the modifications to 214 | produce it from the Program, in the form of source code under the 215 | terms of section 4, provided that you also meet all of these 216 | conditions: 217 | 218 | a) The work must carry prominent notices stating that you 219 | modified it, and giving a relevant date. 220 | b) The work must carry prominent notices stating that it is 221 | released under this License and any conditions added under 222 | section 7. This requirement modifies the requirement in section 223 | 4 to “keep intact all notices”. 224 | c) You must license the entire work, as a whole, under this 225 | License to anyone who comes into possession of a copy. This 226 | License will therefore apply, along with any applicable section 227 | 7 additional terms, to the whole of the work, and all its parts, 228 | regardless of how they are packaged. This License gives no 229 | permission to license the work in any other way, but it does not 230 | invalidate such permission if you have separately received it. 231 | d) If the work has interactive user interfaces, each must 232 | display Appropriate Legal Notices; however, if the Program has 233 | interactive interfaces that do not display Appropriate Legal 234 | Notices, your work need not make them do so. 235 | 236 | A compilation of a covered work with other separate and independent 237 | works, which are not by their nature extensions of the covered work, 238 | and which are not combined with it such as to form a larger program, 239 | in or on a volume of a storage or distribution medium, is called an 240 | “aggregate” if the compilation and its resulting copyright are not 241 | used to limit the access or legal rights of the compilation's users 242 | beyond what the individual works permit. Inclusion of a covered work 243 | in an aggregate does not cause this License to apply to the other 244 | parts of the aggregate. 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms of 248 | sections 4 and 5, provided that you also convey the machine-readable 249 | Corresponding Source under the terms of this License, in one of 250 | these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | b) Convey the object code in, or embodied in, a physical product 257 | (including a physical distribution medium), accompanied by a 258 | written offer, valid for at least three years and valid for as 259 | long as you offer spare parts or customer support for that 260 | product model, to give anyone who possesses the object code 261 | either (1) a copy of the Corresponding Source for all the 262 | software in the product that is covered by this License, on a 263 | durable physical medium customarily used for software 264 | interchange, for a price no more than your reasonable cost of 265 | physically performing this conveying of source, or (2) access to 266 | copy the Corresponding Source from a network server at no 267 | charge. 268 | c) Convey individual copies of the object code with a copy of 269 | the written offer to provide the Corresponding Source. This 270 | alternative is allowed only occasionally and noncommercially, 271 | and only if you received the object code with such an offer, in 272 | accord with subsection 6b. 273 | d) Convey the object code by offering access from a designated 274 | place (gratis or for a charge), and offer equivalent access to 275 | the Corresponding Source in the same way through the same place 276 | at no further charge. You need not require recipients to copy 277 | the Corresponding Source along with the object code. If the 278 | place to copy the object code is a network server, the 279 | Corresponding Source may be on a different server (operated by 280 | you or a third party) that supports equivalent copying 281 | facilities, provided you maintain clear directions next to the 282 | object code saying where to find the Corresponding Source. 283 | Regardless of what server hosts the Corresponding Source, you 284 | remain obligated to ensure that it is available for as long as 285 | needed to satisfy these requirements. 286 | e) Convey the object code using peer-to-peer transmission, 287 | provided you inform other peers where the object code and 288 | Corresponding Source of the work are being offered to the 289 | general public at no charge under subsection 6d. 290 | 291 | A separable portion of the object code, whose source code is 292 | excluded from the Corresponding Source as a System Library, need not 293 | be included in conveying the object code work. 294 | 295 | A “User Product” is either (1) a “consumer product”, which means any 296 | tangible personal property which is normally used for personal, 297 | family, or household purposes, or (2) anything designed or sold for 298 | incorporation into a dwelling. In determining whether a product is a 299 | consumer product, doubtful cases shall be resolved in favor of 300 | coverage. For a particular product received by a particular user, 301 | “normally used” refers to a typical or common use of that class of 302 | product, regardless of the status of the particular user or of the 303 | way in which the particular user actually uses, or expects or is 304 | expected to use, the product. A product is a consumer product 305 | regardless of whether the product has substantial commercial, 306 | industrial or non-consumer uses, unless such uses represent the only 307 | significant mode of use of the product. 308 | 309 | “Installation Information” for a User Product means any methods, 310 | procedures, authorization keys, or other information required to 311 | install and execute modified versions of a covered work in that User 312 | Product from a modified version of its Corresponding Source. The 313 | information must suffice to ensure that the continued functioning of 314 | the modified object code is in no case prevented or interfered with 315 | solely because modification has been made. 316 | 317 | If you convey an object code work under this section in, or with, or 318 | specifically for use in, a User Product, and the conveying occurs as 319 | part of a transaction in which the right of possession and use of 320 | the User Product is transferred to the recipient in perpetuity or 321 | for a fixed term (regardless of how the transaction is 322 | characterized), the Corresponding Source conveyed under this section 323 | must be accompanied by the Installation Information. But this 324 | requirement does not apply if neither you nor any third party 325 | retains the ability to install modified object code on the User 326 | Product (for example, the work has been installed in ROM). 327 | 328 | The requirement to provide Installation Information does not include 329 | a requirement to continue to provide support service, warranty, or 330 | updates for a work that has been modified or installed by the 331 | recipient, or for the User Product in which it has been modified or 332 | installed. Access to a network may be denied when the modification 333 | itself materially and adversely affects the operation of the network 334 | or violates the rules and protocols for communication across the 335 | network. 336 | 337 | Corresponding Source conveyed, and Installation Information 338 | provided, in accord with this section must be in a format that is 339 | publicly documented (and with an implementation available to the 340 | public in source code form), and must require no special password or 341 | key for unpacking, reading or copying. 342 | 7. Additional Terms. 343 | 344 | “Additional permissions” are terms that supplement the terms of this 345 | License by making exceptions from one or more of its conditions. 346 | Additional permissions that are applicable to the entire Program 347 | shall be treated as though they were included in this License, to 348 | the extent that they are valid under applicable law. If additional 349 | permissions apply only to part of the Program, that part may be used 350 | separately under those permissions, but the entire Program remains 351 | governed by this License without regard to the additional 352 | permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part 356 | of it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material 362 | you add to a covered work, you may (if authorized by the copyright 363 | holders of that material) supplement the terms of this License with 364 | terms: 365 | 366 | a) Disclaiming warranty or limiting liability differently from 367 | the terms of sections 15 and 16 of this License; or 368 | b) Requiring preservation of specified reasonable legal notices 369 | or author attributions in that material or in the Appropriate 370 | Legal Notices displayed by works containing it; or 371 | c) Prohibiting misrepresentation of the origin of that material, 372 | or requiring that modified versions of such material be marked 373 | in reasonable ways as different from the original version; or 374 | d) Limiting the use for publicity purposes of names of licensors 375 | or authors of the material; or 376 | e) Declining to grant rights under trademark law for use of some 377 | trade names, trademarks, or service marks; or 378 | f) Requiring indemnification of licensors and authors of that 379 | material by anyone who conveys the material (or modified 380 | versions of it) with contractual assumptions of liability to the 381 | recipient, for any liability that these contractual assumptions 382 | directly impose on those licensors and authors. 383 | 384 | All other non-permissive additional terms are considered “further 385 | restrictions” within the meaning of section 10. If the Program as 386 | you received it, or any part of it, contains a notice stating that 387 | it is governed by this License along with a term that is a further 388 | restriction, you may remove that term. If a license document 389 | contains a further restriction but permits relicensing or conveying 390 | under this License, you may add to a covered work material governed 391 | by the terms of that license document, provided that the further 392 | restriction does not survive such relicensing or conveying. 393 | 394 | If you add terms to a covered work in accord with this section, you 395 | must place, in the relevant source files, a statement of the 396 | additional terms that apply to those files, or a notice indicating 397 | where to find the applicable terms. 398 | 399 | Additional terms, permissive or non-permissive, may be stated in the 400 | form of a separately written license, or stated as exceptions; the 401 | above requirements apply either way. 402 | 8. Termination. 403 | 404 | You may not propagate or modify a covered work except as expressly 405 | provided under this License. Any attempt otherwise to propagate or 406 | modify it is void, and will automatically terminate your rights 407 | under this License (including any patent licenses granted under the 408 | third paragraph of section 11). 409 | 410 | However, if you cease all violation of this License, then your 411 | license from a particular copyright holder is reinstated (a) 412 | provisionally, unless and until the copyright holder explicitly and 413 | finally terminates your license, and (b) permanently, if the 414 | copyright holder fails to notify you of the violation by some 415 | reasonable means prior to 60 days after the cessation. 416 | 417 | Moreover, your license from a particular copyright holder is 418 | reinstated permanently if the copyright holder notifies you of the 419 | violation by some reasonable means, this is the first time you have 420 | received notice of violation of this License (for any work) from 421 | that copyright holder, and you cure the violation prior to 30 days 422 | after your receipt of the notice. 423 | 424 | Termination of your rights under this section does not terminate the 425 | licenses of parties who have received copies or rights from you 426 | under this License. If your rights have been terminated and not 427 | permanently reinstated, you do not qualify to receive new licenses 428 | for the same material under section 10. 429 | 9. Acceptance Not Required for Having Copies. 430 | 431 | You are not required to accept this License in order to receive or 432 | run a copy of the Program. Ancillary propagation of a covered work 433 | occurring solely as a consequence of using peer-to-peer transmission 434 | to receive a copy likewise does not require acceptance. However, 435 | nothing other than this License grants you permission to propagate 436 | or modify any covered work. These actions infringe copyright if you 437 | do not accept this License. Therefore, by modifying or propagating a 438 | covered work, you indicate your acceptance of this License to do so. 439 | 10. Automatic Licensing of Downstream Recipients. 440 | 441 | Each time you convey a covered work, the recipient automatically 442 | receives a license from the original licensors, to run, modify and 443 | propagate that work, subject to this License. You are not 444 | responsible for enforcing compliance by third parties with this 445 | License. 446 | 447 | An “entity transaction” is a transaction transferring control of an 448 | organization, or substantially all assets of one, or subdividing an 449 | organization, or merging organizations. If propagation of a covered 450 | work results from an entity transaction, each party to that 451 | transaction who receives a copy of the work also receives whatever 452 | licenses to the work the party's predecessor in interest had or 453 | could give under the previous paragraph, plus a right to possession 454 | of the Corresponding Source of the work from the predecessor in 455 | interest, if the predecessor has it or can get it with reasonable 456 | efforts. 457 | 458 | You may not impose any further restrictions on the exercise of the 459 | rights granted or affirmed under this License. For example, you may 460 | not impose a license fee, royalty, or other charge for exercise of 461 | rights granted under this License, and you may not initiate 462 | litigation (including a cross-claim or counterclaim in a lawsuit) 463 | alleging that any patent claim is infringed by making, using, 464 | selling, offering for sale, or importing the Program or any portion 465 | of it. 466 | 11. Patents. 467 | 468 | A “contributor” is a copyright holder who authorizes use under this 469 | License of the Program or a work on which the Program is based. The 470 | work thus licensed is called the contributor's “contributor 471 | version”. 472 | 473 | A contributor's “essential patent claims” are all patent claims 474 | owned or controlled by the contributor, whether already acquired or 475 | hereafter acquired, that would be infringed by some manner, 476 | permitted by this License, of making, using, or selling its 477 | contributor version, but do not include claims that would be 478 | infringed only as a consequence of further modification of the 479 | contributor version. For purposes of this definition, “control” 480 | includes the right to grant patent sublicenses in a manner 481 | consistent with the requirements of this License. 482 | 483 | Each contributor grants you a non-exclusive, worldwide, royalty-free 484 | patent license under the contributor's essential patent claims, to 485 | make, use, sell, offer for sale, import and otherwise run, modify 486 | and propagate the contents of its contributor version. 487 | 488 | In the following three paragraphs, a “patent license” is any express 489 | agreement or commitment, however denominated, not to enforce a 490 | patent (such as an express permission to practice a patent or 491 | covenant not to sue for patent infringement). To “grant” such a 492 | patent license to a party means to make such an agreement or 493 | commitment not to enforce a patent against the party. 494 | 495 | If you convey a covered work, knowingly relying on a patent license, 496 | and the Corresponding Source of the work is not available for anyone 497 | to copy, free of charge and under the terms of this License, through 498 | a publicly available network server or other readily accessible 499 | means, then you must either (1) cause the Corresponding Source to be 500 | so available, or (2) arrange to deprive yourself of the benefit of 501 | the patent license for this particular work, or (3) arrange, in a 502 | manner consistent with the requirements of this License, to extend 503 | the patent license to downstream recipients. “Knowingly relying” 504 | means you have actual knowledge that, but for the patent license, 505 | your conveying the covered work in a country, or your recipient's 506 | use of the covered work in a country, would infringe one or more 507 | identifiable patents in that country that you have reason to believe 508 | are valid. 509 | 510 | If, pursuant to or in connection with a single transaction or 511 | arrangement, you convey, or propagate by procuring conveyance of, a 512 | covered work, and grant a patent license to some of the parties 513 | receiving the covered work authorizing them to use, propagate, 514 | modify or convey a specific copy of the covered work, then the 515 | patent license you grant is automatically extended to all recipients 516 | of the covered work and works based on it. 517 | 518 | A patent license is “discriminatory” if it does not include within 519 | the scope of its coverage, prohibits the exercise of, or is 520 | conditioned on the non-exercise of one or more of the rights that 521 | are specifically granted under this License. You may not convey a 522 | covered work if you are a party to an arrangement with a third party 523 | that is in the business of distributing software, under which you 524 | make payment to the third party based on the extent of your activity 525 | of conveying the work, and under which the third party grants, to 526 | any of the parties who would receive the covered work from you, a 527 | discriminatory patent license (a) in connection with copies of the 528 | covered work conveyed by you (or copies made from those copies), or 529 | (b) primarily for and in connection with specific products or 530 | compilations that contain the covered work, unless you entered into 531 | that arrangement, or that patent license was granted, prior to 28 532 | March 2007. 533 | 534 | Nothing in this License shall be construed as excluding or limiting 535 | any implied license or other defenses to infringement that may 536 | otherwise be available to you under applicable patent law. 537 | 12. No Surrender of Others' Freedom. 538 | 539 | If conditions are imposed on you (whether by court order, agreement 540 | or otherwise) that contradict the conditions of this License, they 541 | do not excuse you from the conditions of this License. If you cannot 542 | convey a covered work so as to satisfy simultaneously your 543 | obligations under this License and any other pertinent obligations, 544 | then as a consequence you may not convey it at all. For example, if 545 | you agree to terms that obligate you to collect a royalty for 546 | further conveying from those to whom you convey the Program, the 547 | only way you could satisfy both those terms and this License would 548 | be to refrain entirely from conveying the Program. 549 | 13. Use with the GNU Affero General Public License. 550 | 551 | Notwithstanding any other provision of this License, you have 552 | permission to link or combine any covered work with a work licensed 553 | under version 3 of the GNU Affero General Public License into a 554 | single combined work, and to convey the resulting work. The terms of 555 | this License will continue to apply to the part which is the covered 556 | work, but the special requirements of the GNU Affero General Public 557 | License, section 13, concerning interaction through a network will 558 | apply to the combination as such. 559 | 14. Revised Versions of this License. 560 | 561 | The Free Software Foundation may publish revised and/or new versions 562 | of the GNU General Public License from time to time. Such new 563 | versions will be similar in spirit to the present version, but may 564 | differ in detail to address new problems or concerns. 565 | 566 | Each version is given a distinguishing version number. If the 567 | Program specifies that a certain numbered version of the GNU General 568 | Public License “or any later version” applies to it, you have the 569 | option of following the terms and conditions either of that numbered 570 | version or of any later version published by the Free Software 571 | Foundation. If the Program does not specify a version number of the 572 | GNU General Public License, you may choose any version ever 573 | published by the Free Software Foundation. 574 | 575 | If the Program specifies that a proxy can decide which future 576 | versions of the GNU General Public License can be used, that proxy's 577 | public statement of acceptance of a version permanently authorizes 578 | you to choose that version for the Program. 579 | 580 | Later license versions may give you additional or different 581 | permissions. However, no additional obligations are imposed on any 582 | author or copyright holder as a result of your choosing to follow a 583 | later version. 584 | 15. Disclaimer of Warranty. 585 | 586 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 587 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE 588 | COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” 589 | WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, 590 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 591 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE 592 | RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. 593 | SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL 594 | NECESSARY SERVICING, REPAIR OR CORRECTION. 595 | 16. Limitation of Liability. 596 | 597 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN 598 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES 599 | AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR 600 | DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL 601 | DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM 602 | (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED 603 | INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE 604 | OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH 605 | HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 606 | DAMAGES. 607 | 17. Interpretation of Sections 15 and 16. 608 | 609 | If the disclaimer of warranty and limitation of liability provided 610 | above cannot be given local legal effect according to their terms, 611 | reviewing courts shall apply local law that most closely 612 | approximates an absolute waiver of all civil liability in connection 613 | with the Program, unless a warranty or assumption of liability 614 | accompanies a copy of the Program in return for a fee. 615 | -------------------------------------------------------------------------------- /LICENSES/MIT.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation files 5 | (the "Software"), to deal in the Software without restriction, 6 | including without limitation the rights to use, copy, modify, merge, 7 | publish, distribute, sublicense, and/or sell copies of the Software, 8 | and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice (including the 12 | next paragraph) shall be included in all copies or substantial 13 | portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 19 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 20 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2020 Jellyfin Project https://github.com/jellyfin/jellyfin-roku 2 | # SPDX-FileCopyrightText: 2020 Tod Fitch 3 | # 4 | # SPDX-License-Identifier: GPL-2.0-only 5 | 6 | ######################################################################### 7 | # Makefile Usage: 8 | # > make test ' run all tests 9 | # > make testFailures ' run all tests and show only failures 10 | # 11 | # 1) Make sure that you have the curl command line executable in your path 12 | # 2) Set the variable ROKU_DEV_TARGET in your environment to the IP 13 | # address of your Roku box. (e.g. export ROKU_DEV_TARGET=192.168.1.1. 14 | # Set in your this variable in your shell startup (e.g. .bashrc) 15 | # 3) and set up the ROKU_DEV_PASSWORD environment variable, too 16 | ########################################################################## 17 | 18 | APPNAME = PeerVue 19 | VERSION = 0.0.1 20 | ROKU_TEST_ID = 1 21 | ROKU_TEST_WAIT_DURATION = 5 22 | 23 | ZIP_EXCLUDE= -x rooibos/**\* -x xml/* -x artwork/* -x \*.pkg -x storeassets\* -x keys\* -x \*/.\* -x *.git* -x *.DS* -x *.license -x *.pkg* -x dist/**\* -x out/**\* 24 | 25 | include app.mk 26 | 27 | test: prep_staging prep_tests remove install 28 | echo "Running tests" 29 | 30 | deploy: prep_staging remove install 31 | -------------------------------------------------------------------------------- /PRIVACY.md: -------------------------------------------------------------------------------- 1 | # PeerVue Privacy Policy 2 | 3 | PeerVue does not collect data and does not track those who install this channel. 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # PeerVue - A PeerTube channel for Roku 8 | 9 | 10 | 11 | This is a Roku “channel” that allows you to watch videos hosted on a PeerTube instance on your TV. 12 | 13 | ## Screenshots 14 | 15 | 16 | 17 | 18 | ## Have Questions? 19 | 20 | See the [FAQ page](FAQ.md). 21 | 22 | ## Getting Started 23 | 24 | If you simply wish to use the channel, add the [private channel code PEERVUE](https://my.roku.com/add/PEERVUE) to your Roku account. 25 | 26 | If you wish to help improve the channel, follow the developer steps below to install the app on your personal Roku device. 27 | 28 | ### Developer Mode 29 | 30 | Put your Roku device in [developer mode](https://blog.roku.com/developer/2016/02/04/developer-setup-guide). Write down your Roku device IP and the password you created, you will need these later. 31 | 32 | ### Clone the GitHub Repo 33 | 34 | Navigate to where you'd like to install the app then copy the application files: 35 | 36 | ```bash 37 | git clone https://github.com/n76/PeerVue.git 38 | ``` 39 | 40 | Open up the new folder: 41 | 42 | ```bash 43 | cd PeerVue 44 | ``` 45 | 46 | ### Install Necessary Packages 47 | 48 | ```bash 49 | sudo apt-get install wget make 50 | ``` 51 | 52 | ### Login Details 53 | 54 | Run this command - replacing the IP and password with your Roku device IP and dev password from the first step: 55 | 56 | ```bash 57 | export ROKU_DEV_TARGET=192.168.1.234 58 | export ROKU_DEV_PASSWORD=password 59 | ``` 60 | 61 | Normally you would have to open up your browser and upload a .zip file containing the app code. These commands enable the app to be zipped up and installed on the Roku automatically which is essential for developers and makes it easy to upgrade in the future for users. 62 | 63 | ### Deploy 64 | 65 | Package up the application, send it to your Roku, and launch the channel: 66 | 67 | ```bash 68 | make install 69 | ``` 70 | 71 | Note: You only have to run this command once if you are not a developer. The PeerVue channel will still be installed after rebooting your Roku device. 72 | 73 | ### Bug/Crash Reports 74 | 75 | Did the app crash? Find a nasty bug? Use the this command to view the error log and [report it to the developers](https://github.com/n76/PeerVue/issues): 76 | 77 | ```bash 78 | telnet ${ROKU_DEV_TARGET} 8085 79 | ``` 80 | 81 | To exit telnet: `CTRL + ]` and then type `quit + ENTER` 82 | 83 | ### Upgrade 84 | 85 | Navigate to the folder where you installed the app then upgrade the code to the latest version: 86 | 87 | ```bash 88 | git pull 89 | ``` 90 | 91 | Deploy the app: 92 | 93 | ```bash 94 | make install 95 | ``` 96 | 97 | ## Developer Setup 98 | 99 | Read below and also checkout the [Development Guide For New Devs](DEVGUIDE.md) 100 | 101 | ### Workflow 102 | 103 | Modify code -> `make install` -> Use Roku remote to test changes -> `telnet ${ROKU_DEV_TARGET} 8085` -> `CTRL + ]` -> `quit + ENTER` 104 | 105 | Unfortunately there is no debugger. You will need to use telnet to see log statements, warnings, and error reports. You won't always need to telnet into your device but the workflow above is typical when you are new to Brightscript or are working on tricky code. 106 | 107 | ## Improving PeerVue for Roku 108 | 109 | ### Internationalization 110 | 111 | All display strings used in this channel are from localized string files in JSON format. A complete set of string definitions is contained in locale/default/strings.json See the [Roku documentation](https://developer.roku.com/docs/developer-program/core-concepts/localization.md) for information about how localization is supported by the Roku device. In the case of PeerVue, creating or updating an appropriate locale/language/strings.json file where "language" is the Roku code for the language and country combination. 112 | 113 | Pull requests for language additions or corrections will be greatly appreciated. 114 | 115 | ### Customization 116 | 117 | The resources/config.json file contains number of configuration items. This includes the definitions of the queries used to display the default content. See the [PeerTube API documentation](https://docs.joinpeertube.org/api-rest-reference.html) details on the queries used. 118 | -------------------------------------------------------------------------------- /app.mk: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2020 Jellyfin Project https://github.com/jellyfin/jellyfin-roku 2 | # SPDX-FileCopyrightText: 2020 Tod Fitch 3 | # 4 | # SPDX-License-Identifier: GPL-2.0-only 5 | 6 | ######################################################################### 7 | # common include file for application Makefiles 8 | # 9 | # Makefile Common Usage: 10 | # > make 11 | # > make install 12 | # > make remove 13 | # 14 | # By default, ZIP_EXCLUDE will exclude -x \*.pkg -x storeassets\* -x keys\* -x .\* 15 | # If you define ZIP_EXCLUDE in your Makefile, it will override the default setting. 16 | # 17 | # To exclude different files from being added to the zipfile during packaging 18 | # include a line like this:ZIP_EXCLUDE= -x keys\* 19 | # that will exclude any file who's name begins with 'keys' 20 | # to exclude using more than one pattern use additional '-x ' arguments 21 | # ZIP_EXCLUDE= -x \*.pkg -x storeassets\* 22 | # 23 | # Important Notes: 24 | # To use the "install" and "remove" targets to install your 25 | # application directly from the shell, you must do the following: 26 | # 27 | # 1) Make sure that you have the curl command line executable in your path 28 | # 2) Set the variable ROKU_DEV_TARGET in your environment to the IP 29 | # address of your Roku box. (e.g. export ROKU_DEV_TARGET=192.168.1.1. 30 | # Set in your this variable in your shell startup (e.g. .bashrc) 31 | # 3) Set the variable ROKU_DEV_PASSWORD in your environment for the password 32 | # associated with the rokudev account. 33 | ########################################################################## 34 | DISTREL = $(shell pwd)/out 35 | COMMONREL ?= $(shell pwd)/common 36 | SOURCEREL = $(shell pwd) 37 | 38 | ZIPREL = $(DISTREL)/apps 39 | STAGINGREL = $(DISTREL)/staging 40 | PKGREL = $(DISTREL)/packages 41 | 42 | APPSOURCEDIR = source 43 | IMPORTFILES = $(foreach f,$(IMPORTS),$(COMMONREL)/$f.brs) 44 | IMPORTCLEANUP = $(foreach f,$(IMPORTS),$(APPSOURCEDIR)/$f.brs) 45 | 46 | GITCOMMIT = $(shell git rev-parse --short HEAD) 47 | BUILDDATE = $(shell date -u | awk '{ print $$2,$$3,$$6,$$4 }') 48 | BUILD_NUMBER_FILE=build-number.txt 49 | 50 | ifdef ROKU_DEV_PASSWORD 51 | USERPASS = rokudev:$(ROKU_DEV_PASSWORD) 52 | else 53 | USERPASS = rokudev 54 | endif 55 | 56 | ifndef ZIP_EXCLUDE 57 | ZIP_EXCLUDE= -x \*.pkg -x storeassets\* -x keys\* -x \*/.\* 58 | endif 59 | 60 | HTTPSTATUS = $(shell curl --silent --write-out "\n%{http_code}\n" $(ROKU_DEV_TARGET)) 61 | 62 | ifeq "$(HTTPSTATUS)" " 401" 63 | CURLCMD = curl -S --connect-timeout 2 --max-time 30 --retry 5 64 | else 65 | CURLCMD = curl -S --connect-timeout 2 --max-time 30 --retry 5 --user $(USERPASS) --digest 66 | endif 67 | 68 | home: 69 | @echo "Forcing roku to main menu screen $(ROKU_DEV_TARGET)..." 70 | curl -s -S -d '' http://$(ROKU_DEV_TARGET):8060/keypress/home 71 | sleep 2 72 | 73 | prep_staging: 74 | @echo "*** Preparing Staging Area ***" 75 | @echo " >> removing old application zip $(ZIPREL)/$(APPNAME).zip" 76 | @if [ -e "$(ZIPREL)/$(APPNAME).zip" ]; \ 77 | then \ 78 | rm $(ZIPREL)/$(APPNAME).zip; \ 79 | fi 80 | 81 | @echo " >> creating destination directory $(ZIPREL)" 82 | @if [ ! -d $(ZIPREL) ]; \ 83 | then \ 84 | mkdir -p $(ZIPREL); \ 85 | fi 86 | 87 | @echo " >> setting directory permissions for $(ZIPREL)" 88 | @if [ ! -w $(ZIPREL) ]; \ 89 | then \ 90 | chmod 755 $(ZIPREL); \ 91 | fi 92 | 93 | @echo " >> creating destination directory $(STAGINGREL)" 94 | @if [ -d $(STAGINGREL) ]; \ 95 | then \ 96 | find $(STAGINGREL) -delete; \ 97 | fi; \ 98 | mkdir -p $(STAGINGREL); \ 99 | chmod -R 755 $(STAGINGREL); \ 100 | 101 | echo " >> moving application to $(STAGINGREL)" 102 | cp -r $(SOURCEREL)/source $(STAGINGREL) 103 | cp -r $(SOURCEREL)/components $(STAGINGREL) 104 | cp -r $(SOURCEREL)/images $(STAGINGREL) 105 | cp -r $(SOURCEREL)/resources $(STAGINGREL) 106 | cp -r $(SOURCEREL)/locale $(STAGINGREL) 107 | cp -r $(SOURCEREL)/fonts $(STAGINGREL) 108 | cp $(SOURCEREL)/manifest $(STAGINGREL)/manifest 109 | 110 | package: prep_staging 111 | @echo "*** Creating $(APPNAME).zip ***" 112 | @echo " >> copying imports" 113 | @if [ "$(IMPORTFILES)" ]; \ 114 | then \ 115 | mkdir $(APPSOURCEDIR)/common; \ 116 | cp -f -p -v $(IMPORTFILES) $(APPSOURCEDIR)/common/; \ 117 | fi \ 118 | 119 | @echo " >> bumping build number" 120 | @if ! test -f $(BUILD_NUMBER_FILE); then echo 0 > $(BUILD_NUMBER_FILE); fi 121 | @echo $$(($$(cat $(BUILD_NUMBER_FILE)) + 1)) > $(BUILD_NUMBER_FILE) 122 | echo "build_version=$$(cat $(BUILD_NUMBER_FILE))" >> $(STAGINGREL)/manifest 123 | 124 | @echo " >> generating build info file" 125 | mkdir -p $(STAGINGREL)/$(APPSOURCEDIR) 126 | @if [ -e "$(STAGINGREL)/$(APPSOURCEDIR)/buildinfo.brs" ]; \ 127 | then \ 128 | rm $(STAGINGREL)/$(APPSOURCEDIR)/buildinfo.brs; \ 129 | fi 130 | echo " >> generating build info file";\ 131 | echo "Function BuildDate()" >> $(STAGINGREL)/$(APPSOURCEDIR)/buildinfo.brs 132 | echo " return \"${BUILDDATE}\"" >> $(STAGINGREL)/$(APPSOURCEDIR)/buildinfo.brs 133 | echo "End Function" >> $(STAGINGREL)/$(APPSOURCEDIR)/buildinfo.brs 134 | echo "Function BuildCommit()" >> $(STAGINGREL)/$(APPSOURCEDIR)/buildinfo.brs 135 | echo " return \"${GITCOMMIT}\"" >> $(STAGINGREL)/$(APPSOURCEDIR)/buildinfo.brs 136 | echo "End Function" >> $(STAGINGREL)/$(APPSOURCEDIR)/buildinfo.brs 137 | 138 | # zip .png files without compression 139 | # do not zip up any files ending with '~' 140 | @echo " >> creating application zip $(STAGINGREL)/../apps/$(APPNAME).zip" 141 | @if [ -d $(STAGINGREL) ]; \ 142 | then \ 143 | cd $(STAGINGREL); \ 144 | (zip -0 -r "../apps/$(APPNAME).zip" . -i \*.png $(ZIP_EXCLUDE)); \ 145 | (zip -9 -r "../apps/$(APPNAME).zip" . -x \*~ -x \*.png $(ZIP_EXCLUDE)); \ 146 | cd $(SOURCEREL);\ 147 | else \ 148 | echo "Source for $(APPNAME) not found at $(STAGINGREL)"; \ 149 | fi 150 | 151 | @if [ "$(IMPORTCLEANUP)" ]; \ 152 | then \ 153 | echo " >> deleting imports";\ 154 | rm -r -f $(APPSOURCEDIR)/common; \ 155 | fi \ 156 | 157 | @echo "*** packaging $(APPNAME) complete ***" 158 | 159 | prep_tests: 160 | @mkdir -p $(STAGINGREL)/components/tests/; \ 161 | mkdir -p $(STAGINGREL)/source/tests/; \ 162 | cp -r $(SOURCEREL)/tests/components/* $(STAGINGREL)/components/tests/;\ 163 | cp -r $(SOURCEREL)/tests/source/* $(STAGINGREL)/source/tests/;\ 164 | ./node_modules/.bin/rooibos-cli i tests/.rooibosrc.json 165 | 166 | install: prep_staging package home 167 | @echo "Installing $(APPNAME) to host $(ROKU_DEV_TARGET)" 168 | @$(CURLCMD) --user $(USERPASS) --digest -F "mysubmit=Install" -F "archive=@$(ZIPREL)/$(APPNAME).zip" -F "passwd=" http://$(ROKU_DEV_TARGET)/plugin_install | grep "//" | sed "s[[[" 169 | 170 | remove: 171 | @echo "Removing $(APPNAME) from host $(ROKU_DEV_TARGET)" 172 | @if [ "$(HTTPSTATUS)" == " 401" ]; \ 173 | then \ 174 | $(CURLCMD) --user $(USERPASS) --digest -F "mysubmit=Delete" -F "archive=" -F "passwd=" http://$(ROKU_DEV_TARGET)/plugin_install | grep "//" | sed "s[[[" ; \ 175 | else \ 176 | curl -s -S -F "mysubmit=Delete" -F "archive=" -F "passwd=" http://$(ROKU_DEV_TARGET)/plugin_install | grep "//" | sed "s[[[" ; \ 177 | fi 178 | 179 | screenshot: 180 | SCREENSHOT_TIME=`date "+%s"`; \ 181 | curl -m 1 -o screenshot.jpg --user $(USERPASS) --digest "http://$(ROKU_DEV_TARGET)/pkgs/dev.jpg?time=$$SCREENSHOT_TIME" -H 'Accept: image/png,image/*;q=0.8,*/*;q=0.5' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate' 182 | -------------------------------------------------------------------------------- /components/home_scene.brs: -------------------------------------------------------------------------------- 1 | ' SPDX-FileCopyrightText: 2020 Tod Fitch 2 | ' 3 | ' SPDX-License-Identifier: MIT 4 | 5 | ' 6 | ' Our content screen (and thus things shown in our details and 7 | ' video player) can be from either our configuration specified set 8 | ' of URLs or from URLs derived from a search term. 9 | ' 10 | ' We use the m.content_contains variable to keep track of what 11 | ' is in the content screen. Values are: 12 | ' 13 | ' "config_videos" - content contains video information from 14 | ' the URLs in our config.json file 15 | ' "search_videos" - content contains video information from 16 | ' our most recent search 17 | ' 18 | 19 | function init() 20 | ' 21 | ' Find all of our screens and components 22 | ' 23 | m.content_screen = m.top.findNode("content_screen") 24 | m.details_screen = m.top.findNode("details_screen") 25 | m.error_dialog = m.top.findNode("error_dialog") 26 | m.init_screen = m.top.findNode("MyInitDisplay") 27 | m.overhang = m.top.findNode("MyOverhang") 28 | m.search_screen = m.top.findNode("search_screen") 29 | m.server_setup = m.top.findNode("server_setup") 30 | m.sidebar = m.top.findNode("sidebar") 31 | m.videoplayer = m.top.findNode("videoplayer") 32 | 33 | m.content_contains = "config_videos" 34 | m.searchResultsReceived = false 35 | m.ConfigComplete = false 36 | m.search_task = invalid 37 | 38 | m.DeepLinkContentId = Invalid 39 | m.DeepLinkMediaType = Invalid 40 | 41 | initializeVideoPlayer() 42 | 43 | ' 44 | ' Setup all our observers 45 | ' 46 | m.details_screen.observeField("play_button_pressed", "onPlayButtonPressed") 47 | m.details_screen.observeField("related_button_pressed", "onRelatedButtonPressed") 48 | m.search_screen.observeField("enter_button_pressed","onSearchPressed") 49 | m.server_setup.observeField("enter_button_pressed", "onServerUpdatePressed") 50 | m.sidebar.observeField("selected_item", "onCategorySelected") 51 | m.top.observeField("rowItemSelected", "onRowItemSelected") 52 | m.sidebar.observeField("language_set", "onLanguageChanged") 53 | 54 | ' 55 | ' Flag that we need to send a launch complete signal beacon 56 | ' 57 | m.launchCompleteSent = false 58 | 59 | loadConfig() 60 | end function 61 | 62 | Function deepLink(mediaType, contentId) 63 | m.DeepLinkContentId = contentId 64 | m.DeepLinkMediaType = mediaType 65 | if (m.launchCompleteSent) 66 | startDeepLink() 67 | end if 68 | end function 69 | 70 | sub startDeepLink() 71 | ? "startDeepLink() mediaType = ";m.DeepLinkMediaType 72 | ? "startDeepLink() contendId = ";m.DeepLinkContentId 73 | loadDeepLinkVideoInfo(m.DeepLinkContentId) 74 | end sub 75 | 76 | sub pushContent() 77 | m.details_screen.callFunc("pushContent") 78 | m.content_screen.callFunc("pushContent") 79 | end sub 80 | 81 | sub popContent() as boolean 82 | m.details_screen.callFunc("popContent") 83 | return m.content_screen.callFunc("popContent") 84 | end sub 85 | 86 | sub setContentContains(newContains) 87 | if newContains = m.content_contains 88 | ? "[setContentContains] set to current value: ";m.content_contains 89 | else 90 | ' 91 | ' Changing modes, rewind content history stack 92 | ' 93 | while (popContent()) 94 | ? "[setContentContains] popping content stack" 95 | end while 96 | 97 | if newContains = "search_videos" 98 | m.content_contains = "search_videos" 99 | m.content_screen.callFunc("saveContent") 100 | else 101 | m.content_contains = "config_videos" 102 | m.content_screen.callFunc("restoreContent") 103 | end if 104 | end if 105 | end sub 106 | 107 | sub sendLaunchComplete() 108 | if m.launchCompleteSent = false 109 | m.launchCompleteSent = true 110 | m.top.signalBeacon("AppLaunchComplete") 111 | if (m.DeepLinkContentId <> Invalid) and (m.DeepLinkMediaType <> Invalid) 112 | startDeepLink() 113 | end if 114 | end if 115 | end sub 116 | 117 | ' Main Remote keypress handler 118 | function onKeyEvent(key, press) as Boolean 119 | ? "[home_scene] onKeyEvent", key, press 120 | handled = false 121 | 122 | if (press) 123 | if m.search_screen.visible and (key="back") 124 | setContentContains("config_videos") 125 | enterSideBar() 126 | m.search_screen.setFocus(false) 127 | m.sidebar.setFocus(true) 128 | handled = true 129 | else if m.server_setup.visible and (key="back") 130 | enterSideBar() 131 | m.server_setup.setFocus(false) 132 | m.sidebar.setFocus(true) 133 | handled = true 134 | else if m.sidebar.visible and ((key="right") or (key="back")) 135 | enterContentScreen() 136 | m.sidebar.setFocus(false) 137 | handled = true 138 | else if m.content_screen.visible 139 | if (key="left") 140 | enterSideBar() 141 | m.sidebar.setFocus(true) 142 | handled = true 143 | else if (key="back") 144 | rslt = popContent() 145 | ?"[home_scene] onKeyPress result from popContent: ";rslt 146 | if (rslt) 147 | enterDetailsScreen() 148 | handled = true 149 | else if (m.content_contains="search_videos") 150 | enterSearchScreen() 151 | m.search_screen.setFocus(true) 152 | handled = true 153 | end if 154 | end if 155 | else if m.details_screen.visible and (key="back") 156 | enterContentScreen() 157 | m.content_screen.setFocus(true) 158 | handled = true 159 | else if m.videoplayer.visible and (key="back") 160 | closeVideo() 161 | enterDetailsScreen() 162 | 163 | m.details_screen.setFocus(true) 164 | handled = true 165 | end if 166 | end if 167 | 168 | return handled 169 | end function 170 | 171 | sub enterContentScreen() 172 | m.content_screen.visible = true 173 | m.details_screen.visible = false 174 | m.init_screen.visible = false 175 | m.overhang.visible = true 176 | m.search_screen.visible = false 177 | m.server_setup.visible = false 178 | m.sidebar.visible = false 179 | m.videoplayer.visible = false 180 | end sub 181 | 182 | sub enterSideBar() 183 | m.content_screen.visible = false 184 | m.details_screen.visible = false 185 | m.init_screen.visible = false 186 | m.overhang.visible = true 187 | m.search_screen.visible = false 188 | m.server_setup.visible = false 189 | m.sidebar.visible = true 190 | m.videoplayer.visible = false 191 | end sub 192 | 193 | sub enterDetailsScreen() 194 | m.content_screen.visible = false 195 | m.details_screen.visible = true 196 | m.init_screen.visible = false 197 | m.overhang.visible = true 198 | m.search_screen.visible = false 199 | m.server_setup.visible = false 200 | m.sidebar.visible = false 201 | m.videoplayer.visible = false 202 | end sub 203 | 204 | sub enterSearchScreen() 205 | m.content_screen.visible = false 206 | m.details_screen.visible = false 207 | m.init_screen.visible = false 208 | m.overhang.visible = true 209 | m.search_screen.visible = true 210 | m.server_setup.visible = false 211 | m.sidebar.visible = false 212 | m.videoplayer.visible = false 213 | end sub 214 | 215 | sub enterServerSetupScreen() 216 | m.content_screen.visible = false 217 | m.details_screen.visible = false 218 | m.init_screen.visible = false 219 | m.overhang.visible = true 220 | m.search_screen.visible = false 221 | m.server_setup.visible = true 222 | m.sidebar.visible = false 223 | m.videoplayer.visible = false 224 | end sub 225 | 226 | sub onCategorySelected(obj) 227 | cat_type = obj.getData() 228 | if cat_type = "server" 229 | enterServerSetupScreen() 230 | else if cat_type = "search" 231 | if (m.ConfigComplete) 232 | enterSearchScreen() 233 | end if 234 | else if cat_type = "ignore" 235 | ? "[home_scene] ignored category type" 236 | else 237 | ? "Type not implemented: ";cat_type 238 | 'showErrorDialog(cat_type + " not yet implemented.") 239 | end if 240 | end sub 241 | 242 | sub OnRowItemSelected() 243 | item = m.content_screen.focusedContent 244 | loadVideoInfo(item.uuid) 245 | end sub 246 | 247 | sub onPlayButtonPressed(obj) 248 | m.details_screen.visible = false 249 | m.overhang.visible=false 250 | m.videoplayer.visible = true 251 | m.videoplayer.setFocus(true) 252 | 253 | ' 254 | ' The video player content has been set in the preBufferVideo() 255 | ' routine when we entered the details screen. So all we have to 256 | ' do is tell the player to start. 257 | ' 258 | m.videoplayer.control = "play" 259 | end sub 260 | 261 | sub onRelatedButtonPressed(obj) 262 | ' 263 | ' Only allow the search and related buttons to work if 264 | ' our full configuration including default video content 265 | ' has completed. Otherwise we start messing up the video 266 | ' lists in the content screen 267 | ' 268 | if (m.ConfigComplete) 269 | ' 270 | ' Build searches from the tags associated with the current 271 | ' video 272 | ' 273 | searches = [] 274 | s = {} 275 | s.title = m.details_screen.video_owner 276 | s.path = "/api/v1/accounts/" + url_encode(s.title) + "/videos?nsfw=false&start=0&count=25&sort=-publishedAt" 277 | searches.push(s) 278 | for each tag in m.details_screen.related_tags 279 | s = {} 280 | s.title = tag 281 | s.path = "/api/v1/search/videos/?nsfw=false&start=0&count=30&sort=-match&tagsOneOf=" + url_encode(tag) 282 | searches.push(s) 283 | end for 284 | initiateSearchCommon(searches, true) 285 | end if 286 | end sub 287 | 288 | sub loadVideoInfo(uuid) 289 | m.url_task = createObject("roSGNode", "load_video_info_task") 290 | m.url_task.observeField("response", "onVideoInfoResponse") 291 | m.url_task.url = get_setting("server","") + "/api/v1/videos/" + uuid 292 | m.url_task.control = "RUN" 293 | end sub 294 | 295 | sub onVideoInfoResponse(obj) 296 | data = obj.getData() 297 | if data <> Invalid 298 | m.content_screen.visible = false 299 | m.overhang.visible=true 300 | m.details_screen.visible = true 301 | m.details_screen.content = data 302 | preBufferVideo(data) 303 | ' 304 | ' Fix me: Need to get captions, if they exist, for video object 305 | ' /api/v1/videos/