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 v0.26.0 #10470

Merged
merged 211 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
211 commits
Select commit Hold shift + click to select a range
bc4f0c6
Ignore false positive inspection
TobiGr Aug 2, 2023
c06d61a
Made audio-focus calls respect mute state.
J-Stutzmann Jul 31, 2023
50d7d1b
Merge pull request #10275 from J-Stutzmann/fix/audio-focus
TobiGr Aug 3, 2023
c69bcaa
Fixed some Sonar warnings
TobiGr Aug 3, 2023
32f7427
Adjust empty state message for ListInfoFragments depending on Info st…
TobiGr Aug 5, 2023
bef79e7
Update app/src/main/java/org/schabi/newpipe/fragments/list/BaseListIn…
Stypox Aug 6, 2023
4201723
Merge pull request #10304 from TeamNewPipe/fix/media.ccc.de
Stypox Aug 6, 2023
d957725
Make capitalization of "Night theme" setting consistent with others
triallax Aug 7, 2023
601b1ef
Merge pull request #10313 from mhmdanas/fix-capitalization-of-night-t…
Stypox Aug 7, 2023
4a0ff3f
Make latest release link more obvious to bug reporters
opusforlife2 Aug 12, 2023
ac5f991
Merge pull request #10331 from TeamNewPipe/improve_bug_template
Stypox Aug 12, 2023
0db12e5
Rename StreamSizeWrapper to StreamInfoWrapper
TobiGr Jun 15, 2023
f3859ed
Retrieve MediaFormat for streams that could not be extracted by the e…
TobiGr Aug 14, 2023
e510671
Add tests for new methods retrieving MediaFormats
TobiGr Aug 14, 2023
ba84e7e
Display "Unknown quality" if quality is unknown and not MediaFormat name
TobiGr Jul 19, 2023
db5ed48
Fix some sonar warnings and make some smaller improvements
TobiGr Aug 11, 2023
62f0abe
Simplify MainActivity.tabSelected(MenuItem)
TobiGr Aug 19, 2023
e674706
Merge pull request #10360 from TeamNewPipe/improvement/tabSelected
TobiGr Aug 22, 2023
68957d3
Fix grammar in JDoc
TobiGr Aug 22, 2023
e4003c8
Translated using Weblate (Arabic)
weblate Aug 23, 2023
510db56
Image minizier: replace Number.toFixed(0) with Math.floor()
TobiGr Aug 24, 2023
2b833c5
Fix audio_track_name string formats
AudricV Aug 22, 2023
d09c650
Merge pull request #10376 from TeamNewPipe/fix-string-formats
TobiGr Aug 24, 2023
25cf917
Merge pull request #10377 from TeamNewPipe/image-minimizer
TobiGr Aug 24, 2023
2d16a06
Show play queue button in main player when there is one stream
AudricV Aug 27, 2023
7c1790b
Merge pull request #10396 from AudricV/one-stream-main-player-queue-b…
AudricV Aug 31, 2023
8625462
fix wrongly placed uchinaguchi in language selector settings caus..
ShareASmile Sep 8, 2023
b5463cf
Merge pull request #10406 from ShareASmile/fix-language-selector
TobiGr Sep 8, 2023
2cb973f
Use desugar_jdk_libs_nio.
Isira-Seneviratne Mar 11, 2023
6df808f
Use Path in the download helper classes.
Isira-Seneviratne Mar 11, 2023
4e41e12
Small code and doc improvements
TobiGr Sep 17, 2023
f2c2f17
Replace RuntimeException with IOException
TobiGr Sep 17, 2023
c74bd11
Update miscellaneous libraries
TacoTheDank Jul 20, 2023
0382782
Merge pull request #10234 from TacoTheDank/bumpMisc
TobiGr Sep 17, 2023
b1ab261
Merge pull request #10248 from Isira-Seneviratne/NIO_downloads
Isira-Seneviratne Sep 17, 2023
d1a82a8
Include a high-resolution option in the default resolution settings.
Edwardsoen Mar 28, 2023
19640d5
Add documentation to increase maintainablilty
TobiGr Sep 17, 2023
7e2ab0d
Improved downloading experience (#10407)
rishab247 Sep 17, 2023
6d13cf5
feat: add channel tabs
Theta-Dev Oct 23, 2022
8627efd
fix: get notified menu option on all tabs
Theta-Dev Oct 23, 2022
6d84d19
fix: handle unsupported content
Theta-Dev Oct 23, 2022
4859ab6
feat: prettier channel info page
Theta-Dev Oct 23, 2022
506e372
fix: add progress spinners
Theta-Dev Oct 23, 2022
c3d1e75
fix: scrollable channel description
Theta-Dev Oct 23, 2022
bb062f0
feat: add option to hide channel tabs
Theta-Dev Oct 23, 2022
c929f00
fix: remember selected channel tab on screen rotation
Theta-Dev Oct 23, 2022
74a8bfb
feat: add album tab
Theta-Dev Oct 23, 2022
16cd47f
fix: missing album tab key
Theta-Dev Oct 23, 2022
2c98d07
fix: cache channel data
Theta-Dev Oct 25, 2022
2c03ba2
refactor: adjustments to updated tab extractor API
Theta-Dev Nov 4, 2022
4357a34
fix: ChannelFragment: save last tab
Theta-Dev Nov 22, 2022
be548dc
fix: channel tab title not being set
Theta-Dev Nov 29, 2022
d87aa23
update NewPipeExtractor
Theta-Dev Apr 5, 2023
39b4ed0
refactor: common code from ChannelInfo/Description -> BaseInfoFragment
Theta-Dev Apr 5, 2023
88384dc
update extractor
Theta-Dev Apr 5, 2023
b7911a8
remove fragment_channel_info
Theta-Dev Apr 5, 2023
25e3031
cleanup: remove empty constructor from ChannelFragment
Theta-Dev Apr 5, 2023
c03c344
refactor: rename ChannelInfo to ChannelAbout
Theta-Dev Apr 5, 2023
193c3e5
fix: NPE in ChannelFragment::onSaveInstanceState
Theta-Dev Apr 6, 2023
e3614cb
Move channel header to collapsible app bar
Stypox Apr 12, 2023
b5893f3
fix: notification menu option disappears when switching tabs
Theta-Dev Apr 13, 2023
dfbd39e
fix: limit channel header height
Theta-Dev Apr 13, 2023
c076a0f
Channels are now an Info
Stypox Apr 14, 2023
a1e8b9b
Fix channel tabs in main page setting title themselves
Stypox Apr 14, 2023
371f986
Fix some code smells
Stypox Apr 14, 2023
753a920
feat: add playlist controls to channel tab
Theta-Dev Apr 15, 2023
a2a717b
update NPE
Theta-Dev Apr 16, 2023
28d952a
feat: filter fetched channel tabs
Theta-Dev Apr 16, 2023
dca32ef
add channel banner placeholder
Theta-Dev Apr 19, 2023
013d513
Add space above channel description (About tab)
Stypox Apr 21, 2023
1061bce
Add avatar and bannner URLs to channel About tab
Stypox Apr 21, 2023
c48e702
Improve placeholder channel banner handling
Stypox Apr 21, 2023
604419d
Make channel banner placeholder match YouTube's size
Stypox Apr 21, 2023
6b3a178
Show snackbar with feed loading errors
Stypox Apr 25, 2023
1519527
Fix loading feed when a channel tab is empty
Stypox Apr 25, 2023
6f23b56
Use consistent name for livestreams tab in settings keys
Stypox Apr 25, 2023
9e55014
Fix wrongly themed channel header
Stypox Apr 25, 2023
78b4b94
Update NewPipeExtractor and adapt imports
Stypox Aug 2, 2023
5c7c382
Add missing `@Override` annotations to setupMetadata() implementations
TobiGr Aug 22, 2023
6ab8716
Extract actual feed loading code into separate method
TobiGr Aug 22, 2023
89dc44b
Always show the About tab and support having no description
AudricV Aug 22, 2023
f2ee385
Hide the upload date element on the About tab
AudricV Aug 22, 2023
8fbc8ff
Remove unneeded German translation
AudricV Aug 22, 2023
0d9910c
Fix SubscriptionManagerTest tests
AudricV Aug 23, 2023
109d06b
Deduplicate code to initialize ClickListeners on playlist controls
TobiGr Sep 9, 2023
57eaa1b
Apply review
TobiGr Sep 18, 2023
64da7a0
Fix previous ActionBar title visible for a few miliseconds when openi…
TobiGr Sep 18, 2023
031b893
Remove unused content not supported TextView
TobiGr Sep 18, 2023
0eae9e7
Merge pull request #9182 from Theta-Dev/channel-tabs
Stypox Sep 18, 2023
8f83e39
Fix three memory leaks
TobiGr Aug 29, 2023
9e353f1
Merge pull request #10394 from TeamNewPipe/fix/memory-leaks
Stypox Sep 19, 2023
992bb5d
Simplify retrieveMediaFormatFromContentTypeHeader
Stypox Sep 19, 2023
725c18e
Merge pull request #10165 from TeamNewPipe/fix/media-format
Stypox Sep 19, 2023
6c848b4
Update Google Material library
TacoTheDank Sep 19, 2023
b1faed5
Replace MathUtils.clamp with Kotlin coerceIn
TacoTheDank Sep 19, 2023
6859f73
Merge pull request #10224 from TacoTheDank/moreKotlinMath
TobiGr Sep 20, 2023
748c2ba
Add comments and annotations
TobiGr Sep 20, 2023
8bf2d99
Reorder the modifiers to comply with the Java Language Specification.
TobiGr Sep 20, 2023
0acc353
Remove useless override
TobiGr Sep 20, 2023
50fb48f
Merge pull request #10244 from TacoTheDank/bumpMaterial
TobiGr Sep 20, 2023
fcb855c
Bump AGP to 8.1.1
Isira-Seneviratne Sep 17, 2023
a1f2b7f
Switch to Files.createDirectories()
Isira-Seneviratne Sep 17, 2023
779ea19
Fix doc formatting
TobiGr Sep 20, 2023
673aa0a
Merge pull request #10428 from Isira-Seneviratne/AGP_8.1
TobiGr Sep 20, 2023
b798ff5
Merge pull request #10435 from TeamNewPipe/imp/codequality
Stypox Sep 20, 2023
2a1b506
Improved accessibility of player interfaces
TobiGr Sep 18, 2023
e2de831
Merge pull request #10199 from TeamNewPipe/feat/player/accessibility
TobiGr Sep 21, 2023
af23759
Support obtaining multiple images from the extractor
Stypox May 1, 2023
0a8f28b
Add image quality preference
Stypox May 2, 2023
35073c7
Implement better image selection strategy
Stypox May 2, 2023
4f7d206
Display all thumbnails in description tab
Stypox May 2, 2023
8d463b9
Further improve image resolution strategy
Stypox May 2, 2023
bf908f0
Add documentation and fix SonarCloud issue
Stypox May 2, 2023
37af2c8
Fix possible NPE in PlayQueueNavigator
Stypox May 2, 2023
87dca0f
Separate imageListToDbUrl from choosePreferredImage
Stypox May 2, 2023
0085ca6
Fix loading images from db even if disabled
Stypox May 2, 2023
1b485dd
Allow using CHECKSTYLE:OFF comments
Stypox Aug 13, 2023
0a2d6d1
Add test for ImageStrategy
Stypox Aug 13, 2023
027b829
Use @DrawableRes in PicassoHelper
Stypox Sep 19, 2023
f8b756c
Make question mark localizable
Stypox Sep 19, 2023
b508dd6
Merge pull request #10062 from Stypox/multiple-images
Stypox Sep 22, 2023
bdc2aa2
Update extractor and remove DeobfuscateException
Stypox Sep 22, 2023
5a921c9
Merge pull request #10440 from Stypox/remove-deobfuscation-exception
AudricV Sep 22, 2023
4c4f9b4
Translated using Weblate (Kazakh)
weblate Sep 21, 2023
0c9df50
Translated using Weblate (German)
Sep 22, 2023
ac68118
Translated using Weblate (German)
TobiGr Sep 21, 2023
0a292cf
Translated using Weblate (Spanish)
gallegonovato Sep 21, 2023
11c74bd
Translated using Weblate (Japanese)
kuragehimekurara1 Sep 21, 2023
03c339d
Translated using Weblate (Greek)
VasilisKos Sep 21, 2023
7da35bf
Translated using Weblate (Slovak)
marulinko Sep 22, 2023
f0bcb3b
Translated using Weblate (Arabic)
rex07 Sep 22, 2023
d41b5d8
Translated using Weblate (Indonesian)
Linerly Sep 22, 2023
1a5dfae
Translated using Weblate (Ukrainian)
IhorHordiichuk Sep 21, 2023
a69af42
Translated using Weblate (Polish)
Aga-C Sep 21, 2023
dc45adf
Translated using Weblate (Chinese (Simplified))
Sep 22, 2023
b9c7f87
Translated using Weblate (Chinese (Traditional))
s8321414 Sep 22, 2023
39c06c5
Translated using Weblate (Hebrew)
yarons Sep 21, 2023
1084b7c
Translated using Weblate (Hindi)
ShareASmile Sep 21, 2023
b9e5ee6
Translated using Weblate (Punjabi)
ShareASmile Sep 21, 2023
cb4f656
Translated using Weblate (Slovak)
marulinko Sep 22, 2023
a5fcb41
Translated using Weblate (ryu (generated) (ryu))
kuragehimekurara1 Sep 21, 2023
279fd23
Remove translations without default value
TobiGr Sep 22, 2023
242e203
[AboutFragment / LicenseFragment] Fix license restore after rotation
TobiGr Sep 20, 2023
e206a26
Restore license dialog buttons to open the SoftwareComponent's website
TobiGr Sep 21, 2023
94c1438
Use "done" button to close license dialogs.
TobiGr Sep 23, 2023
c68a6ee
Merge pull request #10436 from TeamNewPipe/fix/license-restore
TobiGr Sep 23, 2023
d622993
Add workflow "PR size labeler" to label PRs based on the number of ch…
TobiGr Jun 17, 2023
2d4f56f
Merge pull request #10170 from TeamNewPipe/actions/pr-size-labeler
Stypox Sep 24, 2023
1630e30
Merge pull request #9987 from Edwardsoen/add_high_resolution_to_defau…
TobiGr Sep 24, 2023
cdb79ef
Make isLimitingDataUsage method of ListHelper package-private and fix…
AudricV Sep 24, 2023
77bbbc8
Use ListHelper to get secondary audio streams for video-only streams
AudricV Sep 24, 2023
609f0a2
Add write permission to PR labeler workflow
TobiGr Sep 24, 2023
f90d74c
Merge pull request #10447 from TeamNewPipe/pr-labeler
TobiGr Sep 24, 2023
db4619f
Add content: read permission to PR size labeler workflow
TobiGr Sep 26, 2023
9c86afe
Merge pull request #10453 from TeamNewPipe/pr-labeler
TobiGr Sep 26, 2023
e80b6b3
Add playlist name and video name to playlist sharing content (#10427)
snaik20 Sep 26, 2023
0758cd6
Fix wrongly formatted string ressources
TobiGr Sep 26, 2023
fe7d169
Fix PR labeler permissions
TobiGr Sep 27, 2023
b50e3c0
Use PR labeler fork
TobiGr Oct 2, 2023
1cf670d
Fix inconsistency between user interaction and database commit order …
dtcxzyw Apr 17, 2022
3d5a8af
Fix inconsistency when LocalPlaylist is used as MainFragment tab
TobiGr Aug 16, 2023
d63a6d3
Create Serbian README (#10465)
nemanya-d Oct 2, 2023
49ce9ba
Fix links to other READMEs in README.sr.md
TobiGr Oct 2, 2023
d963b69
Fix links to README.sr.md
TobiGr Oct 2, 2023
d3c7838
Fix screenshot URLs in multiple READMEs
TobiGr Oct 2, 2023
64e64f7
Update README.asm.md
TobiGr Oct 2, 2023
ed33d1d
Fix images in README.sr.md
TobiGr Oct 2, 2023
bff7ada
Merge pull request #8248 from dtcxzyw/fix-readd-to-playlist
Stypox Oct 3, 2023
5dee7a5
Translated using Weblate (Portuguese)
weblate Oct 5, 2023
be47609
Add changelog for NewPipe 0.26.0 (995)
TobiGr Oct 5, 2023
2ab2185
Translated using Weblate (Odia)
weblate Oct 7, 2023
b18ccff
Added translation using Weblate (English (Middle))
weblate Oct 7, 2023
626daf8
Deleted translation using Weblate (Kashmiri)
TobiGr Oct 7, 2023
6f51c47
Deleted translation using Weblate (Sicilian)
TobiGr Oct 7, 2023
6d0bb02
adds quotation to create filename util replacement char
sqproman Oct 13, 2023
995986e
[README] Remove Bitcoin and Bountysource donation options
TobiGr Oct 13, 2023
d10a93f
[README] Remove Bountysource badge
TobiGr Oct 13, 2023
5265b76
Fix notifiying about old "new" streams
TobiGr Oct 14, 2023
6d69451
Merge pull request #10491 from TeamNewPipe/readme
Stypox Oct 27, 2023
9fab0ec
Fix crash when setting the masking of the new feed items button if th…
AudricV Nov 14, 2023
2cf7764
Fix crash when building the play queue audio track menu if the player…
AudricV Nov 15, 2023
84d50da
Restore player service start handling before player UI separation
AudricV Sep 17, 2023
e5fda35
Remove OPUS HLS streams from playable streams
AudricV Nov 15, 2023
bf8890b
Merge pull request #10579 from AudricV/exclude-hls-opus-streams-for-p…
Stypox Nov 16, 2023
e8ed18f
Merge pull request #10578 from AudricV/try-fix-player-service-foregro…
Stypox Nov 16, 2023
3dc593f
Merge pull request #10577 from AudricV/fix-npe-play-queue-audio-track…
Stypox Nov 16, 2023
be4a5a5
Merge pull request #10576 from AudricV/fix-npe-feed-new-items-button
Stypox Nov 16, 2023
545f9ae
Merge pull request #10489 from sqproman/missing_quotation_replace_cha…
Stypox Nov 16, 2023
b4a0e08
Update app/src/main/java/org/schabi/newpipe/database/feed/dao/FeedDAO.kt
TobiGr Nov 23, 2023
ddd6d03
Add Matrix room link to ReadMe (#10632)
opusforlife2 Dec 6, 2023
7cfd537
Merge pull request #10494 from TobiGr/fix-new-streams
Stypox Dec 7, 2023
edbd623
Fix Matrix channel link
Stypox Dec 7, 2023
ce30108
Improve javadoc for `getAudioStreamFor`
Stypox Dec 7, 2023
e784af3
Merge pull request #10446 from AudricV/dl_improve_video_audio_stream_…
Stypox Dec 7, 2023
096115d
Translated using Weblate (Bengali)
weblate Dec 8, 2023
35c1dfd
Update changelog for NewPipe 0.26.0 (995)
Stypox Dec 10, 2023
0d8d347
NewPipe 0.26.0 (995)
TobiGr Oct 5, 2023
e696562
Fix crash with disabled thumbnails when trying to play a stream
TobiGr Oct 7, 2023
e39ac88
Update new version check to match new API structure
TobiGr Oct 19, 2023
8d59812
Fix channel avatar not loading correctly sometimes
Stypox Nov 16, 2023
e876647
Update NewPipeExtractor to v0.23.0
Stypox Dec 10, 2023
b871b5d
Fix crashes due to wrong root fragment manager
Stypox Dec 10, 2023
a16dcb6
Merge pull request #10645 from Stypox/fix-fragment-manager
Stypox Dec 20, 2023
80f33da
Fix OutOfMemory when fetching feed
Stypox Dec 20, 2023
c0f8d14
Fix lag with many channels on main page
Stypox Dec 20, 2023
495c985
Fix transaction too large for channel tab fragments
Stypox Dec 20, 2023
77fa4bb
Update NewPipeExtractor to v0.23.1
Stypox Dec 21, 2023
b3c82f5
Merge pull request #10671 from Stypox/channel-main-tab-lag
Stypox Dec 21, 2023
4825318
Merge pull request #10670 from Stypox/feed-oom
Stypox Dec 21, 2023
5b999a8
Merge pull request #10673 from Stypox/transaction-too-large
Stypox Dec 21, 2023
9aff49b
Translated using Weblate (Portuguese (Portugal))
weblate Dec 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ body:
attributes:
label: "Checklist"
options:
- label: "I am able to reproduce the bug with the [latest version](https://github.com/TeamNewPipe/NewPipe/releases/latest)."
- label: "I am able to reproduce the bug with the latest version given here: [CLICK THIS LINK](https://github.com/TeamNewPipe/NewPipe/releases/latest)."
required: true
- label: "I made sure that there are *no existing issues* - [open](https://github.com/TeamNewPipe/NewPipe/issues) or [closed](https://github.com/TeamNewPipe/NewPipe/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
required: true
Expand Down
17 changes: 17 additions & 0 deletions .github/changed-lines-count-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Add 'size/small' label to any changes with less than 50 lines
size/small:
max: 49

# Add 'size/medium' label to any changes between 50 and 249 lines
size/medium:
min: 50
max: 249

# Add 'size/large' label to any changes between 250 and 749 lines
size/large:
min: 250
max: 749

# Add 'size/giant' label to any changes for more than 749 lines
size/giant:
min: 750
4 changes: 2 additions & 2 deletions .github/workflows/image-minimizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ module.exports = async ({github, context}) => {
});
}

// Asnyc replace function from https://stackoverflow.com/a/48032528
// Async replace function from https://stackoverflow.com/a/48032528
async function replaceAsync(str, regex, asyncFn) {
const promises = [];
str.replace(regex, (match, ...args) => {
Expand Down Expand Up @@ -138,7 +138,7 @@ module.exports = async ({github, context}) => {
if (shouldModify) {
wasMatchModified = true;
console.log(`Modifying match '${match}'`);
return `<img alt="${g1}" src="${g2}" width=${Math.min(600, (IMG_MAX_HEIGHT_PX * probeAspectRatio).toFixed(0))} />`;
return `<img alt="${g1}" src="${g2}" width=${Math.min(600, Math.floor(IMG_MAX_HEIGHT_PX * probeAspectRatio))} />`;
}

console.log(`Match '${match}' is ok/will not be modified`);
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "PR size labeler"
on: [pull_request]
permissions:
contents: read
pull-requests: write

jobs:
changed-lines-count-labeler:
runs-on: ubuntu-latest
name: Automatically labelling pull requests based on the changed lines count
permissions:
pull-requests: write
steps:
- name: Set a label
uses: TeamNewPipe/changed-lines-count-labeler@main
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: .github/changed-lines-count-labeler.yml
14 changes: 2 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
<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>
<a href="https://hosted.weblate.org/engage/newpipe/" alt="Translation Status"><img src="https://hosted.weblate.org/widgets/newpipe/-/svg-badge.svg"></a>
<a href="https://web.libera.chat/#newpipe" alt="IRC channel: #newpipe"><img src="https://img.shields.io/badge/IRC%20chat-%23newpipe-brightgreen.svg"></a>
<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>
<a href="https://matrix.to/#/#newpipe:libera.chat" alt="Matrix channel: #newpipe"><img src="https://img.shields.io/badge/Matrix%20chat-%23newpipe-blue"></a>
</p>
<hr>
<p align="center"><a href="#screenshots">Screenshots</a> &bull; <a href="#supported-services">Supported Services</a> &bull; <a href="#description">Description</a> &bull; <a href="#features">Features</a> &bull; <a href="#installation-and-updates">Installation and updates</a> &bull; <a href="#contribution">Contribution</a> &bull; <a href="#donate">Donate</a> &bull; <a href="#license">License</a></p>
<p align="center"><a href="https://newpipe.net">Website</a> &bull; <a href="https://newpipe.net/blog/">Blog</a> &bull; <a href="https://newpipe.net/FAQ/">FAQ</a> &bull; <a href="https://newpipe.net/press/">Press</a></p>
<hr>

*Read this document in other languages: [Deutsch](doc/README.de.md), [English](README.md), [Español](doc/README.es.md), [Français](doc/README.fr.md), [हिन्दी](doc/README.hi.md), [Italiano](doc/README.it.md), [한국어](doc/README.ko.md), [Português Brasil](doc/README.pt_BR.md), [Polski](doc/README.pl.md), [ਪੰਜਾਬੀ ](doc/README.pa.md), [日本語](doc/README.ja.md), [Română](doc/README.ro.md), [Soomaali](doc/README.so.md), [Türkçe](doc/README.tr.md), [正體中文](doc/README.zh_TW.md), [অসমীয়া](doc/README.asm.md)*
*Read this document in other languages: [Deutsch](doc/README.de.md), [English](README.md), [Español](doc/README.es.md), [Français](doc/README.fr.md), [हिन्दी](doc/README.hi.md), [Italiano](doc/README.it.md), [한국어](doc/README.ko.md), [Português Brasil](doc/README.pt_BR.md), [Polski](doc/README.pl.md), [ਪੰਜਾਬੀ ](doc/README.pa.md), [日本語](doc/README.ja.md), [Română](doc/README.ro.md), [Soomaali](doc/README.so.md), [Türkçe](doc/README.tr.md), [正體中文](doc/README.zh_TW.md), [অসমীয়া](doc/README.asm.md), [Српски](doc/README.sr.md)*

<b>WARNING: THIS APP IS IN BETA, SO YOU MAY ENCOUNTER BUGS. IF YOU DO, OPEN AN ISSUE IN OUR GITHUB REPOSITORY BY FILLING OUT THE ISSUE TEMPLATE.</b>

Expand Down Expand Up @@ -126,16 +126,6 @@ If you like NewPipe, you're welcome to send a donation. We prefer Liberapay, as
<td><a href="https://liberapay.com/TeamNewPipe/"><img src="assets/liberapay_qr_code.png" alt="Visit NewPipe at liberapay.com" width="100px"></a></td>
<td><a href="https://liberapay.com/TeamNewPipe/donate"><img src="assets/liberapay_donate_button.svg" alt="Donate via Liberapay" height="35px"></a></td>
</tr>
<tr>
<td><img src="https://bitcoin.org/img/icons/logotop.svg" alt="Bitcoin"></td>
<td><img src="assets/bitcoin_qr_code.png" alt="Bitcoin QR code" width="100px"></td>
<td><samp>16A9J59ahMRqkLSZjhYj33n9j3fMztFxnh</samp></td>
</tr>
<tr>
<td><a href="https://www.bountysource.com/teams/newpipe"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/22/Bountysource.png/320px-Bountysource.png" alt="Bountysource" width="190px"></a></td>
<td><a href="https://www.bountysource.com/teams/newpipe"><img src="assets/bountysource_qr_code.png" alt="Visit NewPipe at bountysource.com" width="100px"></a></td>
<td><a href="https://www.bountysource.com/teams/newpipe/issues"><img src="https://img.shields.io/bountysource/team/newpipe/activity.svg?colorB=cd201f" height="30px" alt="Check out how many bounties you can earn."></a></td>
</tr>
</table>

## Privacy Policy
Expand Down
17 changes: 7 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ android {
resValue "string", "app_name", "NewPipe"
minSdk 21
targetSdk 33
versionCode 994
versionName "0.25.2"
versionCode 995
versionName "0.26.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

Expand Down Expand Up @@ -50,9 +50,6 @@ android {
}
}

// Keep the release build type at the end of the list to override 'archivesBaseName' of
// debug build. This seems to be a Gradle bug, therefore
// TODO: update Gradle version
release {
if (System.properties.containsKey('packageSuffix')) {
applicationIdSuffix System.getProperty('packageSuffix')
Expand Down Expand Up @@ -115,7 +112,7 @@ ext {

icepickVersion = '3.2.0'
exoPlayerVersion = '2.18.7'
googleAutoServiceVersion = '1.0.1'
googleAutoServiceVersion = '1.1.1'
groupieVersion = '2.10.1'
markwonVersion = '4.6.2'

Expand Down Expand Up @@ -192,23 +189,23 @@ sonar {

dependencies {
/** Desugaring **/
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs_nio:2.0.3'

/** 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.22.7'
implementation 'com.github.TeamNewPipe:NewPipeExtractor:v0.23.1'
implementation 'com.github.TeamNewPipe:NoNonsense-FilePicker:5.0.0'

/** Checkstyle **/
checkstyle "com.puppycrawl.tools:checkstyle:${checkstyleVersion}"
ktlint 'com.pinterest:ktlint:0.45.2'

/** Kotlin **/
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlin_version}"
implementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}"

/** AndroidX **/
implementation 'androidx.appcompat:appcompat:1.5.1'
Expand All @@ -232,7 +229,7 @@ dependencies {
implementation 'androidx.viewpager2:viewpager2:1.1.0-beta01'
implementation "androidx.work:work-runtime-ktx:${androidxWorkVersion}"
implementation "androidx.work:work-rxjava3:${androidxWorkVersion}"
implementation 'com.google.android.material:material:1.6.1'
implementation 'com.google.android.material:material:1.9.0'

/** Third-party libraries **/
// Instance state boilerplate elimination
Expand Down
124 changes: 124 additions & 0 deletions app/src/androidTest/java/org/schabi/newpipe/database/FeedDAOTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
package org.schabi.newpipe.database

import android.content.Context
import androidx.room.Room
import androidx.test.core.app.ApplicationProvider
import io.reactivex.rxjava3.core.Single
import org.junit.After
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Before
import org.junit.Test
import org.schabi.newpipe.database.feed.dao.FeedDAO
import org.schabi.newpipe.database.feed.model.FeedEntity
import org.schabi.newpipe.database.feed.model.FeedGroupEntity
import org.schabi.newpipe.database.stream.StreamWithState
import org.schabi.newpipe.database.stream.dao.StreamDAO
import org.schabi.newpipe.database.stream.model.StreamEntity
import org.schabi.newpipe.database.subscription.SubscriptionDAO
import org.schabi.newpipe.database.subscription.SubscriptionEntity
import org.schabi.newpipe.extractor.ServiceList
import org.schabi.newpipe.extractor.channel.ChannelInfo
import org.schabi.newpipe.extractor.stream.StreamType
import java.io.IOException
import java.time.OffsetDateTime
import kotlin.streams.toList

class FeedDAOTest {
private lateinit var db: AppDatabase
private lateinit var feedDAO: FeedDAO
private lateinit var streamDAO: StreamDAO
private lateinit var subscriptionDAO: SubscriptionDAO

private val serviceId = ServiceList.YouTube.serviceId

private val stream1 = StreamEntity(1, serviceId, "https://youtube.com/watch?v=1", "stream 1", StreamType.VIDEO_STREAM, 1000, "channel-1", "https://youtube.com/channel/1", "https://i.ytimg.com/vi/1/hqdefault.jpg", 100, "2023-01-01", OffsetDateTime.parse("2023-01-01T00:00:00Z"))
private val stream2 = StreamEntity(2, serviceId, "https://youtube.com/watch?v=2", "stream 2", StreamType.VIDEO_STREAM, 1000, "channel-1", "https://youtube.com/channel/1", "https://i.ytimg.com/vi/1/hqdefault.jpg", 100, "2023-01-02", OffsetDateTime.parse("2023-01-02T00:00:00Z"))
private val stream3 = StreamEntity(3, serviceId, "https://youtube.com/watch?v=3", "stream 3", StreamType.LIVE_STREAM, 1000, "channel-1", "https://youtube.com/channel/1", "https://i.ytimg.com/vi/1/hqdefault.jpg", 100, "2023-01-03", OffsetDateTime.parse("2023-01-03T00:00:00Z"))
private val stream4 = StreamEntity(4, serviceId, "https://youtube.com/watch?v=4", "stream 4", StreamType.VIDEO_STREAM, 1000, "channel-2", "https://youtube.com/channel/2", "https://i.ytimg.com/vi/1/hqdefault.jpg", 100, "2023-08-10", OffsetDateTime.parse("2023-08-10T00:00:00Z"))
private val stream5 = StreamEntity(5, serviceId, "https://youtube.com/watch?v=5", "stream 5", StreamType.VIDEO_STREAM, 1000, "channel-2", "https://youtube.com/channel/2", "https://i.ytimg.com/vi/1/hqdefault.jpg", 100, "2023-08-20", OffsetDateTime.parse("2023-08-20T00:00:00Z"))
private val stream6 = StreamEntity(6, serviceId, "https://youtube.com/watch?v=6", "stream 6", StreamType.VIDEO_STREAM, 1000, "channel-3", "https://youtube.com/channel/3", "https://i.ytimg.com/vi/1/hqdefault.jpg", 100, "2023-09-01", OffsetDateTime.parse("2023-09-01T00:00:00Z"))
private val stream7 = StreamEntity(7, serviceId, "https://youtube.com/watch?v=7", "stream 7", StreamType.VIDEO_STREAM, 1000, "channel-4", "https://youtube.com/channel/4", "https://i.ytimg.com/vi/1/hqdefault.jpg", 100, "2023-08-10", OffsetDateTime.parse("2023-08-10T00:00:00Z"))

private val allStreams = listOf(
stream1, stream2, stream3, stream4, stream5, stream6, stream7
)

@Before
fun createDb() {
val context = ApplicationProvider.getApplicationContext<Context>()
db = Room.inMemoryDatabaseBuilder(
context, AppDatabase::class.java
).build()
feedDAO = db.feedDAO()
streamDAO = db.streamDAO()
subscriptionDAO = db.subscriptionDAO()
}

@After
@Throws(IOException::class)
fun closeDb() {
db.close()
}

@Test
fun testUnlinkStreamsOlderThan_KeepOne() {
setupUnlinkDelete("2023-08-15T00:00:00Z")
val streams = feedDAO.getStreams(
FeedGroupEntity.GROUP_ALL_ID, includePlayed = true, includePartiallyPlayed = true, null
)
.blockingGet()
val allowedStreams = listOf(stream3, stream5, stream6, stream7)
assertEqual(streams, allowedStreams)
}

@Test
fun testUnlinkStreamsOlderThan_KeepMultiple() {
setupUnlinkDelete("2023-08-01T00:00:00Z")
val streams = feedDAO.getStreams(
FeedGroupEntity.GROUP_ALL_ID, includePlayed = true, includePartiallyPlayed = true, null
)
.blockingGet()
val allowedStreams = listOf(stream3, stream4, stream5, stream6, stream7)
assertEqual(streams, allowedStreams)
}

private fun assertEqual(streams: List<StreamWithState>?, allowedStreams: List<StreamEntity>) {
assertNotNull(streams)
assertEquals(allowedStreams, streams!!.stream().map { it.stream }.toList().sortedBy { it.uid })
}

private fun setupUnlinkDelete(time: String) {
clearAndFillTables()
Single.fromCallable {
feedDAO.unlinkStreamsOlderThan(OffsetDateTime.parse(time))
}.blockingSubscribe()
Single.fromCallable {
streamDAO.deleteOrphans()
}.blockingSubscribe()
}

private fun clearAndFillTables() {
db.clearAllTables()
streamDAO.insertAll(allStreams)
subscriptionDAO.insertAll(
listOf(
SubscriptionEntity.from(ChannelInfo(serviceId, "1", "https://youtube.com/channel/1", "https://youtube.com/channel/1", "channel-1")),
SubscriptionEntity.from(ChannelInfo(serviceId, "2", "https://youtube.com/channel/2", "https://youtube.com/channel/2", "channel-2")),
SubscriptionEntity.from(ChannelInfo(serviceId, "3", "https://youtube.com/channel/3", "https://youtube.com/channel/3", "channel-3")),
SubscriptionEntity.from(ChannelInfo(serviceId, "4", "https://youtube.com/channel/4", "https://youtube.com/channel/4", "channel-4")),
)
)
feedDAO.insertAll(
listOf(
FeedEntity(1, 1),
FeedEntity(2, 1),
FeedEntity(3, 1),
FeedEntity(4, 2),
FeedEntity(5, 2),
FeedEntity(6, 3),
FeedEntity(7, 4),
)
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,13 @@
import org.junit.Test;
import org.schabi.newpipe.database.AppDatabase;
import org.schabi.newpipe.database.feed.model.FeedGroupEntity;
import org.schabi.newpipe.database.stream.model.StreamEntity;
import org.schabi.newpipe.database.subscription.SubscriptionEntity;
import org.schabi.newpipe.extractor.channel.ChannelInfo;
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.extractor.localization.DateWrapper;
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import org.schabi.newpipe.extractor.stream.StreamType;
import org.schabi.newpipe.testUtil.TestDatabase;
import org.schabi.newpipe.testUtil.TrampolineSchedulerRule;

import java.io.IOException;
import java.time.OffsetDateTime;
import java.util.Comparator;
import java.util.List;

public class SubscriptionManagerTest {
Expand Down Expand Up @@ -58,7 +52,7 @@ public void testInsert() throws ExtractionException, IOException {
final ChannelInfo info = ChannelInfo.getInfo("https://www.youtube.com/c/3blue1brown");
final SubscriptionEntity subscription = SubscriptionEntity.from(info);

manager.insertSubscription(subscription, info);
manager.insertSubscription(subscription);
final SubscriptionEntity readSubscription = getAssertOneSubscriptionEntity();

// the uid has changed, since the uid is chosen upon inserting, but the rest should match
Expand All @@ -76,7 +70,7 @@ public void testUpdateNotificationMode() throws ExtractionException, IOException
final SubscriptionEntity subscription = SubscriptionEntity.from(info);
subscription.setNotificationMode(0);

manager.insertSubscription(subscription, info);
manager.insertSubscription(subscription);
manager.updateNotificationMode(subscription.getServiceId(), subscription.getUrl(), 1)
.blockingAwait();
final SubscriptionEntity anotherSubscription = getAssertOneSubscriptionEntity();
Expand All @@ -85,35 +79,4 @@ public void testUpdateNotificationMode() throws ExtractionException, IOException
assertEquals(subscription.getUrl(), anotherSubscription.getUrl());
assertEquals(1, anotherSubscription.getNotificationMode());
}

@Test
public void testRememberRecentStreams() throws ExtractionException, IOException {
final ChannelInfo info = ChannelInfo.getInfo("https://www.youtube.com/c/Polyphia");
final List<StreamInfoItem> relatedItems = List.of(
new StreamInfoItem(0, "a", "b", StreamType.VIDEO_STREAM),
new StreamInfoItem(1, "c", "d", StreamType.AUDIO_STREAM),
new StreamInfoItem(2, "e", "f", StreamType.AUDIO_LIVE_STREAM),
new StreamInfoItem(3, "g", "h", StreamType.LIVE_STREAM));
relatedItems.forEach(item -> {
// these two fields must be non-null for the insert to succeed
item.setUploaderUrl(info.getUrl());
item.setUploaderName(info.getName());
// the upload date must not be too much in the past for the item to actually be inserted
item.setUploadDate(new DateWrapper(OffsetDateTime.now()));
});
info.setRelatedItems(relatedItems);
final SubscriptionEntity subscription = SubscriptionEntity.from(info);

manager.insertSubscription(subscription, info);
final List<StreamEntity> streams = database.streamDAO().getAll().blockingFirst();

assertEquals(4, streams.size());
streams.sort(Comparator.comparing(StreamEntity::getServiceId));
for (int i = 0; i < 4; i++) {
assertEquals(relatedItems.get(0).getServiceId(), streams.get(0).getServiceId());
assertEquals(relatedItems.get(0).getUrl(), streams.get(0).getUrl());
assertEquals(relatedItems.get(0).getName(), streams.get(0).getTitle());
assertEquals(relatedItems.get(0).getStreamType(), streams.get(0).getStreamType());
}
}
}
Loading