Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.21.6 #6576

Merged
merged 146 commits into from
Jul 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
a3c4a10
Convert the abstract class DAOs to interfaces.
Isira-Seneviratne Jan 20, 2021
cd0a877
Update Room to 2.3.0.
Isira-Seneviratne May 16, 2021
e8b8391
Rename .java to .kt
Isira-Seneviratne May 16, 2021
3b1c4b0
Convert Converters to a Kotlin object.
Isira-Seneviratne May 16, 2021
96d731d
Refactor equals method
imericxu May 22, 2021
01aab25
Add Tab.hashCode() to go with equals
imericxu May 22, 2021
1cac389
Refactor KioskTab.equals
imericxu May 22, 2021
d2b03af
Add KioskTab.hashCode() matching equals
imericxu May 22, 2021
14bbacc
Refactor ChannelTab.equals
imericxu May 22, 2021
1812249
Add ChannelTab.hashCode() matching equals
imericxu May 22, 2021
2fc26bc
Refactor PlaylistTab.equals
imericxu May 22, 2021
448989f
Add PlaylistTab.hashCode() matching equals
imericxu May 22, 2021
a102fc9
Use constraint layout for play queue item
Stypox Jun 7, 2021
3b00459
Increase buffer for playback after rebuffer
Redirion Jun 7, 2021
761e01c
Merge pull request #6443 from Stypox/invalid-attr
TobiGr Jun 8, 2021
6ad4b42
Better error handling of terminated channels when loading feed
TobiGr Apr 2, 2021
ccc4697
Show detailed error message when an account has been terminated by th…
TobiGr Mar 31, 2021
c5dd3dc
Improve error message when loading feed
TobiGr Mar 31, 2021
89317d4
Fix feed loading and show a dialog for each invalid subscription
Stypox Apr 2, 2021
b57ecae
Fix getting error cause
TobiGr Apr 2, 2021
7c78d96
Translated using Weblate (Indonesian)
weblate Jun 8, 2021
1e09a17
Revert all commits related to ContentSettingsFragment
Stypox Jun 5, 2021
0f75024
Support SAF properly
wb9688 Jun 13, 2020
1164ea5
Move Stored(File|Directory)Helper into NewPipe
wb9688 Jun 14, 2020
cb4e615
Use file picker for export DB
wb9688 Jun 15, 2020
febb21a
Fix non-SAF actions
wb9688 Jul 30, 2020
7efe62e
Only ask for storage permissions when not using SAF
wb9688 Aug 2, 2020
1e8b382
Add setting migration to promote using SAF
Stypox Jan 14, 2021
6a0c5a8
Fix ContentSettingsManager tests
Stypox Jan 14, 2021
bcb1cf6
Improve SAF switch descriptions in settings
Stypox Jan 16, 2021
eea43d5
Add comments to SharpStreams
Stypox Jan 16, 2021
114dc8f
Pass mime type so that SAF treats file extension correctly
Stypox Jan 16, 2021
b78ac7d
Fix strange behaviour when app loses access to saf download folder
Stypox Jan 16, 2021
21b8df0
Check if file really exists before asking user to overwrite it
Stypox Mar 17, 2021
5ffc667
Remove misplaced comment
Stypox Mar 17, 2021
2a99e0e
Reimplement storing backup import/export path
Stypox Jun 6, 2021
c96bdfc
Merge pull request #5415 from Stypox/saf
TobiGr Jun 8, 2021
f63a4ee
Merge pull request #5876 from TeamNewPipe/terminated-channels
TobiGr Jun 8, 2021
3dc4ed1
Add "Open website" button in webview in license fragment, issue #6296
Peyman-hme May 16, 2021
e0c1ca1
Change "Ok" Button to "Dismiss" and also change "Open Website" button…
Peyman-hme May 19, 2021
6fc0d8f
Add Open website string resources
Peyman-hme May 19, 2021
5e2735a
Merge pull request #5462 from Isira-Seneviratne/Convert_abstract_clas…
Stypox Jun 8, 2021
63cff25
Merge pull request #6314 from Peyman-hme/Add-Open-website-button-to-w…
Stypox Jun 8, 2021
5532666
Long press on player share button to copy url to clipboard
Jun 5, 2021
bede758
Use url at current time for long click on player share button
Stypox Jun 8, 2021
0b64382
Merge pull request #6436 from Abanoub8/add_url_button
Stypox Jun 8, 2021
543440e
Update app/src/main/java/org/schabi/newpipe/settings/tabs/Tab.java
Stypox Jun 8, 2021
a2fd5ae
Update app/src/main/java/org/schabi/newpipe/settings/tabs/Tab.java
Stypox Jun 8, 2021
a2eead5
Merge pull request #6346 from Imericxu/tabs-style-check
Stypox Jun 8, 2021
56cd84c
Merge pull request #6444 from TeamNewPipe/increasebufferafterdepletion
TobiGr Jun 8, 2021
e846f69
Add ability to hide played items in a feed
mauriciocolli Apr 5, 2020
360f5ac
Save playback state even if stream is finished and add isFinished()
Stypox Mar 26, 2021
e58fead
Remove IN HISTORY label on stream info items
Stypox Mar 26, 2021
0113ad5
Correctly save stream progress at the end of a video
Stypox Jun 7, 2021
06d10cf
Merge pull request #6313 from Isira-Seneviratne/Update_Room_to_2.3.0
Stypox Jun 9, 2021
9591f14
Update AndroidX Fragment to 1.3.4
TacoTheDank Jun 10, 2021
4031777
Open recognized timestamps in the description of contents in the popu…
AudricV Feb 1, 2021
ae9349e
Initial work: add support for opening timestamps in plain text descri…
AudricV Mar 13, 2021
9e9d1a0
Fix toast shown when falling back to Google Play Store URL and the ac…
AudricV Mar 13, 2021
6abdd2a
Try to change message of the system chooser for the update notification
AudricV Mar 13, 2021
c972940
Apply suggested changes and fix some warnings
AudricV Mar 18, 2021
2fb8636
Fix title of the subject when sharing an URL
AudricV Mar 18, 2021
d85afd6
Initial work to add the image of the content in the share sheet
AudricV Mar 20, 2021
d6decc0
Move some classes to a new subpackage and adress requested changes
AudricV Mar 26, 2021
e5df2f6
Move some classes to a new subpackage and adress requested changes
AudricV Mar 26, 2021
267686f
Initial work: add support for opening hashtags in plain text descript…
AudricV Mar 27, 2021
2702700
Don't use a chooser for other intents than opening a content in a bro…
AudricV Apr 2, 2021
a79badd
Adress requested changes and try some cleanup in handleUrl method of …
AudricV Apr 3, 2021
f13f4cc
Split handleUrl method into two methods
AudricV Apr 3, 2021
da4d379
Initial work: use disposables for timestamps parsing in YouTube video…
AudricV Apr 4, 2021
f02df6d
Fix an error and add a new method in the ShareUtils class
AudricV Apr 25, 2021
218f25c
Annotate params and methods with NonNull
AudricV May 21, 2021
eef418a
Improve text linkifier function parameters
Stypox Jun 5, 2021
edfe0f9
Fix disposables handling for text linkifier
Stypox Jun 5, 2021
32b0bdb
Fix the compile error
AudricV Jun 11, 2021
4eef498
Only call addClickListenersOnTimestamps if relatedInfo is instance of…
AudricV Jun 11, 2021
8c52a81
Added itemsListHeaderDuration to large-hand player
litetex Jun 11, 2021
547a1a9
Merge pull request #6480 from litetex/fixMissingitemsListHeaderDuration
TobiGr Jun 12, 2021
6063ff0
CONTRIBUTING.md: add "Build instructions" section and improve ordering
Stypox Jun 13, 2021
2142f05
Fix hiding finished streams in groups; new stream state validity cond…
Stypox Jun 7, 2021
4698d07
Do not hide feed buttons (show/hide & help) behind three-dots menu
Stypox Jun 9, 2021
7145b11
Fix long press menu in feed
Stypox Jun 9, 2021
fdb6679
Make list stream item ConstraintLayouts and use chain
Stypox Jun 14, 2021
32df4d3
Reshow feed if grid/list view mode changed
Stypox Jun 15, 2021
92910eb
Merge pull request #5523 from TiA4f8R/share-improvements
Stypox Jun 15, 2021
e01ef42
Adds manual tablet mode setting
Dakkaron Apr 11, 2021
d6e0bd8
Merge pull request #6059 from Dakkaron/manual-tablet-mode-setting
Stypox Jun 15, 2021
e4885e3
Fix some older deprecations from previous Fragment versions
TacoTheDank Jun 16, 2021
1061fca
Add super.onRequestPermissionsResult where missing
TacoTheDank Jun 16, 2021
aa4e5da
Fix onActivityResult deprecation in ContentSettingsFragment
TacoTheDank Jun 16, 2021
cae160b
Fix onActivityResult deprecation in SubscriptionsImportFragment
TacoTheDank Jun 16, 2021
a1432e9
Fix onActivityResult deprecation in SubscriptionFragment
TacoTheDank Jun 16, 2021
a9ab2f5
dismiss choice dialog in onStop() to avoid a leaked window Exception:
evermind-zz May 25, 2021
2de9d7b
Merge branch 'master' into dev
TobiGr Jun 17, 2021
90de759
Replaced System.Exit calls with FinishAffinity and Start Activity calls
danielmbutler Jun 15, 2021
8b3e32b
First round of review
Stypox Jun 17, 2021
841fb4c
Merge pull request #6495 from danielmbutler/Replace-System.exit-calls
Stypox Jun 17, 2021
0803d9f
Merge pull request #6504 from evermind-zz/fixes-choice-dialog
Redirion Jun 17, 2021
be676ad
Merge pull request #3371 from mauriciocolli/feed-hide-played-items
TobiGr Jun 18, 2021
6e377dd
Translated using Weblate (Serbian)
TobiGr Jun 18, 2021
0db3406
Fix SonarLint references and explanation
Stypox Jun 18, 2021
74ad488
Merge pull request #6394 from TacoTheDank/androidx-fragment-134
Stypox Jun 18, 2021
79deff3
Annotate some overridden methods and parameters as NonNull
TacoTheDank Jun 19, 2021
6c57551
Merge pull request #6528 from TacoTheDank/annotate-methods
B0pol Jun 20, 2021
62b4f33
Don't enable SAF on Fire TV (#6516)
triallax Jun 20, 2021
a9e85ab
Ask for screenshots/video of UI changes
opusforlife2 Jun 20, 2021
46bfec6
Localization: Fix Simplified Chinese Plural
chr56 May 16, 2021
384ca66
#6522: Fix null pointer exception when displaying SearchFragment
Douile Jun 22, 2021
25cf8dc
Refactoring by Android Studio
B0pol Jun 23, 2021
484c852
Merge pull request #6556 from B0pol/kotlin-style
AudricV Jun 23, 2021
5ebf372
Comment out test-android CI job
XiangRongLin Jun 23, 2021
b996fa7
Add comments explaining decisions in test-android ci job
XiangRongLin Jun 23, 2021
63cad7e
Merge pull request #6562 from TeamNewPipe/disable_instrumented_ci
B0pol Jun 24, 2021
65824ff
Update Invidious instances
B0pol Jun 23, 2021
d7dcfa5
Update Extractor version
B0pol Jun 23, 2021
0da8e28
Merge pull request #6558 from Douile/fix/searchfragment-null-service
B0pol Jun 24, 2021
25914b0
Third round of review
Stypox Jun 24, 2021
78a9952
Merge pull request #6557 from B0pol/invidious-instances
AudricV Jun 24, 2021
ec40c8e
Merge pull request #6482 from Stypox/build-instructions
opusforlife2 Jun 24, 2021
090c063
Address Bopol's review
opusforlife2 Jun 24, 2021
c398308
Merge pull request #6539 from TeamNewPipe/screenshots_for_UI_changes
B0pol Jun 24, 2021
201e5ee
Fix NPE when connecting via BT
Jun 25, 2021
33fbc88
Translated using Weblate (Polish)
weblate Jun 26, 2021
99335ba
Add changelog for 0.21.6 (972)
TobiGr Jun 26, 2021
23f6e10
Add question template
triallax Jul 1, 2021
83b198f
Merge pull request #6570 from Redirion/fixnpe
TobiGr Jul 3, 2021
a63683e
Update extractor version
TobiGr Jul 4, 2021
e26607f
Translated using Weblate (Bengali)
weblate Jul 4, 2021
3931c0d
Merge pull request #6545 from chr56/fix_zh
TobiGr Jul 4, 2021
d8a0a74
Allow asking multiple questions at once
triallax Jul 5, 2021
5ac418a
Merge pull request #6593 from mhmdanas/add-question-template
opusforlife2 Jul 6, 2021
09435a1
Update bug_report.md
litetex Jul 6, 2021
29aa1de
Merge pull request #6617 from litetex/improve-wording-in-bug-report
Stypox Jul 7, 2021
de312eb
Fix ClassCastException
TobiGr Jul 8, 2021
a94dacf
Merge pull request #6622 from TeamNewPipe/fix/RepeatModeChange
TobiGr Jul 8, 2021
82cdb0f
Translated using Weblate (Ukrainian)
weblate Jul 9, 2021
bb386fe
Remove unused translations of "downloads_storage_ask_summary_kitkat"
TobiGr Jul 9, 2021
4ea2d8e
Removed translations with incorrect number of arguments for formatting
TobiGr Jul 9, 2021
a73a4af
Fix APK testing section (#6623)
TobiGr Jul 9, 2021
7c3f5a6
Fix crash when refreshing feed after importing database or subscriptions
TobiGr Jul 10, 2021
9ca2691
Add close() method to NewPipeDatabase
TobiGr Jul 10, 2021
ab838fd
Merge pull request #6639 from TeamNewPipe/fix/db_transaction
TobiGr Jul 10, 2021
fd3d46c
Translated using Weblate (Polish)
weblate Jul 10, 2021
3a83062
Translated using Weblate (Polish)
weblate Jul 12, 2021
4e9631a
Update extractor version to 0.21.6
TobiGr Jul 10, 2021
1e46864
Release 0.21.6 (972)
TobiGr Jun 26, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 49 additions & 14 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ NewPipe contribution guidelines

## Crash reporting

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

## Issue reporting/feature requests

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

## Code contribution

* 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.
* 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.
* Stick to NewPipe's style conventions of [checkStyle](https://github.com/checkstyle/checkstyle). It runs each time you build the project.
* Do not bring non-free software (e.g. binary blobs) into the project. Make sure you do not introduce Google
libraries.
### Guidelines

* 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.
* Stick to [F-Droid contribution guidelines](https://f-droid.org/wiki/page/Inclusion_Policy).
* 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.
* Please test (compile and run) your code before submitting changes! Ideally, provide test feedback in the PR description. Untested code will **not** be merged!
* 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.
* 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.
* 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.

### Before starting development

* 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.
* 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.
* 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.
* 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.
* 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.

### Creating a Pull Request (PR)

* 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.
* Please **test** (compile and run) your code before submitting changes! Ideally, provide test feedback in the PR description. Untested code will **not** be merged!
* Respond if someone requests changes or otherwise raises issues about your PRs.
* Send PRs that only cover one specific issue/solution/bug. Do not send PRs that are huge and consist of multiple independent solutions.
* Try to figure out yourself why builds on our CI fail.
* 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.

## IDE setup & building the app

### Basic setup

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:
- 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).
- Open the folder you just cloned with Android Studio.
- Build and run it just like you would do with any other app, with the green triangle in the top bar.

You may find [SonarLint](https://www.sonarlint.org/intellij)'s **inspections** useful in helping you to write good code and prevent bugs.

### checkStyle setup

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:
- Go to `File -> Settings -> Plugins`, search for `checkstyle` and install `CheckStyle-IDEA`.
- Go to `File -> Settings -> Tools -> Checkstyle`.
- Add NewPipe's configuration file by clicking the `+` in the right toolbar of the "Configuration File" list.
- Under the "Use a local Checkstyle file" bullet, click on `Browse` and pick the file named `checkstyle.xml` in the project's root folder.
- Enable "Store relative to project location" so that moving the directory around does not create issues.
- Insert a description in the top bar, then click `Next` and then `Finish`.
- Activate the configuration file you just added by enabling the checkbox on the left.
- Click `Ok` and you are done.

### ktlint setup

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)`.

## Communication

* 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)!
* You can also use a Matrix account to join the NewPipe channel at [#newpipe:libera.chat](https://matrix.to/#/#newpipe:libera.chat).
* Post suggestions, changes, ideas etc. on GitHub or IRC.
* 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.
* You can post your suggestions, changes, ideas etc. on either GitHub or IRC.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Oh no, a bug! It happens. Thanks for reporting an issue with NewPipe. To make it



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


Expand Down
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Question
about: Ask about anything NewPipe-related
labels: question
assignees: ''

---

<!-- 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. -->

<!-- The comments between these brackets won't show up in the submitted issue (as you can see in the Preview). -->

### Checklist
<!-- This checklist is COMPULSORY. The first box has been checked for you to show you how it is done. -->

- [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.) -->
- [ ] I have read the contribution guidelines given at https://github.com/TeamNewPipe/NewPipe/blob/HEAD/.github/CONTRIBUTING.md.

#### What's your question(s)?


#### Additional context
<!-- Add any other context, like screenshots or links, about the question here.
Example: *Here's a photo of my cat!* -->
9 changes: 7 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,23 @@
- create clones
- take over the world

#### Before/After Screenshots/Screen Record
<!-- 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.-->
- Before:
- After:

#### Fixes the following issue(s)
<!-- 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. -->
- Fixes #

#### Relies on the following changes
<!-- Delete this if it doesn't apply to you. -->
<!-- Delete this if it doesn't apply to your PR. -->
-

#### APK testing
<!-- 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".) -->
<!-- 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.-->
On the website the APK can be found by going to the "Checks" tab below the title and then on "artifacts" on the right.
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.

#### Due diligence
- [ ] I read the [contribution guidelines](https://github.com/TeamNewPipe/NewPipe/blob/HEAD/.github/CONTRIBUTING.md).
53 changes: 29 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,32 +43,37 @@ jobs:
with:
name: app
path: app/build/outputs/apk/debug/*.apk
test-android:
runs-on: macos-latest
strategy:
matrix:
api-level: [21, 29]
steps:
- uses: actions/checkout@v2

- name: set up JDK 8
uses: actions/setup-java@v2
with:
java-version: 8
distribution: "adopt"
# Disabled until emulator works again. see https://github.com/TeamNewPipe/NewPipe/pull/6560
# test-android:
# macos has hardware acceleration. See android-emulator-runner action
# runs-on: macos-latest
# strategy:
# matrix:
# api-level 19 is min sdk, but throws errors related to desugaring
# api-level: [21, 29]
# steps:
# - uses: actions/checkout@v2
#
# - name: set up JDK 8
# uses: actions/setup-java@v2
# with:
# java-version: 8
# distribution: "adopt"
#
# - name: Cache Gradle dependencies
# uses: actions/cache@v2
# with:
# path: ~/.gradle/caches
# key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
# restore-keys: ${{ runner.os }}-gradle
#
# - name: Run android tests
# uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: ${{ matrix.api-level }}
# script: ./gradlew connectedCheck

- name: Cache Gradle dependencies
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle

- name: Run android tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
script: ./gradlew connectedCheck
# sonar:
# runs-on: ubuntu-latest
# steps:
Expand Down
12 changes: 8 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ android {
resValue "string", "app_name", "NewPipe"
minSdkVersion 19
targetSdkVersion 29
versionCode 971
versionName "0.21.5"
versionCode 972
versionName "0.21.6"

multiDexEnabled true

Expand Down Expand Up @@ -102,7 +102,7 @@ ext {
checkstyleVersion = '8.38'

androidxLifecycleVersion = '2.2.0'
androidxRoomVersion = '2.3.0-alpha03'
androidxRoomVersion = '2.3.0'

icepickVersion = '3.2.0'
exoPlayerVersion = '2.12.3'
Expand Down Expand Up @@ -182,8 +182,11 @@ dependencies {

/** NewPipe libraries **/
// You can use a local version by uncommenting a few lines in settings.gradle
// Or you can use a commit you pushed to GitHub by just replacing TeamNewPipe with your GitHub
// name and the commit hash with the commit hash of the (pushed) commit you want to test
// This works thanks to JitPack: https://jitpack.io/
implementation 'com.github.TeamNewPipe:nanojson:1d9e1aea9049fc9f85e68b43ba39fe7be1c1f751'
implementation 'com.github.TeamNewPipe:NewPipeExtractor:v0.21.4'
implementation 'com.github.TeamNewPipe:NewPipeExtractor:v0.21.6'

/** Checkstyle **/
checkstyle "com.puppycrawl.tools:checkstyle:${checkstyleVersion}"
Expand All @@ -198,6 +201,7 @@ dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.documentfile:documentfile:1.0.1'
implementation 'androidx.fragment:fragment-ktx:1.3.4'
implementation "androidx.lifecycle:lifecycle-livedata:${androidxLifecycleVersion}"
implementation "androidx.lifecycle:lifecycle-viewmodel:${androidxLifecycleVersion}"
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
Expand Down
15 changes: 11 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:logo="@mipmap/ic_launcher"
android:requestLegacyExternalStorage="true"
android:theme="@style/OpeningTheme"
android:resizeableActivity="true"
tools:ignore="AllowBackup">
Expand Down Expand Up @@ -232,18 +231,26 @@
<data android:host="invidious.snopyta.org" />
<data android:host="yewtu.be" />
<data android:host="tube.connect.cafe" />
<data android:host="invidious.zapashcanon.fr" />
<data android:host="invidious.kavin.rocks" />
<data android:host="invidious.tube" />
<data android:host="invidious-us.kavin.rocks" />
<data android:host="piped.kavin.rocks" />
<data android:host="invidious.site" />
<data android:host="invidious.xyz" />
<data android:host="vid.mint.lgbt" />
<data android:host="invidiou.site" />
<data android:host="invidious.fdn.fr" />
<data android:host="invidious.048596.xyz" />
<data android:host="invidious.zee.li" />
<data android:host="vid.puffyan.us" />
<data android:host="ytprivate.com" />
<data android:host="invidious.namazso.eu" />
<data android:host="invidious.silkky.cloud" />
<data android:host="invidious.exonip.de" />
<data android:host="inv.riverside.rocks" />
<data android:host="invidious.blamefran.net" />
<data android:host="invidious.moomoo.me" />
<data android:host="ytb.trom.tf" />
<data android:host="yt.cyberhost.uk" />
<data android:host="y.com.cm" />
<data android:pathPrefix="/" />
</intent-filter>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ public boolean onRequestChildRectangleOnScreen(
return consumed == dy;
}

public boolean onInterceptTouchEvent(final CoordinatorLayout parent, final AppBarLayout child,
final MotionEvent ev) {
public boolean onInterceptTouchEvent(@NonNull final CoordinatorLayout parent,
@NonNull final AppBarLayout child,
@NonNull final MotionEvent ev) {
for (final Integer element : skipInterceptionOfElements) {
final View view = child.findViewById(element);
if (view != null) {
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/org/schabi/newpipe/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.downloader.Downloader;
import org.schabi.newpipe.ktx.ExceptionUtils;
import org.schabi.newpipe.settings.SettingsActivity;
import org.schabi.newpipe.settings.NewPipeSettings;
import org.schabi.newpipe.util.Localization;
import org.schabi.newpipe.util.ServiceHelper;
import org.schabi.newpipe.util.StateSaver;
Expand Down Expand Up @@ -91,7 +91,7 @@ public void onCreate() {
app = this;

// Initialize settings first because others inits can use its values
SettingsActivity.initSettings(this);
NewPipeSettings.initSettings(this);

NewPipe.init(getDownloader(),
Localization.getPreferredLocalization(this),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,8 @@ private static void compareAppVersionAndShowNotification(@NonNull final Applicat

if (BuildConfig.VERSION_CODE < versionCode) {
// A pending intent to open the apk location url in the browser.
final Intent viewIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(apkLocationUrl));

final Intent intent = new Intent(Intent.ACTION_CHOOSER);
intent.putExtra(Intent.EXTRA_INTENT, viewIntent);
intent.putExtra(Intent.EXTRA_TITLE, R.string.open_with);
final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(apkLocationUrl));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

final PendingIntent pendingIntent
= PendingIntent.getActivity(application, 0, intent, 0);

Expand Down
4 changes: 3 additions & 1 deletion app/src/main/java/org/schabi/newpipe/ExitActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import android.os.Build;
import android.os.Bundle;

import org.schabi.newpipe.util.NavigationHelper;

/*
* Copyright (C) Hans-Christoph Steiner 2016 <hans@eds.org>
* ExitActivity.java is part of NewPipe.
Expand Down Expand Up @@ -48,6 +50,6 @@ protected void onCreate(final Bundle savedInstanceState) {
finish();
}

System.exit(0);
NavigationHelper.restartApp(this);
}
}
1 change: 1 addition & 0 deletions app/src/main/java/org/schabi/newpipe/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@ public void onBackPressed() {
public void onRequestPermissionsResult(final int requestCode,
@NonNull final String[] permissions,
@NonNull final int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
for (final int i : grantResults) {
if (i == PackageManager.PERMISSION_DENIED) {
return;
Expand Down
11 changes: 11 additions & 0 deletions app/src/main/java/org/schabi/newpipe/NewPipeDatabase.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,15 @@ public static void checkpoint() {
throw new RuntimeException("Checkpoint was blocked from completing");
}
}

public static void close() {
if (databaseInstance != null) {
synchronized (NewPipeDatabase.class) {
if (databaseInstance != null) {
databaseInstance.close();
databaseInstance = null;
}
}
}
}
}
Loading