diff --git a/.gitignore b/.gitignore index 1352b69172a..5d13e6db1e6 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,7 @@ captures/ .weblate *.class app/debug/ -app/release/ +#app/release/ # vscode / eclipse files *.classpath @@ -17,4 +17,4 @@ app/release/ *.settings bin/ .vscode/ -*.code-workspace +*.code-workspace \ No newline at end of file diff --git a/README.md b/README.md index 001f0eeab7a..3628d72fbb5 100644 --- a/README.md +++ b/README.md @@ -1,139 +1,15 @@ -

We are planning to rewrite large chunks of the codebase, to bring about a new, modern and stable NewPipe!

-

Please do not open pull requests for new features now, only bugfix PRs will be accepted.

+this is a homebrew fork of NewPipe to archive some rudimental parental control: -

-

NewPipe

-

A libre lightweight streaming front-end for Android.

+- only videos from subscribed channels are shown in search results +- You can only subscribe to channels when you enter the hardcoded password '1234' -

Get it on F-Droid

+Warning: + This fork is a private project, and actually not intended for public release. But of course anybody can try this app: -

- - - - - - -

-
-

ScreenshotsSupported ServicesDescriptionFeaturesInstallation and updatesContributionDonateLicense

-

WebsiteBlogFAQPress

-
+ https://github.com/malerva0/CloggedPipe/raw/dev/app/release/app-release.apk + + Please, dont expect any support. + + The mentioned changes have been implemented in a laypersons way and are almost untested and come with several side effects (comments to videos not shown,...) -*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)* - -> [!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. -> -> PUTTING NEWPIPE, OR ANY FORK OF IT, INTO THE GOOGLE PLAY STORE VIOLATES THEIR TERMS AND CONDITIONS. - -## Screenshots - -[](fastlane/metadata/android/en-US/images/phoneScreenshots/00.png) -[](fastlane/metadata/android/en-US/images/phoneScreenshots/01.png) -[](fastlane/metadata/android/en-US/images/phoneScreenshots/02.png) -[](fastlane/metadata/android/en-US/images/phoneScreenshots/03.png) -[](fastlane/metadata/android/en-US/images/phoneScreenshots/04.png) -[](fastlane/metadata/android/en-US/images/phoneScreenshots/05.png) -[](fastlane/metadata/android/en-US/images/phoneScreenshots/06.png) -[](fastlane/metadata/android/en-US/images/phoneScreenshots/07.png) -[](fastlane/metadata/android/en-US/images/phoneScreenshots/08.png) -

-[](fastlane/metadata/android/en-US/images/tenInchScreenshots/09.png) -[](fastlane/metadata/android/en-US/images/tenInchScreenshots/10.png) - -### Supported Services - -NewPipe currently supports these services: - - -* YouTube ([website](https://www.youtube.com/)) and YouTube Music ([website](https://music.youtube.com/)) ([wiki](https://en.wikipedia.org/wiki/YouTube)) -* PeerTube ([website](https://joinpeertube.org/)) and all its instances (open the website to know what that means!) ([wiki](https://en.wikipedia.org/wiki/PeerTube)) -* Bandcamp ([website](https://bandcamp.com/)) ([wiki](https://en.wikipedia.org/wiki/Bandcamp)) -* SoundCloud ([website](https://soundcloud.com/)) ([wiki](https://en.wikipedia.org/wiki/SoundCloud)) -* media.ccc.de ([website](https://media.ccc.de/)) ([wiki](https://en.wikipedia.org/wiki/Chaos_Computer_Club)) - -As you can see, NewPipe supports multiple video and audio services. Though it started off with YouTube, other people have added more services over the years, making NewPipe more and more versatile! - -Partially due to circumstance, and partially due to its popularity, YouTube is the best supported out of these services. If you use or are familiar with any of these other services, please help us improve support for them! We're looking for maintainers for SoundCloud and PeerTube. - -If you intend to add a new service, please get in touch with us first! Our [docs](https://teamnewpipe.github.io/documentation/) provide more information on how a new service can be added to the app and to the [NewPipe Extractor](https://github.com/TeamNewPipe/NewPipeExtractor). - -## Description - -NewPipe works by fetching the required data from the official API (e.g. PeerTube) of the service you're using. If the official API is restricted (e.g. YouTube) for our purposes, or is proprietary, the app parses the website or uses an internal API instead. This means that you don't need an account on any service to use NewPipe. - -Also, since they are free and open source software, neither the app nor the Extractor use any proprietary libraries or frameworks, such as Google Play Services. This means you can use NewPipe on devices or custom ROMs that do not have Google apps installed. - -### Features - -* Watch videos at resolutions up to 4K -* Listen to audio in the background, only loading the audio stream to save data -* Popup mode (floating player, aka Picture-in-Picture) -* Watch live streams -* Show/hide subtitles/closed captions -* Search videos and audios (on YouTube, you can specify the content language as well) -* Enqueue videos (and optionally save them as local playlists) -* Show/hide general information about videos (such as description and tags) -* Show/hide next/related videos -* Show/hide comments -* Search videos, audios, channels, playlists and albums -* Browse videos and audios within a channel -* Subscribe to channels (yes, without logging into any account!) -* Get notifications about new videos from channels you're subscribed to -* Create and edit channel groups (for easier browsing and management) -* Browse video feeds generated from your channel groups -* View and search your watch history -* Search and watch playlists (these are remote playlists, which means they're fetched from the service you're browsing) -* Create and edit local playlists (these are created and saved within the app, and have nothing to do with any service) -* Download videos/audios/subtitles (closed captions) -* Open in Kodi -* Watch/Block age-restricted material - - - - -## Installation and updates -You can install NewPipe using one of the following methods: - 1. Add our custom repo to F-Droid and install it from there. The instructions are here: https://newpipe.net/FAQ/tutorials/install-add-fdroid-repo/ - 2. Download the APK from [GitHub Releases](https://github.com/TeamNewPipe/NewPipe/releases) and install it. - 3. Update via F-Droid. This is the slowest method of getting updates, as F-Droid must recognize changes, build the APK itself, sign it, and then push the update to users. - 4. Build a debug APK yourself. This is the fastest way to get new features on your device, but is much more complicated, so we recommend using one of the other methods. - 5. If you're interested in a specific feature or bugfix provided in a Pull Request in this repo, you can also download its APK from within the PR. Read the PR description for instructions. The great thing about PR-specific APKs is that they're installed side-by-side the official app, so you don't have to worry about losing your data or messing anything up. - -We recommend method 1 for most users. APKs installed using method 1 or 2 are compatible with each other (meaning that if you installed NewPipe using either method 1 or 2, you can also update NewPipe using the other), but not with those installed using method 3. This is due to the same signing key (ours) being used for 1 and 2, but a different signing key (F-Droid's) being used for 3. Building a debug APK using method 4 excludes a key entirely. Signing keys help ensure that a user isn't tricked into installing a malicious update to an app. When using method 5, each APK is signed with a different random key supplied by GitHub Actions, so you cannot even update it. You will have to backup and restore the app data each time you wish to use a new APK. - -In the meanwhile, if you want to switch sources for some reason (e.g. NewPipe's core functionality breaks and F-Droid doesn't have the latest update yet), we recommend following this procedure: -1. Back up your data via Settings > Backup and Restore > Export Database so you keep your history, subscriptions, and playlists -2. Uninstall NewPipe -3. Download the APK from the new source and install it -4. Import the data from step 1 via Settings > Backup and Restore > Import Database - -Note: when you're importing a database into the official app, always make sure that it is the one you exported _from_ the official app. If you import a database exported from an APK other than the official app, it may break things. Such an action is unsupported, and you should only do so when you're absolutely certain you know what you're doing. - -## Contribution -Whether you have ideas, translations, design changes, code cleaning, or even major code changes, help is always welcome. The app gets better and better with each contribution, no matter how big or small! If you'd like to get involved, check our [contribution notes](.github/CONTRIBUTING.md). - - -Translation status - - -## Donate -If you like NewPipe, you're welcome to send a donation. We prefer Liberapay, as it is both open-source and non-profit. For further info on donating to NewPipe, please visit our [website](https://newpipe.net/donate). - - - - - - - -
LiberapayVisit NewPipe at liberapay.comDonate via Liberapay
- -## Privacy Policy - -The NewPipe project aims to provide a private, anonymous experience for using web-based media services. Therefore, the app does not collect any data without your consent. NewPipe's privacy policy explains in detail what data is sent and stored when you send a crash report, or leave a comment in our blog. You can find the document [here](https://newpipe.net/legal/privacy/). - -## License -[![GNU GPLv3 Image](https://www.gnu.org/graphics/gplv3-127x51.png)](https://www.gnu.org/licenses/gpl-3.0.en.html) - -NewPipe is Free Software: You can use, study, share, and improve it at will. Specifically you can redistribute and/or modify it under the terms of the [GNU General Public License](https://www.gnu.org/licenses/gpl.html) as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + diff --git a/app/build.gradle b/app/build.gradle index 28a20819511..cbc9011e7f1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -16,9 +16,9 @@ android { namespace 'org.schabi.newpipe' defaultConfig { - applicationId "org.schabi.newpipe" - resValue "string", "app_name", "NewPipe" - minSdk 21 + applicationId "org.malerva0.cloggedpipe" + resValue "string", "app_name", "CloggedPipe" + minSdk 26 targetSdk 33 versionCode 997 versionName "0.27.0" @@ -42,24 +42,25 @@ android { if (normalizedWorkingBranch.isEmpty() || workingBranch == "master" || workingBranch == "dev") { // default values when branch name could not be determined or is master or dev applicationIdSuffix ".debug" - resValue "string", "app_name", "NewPipe Debug" + resValue "string", "app_name", "CloggedPipe Debug" } else { applicationIdSuffix ".debug." + normalizedWorkingBranch - resValue "string", "app_name", "NewPipe " + workingBranch - archivesBaseName = 'NewPipe_' + normalizedWorkingBranch + resValue "string", "app_name", "CloggedPipe " + workingBranch + archivesBaseName = 'CloggedPipe_' + normalizedWorkingBranch } } release { if (System.properties.containsKey('packageSuffix')) { applicationIdSuffix System.getProperty('packageSuffix') - resValue "string", "app_name", "NewPipe " + System.getProperty('packageSuffix') - archivesBaseName = 'NewPipe_' + System.getProperty('packageSuffix') + resValue "string", "app_name", "CloggedPipe " + System.getProperty('packageSuffix') + archivesBaseName = 'CloggedPipe_' + System.getProperty('packageSuffix') } minifyEnabled true shrinkResources false // disabled to fix F-Droid's reproducible build proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' archivesBaseName = 'app' + signingConfig signingConfigs.debug } } diff --git a/app/release/app-release.apk b/app/release/app-release.apk new file mode 100644 index 00000000000..b67701e2cf2 Binary files /dev/null and b/app/release/app-release.apk differ diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json new file mode 100644 index 00000000000..39a9975e016 --- /dev/null +++ b/app/release/output-metadata.json @@ -0,0 +1,20 @@ +{ + "version": 3, + "artifactType": { + "type": "APK", + "kind": "Directory" + }, + "applicationId": "org.malerva0.cloggedpipe", + "variantName": "release", + "elements": [ + { + "type": "SINGLE", + "filters": [], + "attributes": [], + "versionCode": 997, + "versionName": "0.27.0", + "outputFile": "app-release.apk" + } + ], + "elementType": "File" +} \ No newline at end of file diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java index 7e83d995883..ec351b8d5d8 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java @@ -285,7 +285,10 @@ private void monitorSubscription(final ChannelInfo info) { private Function mapOnSubscribe(final SubscriptionEntity subscription) { return (@NonNull Object o) -> { - subscriptionManager.insertSubscription(subscription); + final String a = binding.editTextNumberPassword.getText().toString(); + if (a.equals("1234")) { + subscriptionManager.insertSubscription(subscription); + } return o; }; } diff --git a/app/src/main/java/org/schabi/newpipe/info_list/InfoListAdapter.java b/app/src/main/java/org/schabi/newpipe/info_list/InfoListAdapter.java index 575568c00f9..603f2fc8a04 100644 --- a/app/src/main/java/org/schabi/newpipe/info_list/InfoListAdapter.java +++ b/app/src/main/java/org/schabi/newpipe/info_list/InfoListAdapter.java @@ -11,6 +11,8 @@ import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; +import org.schabi.newpipe.database.feed.model.FeedGroupEntity; +import org.schabi.newpipe.database.subscription.SubscriptionEntity; import org.schabi.newpipe.databinding.PignateFooterBinding; import org.schabi.newpipe.extractor.InfoItem; import org.schabi.newpipe.extractor.channel.ChannelInfoItem; @@ -32,9 +34,9 @@ import org.schabi.newpipe.info_list.holder.StreamInfoItemHolder; import org.schabi.newpipe.info_list.holder.StreamMiniInfoItemHolder; import org.schabi.newpipe.local.history.HistoryRecordManager; +import org.schabi.newpipe.local.subscription.SubscriptionManager; import org.schabi.newpipe.util.FallbackViewHolder; import org.schabi.newpipe.util.OnClickGesture; - import java.util.ArrayList; import java.util.List; import java.util.function.Supplier; @@ -85,6 +87,9 @@ public class InfoListAdapter extends RecyclerView.Adapter infoItemList; private final HistoryRecordManager recordManager; + private final SubscriptionManager subscriptionManager; + + private boolean useMiniVariant = false; private boolean showFooter = false; @@ -95,6 +100,7 @@ public class InfoListAdapter extends RecyclerView.Adapter(); } @@ -133,7 +139,28 @@ public void addInfoItemList(@Nullable final List data) { } final int offsetStart = sizeConsideringHeaderOffset(); - infoItemList.addAll(data); + + final List dataFiltered = new ArrayList<>(); + for (final InfoItem ii : data) { + if (ii.getInfoType() == InfoItem.InfoType.CHANNEL) { + dataFiltered.add(ii); + } + if (ii.getInfoType() == InfoItem.InfoType.STREAM) { + final StreamInfoItem s = (StreamInfoItem) ii; + final List subs = + subscriptionManager.getSubscriptions(FeedGroupEntity.GROUP_ALL_ID, + "", false).blockingFirst(); + for (final SubscriptionEntity si: subs) { + final String streamUploaderName = s.getUploaderName(); + final String tempChannelName = si.getName(); + if (streamUploaderName.equals(tempChannelName)) { + dataFiltered.add(s); + break; + } + } + } + } + infoItemList.addAll(dataFiltered); if (DEBUG) { Log.d(TAG, "addInfoItemList() after > offsetStart = " + offsetStart + ", " @@ -141,7 +168,7 @@ public void addInfoItemList(@Nullable final List data) { + "hasHeader = " + hasHeader() + ", " + "showFooter = " + showFooter); } - notifyItemRangeInserted(offsetStart, data.size()); + notifyItemRangeInserted(offsetStart, dataFiltered.size()); if (showFooter) { final int footerNow = sizeConsideringHeaderOffset(); diff --git a/app/src/main/res/layout-land/list_stream_card_item.xml b/app/src/main/res/layout-land/list_stream_card_item.xml deleted file mode 120000 index 70228ee1d20..00000000000 --- a/app/src/main/res/layout-land/list_stream_card_item.xml +++ /dev/null @@ -1 +0,0 @@ -../layout/list_stream_item.xml \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_channel.xml b/app/src/main/res/layout/fragment_channel.xml index f557e339696..8ada5cf3712 100644 --- a/app/src/main/res/layout/fragment_channel.xml +++ b/app/src/main/res/layout/fragment_channel.xml @@ -72,6 +72,8 @@ app:tint="@null" tools:visibility="visible" /> + + + + @color/black @color/black - #CD201F + #99198F #999999 #6C6C6C diff --git a/app/src/main/res/values/colors_services.xml b/app/src/main/res/values/colors_services.xml index f3487810ac0..db6d15f1d64 100644 --- a/app/src/main/res/values/colors_services.xml +++ b/app/src/main/res/values/colors_services.xml @@ -1,10 +1,12 @@ - #e53935 + #99198F #000000 - #992722 + + + #99198F #FFFFFF