Skip to content

Commit da51e1e

Browse files
Merge branch 'TeamNewPipe:dev' into dev
2 parents eb6968f + a536311 commit da51e1e

827 files changed

Lines changed: 13567 additions & 6137 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CONTRIBUTING.md

Lines changed: 54 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ NewPipe contribution guidelines
33

44
## Crash reporting
55

6-
Report crashes through the automated crash report system of NewPipe.
6+
Report crashes through the **automated crash report system** of NewPipe.
77
This way all the data needed for debugging is included in your bugreport for GitHub.
8-
You'll see exactly what is sent, be able to add your comments, and then send it.
8+
You'll see *exactly* what is sent, be able to add **your comments**, and then send it.
99

1010
## Issue reporting/feature requests
1111

@@ -25,22 +25,61 @@ You'll see exactly what is sent, be able to add your comments, and then send it.
2525

2626
## Code contribution
2727

28-
* If you want to help out with an existing bug report or feature request, leave a comment on that issue saying you want to try your hand at it.
29-
* If there is no existing issue for what you want to work on, open a new one describing your changes. This gives the team and the community a chance to give feedback before you spend time on something that is already in development, should be done differently, or should be avoided completely.
30-
* Stick to NewPipe's style conventions of [checkStyle](https://github.com/checkstyle/checkstyle). It runs each time you build the project.
31-
* Do not bring non-free software (e.g. binary blobs) into the project. Make sure you do not introduce Google
32-
libraries.
28+
### Guidelines
29+
30+
* Stick to NewPipe's *style conventions* of [checkStyle](https://github.com/checkstyle/checkstyle) and [ktlint](https://github.com/pinterest/ktlint). They run each time you build the project.
3331
* Stick to [F-Droid contribution guidelines](https://f-droid.org/wiki/page/Inclusion_Policy).
34-
* Make changes on a separate branch with a meaningful name, not on the _master_ branch or the _dev_ branch. This is commonly known as *feature branch workflow*. You may then send your changes as a pull request (PR) on GitHub.
35-
* Please test (compile and run) your code before submitting changes! Ideally, provide test feedback in the PR description. Untested code will **not** be merged!
36-
* Make sure your PR is up-to-date with the rest of the code. Often, a simple click on "Update branch" will do the job, but if not, you must rebase the dev branch manually and resolve the problems on your own. You can find help [on the wiki](https://github.com/TeamNewPipe/NewPipe/wiki/How-to-merge-a-PR). That makes the maintainers' jobs way easier.
37-
* Please show intention to maintain your features and code after you contribute a PR. Unmaintained code is a hassle for core developers. If you do not intend to maintain features you plan to contribute, please rethink your submission, or clearly state that in the PR description.
32+
* In particular **do not bring non-free software** (e.g. binary blobs) into the project. Make sure you do not introduce any closed-source library from Google.
33+
34+
### Before starting development
35+
36+
* If you want to help out with an existing bug report or feature request, **leave a comment** on that issue saying you want to try your hand at it.
37+
* If there is no existing issue for what you want to work on, **open a new one** describing the changes you are planning to introduce. This gives the team and the community a chance to give **feedback** before you spend time on something that is already in development, should be done differently, or should be avoided completely.
38+
* Please show **intention to maintain your features** and code after you contribute a PR. Unmaintained code is a hassle for core developers. If you do not intend to maintain features you plan to contribute, please rethink your submission, or clearly state that in the PR description.
39+
* Create PRs that cover only **one specific issue/solution/bug**. Do not create PRs that are huge monoliths and could have been split into multiple independent contributions.
40+
* NewPipe uses [NewPipeExtractor](https://github.com/TeamNewPipe/NewPipeExtractor) to fetch data from services. If you need to change something there, you must test your changes in NewPipe. Telling NewPipe to use your extractor version can be accomplished by editing the `app/build.gradle` file: the comments under the "NewPipe libraries" section of `dependencies` will help you out.
41+
42+
### Kotlin in NewPipe
43+
* NewPipe will remain mostly Java for time being
44+
* Contributions containing a simple conversion from Java to Kotlin should be avoided. Conversions to Kotlin should only be done if Kotlin actually brings improvements like bug fixes or better performance which are not, or only with much more effort, implementable in Java. The core team sees Java as an easier to learn and generally well adopted programming language.
45+
46+
### Creating a Pull Request (PR)
47+
48+
* Make changes on a **separate branch** with a meaningful name, not on the _master_ branch or the _dev_ branch. This is commonly known as *feature branch workflow*. You may then send your changes as a pull request (PR) on GitHub.
49+
* Please **test** (compile and run) your code before submitting changes! Ideally, provide test feedback in the PR description. Untested code will **not** be merged!
3850
* Respond if someone requests changes or otherwise raises issues about your PRs.
39-
* Send PRs that only cover one specific issue/solution/bug. Do not send PRs that are huge and consist of multiple independent solutions.
4051
* Try to figure out yourself why builds on our CI fail.
52+
* Make sure your PR is **up-to-date** with the rest of the code. Often, a simple click on "Update branch" will do the job, but if not, you must *rebase* your branch on the `dev` branch manually and resolve the conflicts on your own. You can find help [on the wiki](https://github.com/TeamNewPipe/NewPipe/wiki/How-to-merge-a-PR). Doing this makes the maintainers' job way easier.
53+
54+
## IDE setup & building the app
55+
56+
### Basic setup
57+
58+
NewPipe is developed using [Android Studio](https://developer.android.com/studio/). Learn more about how to install it and how it works in the [official documentation](https://developer.android.com/studio/intro). In particular, make sure you have accepted Android Studio's SDK licences. Once Android Studio is ready, setting up the NewPipe project is fairly simple:
59+
- Clone the NewPipe repository with `git clone https://github.com/TeamNewPipe/NewPipe.git` (or use the link from your own fork, if you want to open a PR).
60+
- Open the folder you just cloned with Android Studio.
61+
- Build and run it just like you would do with any other app, with the green triangle in the top bar.
62+
63+
You may find [SonarLint](https://www.sonarlint.org/intellij)'s **inspections** useful in helping you to write good code and prevent bugs.
64+
65+
### checkStyle setup
66+
67+
The [checkStyle](https://github.com/checkstyle/checkstyle) plugin verifies that Java code abides by the project style. It runs automatically each time you build the project. If you want to view errors directly in the editor, instead of having to skim through the build output, you can install an Android Studio plugin:
68+
- Go to `File -> Settings -> Plugins`, search for `checkstyle` and install `CheckStyle-IDEA`.
69+
- Go to `File -> Settings -> Tools -> Checkstyle`.
70+
- Add NewPipe's configuration file by clicking the `+` in the right toolbar of the "Configuration File" list.
71+
- Under the "Use a local Checkstyle file" bullet, click on `Browse` and pick the file named `checkstyle.xml` in the project's root folder.
72+
- Enable "Store relative to project location" so that moving the directory around does not create issues.
73+
- Insert a description in the top bar, then click `Next` and then `Finish`.
74+
- Activate the configuration file you just added by enabling the checkbox on the left.
75+
- Click `Ok` and you are done.
76+
77+
### ktlint setup
78+
79+
The [ktlint](https://github.com/pinterest/ktlint) plugin does the same job as checkStyle for Kotlin files. Installing the related plugin is as simple as going to `File -> Settings -> Plugins`, searching for `ktlint` and installing `Ktlint (unofficial)`.
4180

4281
## Communication
4382

44-
* The [#newpipe](irc:irc.freenode.net/newpipe) channel on freenode has the core team and other developers in it. [Click here for webchat](https://webchat.freenode.net/?channels=newpipe)!
45-
* You can also use a Matrix account to join the Newpipe channel at [#freenode_#newpipe:matrix.org](https://matrix.to/#/#freenode_#newpipe:matrix.org).
46-
* Post suggestions, changes, ideas etc. on GitHub or IRC.
83+
* The #newpipe channel on Libera Chat (`ircs://irc.libera.chat:6697/newpipe`) has the core team and other developers in it. [Click here for webchat](https://web.libera.chat/#newpipe)!
84+
* You can also use a Matrix account to join the NewPipe channel at [#newpipe:libera.chat](https://matrix.to/#/#newpipe:libera.chat). Some convenient clients, available both for phone and desktop, are listed at that link.
85+
* You can post your suggestions, changes, ideas etc. on either GitHub or IRC.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Oh no, a bug! It happens. Thanks for reporting an issue with NewPipe. To make it
3333

3434

3535

36-
### Actual behaviour
36+
### Actual behavior
3737
<!-- Tell us what happens with the steps given above. -->
3838

3939

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: 💬 IRC
4-
url: https://webchat.freenode.net/#newpipe
4+
url: https://web.libera.chat/#newpipe
55
about: Chat with us via IRC for quick Q/A
66
- name: 💬 Matrix
7-
url: https://matrix.to/#/#freenode_#newpipe:matrix.org
7+
url: https://matrix.to/#/#newpipe:libera.chat
88
about: Chat with us via Matrix for quick Q/A

.github/ISSUE_TEMPLATE/question.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Question
3+
about: Ask about anything NewPipe-related
4+
labels: question
5+
assignees: ''
6+
7+
---
8+
9+
<!-- IF YOU DON'T FILL IN THE TEMPLATE PROPERLY, YOUR ISSUE IS LIABLE TO BE CLOSED. If you feel tired/lazy right now, open your issue some other time. We'll wait. -->
10+
11+
<!-- The comments between these brackets won't show up in the submitted issue (as you can see in the Preview). -->
12+
13+
### Checklist
14+
<!-- This checklist is COMPULSORY. The first box has been checked for you to show you how it is done. -->
15+
16+
- [x] I checked, but didn't find any duplicates (open OR closed) of this issue in the repo. <!-- Seriously, check. O_O (If there's already an issue but you'd like to see if something changed, just make a comment on the issue instead of opening a new one.) -->
17+
- [ ] I have read the contribution guidelines given at https://github.com/TeamNewPipe/NewPipe/blob/HEAD/.github/CONTRIBUTING.md.
18+
19+
#### What's your question(s)?
20+
21+
22+
#### Additional context
23+
<!-- Add any other context, like screenshots or links, about the question here.
24+
Example: *Here's a photo of my cat!* -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,23 @@
1212
- create clones
1313
- take over the world
1414

15+
#### Before/After Screenshots/Screen Record
16+
<!-- If your PR changes the app's UI in any way, please include screenshots or a video showing exactly what changed, so that developers and users can pinpoint it easily. Delete this if it doesn't apply to your PR.-->
17+
- Before:
18+
- After:
19+
1520
#### Fixes the following issue(s)
16-
<!-- Also add any other links relevant to your change. -->
17-
-
21+
<!-- Prefix issues with "Fixes" so that GitHub closes them when the PR is merged (note that each "Fixes #" should be in its own item). Also add any other relevant links. -->
22+
- Fixes #
1823

1924
#### Relies on the following changes
20-
<!-- Delete this if it doesn't apply to you. -->
25+
<!-- Delete this if it doesn't apply to your PR. -->
2126
-
2227

2328
#### APK testing
2429
<!-- Use a new, meaningfully named branch. The name is used as a suffix for the app ID to allow installing and testing multiple versions of NewPipe, e.g. "commentfix", if your PR implements a bugfix for comments. (No names like "patch-0" and "feature-1".) -->
2530
<!-- Remove the following line if you directly link the APK created by the CI pipeline. Directly linking is preferred if you need to let users test.-->
26-
On the website the APK can be found by going to the "Checks" tab below the title and then on "artifacts" on the right.
31+
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.
2732

2833
#### Due diligence
2934
- [ ] I read the [contribution guidelines](https://github.com/TeamNewPipe/NewPipe/blob/HEAD/.github/CONTRIBUTING.md).

.github/workflows/ci.yml

Lines changed: 56 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,91 @@
11
name: CI
22

33
on:
4+
workflow_dispatch:
45
pull_request:
56
branches:
67
- dev
8+
- master
9+
paths-ignore:
10+
- 'README*.md'
11+
- 'fastlane/**'
12+
- 'assets/**'
13+
- '.github/**/*.md'
714
push:
8-
branches:
15+
branches:
916
- dev
1017
- master
18+
paths-ignore:
19+
- 'README*.md'
20+
- 'fastlane/**'
21+
- 'assets/**'
22+
- '.github/**/*.md'
1123

1224
jobs:
13-
build-and-test:
25+
build-and-test-jvm:
1426
runs-on: ubuntu-latest
1527
steps:
1628
- uses: actions/checkout@v2
29+
- uses: gradle/wrapper-validation-action@v1
1730

1831
- name: create and checkout branch
1932
# push events already checked out the branch
2033
if: github.event_name == 'pull_request'
2134
run: git checkout -B ${{ github.head_ref }}
2235

23-
- name: set up JDK 1.8
24-
uses: actions/setup-java@v1.4.3
36+
- name: set up JDK 8
37+
uses: actions/setup-java@v2
2538
with:
26-
java-version: 1.8
39+
java-version: 8
40+
distribution: "adopt"
2741

2842
- name: Cache Gradle dependencies
2943
uses: actions/cache@v2
3044
with:
3145
path: ~/.gradle/caches
3246
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
3347
restore-keys: ${{ runner.os }}-gradle
34-
35-
- name: Build debug APK and run Tests
36-
run: ./gradlew assembleDebug lintDebug testDebugUnitTest --stacktrace
48+
49+
- name: Build debug APK and run jvm tests
50+
run: ./gradlew assembleDebug lintDebug testDebugUnitTest --stacktrace -DskipFormatKtlint
3751

3852
- name: Upload APK
3953
uses: actions/upload-artifact@v2
4054
with:
4155
name: app
4256
path: app/build/outputs/apk/debug/*.apk
57+
58+
test-android:
59+
# macos has hardware acceleration. See android-emulator-runner action
60+
runs-on: macos-latest
61+
strategy:
62+
matrix:
63+
# api-level 19 is min sdk, but throws errors related to desugaring
64+
api-level: [ 21, 29 ]
65+
steps:
66+
- uses: actions/checkout@v2
67+
68+
- name: set up JDK 8
69+
uses: actions/setup-java@v2
70+
with:
71+
java-version: 8
72+
distribution: "adopt"
73+
74+
- name: Cache Gradle dependencies
75+
uses: actions/cache@v2
76+
with:
77+
path: ~/.gradle/caches
78+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
79+
restore-keys: ${{ runner.os }}-gradle
80+
81+
- name: Run android tests
82+
uses: reactivecircus/android-emulator-runner@v2
83+
with:
84+
api-level: ${{ matrix.api-level }}
85+
# workaround to emulator bug: https://github.com/ReactiveCircus/android-emulator-runner/issues/160
86+
emulator-build: 7425822
87+
script: ./gradlew connectedCheck
88+
4389
# sonar:
4490
# runs-on: ubuntu-latest
4591
# steps:
@@ -48,9 +94,10 @@ jobs:
4894
# fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
4995

5096
# - name: Set up JDK 11
51-
# uses: actions/setup-java@v1.4.3
97+
# uses: actions/setup-java@v2
5298
# with:
5399
# java-version: 11 # Sonar requires JDK 11
100+
# distribution: "adopt"
54101

55102
# - name: Cache SonarCloud packages
56103
# uses: actions/cache@v2

README.es.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<a href="https://www.gnu.org/licenses/gpl-3.0" alt="License: GPLv3"><img src="https://img.shields.io/badge/Licencia-GPL%20v3-blue.svg"></a>
1010
<a href="https://github.com/TeamNewPipe/NewPipe/actions" alt="Build Status"><img src="https://github.com/TeamNewPipe/NewPipe/workflows/CI/badge.svg?branch=dev&event=push"></a>
1111
<a href="https://hosted.weblate.org/engage/newpipe/es/" alt="Estado de la traducción"><img src="https://hosted.weblate.org/widgets/newpipe/es/svg-badge.svg"></a>
12-
<a href="http://webchat.freenode.net/?channels=%23newpipe" alt="IRC channel: #newpipe"><img src="https://img.shields.io/badge/Canal%20de%20IRC%20-%23newpipe-brightgreen.svg"></a>
12+
<a href="https://web.libera.chat/#newpipe" alt="IRC channel: #newpipe"><img src="https://img.shields.io/badge/Canal%20de%20IRC%20-%23newpipe-brightgreen.svg"></a>
1313
<a href="https://www.bountysource.com/teams/newpipe" alt="Bountysource bounties"><img src="https://img.shields.io/bountysource/team/newpipe/activity.svg?colorB=cd201f"></a>
1414
</p>
1515
<hr>
@@ -18,7 +18,7 @@
1818
<p align="center"><a href="https://newpipe.net">Sitio web</a> &bull; <a href="https://newpipe.net/blog/">Blog</a> &bull; <a href="https://newpipe.net/FAQ/">Preguntas Frecuentes</a> &bull; <a href="https://newpipe.net/press/">Prensa</a></p>
1919
<hr>
2020

21-
*Lea esto en otros idiomas: [English](README.md), [한국어](README.ko.md), [Soomaali](README.so.md), [Português Brasil](README.pt_BR.md), [日本語](README.ja.md), [Română](README.ro.md) .*
21+
*Lea esto en otros idiomas: [English](README.md), [한국어](README.ko.md), [Soomaali](README.so.md), [Português Brasil](README.pt_BR.md), [日本語](README.ja.md), [Română](README.ro.md), [Türkçe](README.tr.md).*
2222

2323
<b>AVISO: ESTA ES UNA VERSIÓN BETA, POR LO TANTO, PUEDE ENCONTRAR BUGS (ERRORES). SI ENCUENTRA UNO, ABRA UN ISSUE A TRAVÉS DE NUESTRO REPOSITORIO GITHUB.</b>
2424

@@ -85,7 +85,7 @@ NewPipe apoya varios servicios. Nuestras [documentaciones](https://teamnewpipe.g
8585

8686
## Installación y actualizaciones
8787
Se puede instalar NewPipe usando uno de los métodos siguientes:
88-
1. Agregar nuestro repositorio personalizado a F-Droid e instalarlo desde allí. Las instrucciones están aquí: https://newpipe.schabi.org/FAQ/tutorials/install-add-fdroid-repo/
88+
1. Agregar nuestro repositorio personalizado a F-Droid e instalarlo desde allí. Las instrucciones están aquí: https://newpipe.net/FAQ/tutorials/install-add-fdroid-repo/
8989
2. Descargar el archivo APK del enlace [Github Releases](https://github.com/TeamNewPipe/NewPipe/releases) e instalarlo.
9090
3. Actualizar a través de F-Droid. Este es el método más lento para obtener la actualización, como F-Droid debe reconocer cambios, construir el APK aparte, firmarlo con una clave, y finalmente empujar la actualización a los usuarios.
9191
4. Construir un APK de depuración por si mismo. Este es el modo más rápido para realizar nuevas características en su dispositivo, pero es mucho más complicado, asi que recomendamos uno de los otros métodos.
@@ -135,6 +135,6 @@ El proyecto NewPipe tiene como objetivo proveer una experience privada y anónim
135135
Por lo tanto, la app no colecciona ningunos datos sin su consentimiento. La politica de privacidad de NewPipe explica en detalle los datos enviados y almacenados cuando envia un informe de error, o comentario en nuestro blog. Puede encontrar el documento [aqui](https://newpipe.net/legal/privacy/).
136136

137137
## Licencia
138-
[![GNU GPLv3 Image](https://www.gnu.org/graphics/gplv3-127x51.png)](http://www.gnu.org/licenses/gpl-3.0.en.html)
138+
[![GNU GPLv3 Image](https://www.gnu.org/graphics/gplv3-127x51.png)](https://www.gnu.org/licenses/gpl-3.0.en.html)
139139

140140
NewPipe es Software Libre: Puede usar, estudiar, compartir, y mejorarlo a su voluntad. Especificamente puede redistribuir y/o modificarlo bajo los términos de la [GNU General Public License](https://www.gnu.org/licenses/gpl.html) como publicado por la Free Software Foundation, o versión 3 de la licencia, o (en su opción) cualquier versión posterior.

0 commit comments

Comments
 (0)