1
0
mirror of https://github.com/TeamNewPipe/website synced 2025-10-06 00:22:38 +02:00

Apply suggestions from code review

Co-authored-by: Stypox <stypox@pm.me>
Co-authored-by: Taco <SkytkRSfan3895@gmail.com>
This commit is contained in:
Poolitzer
2022-04-29 16:37:00 +02:00
committed by GitHub
parent 5cc96fd11f
commit 8dbfdb2d3e

View File

@@ -23,7 +23,7 @@ This post also contains all the changes from the 0.22.0 Extractor version, which
- [@TiA4f8R](https://github.com/TiA4f8R) brings you a second frequently requested and really awesome feature. Seamless switch to and from background! Now when you select "Minimize to background" in settings and minimise the app, NewPipe will pause the video stream and continue the audio stream without interruption! When you switch back to the app, you will see a black screen for a couple of seconds, after which the video will resume playing. (Note: there are certain (usually very old) videos for which this won't work. In those cases, the regular short pause in the audio will occur before playback resumes.)
- [@Stypox](https://github.com/Stypox) made it so that YouTube Mixes and YouTube Music Mixes show up in related videos section. You're no longer forced to do the tedious job of having to share Mix URLs to NewPipe each time from another app to be able to play them! For those who have discovered upon reading this that NewPipe can play Mixes, congrats, and have fun! :)
- [@Stypox](https://github.com/Stypox) made it so that YouTube Mixes and YouTube Music Mixes show up in related videos section. You're no longer forced to do the tedious job of having to share Mix URLs to NewPipe each time from another app to be able to play them! While the release was being prepared, YouTube removed mix suggestions in the EU unless cookies are accepted (which NewPipe does not), but they should still appear in other countries. For those who have discovered upon reading this that NewPipe can play Mixes, congrats, and have fun! :)
- [@haklc](https://github.com/haklc) added a cool feature where you can change the audio pitch by semitones instead of percentage! This is a nifty tool for musically-inclined users, and also something fun to play with for everyone else. Don't worry, you can toggle a checkbox to revert to the percentage way of doing things.
@@ -45,7 +45,7 @@ This post also contains all the changes from the 0.22.0 Extractor version, which
- [@SpinHit](https://github.com/SpinHit) added a confirmation dialog when deleting all files in the Download menu.
- [@mauriciocolli](https://github.com/mauriciocolli) noticed that the app used duplicated icons for the night theme, which caused visibility problems for a lot of them. Since the original icons are vector drawables, the duplicated icons were deleted en masse, and instead, color attributes were used to match the original icons to the active theme.
- [@mauriciocolli](https://github.com/mauriciocolli) noticed that the app used duplicated icons for the night theme, which caused visibility problems for a lot of them. Since the original icons are vector drawables, the duplicated icons were deleted en masse, and instead, color attributes were used to match the original icons to the active theme. We tried to catch every case where this breaks the icon, but it is likely we missed some. Feel free to report them in the repo (see the last header for more details on that).
- In a surprise entry, [@karyogamy](https://github.com/karyogamy), a former contributor, showed up out of the blue and did some major refactoring work on the player code, which was blocking further ExoPlayer updates! As a followup, ExoPlayer has now been updated from version 2.14.2 to version 2.17.1, the latest release, skipping _two_ major releases. The code was also simplified a lot, and some custom code was dropped in favour of using ExoPlayer's functionality directly.
@@ -69,7 +69,7 @@ This post also contains all the changes from the 0.22.0 Extractor version, which
- If you used external buttons (like on a Bluetooth headphone or speaker) to resume playback, the player controls UI would remain on screen forever, instead of fading out after a few moments. [@ktprograms](https://github.com/ktprograms) fixed this.
- The update check would randomly fail while the app was in the background. [@TacoTheDank](https://github.com/TacoTheDank) updated some deprecated code to fix this.
- The app's update checking service would randomly fail while the app ran in the background, resulting in a crash. [@TacoTheDank](https://github.com/TacoTheDank) updated some deprecated code to fix this. Less crashes for you!
- The new error notifications added by [@Stypox](https://github.com/Stypox) in a previous release crashed the app on KitKat, which they have now fixed.
@@ -96,11 +96,11 @@ This post also contains all the changes from the 0.22.0 Extractor version, which
- [@litetex](https://github.com/litetex) realised that our hardcoded SoundCloud ClientID went out of date pretty quickly after each release, so there was no point in updating it again and again. It has been removed completely. Now we don't have to chase after a moving goalpost of an optimisation, which hardly benefited users. Thanks, litetex!
- [@Stypox](https://github.com/Stypox) added the `MockOnly` JUnit 5 extension to all the YouTube extraction tests so that they work for Mixes. Moreover, the `DownloaderFactory` class's methods were made static, shaving off a little bit of CPU overhead each time that code is run.
- [@Stypox](https://github.com/Stypox) added the `MockOnly` JUnit 5 extension so that a test can be instructed to only run when the downloader is mocked. This was needed for YouTube Mixes. Moreover, the `DownloaderFactory` class's methods were made static, shaving off a little bit of CPU overhead each time that code is run.
- [@Stypox](https://github.com/Stypox) added the Checkstyle static code analysis tool to the NewPipe Extractor project, so that code formatting remains standardised throughout the repo. A bunch of code was also refactored along the way. (The Checkstyle mentioned in previous blog posts is part of the NewPipe repo.)
- [@TacoTheDank](https://github.com/TacoTheDank) replaced the `CircleImageView` library with Google's own Material library, `ShapeableImageView`. Taco dares you to find the difference between the old and new icons. (Hint for those who really want to try: look at circular image icons, like the channel avatars.) Aaanyway, that's one less dependency! Less code is good code.
- [@TacoTheDank](https://github.com/TacoTheDank) replaced the `CircleImageView` library with Google's own Material implementation, `ShapeableImageView`. Taco dares you to find the difference between the old and new icons. (Hint for those who really want to try: look at circular image icons, like the channel avatars.) Aaanyway, that's one less dependency! Less code is good code.
- [@Stypox](https://github.com/Stypox) made a lot of complicated changes that we don't understand at all so that there is no raw use of parameterized classes in the code, which generates a Java warning. We're assuming this is a good thing. Let us know in the comments.
@@ -132,7 +132,7 @@ This post also contains all the changes from the 0.22.0 Extractor version, which
- While investigating some player UI layout issues, [@Stypox](https://github.com/Stypox) realised that the `large-land` XML layout file wasn't actually being used at all, and removed it, getting rid of some 800 lines of duplicated code!
- [@TacoTheDank](https://github.com/TacoTheDank) migrated the app update checker from using the deprecated `IntentService` service to using a worker, by adding the AndroidX `Work` library. There was also some Kotlin-isation and refactoring involved.
- [@TacoTheDank](https://github.com/TacoTheDank) migrated the app update checker from using the deprecated `IntentService` service to using a worker, by adding the AndroidX `Work` library. There was also some Kotlin-isation and refactoring involved. Who doesn't like themselves some Kotlin.
- [@Stypox](https://github.com/Stypox) de-duplicated a couple of functions that were both meant to fetch the full stream info if only sparse info was fetched earlier, improved the toast shown for this action, and ensured that streams are properly saved in the database, negating any potential side effects of incorrectly stored info.