From 5108d75682bf5cbb142ca4be8796daab02b9fb3f Mon Sep 17 00:00:00 2001 From: Stypox Date: Tue, 25 Jan 2022 17:37:15 +0100 Subject: [PATCH 01/10] Fix NPE and add some `@Nullable`s Fix NullPointerException in PlayerHolder.getQueueSize() and add `@Nullable` here and there so that the linter reports risks of NPEs --- .../main/java/org/schabi/newpipe/player/Player.java | 4 +++- .../schabi/newpipe/player/helper/PlayerHolder.java | 12 ++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/Player.java b/app/src/main/java/org/schabi/newpipe/player/Player.java index 81ef25db1..c002ba16d 100644 --- a/app/src/main/java/org/schabi/newpipe/player/Player.java +++ b/app/src/main/java/org/schabi/newpipe/player/Player.java @@ -260,7 +260,8 @@ public final class Player implements // Playback //////////////////////////////////////////////////////////////////////////*/ - private PlayQueue playQueue; + // play queue might be null e.g. while player is starting + @Nullable private PlayQueue playQueue; private PlayQueueAdapter playQueueAdapter; private StreamSegmentAdapter segmentAdapter; @@ -4202,6 +4203,7 @@ public final class Player implements } + @Nullable public PlayQueue getPlayQueue() { return playQueue; } diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHolder.java b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHolder.java index 10e315667..42865564a 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHolder.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHolder.java @@ -38,12 +38,12 @@ public final class PlayerHolder { private static final boolean DEBUG = MainActivity.DEBUG; private static final String TAG = PlayerHolder.class.getSimpleName(); - private PlayerServiceExtendedEventListener listener; + @Nullable private PlayerServiceExtendedEventListener listener; private final PlayerServiceConnection serviceConnection = new PlayerServiceConnection(); private boolean bound; - private MainPlayer playerService; - private Player player; + @Nullable private MainPlayer playerService; + @Nullable private Player player; /** * Returns the current {@link MainPlayer.PlayerType} of the {@link MainPlayer} service, @@ -75,7 +75,11 @@ public final class PlayerHolder { } public int getQueueSize() { - return isPlayerOpen() ? player.getPlayQueue().size() : 0; + if (player == null || player.getPlayQueue() == null) { + // player play queue might be null e.g. while player is starting + return 0; + } + return player.getPlayQueue().size(); } public void setListener(@Nullable final PlayerServiceExtendedEventListener newListener) { From 71c5aaa11ec020fa9b03a619758943ce01424683 Mon Sep 17 00:00:00 2001 From: Stypox Date: Thu, 27 Jan 2022 17:11:16 +0100 Subject: [PATCH 02/10] Do not show enqueue button if play queue not ready --- .../schabi/newpipe/fragments/list/BaseListFragment.java | 2 +- .../fragments/list/playlist/PlaylistFragment.java | 2 +- .../java/org/schabi/newpipe/local/feed/FeedFragment.kt | 2 +- .../local/history/StatisticsPlaylistFragment.java | 2 +- .../newpipe/local/playlist/LocalPlaylistFragment.java | 2 +- .../org/schabi/newpipe/player/helper/PlayerHolder.java | 9 +++++++++ 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java index 4319d42ee..3c2e65bb7 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java @@ -352,7 +352,7 @@ public abstract class BaseListFragment extends BaseStateFragment } final List entries = new ArrayList<>(); - if (PlayerHolder.getInstance().isPlayerOpen()) { + if (PlayerHolder.getInstance().isPlayQueueReady()) { entries.add(StreamDialogEntry.enqueue); if (PlayerHolder.getInstance().getQueueSize() > 1) { diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java index 85c47ec74..640d08064 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java @@ -149,7 +149,7 @@ public class PlaylistFragment extends BaseListInfoFragment { final ArrayList entries = new ArrayList<>(); - if (PlayerHolder.getInstance().isPlayerOpen()) { + if (PlayerHolder.getInstance().isPlayQueueReady()) { entries.add(StreamDialogEntry.enqueue); if (PlayerHolder.getInstance().getQueueSize() > 1) { diff --git a/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt b/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt index 905290b48..e6da0d545 100644 --- a/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt +++ b/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt @@ -362,7 +362,7 @@ class FeedFragment : BaseStateFragment() { if (context == null || context.resources == null || activity == null) return val entries = ArrayList() - if (PlayerHolder.getInstance().isPlayerOpen) { + if (PlayerHolder.getInstance().isPlayQueueReady) { entries.add(StreamDialogEntry.enqueue) if (PlayerHolder.getInstance().queueSize > 1) { diff --git a/app/src/main/java/org/schabi/newpipe/local/history/StatisticsPlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/local/history/StatisticsPlaylistFragment.java index 43a5fcf3c..73682d5d5 100644 --- a/app/src/main/java/org/schabi/newpipe/local/history/StatisticsPlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/history/StatisticsPlaylistFragment.java @@ -338,7 +338,7 @@ public class StatisticsPlaylistFragment final ArrayList entries = new ArrayList<>(); - if (PlayerHolder.getInstance().isPlayerOpen()) { + if (PlayerHolder.getInstance().isPlayQueueReady()) { entries.add(StreamDialogEntry.enqueue); if (PlayerHolder.getInstance().getQueueSize() > 1) { diff --git a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java index 87d913b3b..feb5b2f96 100644 --- a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java @@ -753,7 +753,7 @@ public class LocalPlaylistFragment extends BaseLocalListFragment entries = new ArrayList<>(); - if (PlayerHolder.getInstance().isPlayerOpen()) { + if (PlayerHolder.getInstance().isPlayQueueReady()) { entries.add(StreamDialogEntry.enqueue); if (PlayerHolder.getInstance().getQueueSize() > 1) { diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHolder.java b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHolder.java index 42865564a..06a2e52ab 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHolder.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHolder.java @@ -70,6 +70,15 @@ public final class PlayerHolder { return player != null; } + /** + * Use this method to only allow the user to manipulate the play queue (e.g. by enqueueing via + * the stream long press menu) when there actually is a play queue to manipulate. + * @return true only if the player is open and its play queue is ready (i.e. it is not null) + */ + public boolean isPlayQueueReady() { + return player != null && player.getPlayQueue() != null; + } + public boolean isBound() { return bound; } From 79060f0bfe56009f5c7c059feeeaf8435e0faba4 Mon Sep 17 00:00:00 2001 From: TacoTheDank Date: Wed, 2 Feb 2022 13:12:29 -0500 Subject: [PATCH 03/10] Update ACRA library --- app/build.gradle | 2 +- app/src/main/java/org/schabi/newpipe/App.java | 18 +++--------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 4cebcb7f5..7d6123d6f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -260,7 +260,7 @@ dependencies { implementation "com.nononsenseapps:filepicker:4.2.1" // Crash reporting - implementation "ch.acra:acra-core:5.7.0" + implementation "ch.acra:acra-core:5.8.4" // Properly restarting implementation 'com.jakewharton:process-phoenix:2.1.2' diff --git a/app/src/main/java/org/schabi/newpipe/App.java b/app/src/main/java/org/schabi/newpipe/App.java index 6c02b6f57..54e0af8c6 100644 --- a/app/src/main/java/org/schabi/newpipe/App.java +++ b/app/src/main/java/org/schabi/newpipe/App.java @@ -13,13 +13,8 @@ import androidx.preference.PreferenceManager; import com.jakewharton.processphoenix.ProcessPhoenix; import org.acra.ACRA; -import org.acra.config.ACRAConfigurationException; -import org.acra.config.CoreConfiguration; import org.acra.config.CoreConfigurationBuilder; -import org.schabi.newpipe.error.ErrorInfo; -import org.schabi.newpipe.error.ErrorUtil; import org.schabi.newpipe.error.ReCaptchaActivity; -import org.schabi.newpipe.error.UserAction; import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.downloader.Downloader; import org.schabi.newpipe.ktx.ExceptionUtils; @@ -210,16 +205,9 @@ public class App extends MultiDexApplication { return; } - try { - final CoreConfiguration acraConfig = new CoreConfigurationBuilder(this) - .setBuildConfigClass(BuildConfig.class) - .build(); - ACRA.init(this, acraConfig); - } catch (final ACRAConfigurationException exception) { - exception.printStackTrace(); - ErrorUtil.openActivity(this, new ErrorInfo(exception, - UserAction.SOMETHING_ELSE, "Could not initialize ACRA crash report")); - } + final CoreConfigurationBuilder acraConfig = new CoreConfigurationBuilder(this) + .withBuildConfigClass(BuildConfig.class); + ACRA.init(this, acraConfig); } private void initNotificationChannels() { From 9274e6417ae2b75d2a4023b3aeba45d2dbb2ec2f Mon Sep 17 00:00:00 2001 From: Mohammed Anas Date: Fri, 4 Feb 2022 10:13:10 +0000 Subject: [PATCH 04/10] Add files in `doc` to `paths-ignore` --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49e78e997..a4c4beb42 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,8 @@ on: - dev - master paths-ignore: - - 'README*.md' + - 'README.md' + - 'doc/**' - 'fastlane/**' - 'assets/**' - '.github/**/*.md' @@ -16,7 +17,8 @@ on: - dev - master paths-ignore: - - 'README*.md' + - 'README.md' + - 'doc/**' - 'fastlane/**' - 'assets/**' - '.github/**/*.md' From 3b1b23ba2a102a626453722fe83995f9920ee9f7 Mon Sep 17 00:00:00 2001 From: Mohammed Anas Date: Fri, 4 Feb 2022 10:32:33 +0000 Subject: [PATCH 05/10] Add `FUNDING.yml` to `paths-ignore` --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4c4beb42..eedd37c6e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,7 @@ on: - 'fastlane/**' - 'assets/**' - '.github/**/*.md' + - '.github/FUNDING.yml' push: branches: - dev @@ -22,6 +23,7 @@ on: - 'fastlane/**' - 'assets/**' - '.github/**/*.md' + - '.github/FUNDING.yml' jobs: build-and-test-jvm: From 2e538b89599cfb6225221d22f1aca3e8eaa758ba Mon Sep 17 00:00:00 2001 From: Tobi Date: Fri, 11 Feb 2022 15:25:25 +0100 Subject: [PATCH 06/10] Add changelog for NewPipe 0.22.0 (983) (#7810) * Add changelog for NewPipe 0.22.0 (983) Co-authored-by: opusforlife2 <53176348+opusforlife2@users.noreply.github.com> Co-authored-by: Mohammed Anas --- fastlane/metadata/android/en-US/changelogs/983.txt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 fastlane/metadata/android/en-US/changelogs/983.txt diff --git a/fastlane/metadata/android/en-US/changelogs/983.txt b/fastlane/metadata/android/en-US/changelogs/983.txt new file mode 100644 index 000000000..efbd0557c --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/983.txt @@ -0,0 +1,9 @@ +Add new double-tap-to-seek UI and behaviour +Make settings searchable +Highlight pinned comments as such +Add open-with-app support for FSFE's PeerTube instance +Add error notifications +Fix replay of first queue item on player change +Wait longer when buffering during livestreams before failing +Fix order of local search results +Fix empty item fields in play queue From 608e73e2f2577fa929f2620ab23e2b1ccede0517 Mon Sep 17 00:00:00 2001 From: TiA4f8R <74829229+TiA4f8R@users.noreply.github.com> Date: Thu, 10 Feb 2022 19:48:04 +0100 Subject: [PATCH 07/10] Set workaround for playback position reset when switching to main player with content thumbnail The workaround set before was not applied when switching to main player with content thumbnail from popup or background player. This commit fixes this by applying the workaround when switching to main player with content thumbnail from popup or background player. --- .../schabi/newpipe/fragments/detail/VideoDetailFragment.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index 05630ef79..2d9abc6dc 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -500,6 +500,10 @@ public final class VideoDetailFragment break; case R.id.detail_thumbnail_root_layout: autoPlayEnabled = true; // forcefully start playing + // FIXME Workaround #7427 + if (isPlayerAvailable()) { + player.setRecovery(); + } openVideoPlayerAutoFullscreen(); break; case R.id.detail_title_root_layout: From f388a1af6770da1aa2517f7edefc9ee7db3563a6 Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Fri, 11 Feb 2022 20:54:12 +0100 Subject: [PATCH 08/10] Added image-minimizer (#7772) Co-authored-by: Mohammed Anas --- .github/workflows/image-minimizer.js | 107 ++++++++++++++++++++++++++ .github/workflows/image-minimizer.yml | 29 +++++++ 2 files changed, 136 insertions(+) create mode 100644 .github/workflows/image-minimizer.js create mode 100644 .github/workflows/image-minimizer.yml diff --git a/.github/workflows/image-minimizer.js b/.github/workflows/image-minimizer.js new file mode 100644 index 000000000..8d10a1e77 --- /dev/null +++ b/.github/workflows/image-minimizer.js @@ -0,0 +1,107 @@ +/* + * Script for minimizing big images (jpg,gif,png) when they are uploaded to GitHub and not edited otherwise + */ +module.exports = async ({github, context}) => { + const IGNORE_KEY = ''; + const IGNORE_ALT_NAME_END = 'ignoreImageMinify'; + const IMG_MAX_HEIGHT_PX = 600; + + // Get the body of the image + let initialBody = null; + if (context.eventName == 'issue_comment') { + initialBody = context.payload.comment.body; + } else if (context.eventName == 'issues') { + initialBody = context.payload.issue.body; + } else { + console.log('Aborting: No body found'); + return; + } + console.log(`Found body: \n${initialBody}\n`); + + // Check if we should ignore the currently processing element + if (initialBody.includes(IGNORE_KEY)) { + console.log('Ignoring: Body contains IGNORE_KEY'); + return; + } + + // Regex for finding images (simple variant) ![ALT_TEXT](https://*.githubusercontent.com//.) + const REGEX_IMAGE_LOOKUP = /\!\[(.*)\]\((https:\/\/[-a-z0-9]+\.githubusercontent\.com\/\d+\/[-0-9a-f]{32,512}\.(jpg|gif|png))\)/gm; + + // Check if we found something + let foundSimpleImages = REGEX_IMAGE_LOOKUP.test(initialBody); + if (!foundSimpleImages) { + console.log('Found no simple images to process'); + return; + } + + console.log('Found at least one simple image to process'); + + // Require the probe lib for getting the image dimensions + const probe = require('probe-image-size'); + + // Try to find and replace the images with minimized ones + let newBody = await replaceAsync(initialBody, REGEX_IMAGE_LOOKUP, async (match, g1, g2) => { + console.log(`Found match '${match}'`); + + if (g1.endsWith(IGNORE_ALT_NAME_END)) { + console.log(`Ignoring match '${match}': IGNORE_ALT_NAME_END`); + return match; + } + + let shouldModifiy = false; + try { + console.log(`Probing ${g2}`); + let probeResult = await probe(g2); + if (probeResult == null) { + throw 'No probeResult'; + } + if (probeResult.hUnits != 'px') { + throw `Unexpected probeResult.hUnits (expected px but got ${probeResult.hUnits})`; + } + + shouldModifiy = probeResult.height > IMG_MAX_HEIGHT_PX; + } catch(e) { + console.log('Probing failed:', e); + // Immediately abort + return match; + } + + if (shouldModifiy) { + console.log(`Modifying match '${match}'`); + return `${g1}`; + } + + console.log(`Match '${match}' is ok/will not be modified`); + return match; + }); + + // Update the corresponding element + if (context.eventName == 'issue_comment') { + console.log('Updating comment with id', context.payload.comment.id); + await github.rest.issues.updateComment({ + comment_id: context.payload.comment.id, + owner: context.repo.owner, + repo: context.repo.repo, + body: newBody + }) + } else if (context.eventName == 'issues') { + console.log('Updating issue', context.payload.issue.number); + await github.rest.issues.update({ + issue_number: context.payload.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: newBody + }); + } + + // Asnyc replace function from https://stackoverflow.com/a/48032528 + async function replaceAsync(str, regex, asyncFn) { + const promises = []; + str.replace(regex, (match, ...args) => { + const promise = asyncFn(match, ...args); + promises.push(promise); + }); + const data = await Promise.all(promises); + return str.replace(regex, () => data.shift()); + } +} diff --git a/.github/workflows/image-minimizer.yml b/.github/workflows/image-minimizer.yml new file mode 100644 index 000000000..77b1faecf --- /dev/null +++ b/.github/workflows/image-minimizer.yml @@ -0,0 +1,29 @@ +name: Image Minimizer + +on: + issue_comment: + types: [created, edited] + issues: + types: [opened, edited] + +jobs: + try-minimize: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v2 + with: + node-version: 16 + + - name: Install probe-image-size + run: npm i probe-image-size@7.2.3 --ignore-scripts + + - name: Minimize simple images + uses: actions/github-script@v5 + timeout-minutes: 3 + with: + script: | + const script = require('.github/workflows/image-minimizer.js'); + await script({github, context}); From 3223ec04e38b2359ea6c9bd39a6b91dd2feab4ff Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Fri, 11 Feb 2022 20:56:59 +0100 Subject: [PATCH 09/10] Use the correct app language when searching in the settings --- .../java/org/schabi/newpipe/settings/SettingsActivity.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java b/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java index 3872e5172..7510bb3bc 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java +++ b/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java @@ -2,6 +2,7 @@ package org.schabi.newpipe.settings; import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage; +import android.content.Context; import android.os.Bundle; import android.text.TextUtils; import android.util.Log; @@ -228,7 +229,9 @@ public class SettingsActivity extends AppCompatActivity implements // Build search items - final PreferenceParser parser = new PreferenceParser(getApplicationContext(), config); + final Context searchContext = getApplicationContext(); + assureCorrectAppLanguage(searchContext); + final PreferenceParser parser = new PreferenceParser(searchContext, config); final PreferenceSearcher searcher = new PreferenceSearcher(config); // Find all searchable SettingsResourceRegistry fragments From e2a7b9ac56bd2e14b85a407ac4f0bfbba601f9f0 Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Sat, 12 Feb 2022 20:34:08 +0100 Subject: [PATCH 10/10] Switch to GitHub issue forms (#7773) * Switched to GitHub issue forms See also * https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#creating-issue-forms * https://github.blog/changelog/2021-06-23-issues-forms-beta-for-public-repositories/ * Switched expected and actual behavior * Improved/Reworked issue template Credits to @TheAssassin * CI: Ignore changes to issue-templates * Improved/Reworked issue template Credits to @opusforlife2 and @mhmdanas * Further improved the issue templates * Next round of review Co-authored-by: opusforlife2 <53176348+opusforlife2@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/bug_report.md | 65 ------------ .github/ISSUE_TEMPLATE/bug_report.yml | 113 +++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 24 ----- .github/ISSUE_TEMPLATE/feature_request.yml | 51 ++++++++++ .github/ISSUE_TEMPLATE/question.md | 24 ----- .github/ISSUE_TEMPLATE/question.yml | 35 +++++++ .github/workflows/ci.yml | 2 + 7 files changed, 201 insertions(+), 113 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml delete mode 100644 .github/ISSUE_TEMPLATE/question.md create mode 100644 .github/ISSUE_TEMPLATE/question.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index de16c5cf0..000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -name: Bug report -about: Create a bug report to help us improve -labels: bug -assignees: '' - ---- - - - - - - - -### Checklist - - -- [x] I am using the latest version - x.xx.x -- [ ] I checked, but didn't find any duplicates (open OR closed) of this issue in the repo. -- [ ] I have read the contribution guidelines given at https://github.com/TeamNewPipe/NewPipe/blob/HEAD/.github/CONTRIBUTING.md. -- [ ] This issue contains only one bug. I will open one issue for every bug report I want to file. - -### Steps to reproduce the bug - - - - - - -### Actual behavior - - - - -### Expected behavior - - - - -### Screenshots/Screen recordings - - - - - - -### Logs - - - - - - - - -### Device info - - - Android version/Custom ROM version: - - Device model: diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 000000000..a0a9f9ef5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,113 @@ +name: Bug report +description: Create a bug report to help us improve +labels: [bug] +body: + - type: markdown + attributes: + value: | + Thank you for helping to make NewPipe better by reporting a bug. :hugs: + + Please fill in as much information as possible about your bug so that we don't have to play "information ping-pong" and can help you immediately. + + - type: checkboxes + id: checklist + attributes: + label: "Checklist" + options: + - label: "I am able to reproduce the bug with the [latest version](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 + - label: "I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise." + required: true + - label: "This issue contains only one bug." + required: true + - label: "I have read and understood the [contribution guidelines](https://github.com/TeamNewPipe/NewPipe/blob/dev/.github/CONTRIBUTING.md)." + required: true + + - type: input + id: app-version + attributes: + label: Affected version + description: "In which NewPipe version did you encounter the bug?" + placeholder: "x.xx.x - Can be seen in the app from the 'About' section in the sidebar" + validations: + required: true + + - type: textarea + id: steps-to-reproduce + attributes: + label: Steps to reproduce the bug + description: | + What did you do for the bug to show up? + + If you can't cause the bug to show up again reliably (and hence don't have a proper set of steps to give us), please still try to give as many details as possible on how you think you encountered the bug. + placeholder: | + 1. Go to '...' + 2. Press on '....' + 3. Swipe down to '....' + validations: + required: true + + - type: textarea + id: expected-behavior + attributes: + label: Expected behavior + description: | + Tell us what you expect to happen. + + - type: textarea + id: actual-behavior + attributes: + label: Actual behavior + description: | + Tell us what happens with the steps given above. + + - type: textarea + id: screen-media + attributes: + label: Screenshots/Screen recordings + description: | + A picture or video is worth a thousand words. + + If applicable, add screenshots or a screen recording to help explain your problem. + GitHub supports uploading them directly in the text box. + If your file is too big for Github to accept, try to compress it (ZIP-file) or feel free to paste a link to an image/video hoster here instead. + + :heavy_exclamation_mark: DON'T POST SCREENSHOTS OF THE ERROR PAGE. + Instead, follow the instructions in the "Logs" section below. + + - type: textarea + id: logs + attributes: + label: Logs + description: | + If your bug includes a crash (where you're shown the Error Report page with a bunch of info), tap on "Copy formatted report" at the bottom and paste it here. + + - type: input + id: device-os-info + attributes: + label: Affected Android/Custom ROM version + description: | + With what operating system (+ version) did you encounter the bug? + placeholder: "Example: Android 12 / LineageOS 18.1" + + - type: input + id: device-model-info + attributes: + label: Affected device model + description: | + On what device did you encounter the bug? + placeholder: "Example: Huawei P20 lite (ANE-LX1) / Samsung Galaxy S20" + + - type: textarea + id: additional-information + attributes: + label: Additional information + description: | + Any other information you'd like to include, for instance that + * the affected device is foldable or a TV + * you have disabled all animations on your device + * your cat disabled your network connection + * ... + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 6664ed276..000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -labels: enhancement -assignees: '' - ---- - - - - -### Checklist - - -- [x] I checked, but didn't find any duplicates (open OR closed) of this issue in the repo. -- [ ] I have read the contribution guidelines given at https://github.com/TeamNewPipe/NewPipe/blob/HEAD/.github/CONTRIBUTING.md. -- [ ] This issue contains only one feature request. I will open one issue for every feature I want to request. - -#### What feature do you want? - - - -#### Why do you want this feature? - diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 000000000..83d6f0299 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,51 @@ +name: Feature request +description: Suggest an idea for this project +labels: [enhancement] +body: + - type: markdown + attributes: + value: | + Thank you for helping to make NewPipe better by suggesting a feature. :hugs: + + Your ideas are highly welcome! The app is made for you, the users, after all. + + - type: checkboxes + id: checklist + attributes: + label: "Checklist" + options: + - 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 + - label: "I'm aware that this is a request for NewPipe itself and that requests for adding a new service need to be made at [NewPipeExtractor](https://github.com/TeamNewPipe/NewPipeExtractor/issues)." + required: true + - label: "I have taken the time to fill in all the required details. I understand that the feature request will be dismissed otherwise." + required: true + - label: "This issue contains only one feature request." + required: true + - label: "I have read and understood the [contribution guidelines](https://github.com/TeamNewPipe/NewPipe/blob/dev/.github/CONTRIBUTING.md)." + required: true + + + - type: textarea + id: feature-description + attributes: + label: Feature description + description: | + Explain how you want the app's look or behavior to change to suit your needs. + validations: + required: true + + - type: textarea + id: why-is-the-feature-requested + attributes: + label: Why do you want this feature? + description: | + Describe any problem or limitation you come across while using the app which would be solved by this feature. + validations: + required: true + + - type: textarea + id: additional-information + attributes: + label: Additional information + description: Any other information you'd like to include, for instance sketches, mockups, pictures of cats, etc. diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md deleted file mode 100644 index 5582fd407..000000000 --- a/.github/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: Question -about: Ask about anything NewPipe-related -labels: question -assignees: '' - ---- - - - - - -### Checklist - - -- [x] I checked, but didn't find any duplicates (open OR closed) of this issue in the repo. -- [ ] 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 - diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml new file mode 100644 index 000000000..4c42ab26a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.yml @@ -0,0 +1,35 @@ +name: Question +description: Ask about anything NewPipe-related +labels: [question] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this issue! :hugs: + + Note that you can also ask questions on our [IRC channel](https://web.libera.chat/#newpipe). + + - type: checkboxes + id: checklist + attributes: + label: "Checklist" + options: + - 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 + - label: "I have taken the time to fill in all the required details. I understand that the question will be dismissed otherwise." + required: true + - label: "I have read and understood the [contribution guidelines](https://github.com/TeamNewPipe/NewPipe/blob/dev/.github/CONTRIBUTING.md)." + required: true + + - type: textarea + id: what-is-the-question + attributes: + label: What is/are your question(s)? + validations: + required: true + + - type: textarea + id: additional-information + attributes: + label: Additional information + description: Any other information you'd like to include, for instance sketches, mockups, pictures of cats, etc. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eedd37c6e..7dbfadc0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,7 @@ on: - 'assets/**' - '.github/**/*.md' - '.github/FUNDING.yml' + - '.github/ISSUE_TEMPLATE/**' push: branches: - dev @@ -24,6 +25,7 @@ on: - 'assets/**' - '.github/**/*.md' - '.github/FUNDING.yml' + - '.github/ISSUE_TEMPLATE/**' jobs: build-and-test-jvm: