Skip to content

Commit

Permalink
Use cronet for playback PR updated (#41)
Browse files Browse the repository at this point in the history
* Hide play queue button in VideoDetailsFragment mini player when the play queue is empty

Related PR introducing the button: TeamNewPipe#8946

* Use GROUP_ALL_ID instead of hardcoded -1

* Fix duplicate videos in feed "All"

* Update AppCompat to 1.5.1.

* Use TextViewCompat.setCompoundDrawableTintList().

* Update PrettyTime from 5.0.3 to 5.0.6 to include new localizations

* Use OnClickListener and OnLongClickListener lambdas in the player UIs.

* Use lambdas for VideoDetailFragment listeners.

* Add changelog for 0.24.1 (991)

* [YouTube] Support opening handles from external apps

* Update NewPipe Extractor to support handles

* Translated using Weblate (Punjabi)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Turkish)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Punjabi (Pakistan))

Currently translated at 18.4% (119 of 646 strings)

Translated using Weblate (Slovak)

Currently translated at 9.7% (7 of 72 strings)

Translated using Weblate (Azerbaijani)

Currently translated at 97.2% (70 of 72 strings)

Translated using Weblate (Polish)

Currently translated at 59.7% (43 of 72 strings)

Translated using Weblate (Ukrainian)

Currently translated at 100.0% (72 of 72 strings)

Translated using Weblate (Turkish)

Currently translated at 99.8% (645 of 646 strings)

Translated using Weblate (German)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Hungarian)

Currently translated at 9.8% (7 of 71 strings)

Translated using Weblate (Punjabi)

Currently translated at 5.6% (4 of 71 strings)

Translated using Weblate (Galician)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Punjabi)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Azerbaijani)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Vietnamese)

Currently translated at 99.6% (644 of 646 strings)

Translated using Weblate (Portuguese)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Hungarian)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Asturian)

Currently translated at 2.8% (2 of 71 strings)

Translated using Weblate (Punjabi)

Currently translated at 99.6% (644 of 646 strings)

Translated using Weblate (Vietnamese)

Currently translated at 98.9% (639 of 646 strings)

Translated using Weblate (Chinese (Traditional, Hong Kong))

Currently translated at 99.5% (643 of 646 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (646 of 646 strings)

Added translation using Weblate (English (Middle))

Added translation using Weblate (English (Old))

Added translation using Weblate (Sicilian)

Added translation using Weblate (Arabic (Najdi))

Added translation using Weblate (Kashmiri)

Added translation using Weblate (German (Low))

Added translation using Weblate (Aymará)

Added translation using Weblate (Kazakh)

Translated using Weblate (Bulgarian)

Currently translated at 2.8% (2 of 71 strings)

Translated using Weblate (Bengali)

Currently translated at 90.5% (585 of 646 strings)

Translated using Weblate (Punjabi)

Currently translated at 99.6% (644 of 646 strings)

Translated using Weblate (Azerbaijani)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Lithuanian)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (646 of 646 strings)

Co-authored-by: Agnieszka C <aga_04@o2.pl>
Co-authored-by: Balázs Meskó <meskobalazs@mailbox.org>
Co-authored-by: Enol P <enolp@softastur.org>
Co-authored-by: Ergün Can Taş <erguntas1968@gmail.com>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Giovanni Donisi <giovannidonisi0701@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Co-authored-by: Lyudmil Borisov <lyuskoborisov@abv.bg>
Co-authored-by: Marian Hanzel <marulinko@gmail.com>
Co-authored-by: Nizami <nizamismidov4@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Ray <ray.cfu@protonmail.com>
Co-authored-by: Rohan Deb Sarkar <rohandebsarkar+git@gmail.com>
Co-authored-by: SC <lalocas@protonmail.com>
Co-authored-by: ShareASmile <aapshergill@gmail.com>
Co-authored-by: TXRdev Archive <lckphanaf9999@gmail.com>
Co-authored-by: Thọ Bùi Nguyễn Hoàng <buitho061997@gmail.com>
Co-authored-by: Vri 🌈 <weblate@vrifox.cc>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: bgo-eiu <huyaqoob+toolforge@gmail.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: pjammo <adrianoghr@hotmail.it>
Co-authored-by: zaioti <zaioti@tuta.io>
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/ast/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/az/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/bg/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/hu/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/pa/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/pl/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/sk/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/uk/
Translation: NewPipe/Metadata

* Update NewPipe to 0.24.1 (991)

* Fix inconsistent channel group list and item view mode

* Fix wrongly calculated channel groups span count

* Add helper methods for adding PendingIntent mutability.

* Translated using Weblate (Odia)

Currently translated at 6.1% (40 of 646 strings)

Translated using Weblate (Santali)

Currently translated at 10.3% (67 of 646 strings)

Translated using Weblate (Chinese (Traditional))

Currently translated at 63.8% (46 of 72 strings)

Translated using Weblate (Arabic)

Currently translated at 50.0% (36 of 72 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (72 of 72 strings)

Translated using Weblate (Portuguese)

Currently translated at 69.4% (50 of 72 strings)

Translated using Weblate (Bulgarian)

Currently translated at 4.1% (3 of 72 strings)

Translated using Weblate (Chinese (Traditional, Hong Kong))

Currently translated at 16.6% (12 of 72 strings)

Translated using Weblate (Norwegian Bokmål)

Currently translated at 92.2% (596 of 646 strings)

Translated using Weblate (Azerbaijani)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Vietnamese)

Currently translated at 99.6% (644 of 646 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Arabic)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Romanian)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Chinese (Traditional, Hong Kong))

Currently translated at 99.8% (645 of 646 strings)

Translated using Weblate (Korean)

Currently translated at 99.8% (645 of 646 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Punjabi)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Turkish)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Punjabi (Pakistan))

Currently translated at 18.4% (119 of 646 strings)

Translated using Weblate (Slovak)

Currently translated at 9.7% (7 of 72 strings)

Translated using Weblate (Azerbaijani)

Currently translated at 97.2% (70 of 72 strings)

Translated using Weblate (Polish)

Currently translated at 59.7% (43 of 72 strings)

Translated using Weblate (Ukrainian)

Currently translated at 100.0% (72 of 72 strings)

Translated using Weblate (Turkish)

Currently translated at 99.8% (645 of 646 strings)

Translated using Weblate (German)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Hungarian)

Currently translated at 9.8% (7 of 71 strings)

Translated using Weblate (Punjabi)

Currently translated at 5.6% (4 of 71 strings)

Translated using Weblate (Galician)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Punjabi)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Azerbaijani)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Vietnamese)

Currently translated at 99.6% (644 of 646 strings)

Translated using Weblate (Portuguese)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Hungarian)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Asturian)

Currently translated at 2.8% (2 of 71 strings)

Translated using Weblate (Punjabi)

Currently translated at 99.6% (644 of 646 strings)

Translated using Weblate (Vietnamese)

Currently translated at 98.9% (639 of 646 strings)

Translated using Weblate (Chinese (Traditional, Hong Kong))

Currently translated at 99.5% (643 of 646 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (646 of 646 strings)

Added translation using Weblate (English (Middle))

Added translation using Weblate (English (Old))

Added translation using Weblate (Sicilian)

Added translation using Weblate (Arabic (Najdi))

Added translation using Weblate (Kashmiri)

Added translation using Weblate (German (Low))

Added translation using Weblate (Aymará)

Added translation using Weblate (Kazakh)

Translated using Weblate (Bulgarian)

Currently translated at 2.8% (2 of 71 strings)

Translated using Weblate (Bengali)

Currently translated at 90.5% (585 of 646 strings)

Translated using Weblate (Punjabi)

Currently translated at 99.6% (644 of 646 strings)

Translated using Weblate (Azerbaijani)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Lithuanian)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (646 of 646 strings)

Co-authored-by: Agnieszka C <aga_04@o2.pl>
Co-authored-by: Alex25820 <alexs25820@gmail.com>
Co-authored-by: Balázs Meskó <meskobalazs@mailbox.org>
Co-authored-by: Enol P <enolp@softastur.org>
Co-authored-by: Ergün Can Taş <erguntas1968@gmail.com>
Co-authored-by: GET100PERCENT <eraofphysics@yahoo.com>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Giovanni Donisi <giovannidonisi0701@gmail.com>
Co-authored-by: Hoseok Seo <ddinghoya@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Co-authored-by: L-M-H <lars.magnus@herland.priv.no>
Co-authored-by: Lyudmil Borisov <lyuskoborisov@abv.bg>
Co-authored-by: Marian Hanzel <marulinko@gmail.com>
Co-authored-by: Massimo Pissarello <mapi68@gmail.com>
Co-authored-by: Nizami <nizamismidov4@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Prasanta-Hembram <Prasantahembram720@gmail.com>
Co-authored-by: Preston Waters <masatox3@yahoo.com>
Co-authored-by: Ray <ray.cfu@protonmail.com>
Co-authored-by: Rohan Deb Sarkar <rohandebsarkar+git@gmail.com>
Co-authored-by: SC <lalocas@protonmail.com>
Co-authored-by: Sebi <stoican_sebi@yahoo.com>
Co-authored-by: ShareASmile <aapshergill@gmail.com>
Co-authored-by: TXRdev Archive <lckphanaf9999@gmail.com>
Co-authored-by: Thọ Bùi Nguyễn Hoàng <buitho061997@gmail.com>
Co-authored-by: Vri 🌈 <weblate@vrifox.cc>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: bgo-eiu <huyaqoob+toolforge@gmail.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: pjammo <adrianoghr@hotmail.it>
Co-authored-by: thami simo <simo.azad@gmail.com>
Co-authored-by: zaioti <zaioti@tuta.io>
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/ar/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/ast/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/az/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/bg/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/hu/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/it/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/pa/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/pl/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/pt/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/sk/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/uk/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/zh_Hant/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/zh_Hant_HK/
Translation: NewPipe/Metadata

* Remove the redundant/overlapping toast "Copied to clipboard" for Android 13+

Signed-off-by: dhruv <dhruvpatidar35@gmail.com>

Co-authored-by: Tobi <TobiGr@users.noreply.github.com>
Co-authored-by: AudricV <74829229+AudricV@users.noreply.github.com>

* Remove Utility.copyToClipboard and use ShareUtils.copyToClipboard instead

This method is not needed anymore, as ShareUtils.copyToClipboard does
almost the same thing (no label is set on the ClipData used to copy text,
contrary to what Utility did, but using "text" as a ClipData label doesn't seem
useful).

It was used in MissionAdapter.handlePopupItem to copy the SHA1 or the MD5 of a
file.

* Use Locale.forLanguageTag().

* Group private Localization methods together.

* Use Math.floorDiv().

* Fix persistent hover overlay when mouse connected

* Fix DeX mode check

* Address review comments

* Fix JSDoc checkstyle warning

* Add JSDoc comment and a performance note for `isDesktopMode`

* Add check for input devices with cursor.

* Remove errant return.

* Remove now obsolete API check.

* Improve code of DeviceUtils.isDesktopMode

- Avoid NullPointerException crashes if there is no UiModeManager or desktop
system service mode
- Use final for every exception
- Suppress missing fields warnings
- Add missing NonNull annotation

* Translated using Weblate (Punjabi)

Currently translated at 100.0% (646 of 646 strings)

* Translated using Weblate (Czech)

Currently translated at 100.0% (72 of 72 strings)

Translation: NewPipe/Metadata
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/cs/

* Translated using Weblate (Italian)

Currently translated at 100.0% (72 of 72 strings)

Translation: NewPipe/Metadata
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/it/

* Translated using Weblate (Latvian)

Currently translated at 4.1% (3 of 72 strings)

Translation: NewPipe/Metadata
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/lv/

* Translated using Weblate (Latvian)

Currently translated at 92.5% (598 of 646 strings)

* Set compileSdk and targetSdk to 33 (Android 13)

android:exported in now required in the manifest on all activities/services/receivers/providers. It was set to true for those that need to interact with outside apps or the OS, while others have exported=false.
This also required updating LeakCanary to the latest version as the older version being used was not using android:exported in AndroidManifest.xml.

* Use SparseArrayCompat for thumbnails.

* Use SparseArrayCompat instead of SparseArray in StreamItemAdapter.

Make additional small improvements as well.

* Seeking no longer pauses the played video

* Set image-minimizer to specify image width ...

Fix TeamNewPipe#9469
for portrait like orientations

* Fix value of width

* Resolve scoping issue to get values of probeResult

* Minimize not-so-long images too

* checkstyle: declare org.jetbrains and javax.annotation Nullable's and NotNull/Nonnull as illegal imports

* Block rxjava3 nullable/nonnull imports in checkstyle

* Add notifications permission

* Request permission to send notifications

* Make miniplayer close button area larger

* Use BitmapCompat.createScaledBitmap().

* Update Sonarqube to 3.5

* Disabling night theme selection if auto theme is not used

* Update Desugaring to 1.1.8

* Translated using Weblate (Norwegian Bokmål)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Hindi)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Korean)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (French)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Norwegian Nynorsk)

Currently translated at 9.1% (59 of 646 strings)

Translated using Weblate (Punjabi (Pakistan))

Currently translated at 19.6% (127 of 646 strings)

Translated using Weblate (Norwegian Bokmål)

Currently translated at 99.0% (640 of 646 strings)

Translated using Weblate (Arabic (Libya))

Currently translated at 5.5% (4 of 72 strings)

Translated using Weblate (Hindi)

Currently translated at 18.0% (13 of 72 strings)

Translated using Weblate (Hungarian)

Currently translated at 11.1% (8 of 72 strings)

Translated using Weblate (Portuguese)

Currently translated at 69.4% (50 of 72 strings)

Translated using Weblate (Filipino)

Currently translated at 5.5% (4 of 72 strings)

Translated using Weblate (Filipino)

Currently translated at 35.9% (232 of 646 strings)

Translated using Weblate (Catalan)

Currently translated at 95.9% (620 of 646 strings)

Translated using Weblate (Hindi)

Currently translated at 78.7% (509 of 646 strings)

Translated using Weblate (Turkish)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Chinese (Traditional, Hong Kong))

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Portuguese (Portugal))

Currently translated at 69.4% (50 of 72 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (72 of 72 strings)

Translated using Weblate (Azerbaijani)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Odia)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Persian)

Currently translated at 61.1% (44 of 72 strings)

Translated using Weblate (Russian)

Currently translated at 41.6% (30 of 72 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Norwegian Nynorsk)

Currently translated at 6.1% (40 of 646 strings)

Translated using Weblate (Odia)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Odia)

Currently translated at 2.7% (2 of 72 strings)

Translated using Weblate (Lithuanian)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (French)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Odia)

Currently translated at 30.1% (195 of 646 strings)

Translated using Weblate (Russian)

Currently translated at 41.6% (30 of 72 strings)

Translated using Weblate (Norwegian Bokmål)

Currently translated at 92.2% (596 of 646 strings)

Translated using Weblate (Hindi)

Currently translated at 69.6% (450 of 646 strings)

Added translation using Weblate (Norwegian Nynorsk)

Translated using Weblate (Georgian)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Ukrainian)

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Icelandic)

Currently translated at 99.0% (640 of 646 strings)

Translated using Weblate (Punjabi)

Currently translated at 6.9% (5 of 72 strings)

Translated using Weblate (German)

Currently translated at 62.5% (45 of 72 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (646 of 646 strings)

Translated using Weblate (Georgian)

Currently translated at 20.1% (130 of 646 strings)

Translated using Weblate (Georgian)

Currently translated at 98.6% (71 of 72 strings)

Added translation using Weblate (Georgian)

Co-authored-by: AudricV <avdivers84@gmail.com>
Co-authored-by: Boros Zsombor <zsombor2626@gmail.com>
Co-authored-by: Cyndaquissshhh <iversonbriones123@gmail.com>
Co-authored-by: Emin Tufan Çetin <etcetin@gmail.com>
Co-authored-by: GET100PERCENT <eraofphysics@yahoo.com>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Hoseok Seo <ddinghoya@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Co-authored-by: JY3 <GeeyunJY3@gmail.com>
Co-authored-by: L-M-H <lars.magnus@herland.priv.no>
Co-authored-by: M. Ll <mklr95@gmail.com>
Co-authored-by: M4SK <themightyloki@free.fr>
Co-authored-by: Nahla Hamdi <nahlahamdi87@gmail.com>
Co-authored-by: Net <nizamismidov4@gmail.com>
Co-authored-by: Nikoloz <nukushatugushi@gmail.com>
Co-authored-by: Pedro Henrique Vilela do Nascimento <pedro.hvn@usp.br>
Co-authored-by: Platon Terekhov <gibbonsville_cowal@simplelogin.com>
Co-authored-by: Ray <ray.cfu@protonmail.com>
Co-authored-by: ShareASmile <aapshergill@gmail.com>
Co-authored-by: Trendyne <eiko@chiru.no>
Co-authored-by: VfBFan <drop0815@posteo.de>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: bgo-eiu <huyaqoob+toolforge@gmail.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: qqqq1 <qqqq1@hi2.in>
Co-authored-by: ssantos <ssantos@web.de>
Co-authored-by: tryvseu <tryvseu@tuta.io>
Co-authored-by: Артём Нефедов <artem10397g@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/ar_LY/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/de/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/es/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/fa/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/fil/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/hi/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/hu/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/ka/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/or/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/pa/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/pt/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/pt_PT/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/ru/
Translation: NewPipe/Metadata

* Show toast when no updates are available.

Co-authored-by: Stypox <stypox@pm.me>

* Apply ktlint formatting.

* rename help to fast mode

* Only show "Enqueue next" when in the middle of the queue

Add a check that the queue position is not the last in the queue before
showing "Enqueue next".

Previously the "Enqueue next" action would always be shown if the queue
length was greater than one, this meant even if you were at the end of
the queue (when "Enqueue" would have the same effect as "Enqueue next")
the action would still be shown.

* Rename list_empty_subtitle string

* Show hint about how to import subscriptions when there are none

* Center text in empty views

* Added option to download items in the queue

* show subscriber count on player page

* Make subscribers in video detail fragment dimmer

* Remove dead Privacy Tools instance (TeamNewPipe#9504)

* Implemented suggestions

* Translated using Weblate (Spanish)

Currently translated at 100.0% (72 of 72 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Esperanto)

Currently translated at 74.3% (482 of 648 strings)

Translated using Weblate (German)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Punjabi)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Azerbaijani)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Hindi)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Lithuanian)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (French)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (German)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (German)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Odia)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Galician)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Estonian)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Portuguese)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Punjabi)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Hindi)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Hebrew)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Chinese (Traditional))

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Turkish)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Ukrainian)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Indonesian)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Arabic)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Czech)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (German)

Currently translated at 99.8% (647 of 648 strings)

Translated using Weblate (Greek)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Greek)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Greek)

Currently translated at 99.6% (646 of 648 strings)

Co-authored-by: Agnieszka C <aga_04@o2.pl>
Co-authored-by: BMN <weblate@yopmail.com>
Co-authored-by: C. Rüdinger <Mail-an-CR@web.de>
Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Co-authored-by: Eric <hamburger1024@duck.com>
Co-authored-by: Fjuro <ifjuro@proton.me>
Co-authored-by: Florian <flo.site@zaclys.net>
Co-authored-by: GET100PERCENT <eraofphysics@yahoo.com>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Igor Nedoboy <i.nedoboy@mail.ru>
Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
Co-authored-by: Linerly <linerly@protonmail.com>
Co-authored-by: Nidi <nizamismidov4@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Priit Jõerüüt <hwlate@joeruut.com>
Co-authored-by: Retrial <giwrgosmant@gmail.com>
Co-authored-by: Rex_sa <rex.sa@pm.me>
Co-authored-by: Ricardo <contatorms7@tutamail.com>
Co-authored-by: SC <lalocas@protonmail.com>
Co-authored-by: ShareASmile <aapshergill@gmail.com>
Co-authored-by: Skarvinius <saab_samuel@hotmail.com>
Co-authored-by: Vasilis K <skyhirules@gmail.com>
Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Co-authored-by: argonfilm <gradicchuck@gmail.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: nautilusx <translate@disroot.org>
Co-authored-by: pjammo <adrianoghr@hotmail.it>
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/es/
Translation: NewPipe/Metadata

* Update RxJava to 3.1.5.

* Fixes TeamNewPipe#9518

- Crash fix on clicking on add to playlist.
- Added toast when clicked on share button for better UI.

* Delete translation without default: app_update_notification_content_text

* Delete translation without default: app_update_notification_content_text

* Delete translation without default: app_update_notification_content_title

* Delete translation without default: progressive_load_interval_default

* Removed the wasPlaying variable

* Update ExoPlayer to 2.18.2

* added icon for play all

* Support audio only background for services only supporting video streams

Some services may only have video streams and no separate audio streams available.
This commit will add audio background playback support for those services.
It uses the video source as audio source for background playback.

* Translated using Weblate (French)

Currently translated at 93.0% (67 of 72 strings)

Translated using Weblate (Ukrainian)

Currently translated at 100.0% (72 of 72 strings)

Translated using Weblate (Ukrainian)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (French)

Currently translated at 91.6% (66 of 72 strings)

Translated using Weblate (Urdu)

Currently translated at 66.9% (434 of 648 strings)

Translated using Weblate (Hungarian)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Portuguese (Portugal))

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Punjabi)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Azerbaijani)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Hindi)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Romanian)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (72 of 72 strings)

Translated using Weblate (Telugu)

Currently translated at 6.9% (5 of 72 strings)

Translated using Weblate (Telugu)

Currently translated at 66.9% (434 of 648 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Dutch)

Currently translated at 100.0% (648 of 648 strings)

Translated using Weblate (Tamil)

Currently translated at 54.0% (350 of 648 strings)

Translated using Weblate (Chinese (Traditional, Hong Kong))

Currently translated at 100.0% (648 of 648 strings)

Co-authored-by: Ahmad Raza <ahmadrazaxm@gmail.com>
Co-authored-by: Dan <denqwerta@gmail.com>
Co-authored-by: Florian <flo.site@zaclys.net>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Igor Nedoboy <i.nedoboy@mail.ru>
Co-authored-by: Igor Sorocean <sorocean.igor@gmail.com>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
Co-authored-by: Kiss Attila <gaxeco4855@pro5g.com>
Co-authored-by: Nidi <nizamismidov4@gmail.com>
Co-authored-by: Ray <ray.cfu@protonmail.com>
Co-authored-by: ShareASmile <aapshergill@gmail.com>
Co-authored-by: Terry Louwers <t.louwers@gmail.com>
Co-authored-by: Translator <kvb@tuta.io>
Co-authored-by: pjammo <adrianoghr@hotmail.it>
Co-authored-by: ssantos <ssantos@web.de>
Co-authored-by: subba raidu <raidu4u@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/fr/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/it/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/te/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/uk/
Translation: NewPipe/Metadata

* Add Nynorsk (nn) to the language chooser

* Use ListAdapter in NotificationModeConfigAdapter.

* Refactor constrolsTouchListener code

* Activate on click listeners only when not loading

For consistency with long click listeners, in VideoDetailFragment

* Use correct fragment manager for download dialog

Tapping download on the long-press menu of queue items when the queue is shown inside the player would crash otherwise

* Remove playlist details toasts

* Update rxandroid from 3.0.0 to 3.0.2

* set 'playback in background button' visible if there are videostreams

* Use new NewPipe Extractor Utils methods.

* Simplify disposables handling in notification mode settings

* Use Cronet for playback, replace YouTube custom DataSource by a Resolver and increase network socket timeouts

Use the Cronet network stack for playback using ExoPlayer's Cronet extension,
instead of using Android's native network stack provided by HttpUrlConnection,
which is Android device and OS version specific: this means that this network
stack can be easily outdated and can contain some issues that are not present
on Cronet or OkHttp.

While OkHttp could be used as a network stack of ExoPlayer, it has been noticed
when testing the usage of the OkHttp extension for playback that throttling
issues with playback of YouTube contents may happen. That's the reason why
Cronet is used instead, on which the issue does not happen, according to tests.

The addition of this network library, embedded into the application, increases
unfortunately the application size by around 10MB, because the Cronet library
contains native code, shipped for all CPU architectures supported by Android's
NDK (arm64-v8a, armeabi-v7a, x86 and x86_64). This doubles the release
application size, due to the fact that the application is universal and not
architecture dependant.

QUIC is disabled on the Cronet engine, lazy-loaded (created only when the
player is opened for the first time), in order to prevent sending to services
the QUIC User-Agent ID which contains the application ID and version. This
User-Agent ID is not editable by clients, but can be changed by using a custom
Cronet implementation based on a custom cronet-common module, or by removing the
original class responsible of generating the User-Agent ID and providing a
custom implementation instead.

As YoutubeHttpDataSource was a copy of ExoPlayer's DefaultHttpDataSource, based
on Android's network stack, which is now unused, it has been removed and the
modifications made for YouTube playback on streaming URLs are now made using a
ResolvingDataSource Resolver, YoutubeDataSourceResolver.

A workaround is used in it to prevent ExoPlayer sending the Range HTTP header.
If usage of the range query parameter/path parameter is enabled and that it
doesn't already exist as a URL parameter, this header is converted into a range
query parameter or "path parameter". This may break playback if YouTube is
serving streaming data with compression, which is unlikely to happen as it is
inefficient, and that Cronet doesn't allow editing the `Accept-Encoding` HTTP
header (see
https://groups.google.com/a/chromium.org/g/net-dev/c/VbWPhyGrxD4/m/VC71PP3DAQAJ
for details about how Cronet handles content encoding).

This resolver adds support of YouTube videoplayback URLs using "path
parameters" instead of query parameters. For example,
https://YOUTUBE_VIDEO_HOST.com/videoplayback/PARAM_1/VALUE_1/PARAM_2/VALUE_2
is using "path parameters", when
https://YOUTUBE_VIDEO_HOST.com/videoplayback?PARAM_1=VALUE_1&PARAM_2=VALUE_2
query parameters. "Path parameters" are used for streaming URLs of DASH and HLS
manifests.

This Resolver is compatible with multiple network stacks and is easier to
maintain than the previous approach.

Timeouts of network sockets connect and write operations have been increased
from the default values (10 seconds) to 30 seconds. It is now also the case for
playback, while this value where has been set where it was possible (connect
and read operations, their default value is 8 seconds in ExoPlayer).

* Add custom UserAgent class to allow using QUIC

This class changes the QUIC User-Agent ID generated by Cronet, by removing the
application name to allow usage of QUIC.

The original class must be removed when building the app, in order to avoid
duplicate classes which would break release builds or use the original class on
debug builds.

* Remove UserAgent from cronet-common via Gradle tasks

Co-authored-by: AudricV <74829229+AudricV@users.noreply.github.com>

* Enable QUIC and Brotli support for playback

Also make sure that HTTP/2 is enabled, even if this should already be the case
by default (same behavior for QUIC).

* Remove any reference to user data in cronet's UserAgent

---------

Co-authored-by: TobiGr <tobigr@users.noreply.github.com>
Co-authored-by: Stypox <stypox@pm.me>
Co-authored-by: Isira Seneviratne <isirasen96@gmail.com>
Co-authored-by: Isira Seneviratne <31027858+Isira-Seneviratne@users.noreply.github.com>
Co-authored-by: AudricV <74829229+AudricV@users.noreply.github.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Agnieszka C <aga_04@o2.pl>
Co-authored-by: Balázs Meskó <meskobalazs@mailbox.org>
Co-authored-by: Enol P <enolp@softastur.org>
Co-authored-by: Ergün Can Taş <erguntas1968@gmail.com>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Giovanni Donisi <giovannidonisi0701@gmail.com>
Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Co-authored-by: Lyudmil Borisov <lyuskoborisov@abv.bg>
Co-authored-by: Marian Hanzel <marulinko@gmail.com>
Co-authored-by: Nizami <nizamismidov4@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Ray <ray.cfu@protonmail.com>
Co-authored-by: Rohan Deb Sarkar <rohandebsarkar+git@gmail.com>
Co-authored-by: SC <lalocas@protonmail.com>
Co-authored-by: TXRdev Archive <lckphanaf9999@gmail.com>
Co-authored-by: Thọ Bùi Nguyễn Hoàng <buitho061997@gmail.com>
Co-authored-by: Vri 🌈 <weblate@vrifox.cc>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: bgo-eiu <huyaqoob+toolforge@gmail.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: pjammo <adrianoghr@hotmail.it>
Co-authored-by: zaioti <zaioti@tuta.io>
Co-authored-by: Alex25820 <alexs25820@gmail.com>
Co-authored-by: GET100PERCENT <eraofphysics@yahoo.com>
Co-authored-by: Hoseok Seo <ddinghoya@gmail.com>
Co-authored-by: L-M-H <lars.magnus@herland.priv.no>
Co-authored-by: Massimo Pissarello <mapi68@gmail.com>
Co-authored-by: Prasanta-Hembram <Prasantahembram720@gmail.com>
Co-authored-by: Preston Waters <masatox3@yahoo.com>
Co-authored-by: Sebi <stoican_sebi@yahoo.com>
Co-authored-by: thami simo <simo.azad@gmail.com>
Co-authored-by: dhruvpatidar359 <dhruvpatidar35@gmail.com>
Co-authored-by: Hanif Shersy <hanif.shersy@slyp.com.au>
Co-authored-by: cybersphinx <chr.ohm@gmx.net>
Co-authored-by: Fjuro <ifjuro@proton.me>
Co-authored-by: Coool (github.com/Coool) <coool@mail.lv>
Co-authored-by: Jared Fantaye <Jared@fantaye.de>
Co-authored-by: yashpalgoyal1304 <yashpalgoyal1304@gmail.com>
Co-authored-by: evermind <evermind@tuxfamily.org>
Co-authored-by: TacoTheDank <SkytkRSfan3895@gmail.com>
Co-authored-by: AudricV <avdivers84@gmail.com>
Co-authored-by: Boros Zsombor <zsombor2626@gmail.com>
Co-authored-by: Cyndaquissshhh <iversonbriones123@gmail.com>
Co-authored-by: Emin Tufan Çetin <etcetin@gmail.com>
Co-authored-by: JY3 <GeeyunJY3@gmail.com>
Co-authored-by: M. Ll <mklr95@gmail.com>
Co-authored-by: M4SK <themightyloki@free.fr>
Co-authored-by: Nahla Hamdi <nahlahamdi87@gmail.com>
Co-authored-by: Nikoloz <nukushatugushi@gmail.com>
Co-authored-by: Pedro Henrique Vilela do Nascimento <pedro.hvn@usp.br>
Co-authored-by: Platon Terekhov <gibbonsville_cowal@simplelogin.com>
Co-authored-by: Trendyne <eiko@chiru.no>
Co-authored-by: VfBFan <drop0815@posteo.de>
Co-authored-by: qqqq1 <qqqq1@hi2.in>
Co-authored-by: ssantos <ssantos@web.de>
Co-authored-by: tryvseu <tryvseu@tuta.io>
Co-authored-by: Артём Нефедов <artem10397g@gmail.com>
Co-authored-by: pratyaksh1610 <pratyakshkhuranaofficial@gmail.com>
Co-authored-by: Douile <25043847+Douile@users.noreply.github.com>
Co-authored-by: ThetaDev <t.testboy@gmail.com>
Co-authored-by: Daniel Gray <dng@disroot.org>
Co-authored-by: BMN <weblate@yopmail.com>
Co-authored-by: C. Rüdinger <Mail-an-CR@web.de>
Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Co-authored-by: Eric <hamburger1024@duck.com>
Co-authored-by: Florian <flo.site@zaclys.net>
Co-authored-by: Igor Nedoboy <i.nedoboy@mail.ru>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
Co-authored-by: Linerly <linerly@protonmail.com>
Co-authored-by: Priit Jõerüüt <hwlate@joeruut.com>
Co-authored-by: Retrial <giwrgosmant@gmail.com>
Co-authored-by: Rex_sa <rex.sa@pm.me>
Co-authored-by: Ricardo <contatorms7@tutamail.com>
Co-authored-by: Skarvinius <saab_samuel@hotmail.com>
Co-authored-by: Vasilis K <skyhirules@gmail.com>
Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Co-authored-by: argonfilm <gradicchuck@gmail.com>
Co-authored-by: nautilusx <translate@disroot.org>
Co-authored-by: Robin <robin.gawenda@ondamedia.de>
Co-authored-by: Ahmad Raza <ahmadrazaxm@gmail.com>
Co-authored-by: Dan <denqwerta@gmail.com>
Co-authored-by: Igor Sorocean <sorocean.igor@gmail.com>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
Co-authored-by: Kiss Attila <gaxeco4855@pro5g.com>
Co-authored-by: Terry Louwers <t.louwers@gmail.com>
Co-authored-by: Translator <kvb@tuta.io>
Co-authored-by: subba raidu <raidu4u@gmail.com>
Co-authored-by: Robin <redirion@web.de>
  • Loading branch information
Show file tree
Hide file tree
Showing 328 changed files with 6,110 additions and 3,068 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew build sonarqube --info
run: ./gradlew build sonar --info
6 changes: 4 additions & 2 deletions .github/workflows/image-minimizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ module.exports = async ({github, context}) => {
return match;
}

let probeAspectRatio = 0;
let shouldModify = false;
try {
console.log(`Probing ${g2}`);
Expand All @@ -76,7 +77,8 @@ module.exports = async ({github, context}) => {
}
console.log(`Probing resulted in ${probeResult.width}x${probeResult.height}px`);

shouldModify = probeResult.height > IMG_MAX_HEIGHT_PX && (probeResult.width / probeResult.height) < MIN_ASPECT_RATIO;
probeAspectRatio = probeResult.width / probeResult.height;
shouldModify = probeResult.height > IMG_MAX_HEIGHT_PX && probeAspectRatio < MIN_ASPECT_RATIO;
} catch(e) {
console.log('Probing failed:', e);
// Immediately abort
Expand All @@ -86,7 +88,7 @@ module.exports = async ({github, context}) => {
if (shouldModify) {
wasMatchModified = true;
console.log(`Modifying match '${match}'`);
return `<img alt="${g1}" src="${g2}" height=${IMG_MAX_HEIGHT_PX} />`;
return `<img alt="${g1}" src="${g2}" width=${Math.min(600, (IMG_MAX_HEIGHT_PX * probeAspectRatio).toFixed(0))} />`;
}

console.log(`Match '${match}' is ok/will not be modified`);
Expand Down
91 changes: 76 additions & 15 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ plugins {
id "kotlin-kapt"
id "kotlin-parcelize"
id "checkstyle"
id "org.sonarqube" version "3.3"
id "org.sonarqube" version "3.5.0.2730"
}

android {
compileSdk 31
compileSdk 33
namespace 'org.schabi.newpipe'

defaultConfig {
applicationId "org.schabi.newpipe"
resValue "string", "app_name", "NewPipe"
minSdk 21
targetSdk 29
versionCode 990
versionName "0.24.0"
targetSdk 33
versionCode 991
versionName "0.24.1"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

Expand Down Expand Up @@ -102,12 +102,12 @@ ext {
androidxWorkVersion = '2.7.1'

icepickVersion = '3.2.0'
exoPlayerVersion = '2.18.1'
exoPlayerVersion = '2.18.2'
googleAutoServiceVersion = '1.0.1'
groupieVersion = '2.10.1'
markwonVersion = '4.6.2'

leakCanaryVersion = '2.5'
leakCanaryVersion = '2.9.1'
stethoVersion = '1.6.0'
mockitoVersion = '4.0.0'
assertJVersion = '3.23.1'
Expand All @@ -116,6 +116,10 @@ ext {
configurations {
checkstyle
ktlint

// This is a configuration that only contains the cronet-common dependency, so that in
// cronetCommonNoUserAgentLib we can get the aar without making explicit network requests
cronetCommon
}

checkstyle {
Expand All @@ -132,6 +136,7 @@ task runCheckstyle(type: Checkstyle) {
exclude '**/R.java'
exclude '**/BuildConfig.java'
exclude 'main/java/us/shandian/giga/**'
exclude 'main/java/org/chromium/net/**'

classpath = configurations.checkstyle

Expand Down Expand Up @@ -169,25 +174,61 @@ afterEvaluate {
preDebugBuild.dependsOn runCheckstyle, runKtlint
}

sonarqube {
sonar {
properties {
property "sonar.projectKey", "TeamNewPipe_NewPipe"
property "sonar.organization", "teamnewpipe"
property "sonar.host.url", "https://sonarcloud.io"
}
}

ext {
// Represents the folder in which to put temporary files, and also the path to the generated
// archive (without a `.jar` in the end)
cronetCommonPath = "$buildDir/cronet-common"
cronetVersion = "108.5359.79"
}

// These three tasks are actually just a chain of tasks that are executed one after the other
task cronetCommonNoUserAgentLib(type: Copy) {
from configurations.cronetCommon
into (cronetCommonPath)
from zipTree("$cronetCommonPath/cronet-common-${cronetVersion}.aar")
into (cronetCommonPath)
from zipTree("$cronetCommonPath/classes.jar")
into (cronetCommonPath)
// We want every class except the UserAgent class, since we want to define that ourselves
exclude "org/chromium/net/impl/UserAgent.class"
}

task cronetCommonNoUserAgentClasses(type: Delete) {
dependsOn cronetCommonNoUserAgentLib
delete fileTree(cronetCommonPath) {
// Remove everything except .class files, otherwise the other files would end up in the .jar
exclude "**/*.class"
}
}

task cronetCommonNoUserAgentJar(type: Jar) {
dependsOn cronetCommonNoUserAgentClasses
from files(cronetCommonPath)
// create a file with the same name of the directory and with `.jar` at the end
destinationDirectory = file(cronetCommonPath).parentFile
archiveBaseName = file(cronetCommonPath).name
reproducibleFileOrder = true
}

dependencies {
/** Desugaring **/
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.6'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.8'

/** 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:9ffdd0948b2ecd82655f5ff2a3e127b2b7695d5b'
implementation 'com.github.TeamNewPipe:NewPipeExtractor:2211a24b6934a8a8cdf5547ea1b52daa4cb5de6c'
implementation 'com.github.TeamNewPipe:NoNonsense-FilePicker:5.0.0'

/** Checkstyle **/
Expand All @@ -198,7 +239,7 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlin_version}"

/** AndroidX **/
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.core:core-ktx:1.8.0'
Expand Down Expand Up @@ -232,6 +273,22 @@ dependencies {
// HTTP client
implementation "com.squareup.okhttp3:okhttp:4.10.0"

// HTTP client for playback
implementation ("org.chromium.net:cronet-embedded:$cronetVersion") {
// Exclude cronet-common module as it is added separately below
exclude module: "cronet-common"
}
// cronet-api is a dependency of cronet-common: we need to add it manually because the jar
// generated by cronetCommonNoUserAgentJar does not contain its dependencies
implementation "org.chromium.net:cronet-api:$cronetVersion"
// Remove the UserAgent class from cronet-common before adding it as a dependency, so that we
// can replace that class with our own implementation, which does not leak the application
// package name in the QUIC User-Agent ID value
cronetCommon "org.chromium.net:cronet-common:$cronetVersion"
implementation files("${cronetCommonPath}.jar") {
builtBy "cronetCommonNoUserAgentJar"
}

// Media player
implementation "com.google.android.exoplayer:exoplayer-core:${exoPlayerVersion}"
implementation "com.google.android.exoplayer:exoplayer-dash:${exoPlayerVersion}"
Expand All @@ -241,6 +298,10 @@ dependencies {
implementation "com.google.android.exoplayer:exoplayer-smoothstreaming:${exoPlayerVersion}"
implementation "com.google.android.exoplayer:exoplayer-ui:${exoPlayerVersion}"
implementation "com.google.android.exoplayer:extension-mediasession:${exoPlayerVersion}"
implementation ("com.google.android.exoplayer:extension-cronet:${exoPlayerVersion}") {
// Exclude Google Play Services Cronet implementation used by default by the extension
exclude group: "com.google.android.gms"
}

// Metadata generator for service descriptors
compileOnly "com.google.auto.service:auto-service-annotations:${googleAutoServiceVersion}"
Expand All @@ -259,19 +320,19 @@ dependencies {
implementation "io.noties.markwon:linkify:${markwonVersion}"

// Crash reporting
implementation "ch.acra:acra-core:5.9.3"
implementation "ch.acra:acra-core:5.9.7"

// Properly restarting
implementation 'com.jakewharton:process-phoenix:2.1.2'

// Reactive extensions for Java VM
implementation "io.reactivex.rxjava3:rxjava:3.0.13"
implementation "io.reactivex.rxjava3:rxandroid:3.0.0"
implementation "io.reactivex.rxjava3:rxjava:3.1.5"
implementation "io.reactivex.rxjava3:rxandroid:3.0.2"
// RxJava binding APIs for Android UI widgets
implementation "com.jakewharton.rxbinding4:rxbinding:4.0.0"

// Date and time formatting
implementation "org.ocpsoft.prettytime:prettytime:5.0.3.Final"
implementation "org.ocpsoft.prettytime:prettytime:5.0.6.Final"

/** Debugging **/
// Memory leak detection
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.schabi.newpipe.util

import android.content.Context
import android.util.SparseArray
import android.view.View
import android.view.View.GONE
import android.view.View.INVISIBLE
import android.view.View.VISIBLE
import android.widget.Spinner
import androidx.collection.SparseArrayCompat
import androidx.test.core.app.ApplicationProvider
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
Expand Down Expand Up @@ -39,9 +39,7 @@ class StreamItemAdapterTest {
@Test
fun videoStreams_noSecondaryStream() {
val adapter = StreamItemAdapter<VideoStream, AudioStream>(
context,
getVideoStreams(true, true, true, true),
null
getVideoStreams(true, true, true, true)
)

spinner.adapter = adapter
Expand All @@ -54,7 +52,6 @@ class StreamItemAdapterTest {
@Test
fun videoStreams_hasSecondaryStream() {
val adapter = StreamItemAdapter(
context,
getVideoStreams(false, true, false, true),
getAudioStreams(false, true, false, true)
)
Expand All @@ -69,7 +66,6 @@ class StreamItemAdapterTest {
@Test
fun videoStreams_Mixed() {
val adapter = StreamItemAdapter(
context,
getVideoStreams(true, true, true, true, true, false, true, true),
getAudioStreams(false, true, false, false, false, true, true, true)
)
Expand All @@ -88,7 +84,6 @@ class StreamItemAdapterTest {
@Test
fun subtitleStreams_noIcon() {
val adapter = StreamItemAdapter<SubtitlesStream, Stream>(
context,
StreamItemAdapter.StreamSizeWrapper(
(0 until 5).map {
SubtitlesStream.Builder()
Expand All @@ -99,8 +94,7 @@ class StreamItemAdapterTest {
.build()
},
context
),
null
)
)
spinner.adapter = adapter
for (i in 0 until spinner.count) {
Expand All @@ -111,7 +105,6 @@ class StreamItemAdapterTest {
@Test
fun audioStreams_noIcon() {
val adapter = StreamItemAdapter<AudioStream, Stream>(
context,
StreamItemAdapter.StreamSizeWrapper(
(0 until 5).map {
AudioStream.Builder()
Expand All @@ -122,8 +115,7 @@ class StreamItemAdapterTest {
.build()
},
context
),
null
)
)
spinner.adapter = adapter
for (i in 0 until spinner.count) {
Expand Down Expand Up @@ -200,7 +192,7 @@ class StreamItemAdapterTest {
* Helper function that builds a secondary stream list.
*/
private fun <T : Stream> getSecondaryStreamsFromList(streams: List<T?>) =
SparseArray<SecondaryStreamHelper<T>?>(streams.size).apply {
SparseArrayCompat<SecondaryStreamHelper<T>?>(streams.size).apply {
streams.forEachIndexed { index, stream ->
val secondaryStreamHelper: SecondaryStreamHelper<T>? = stream?.let {
SecondaryStreamHelper(
Expand Down
Loading

0 comments on commit ff2b11b

Please sign in to comment.