1
mirror of https://github.com/TeamNewPipe/NewPipe synced 2025-09-20 11:20:52 +02:00

Compare commits

...

159 Commits

Author SHA1 Message Date
Mohammed Anas
4e633504a8 Merge pull request #7753 from TeamNewPipe/release/0.21.16
Release 0.21.16
2022-02-01 16:18:52 +03:00
TobiGr
144a10f7a6 Release 0.21.16 (982) 2022-02-01 13:44:19 +01:00
TobiGr
72a2644f25 Update NewPipe Extractor to 0.21.13 2022-02-01 13:41:12 +01:00
TobiGr
ff8868f6a3 NewPipe version 0.21.15 (981) 2021-12-23 23:41:20 +01:00
Robin
8c6e37d1d1 Disable media tunneling on Philips QM16XE 2021-12-23 23:35:04 +01:00
litetex
c90237c14c Removed/Reverted MediaParser support (Android 11+) due to bugs 2021-12-23 23:33:55 +01:00
litetex
3750561b4d Merge pull request #7475 from litetex/release/v0.21.14
Release/v0.21.14
2021-12-11 17:06:29 +01:00
Hosted Weblate
6b026557d4 Translated using Weblate (French)
Currently translated at 99.5% (628 of 631 strings)

Translated using Weblate (Hungarian)

Currently translated at 3.2% (2 of 61 strings)

Translated using Weblate (Punjabi)

Currently translated at 4.9% (3 of 61 strings)

Translated using Weblate (Telugu)

Currently translated at 6.5% (4 of 61 strings)

Translated using Weblate (German)

Currently translated at 50.8% (31 of 61 strings)

Translated using Weblate (Portuguese (Portugal))

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (Punjabi)

Currently translated at 91.4% (577 of 631 strings)

Translated using Weblate (Telugu)

Currently translated at 38.1% (241 of 631 strings)

Translated using Weblate (Indonesian)

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (Japanese)

Currently translated at 99.2% (626 of 631 strings)

Translated using Weblate (Russian)

Currently translated at 99.8% (630 of 631 strings)

Translated using Weblate (Serbian)

Currently translated at 96.5% (609 of 631 strings)

Translated using Weblate (German)

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (Tamil)

Currently translated at 1.6% (1 of 61 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (61 of 61 strings)

Translated using Weblate (Polish)

Currently translated at 55.7% (34 of 61 strings)

Translated using Weblate (Hebrew)

Currently translated at 50.8% (31 of 61 strings)

Translated using Weblate (Ukrainian)

Currently translated at 80.3% (49 of 61 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (Ukrainian)

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (Greek)

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (Portuguese)

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (Japanese)

Currently translated at 98.8% (624 of 631 strings)

Translated using Weblate (Dutch)

Currently translated at 99.8% (630 of 631 strings)

Translated using Weblate (French)

Currently translated at 99.0% (625 of 631 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (German)

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (English)

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (English)

Currently translated at 100.0% (631 of 631 strings)

Co-authored-by: Agnieszka C <aga_04@o2.pl>
Co-authored-by: Alex25820 <Alexander_sjogren@hotmail.se>
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: Balázs Meskó <meskobalazs@mailbox.org>
Co-authored-by: GnuPGを使うべきだ <dieeeazpnnqbpddh@cock.email>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Human Beeing <thankful_human@mailbox.org>
Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Co-authored-by: JY3 <GeeyunJY3@gmail.com>
Co-authored-by: Linerly <linerly@protonmail.com>
Co-authored-by: Naveen <naveen.translator@protonmail.com>
Co-authored-by: Ricardo <contatorms7@tutamail.com>
Co-authored-by: Terry Louwers <t.louwers@gmail.com>
Co-authored-by: Vasilis K <skyhirules@gmail.com>
Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Co-authored-by: chr56 <chr0056@gmail.com>
Co-authored-by: nautilusx <translate@disroot.org>
Co-authored-by: nzgha <nzghafoss.ldxwe@slmail.me>
Co-authored-by: rickeesingh <rickeesingh231@gmail.com>
Co-authored-by: ssantos <ssantos@web.de>
Co-authored-by: subba raidu <raidu4u@gmail.com>
Co-authored-by: translator <kvb@tuta.io>
Co-authored-by: Даниил Морозюк <morozdan2003@gmail.com>
Co-authored-by: Саша Петровић <salepetronije@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/de/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/he/
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/ta/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/te/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/uk/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/zh_Hans/
Translation: NewPipe/Metadata
2021-12-11 16:51:35 +01:00
litetex
1ee137bbda Updated to NewPipeExtractor to version `v0.21.12` 2021-12-11 16:21:34 +01:00
litetex
2c88e9d068 Updated version to 0.21.14 2021-12-01 21:07:57 +01:00
litetex
4825a0a35f Update changelog (#7476)
* Added changelog for 980

Co-authored-by: Mohammed Anas <triallax@tutanota.com>
2021-12-01 21:06:12 +01:00
Hosted Weblate
122b0b0de4 Translated using Weblate (Norwegian Bokmål)
Currently translated at 95.8% (605 of 631 strings)

Translated using Weblate (Hebrew)

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (Chinese (Traditional))

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (Ukrainian)

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (Arabic)

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (Greek)

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (Russian)

Currently translated at 99.5% (628 of 631 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (German)

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (German)

Currently translated at 100.0% (631 of 631 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 99.3% (627 of 631 strings)

Translated using Weblate (Arabic)

Currently translated at 100.0% (626 of 626 strings)

Translated using Weblate (Portuguese (Portugal))

Currently translated at 56.6% (34 of 60 strings)

Translated using Weblate (Portuguese)

Currently translated at 61.6% (37 of 60 strings)

Translated using Weblate (Portuguese (Portugal))

Currently translated at 100.0% (626 of 626 strings)

Translated using Weblate (Arabic)

Currently translated at 99.8% (625 of 626 strings)

Translated using Weblate (Tamil)

Currently translated at 36.4% (228 of 626 strings)

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

Currently translated at 39.1% (245 of 626 strings)

Translated using Weblate (Hungarian)

Currently translated at 82.2% (515 of 626 strings)

Translated using Weblate (Hungarian)

Currently translated at 81.9% (513 of 626 strings)

Translated using Weblate (French)

Currently translated at 66.6% (40 of 60 strings)

Translated using Weblate (Bengali)

Currently translated at 88.0% (551 of 626 strings)

Translated using Weblate (Turkish)

Currently translated at 100.0% (626 of 626 strings)

Translated using Weblate (Indonesian)

Currently translated at 100.0% (626 of 626 strings)

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

Currently translated at 35.4% (222 of 626 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (626 of 626 strings)

Translated using Weblate (French)

Currently translated at 100.0% (626 of 626 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (626 of 626 strings)

Translated using Weblate (Slovak)

Currently translated at 100.0% (626 of 626 strings)

Translated using Weblate (Estonian)

Currently translated at 11.6% (7 of 60 strings)

Translated using Weblate (Portuguese)

Currently translated at 61.6% (37 of 60 strings)

Translated using Weblate (Estonian)

Currently translated at 100.0% (626 of 626 strings)

Translated using Weblate (Hindi)

Currently translated at 77.3% (484 of 626 strings)

Translated using Weblate (Lithuanian)

Currently translated at 100.0% (626 of 626 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (626 of 626 strings)

Translated using Weblate (Hebrew)

Currently translated at 100.0% (626 of 626 strings)

Translated using Weblate (Chinese (Traditional))

Currently translated at 100.0% (626 of 626 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (626 of 626 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (626 of 626 strings)

Translated using Weblate (Ukrainian)

Currently translated at 100.0% (626 of 626 strings)

Translated using Weblate (Arabic)

Currently translated at 100.0% (626 of 626 strings)

Translated using Weblate (Greek)

Currently translated at 100.0% (626 of 626 strings)

Translated using Weblate (Portuguese)

Currently translated at 100.0% (626 of 626 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (626 of 626 strings)

Translated using Weblate (French)

Currently translated at 100.0% (626 of 626 strings)

Translated using Weblate (German)

Currently translated at 100.0% (626 of 626 strings)

Translated using Weblate (Galician)

Currently translated at 3.3% (2 of 60 strings)

Translated using Weblate (Galician)

Currently translated at 94.4% (590 of 625 strings)

Translated using Weblate (Croatian)

Currently translated at 100.0% (625 of 625 strings)

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

Currently translated at 28.4% (178 of 625 strings)

Translated using Weblate (German)

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Arabic)

Currently translated at 60.0% (36 of 60 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Latvian)

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Portuguese (Portugal))

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Portuguese (Portugal))

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Finnish)

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Chinese (Traditional))

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Portuguese)

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Japanese)

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Sardinian)

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Estonian)

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Lithuanian)

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Hebrew)

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Turkish)

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Ukrainian)

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Arabic)

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Greek)

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Japanese)

Currently translated at 99.5% (622 of 625 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (French)

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (German)

Currently translated at 100.0% (625 of 625 strings)

Translated using Weblate (Spanish)

Currently translated at 58.3% (35 of 60 strings)

Translated using Weblate (Interlingua)

Currently translated at 1.6% (1 of 60 strings)

Translated using Weblate (Bulgarian)

Currently translated at 78.6% (489 of 622 strings)

Translated using Weblate (Tamil)

Currently translated at 34.0% (212 of 622 strings)

Translated using Weblate (Vietnamese)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Romanian)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Malayalam)

Currently translated at 99.0% (616 of 622 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Bulgarian)

Currently translated at 77.0% (479 of 622 strings)

Translated using Weblate (Bulgarian)

Currently translated at 58.5% (364 of 622 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (60 of 60 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Persian)

Currently translated at 63.3% (38 of 60 strings)

Translated using Weblate (French)

Currently translated at 66.6% (40 of 60 strings)

Translated using Weblate (Azerbaijani)

Currently translated at 45.0% (280 of 622 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Croatian)

Currently translated at 98.8% (615 of 622 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Arabic)

Currently translated at 58.3% (35 of 60 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (60 of 60 strings)

Translated using Weblate (Swedish)

Currently translated at 23.3% (14 of 60 strings)

Translated using Weblate (Polish)

Currently translated at 55.0% (33 of 60 strings)

Translated using Weblate (Hebrew)

Currently translated at 50.0% (30 of 60 strings)

Translated using Weblate (Ukrainian)

Currently translated at 80.0% (48 of 60 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Estonian)

Currently translated at 10.1% (6 of 59 strings)

Translated using Weblate (Finnish)

Currently translated at 13.5% (8 of 59 strings)

Translated using Weblate (Esperanto)

Currently translated at 1.6% (1 of 59 strings)

Translated using Weblate (Portuguese (Portugal))

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Estonian)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Finnish)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Esperanto)

Currently translated at 83.7% (521 of 622 strings)

Translated using Weblate (Esperanto)

Currently translated at 83.7% (521 of 622 strings)

Translated using Weblate (Slovak)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Portuguese)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (French)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (German)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (59 of 59 strings)

Translated using Weblate (Swedish)

Currently translated at 22.0% (13 of 59 strings)

Translated using Weblate (German)

Currently translated at 52.5% (31 of 59 strings)

Translated using Weblate (Portuguese (Portugal))

Currently translated at 99.8% (621 of 622 strings)

Translated using Weblate (Kabyle)

Currently translated at 26.0% (162 of 622 strings)

Translated using Weblate (Catalan)

Currently translated at 97.5% (607 of 622 strings)

Translated using Weblate (Lithuanian)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Turkish)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Ukrainian)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Indonesian)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Czech)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Greek)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Japanese)

Currently translated at 99.5% (619 of 622 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (English)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Swedish)

Currently translated at 16.9% (10 of 59 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Arabic)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Swedish)

Currently translated at 99.3% (618 of 622 strings)

Translated using Weblate (Swedish)

Currently translated at 99.3% (618 of 622 strings)

Translated using Weblate (Swedish)

Currently translated at 99.3% (618 of 622 strings)

Translated using Weblate (Swedish)

Currently translated at 99.3% (618 of 622 strings)

Translated using Weblate (Chinese (Traditional))

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (German)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (59 of 59 strings)

Translated using Weblate (Sardinian)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Kurdish (Central))

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Lithuanian)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Hebrew)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Turkish)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Ukrainian)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Indonesian)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (French)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Greek)

Currently translated at 100.0% (622 of 622 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (621 of 621 strings)

Translated using Weblate (Persian)

Currently translated at 62.7% (37 of 59 strings)

Translated using Weblate (French)

Currently translated at 66.1% (39 of 59 strings)

Translated using Weblate (Spanish)

Currently translated at 57.6% (34 of 59 strings)

Translated using Weblate (Polish)

Currently translated at 54.2% (32 of 59 strings)

Translated using Weblate (Hebrew)

Currently translated at 49.1% (29 of 59 strings)

Translated using Weblate (Ukrainian)

Currently translated at 79.6% (47 of 59 strings)

Translated using Weblate (Dutch (Belgium))

Currently translated at 93.0% (578 of 621 strings)

Translated using Weblate (Swedish)

Currently translated at 98.8% (614 of 621 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (621 of 621 strings)

Translated using Weblate (Indonesian)

Currently translated at 99.6% (619 of 621 strings)

Co-authored-by: ARtHryDr <sergivallsr@gmail.com>
Co-authored-by: Agnieszka C <aga_04@o2.pl>
Co-authored-by: AioiLight <info@aioilight.space>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alex25820 <Alexander_sjogren@hotmail.se>
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: Andrij Mizyk <andmizyk@gmail.com>
Co-authored-by: Azizov Aga <895238489@e2t.link>
Co-authored-by: ButterflyOfFire <ButterflyOfFire@protonmail.com>
Co-authored-by: D D <keptawesome@gmail.com>
Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Garden Hose <maxmammath@gmail.com>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: GnuPGを使うべきだ <dieeeazpnnqbpddh@cock.email>
Co-authored-by: GobinathAL <gobinathal8@gmail.com>
Co-authored-by: Ha Thang <tadi69835@gmail.com>
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: Ihor Hordiichuk <igor_ck@outlook.com>
Co-authored-by: Isak Holmström <isak@kajko.se>
Co-authored-by: JY3 <GeeyunJY3@gmail.com>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
Co-authored-by: Joel A <joeax910@student.liu.se>
Co-authored-by: Karl Tammik <karltammik@protonmail.com>
Co-authored-by: Kim Nyberg <kim-nyberg@outlook.com>
Co-authored-by: Laura Arjona Reina <larjona@larjona.net>
Co-authored-by: Lavin Tom K Abraham <lavintom007@gmail.com>
Co-authored-by: Ldm Public <ldmpub@gmail.com>
Co-authored-by: Leander Coevoet <leandercoevoet1@gmail.com>
Co-authored-by: LiftedStarfish <liftedstarfish@protonmail.com>
Co-authored-by: Line <LineAirline@protonmail.com>
Co-authored-by: Marian Hanzel <marulinko@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Mohammed Anas <6daf084a-8eaf-40fb-86c7-8500077c3b69@anonaddy.me>
Co-authored-by: MohammedSR Vevo <mohammednajmidin@gmail.com>
Co-authored-by: Nachimuthu Easwaran <nachimuthu.gct@gmail.com>
Co-authored-by: Nekromanser <ari.taitto@protonmail.com>
Co-authored-by: Oymate <dhruboadittya96@gmail.com>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Philipp <philipp.steisslingen@web.de>
Co-authored-by: Priit Jõerüüt <hwlate@joeruut.com>
Co-authored-by: Ray <ray.cfu@protonmail.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: Software In Interlingua <softinterlingua@gmail.com>
Co-authored-by: Tanishq-Banyal <banyaltanishq@gmail.com>
Co-authored-by: TiA4f8R <avdivers84@gmail.com>
Co-authored-by: Toldi Balázs <tbazsalanszky@gmail.com>
Co-authored-by: Valdnet <valdnet@itvix.pl>
Co-authored-by: Vasilis K <skyhirules@gmail.com>
Co-authored-by: VfBFan <drop0815@posteo.de>
Co-authored-by: Ville Rantanen <v.r@iki.fi>
Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Co-authored-by: Zampa Yayas <zampayayas@gmail.com>
Co-authored-by: bomzhellino <adm.bomzh@gmail.com>
Co-authored-by: chr56 <chr0056@gmail.com>
Co-authored-by: evfjunior <evfjunior@protonmail.com>
Co-authored-by: g <muziejusinfo@gmail.com>
Co-authored-by: inkhorn <inkhorn@hostux.ninja>
Co-authored-by: naofum <naofum@gmail.com>
Co-authored-by: nautilusx <translate@disroot.org>
Co-authored-by: nzgha <nzghafoss.ldxwe@slmail.me>
Co-authored-by: pjammo <adrianoghr@hotmail.it>
Co-authored-by: random r <epsilin@yopmail.com>
Co-authored-by: ssantos <ssantos@web.de>
Co-authored-by: sunu.wahyudhi <nopeholmes@gmail.com>
Co-authored-by: tdayris-perso <tdayris@tutanota.de>
Co-authored-by: translator <yasinoc375@advew.com>
Co-authored-by: whenwesober <naomi16i_1298q@cikuh.com>
Co-authored-by: zeritti <woodenmo@posteo.de>
Co-authored-by: zmni <zmni@outlook.com>
Co-authored-by: Ács Zoltán <acszoltan111@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/ar/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/de/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/eo/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/es/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/et/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/fa/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/fi/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/fr/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/gl/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/he/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/ia/
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/pt_PT/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/sv/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/uk/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/zh_Hans/
Translation: NewPipe/Metadata
2021-11-30 22:07:54 +01:00
litetex
7dc85af5fb Use latest NewPipeExtractor to fix parsing of YT's dislikes (#7467) 2021-11-29 19:59:18 +00:00
Stypox
c7daf32904 Merge pull request #7142 from litetex/better-player-error-handling
Better player error handling
2021-11-28 17:01:45 +01:00
litetex
4c8dca5300 Fixed NPE + Problems with context 2021-11-28 13:42:26 +01:00
Robin
ef91214085 Merge pull request #7442 from mhmdanas/fix-gradle-sha256
Fix Gradle checksum
2021-11-26 09:29:21 +01:00
mhmdanas
dc09a4621b Fix Gradle checksum 2021-11-26 10:50:07 +03:00
litetex
2f99a217c3 Fixed build 2021-11-23 20:21:59 +01:00
litetex
6992b2c308 Moved report_player_errors to debug 2021-11-23 20:16:01 +01:00
litetex
0d51eefbb9 Refactoring 2021-11-23 20:12:16 +01:00
litetex
aa28a85747 Added a workaround for not serializable exceptions 2021-11-23 20:12:14 +01:00
litetex
f18ee8e83d Added a bit more documentation 2021-11-23 20:12:13 +01:00
litetex
fb58967766 PlayerErrorHandler refactor + docs 2021-11-23 20:12:12 +01:00
litetex
c3f1478fde Support for debug option "Crash the player" on TVs 2021-11-23 20:12:11 +01:00
litetex
e5c00a7ef4 Added some doc 2021-11-23 20:12:10 +01:00
litetex
769791af7a Added a "Crash the player" debug option 2021-11-23 20:12:09 +01:00
litetex
e632fab4d0 Added option to report player errors
* Added a new setting so that player errors are reported (under Video and Audio > Player)
* Moved the player error logic to separate class specially created for this purpose
2021-11-23 20:12:07 +01:00
Stypox
6cd25d7e55 Merge pull request #7412 from litetex/code-cleanup
Some code cleanup(s)
2021-11-23 08:59:34 +01:00
litetex
c9488eb042 Removed useless lines 2021-11-22 19:49:52 +01:00
litetex
c8516a04dc Formatted code 2021-11-21 19:56:50 +01:00
litetex
02d1b98b1c Removed useless doc 2021-11-21 19:46:11 +01:00
litetex
d8236bbedd Merge pull request #7406 from Redirion/usedefaultloadcontrol
Use DefaultLoadcontrol
2021-11-21 15:11:21 +01:00
opusforlife2
1de21fb0c2 Merge pull request #7418 from TeamNewPipe/add-gradle-wrapper-Sha256
Add gradle wrapper Sha256
2021-11-21 08:25:55 +00:00
Robin
13cac07b8d Add gradle wrapper Sha256 2021-11-18 10:51:11 +01:00
XiangRongLin
bd9dcfb28a Merge pull request #7381 from litetex/prevent-automatic-replay-after-returning-from-background
Prevent automatic replay after returning from background
2021-11-17 09:38:09 +01:00
Robin
d5199eac3e Merge pull request #7050 from litetex/feed-refactor-new-items-handling
Rework feed new items handling
2021-11-15 23:20:07 +01:00
litetex
7638d229c0 Fixed typo 2021-11-15 20:24:40 +01:00
TacoTheDank
a641c5bb58 Update Groupie to 2.9.0 2021-11-15 20:24:39 +01:00
litetex
1e0c9f46ad Improved highlighting in FeedFragment
Now keeps the ``selectableItemBackground`` when highligthing an item.
2021-11-15 20:22:23 +01:00
litetex
4eb02f584e Fixed default visibility of "new feed items" button
Fixed/Avoid NPEs
2021-11-15 20:22:22 +01:00
litetex
700c1b4b25 Removed unnecessary layout
Moved the feed button up a bit
2021-11-15 20:22:21 +01:00
litetex
4b4337e078 Used more understandable kotlin methods 2021-11-15 20:22:20 +01:00
litetex
38ce800685 Fixed feed when animations are off
Introduced a check if corresponding animations on the devices are enabled
2021-11-15 20:22:20 +01:00
litetex
2310e8c1d6 Made `hideNewItemsLoaded` more null safe 2021-11-15 20:22:19 +01:00
litetex
1b2b3a4f88 Make new feed items bold 2021-11-15 20:22:18 +01:00
litetex
d11129a76b Fixed StackOverflow 2021-11-15 20:22:17 +01:00
litetex
02789122a0 Implemented UI highlighting and "new feed items"-notification
Fixed format
2021-11-15 20:22:17 +01:00
litetex
676bc02d52 No more reaction to unnecessary feed db-changes
This caused duplicate events (https://github.com/TeamNewPipe/NewPipe/pull/6686#issuecomment-909575283) and unnecessary processing of items
2021-11-15 20:21:23 +01:00
litetex
8b807b0706 Enhanced `View.slideUp` 2021-11-15 20:21:21 +01:00
Robin
72dfe974ab Merge pull request #7408 from Redirion/fixedautotransition2
Fixed Period Transition
2021-11-15 19:59:42 +01:00
litetex
316db0e4c6 setRecovery: Remove checks and use Math.min/max 2021-11-15 19:56:14 +01:00
litetex
010c607e40 Prevent automatic replay after returning from background
See also https://github.com/TeamNewPipe/NewPipe/pull/7195#issuecomment-962624380
2021-11-15 19:47:08 +01:00
Robin
3e099fb2a3 Fixed Period Transition 2021-11-14 21:19:36 +01:00
Robin
9c9730b152 Use DefaultLoadcontrol 2021-11-14 20:12:12 +01:00
Stypox
9e44053e22 Merge pull request #7160 from nschulzke/mark-as-watched-everywhere
Enable Mark as Watched in all the other playlist fragments.
2021-11-13 20:37:59 +01:00
Nathan Schulzke
dee32c3dc5 Factor out shouldAddMarkAsWatched as a shared function 2021-11-13 10:18:17 -07:00
Robin
344fbff59a Merge pull request #7363 from litetex/playback-speed-ctrls-simple-landscape-improvements
Simple playback-speed-controls improvements
2021-11-12 21:19:17 +01:00
litetex
e39a816bdc Merge pull request #5843 from TeamNewPipe/jcenter
Remove JCenter when possible
2021-11-12 20:53:29 +01:00
TobiGr
605b8fac5e Remove JCenter
All dependencies which were fetched from JCenter are now available via Maven Central. This source change is necessary becuase JCenter announced they werer going to be read-only starting at 31st March 2021 (https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter).
2021-11-12 20:38:50 +01:00
Robin
dfba10f8ae Merge pull request #7005 from Redirion/exo14
Update ExoPlayer to 2.14.2
2021-11-12 20:19:00 +01:00
litetex
48a1ab64b0 Refactored `PlaybackResolver`
* fixes the deprecation of ``setTag``
* makes the code more consistent
* de-duplicates some code
2021-11-12 20:14:39 +01:00
litetex
dd2cde3c1a De-duplicated PlayerDataSource-code 2021-11-12 19:40:00 +01:00
Robin
1b9c2b37c5 Use Android11+ extractors 2021-11-12 19:17:52 +01:00
Robin
eae1f8b597 Update ExoPlayer to 2.14.2 2021-11-12 19:17:51 +01:00
litetex
18ce86c2ed Merge pull request #7370 from iambaji/issue_7362
added show watched items toggle preference
2021-11-12 18:24:44 +01:00
litetex
d5f25e05d9 Merge pull request #7395 from litetex/gradle-replaced-with-with-using
Gradle: Replaced deprecated `with` with `using`
2021-11-12 18:17:41 +01:00
litetex
53303ac5d3 Replaced deprecated `with with using` 2021-11-11 20:17:54 +01:00
litetex
90cc8e2144 A feed settings-key better fits there 2021-11-11 19:49:46 +01:00
litetex
adf9badbf6 Fixed toggle not in sync with list after app restart + refactored the code a bit 2021-11-11 19:46:15 +01:00
Baji Shaik
c35fe4f3f1 moved preference key from viewmodel to settings_keys.xml 2021-11-10 16:16:17 -05:00
Baji Shaik
63291f8101 added show watched items toggle preference
default sharedpreference is used to persist and retrieve show watched menu option toggle state
2021-11-07 23:11:10 -05:00
litetex
62efb588ef Removed obvious title from the "Playback Speed Controls" 2021-11-07 13:51:43 +01:00
litetex
203ca9afc6 Removed unused imports 2021-11-06 21:07:00 +01:00
litetex
a23f941ac8 Simplified some code and added some comments 2021-11-05 19:07:56 +01:00
litetex
b0a10f0542 Merged extremely similar code together / parity between video and popup player
* Removed ``player.getPlayPauseButton().requestFocus();`` as there is no reason why it was introduced there documented
* Use the same delay to hide the controls on both players
2021-11-05 18:10:55 +01:00
litetex
478ad42977 De-Duplicated some code 2021-11-05 18:07:21 +01:00
litetex
0764983ac6 Why log double? 2021-11-05 18:06:32 +01:00
litetex
2b2f1ee8f5 Added some doc 2021-11-05 18:06:10 +01:00
litetex
28f167fd99 Removed dead code 2021-11-05 18:04:57 +01:00
litetex
272be36dd9 Removed `e.printStacktrace` and used an proper logger 2021-11-05 18:04:49 +01:00
litetex
f933db8117 Added a custom title
to also save some margin/padding/etc
2021-11-04 19:47:08 +01:00
litetex
cddb9bccb9 Reworked `dialog_playback_parameter`
* Removed dependency to @dimen/video_item_search_padding as it's unrelated
* Made the margins/paddings a bit smaller
* Put the checkboxes inside a layout
* Removed some useless attributes (maxLine)
2021-11-04 19:46:22 +01:00
litetex
b5ad24eb47 Merge pull request #7353 from B0pol/peertube-shortlinks
Support PeerTube short links
2021-11-04 16:31:16 +01:00
litetex
ad8f791f71 Changed extractor dependency back to TeamNewPipe
...as the required PR was merged.
2021-11-04 16:18:12 +01:00
litetex
2e862b4ccc Merge pull request #6844 from 0x416c6578/shuffle-mode-ui-fix
Fixed shuffle button opacity UI bug
2021-11-03 18:18:31 +01:00
litetex
ecac897e7b Fixed typo 2021-11-03 17:30:30 +01:00
bopol
702adb53a7 Support PeerTube short links 2021-11-03 14:49:17 +01:00
litetex
4ea962f523 Merge pull request #7348 from TiA4f8R/unrevert-pr6824
"Unrevert" changes from pull request 6824
2021-11-03 00:13:41 +01:00
TiA4f8R
acaf92d671 Unrevert PR 6824
PR 7061 reverted by mistake PR 6824 (it was a rebase issue). This commit unreverts this change and uses custom TextViews correctly in the file changed by PR 6824.
2021-11-02 17:53:27 +01:00
litetex
c673cb6157 Merge pull request #7304 from mhmdanas/add-y2ube-link-support
Add support for y2u.be links
2021-11-01 23:22:21 +01:00
litetex
c0f7b123a3 Merge pull request #7296 from vhouriet/vhouriet_feature_issue6049
Add "Check for updates" button in update settings
2021-11-01 23:17:25 +01:00
litetex
e9e2afa61a Merge pull request #7061 from TiA4f8R/custom-textview-edittext
Use custom TextViews and EditTexts in all XML resources
2021-10-27 20:47:15 +02:00
litetex
403154b2e1 Less indents and code -> better readable
Also removed a useless variable
2021-10-26 20:47:15 +02:00
litetex
e5fd24b0d1 Make naming great again
When we build APKs in PRs it's also a GITHUB_APK...
2021-10-26 20:47:14 +02:00
litetex
8dc34274a1 Removed dead code 2021-10-26 20:47:13 +02:00
litetex
467bd21de2 Cleanup up some code 2021-10-26 20:47:13 +02:00
vhouriet
5c9705d94e Change check for updates button to trigger a version check 2021-10-26 20:47:12 +02:00
vhouriet
85fb5827aa Add Check for updates button 2021-10-26 20:47:11 +02:00
litetex
0bcc9bd3ba Try to fix jitpack not resolving dependency 2021-10-26 19:07:54 +02:00
litetex
25e120bec1 Changed extractor dependency back to TeamNewPipe
...as the required PR was merged.
2021-10-26 18:47:48 +02:00
litetex
7067deb328 Merge pull request #7261 from TacoTheDank/bumpRecyclerView
Update RecyclerView & Groupie libraries
2021-10-24 21:22:04 +02:00
Mohammed Anas
f6efd302dc Fix extractor dependency 2021-10-23 20:30:04 +00:00
mhmdanas
61972141ae Add support for y2u.be links 2021-10-23 23:14:25 +03:00
litetex
af936bc646 Always create a backup list when shuffling
The backup-list has to be created at all cost (even when current list size <= 2). Otherwise it's not possible to enter shuffle-mode (as ``isShuffled()`` always returns false)!
2021-10-23 17:35:42 +02:00
litetex
d66f933c69 Fixing the shuffle button on the UI is enough.
No need for doing the heavier method ``onShuffleModeEnabledChanged(false);``
2021-10-23 16:46:56 +02:00
0x416c6578
cf81c37683 Removed changes to the intent handler 2021-10-23 16:43:29 +02:00
0x416c6578
d2306b0fd7 Fixed shuffle button opacity bug
Parameterised shuffle state into initPlayback for potentially passing the shuffle state into the player in the future
2021-10-23 16:43:28 +02:00
litetex
94dfabf3dc Merge pull request #7263 from TacoTheDank/moreBumps
Update some libraries
2021-10-22 18:19:01 +02:00
TobiGr
5522dc10b8 Merge branch 'master' into dev 2021-10-21 21:17:32 +02:00
Mohammed Anas
0ae04b8ead Merge pull request #7291 from TeamNewPipe/release/0.21.13
Release/0.21.13
2021-10-21 22:11:54 +03:00
Tobi
44cad27d0a Merge pull request #7268 from TeamNewPipe/release/0.21.13
Release 0.21.13
- Fix playback resume
- Ensure that the service for new version checks is not started in background
2021-10-21 20:51:01 +02:00
TobiGr
5d59025b3c Update changelog 2021-10-21 20:30:10 +02:00
TobiGr
768bb0bbcd Start service for update checks in onPastCreate() 2021-10-20 23:55:18 +02:00
Stypox
ac071b383f Revert part of #6872 and fix playback resuming 2021-10-20 23:20:26 +02:00
litetex
e0b1a6b88b Merge pull request #7149 from TacoTheDank/updateFragWorkaround
Update pager workaround code to Fragment 1.3.6
2021-10-20 19:44:35 +02:00
TacoTheDank
ed86b1c572 Update pager workaround to Fragment 1.3.6 2021-10-19 17:39:38 -04:00
TacoTheDank
b6c2bade73 Update AndroidX Media library 2021-10-19 17:36:36 -04:00
TacoTheDank
b6b19b474e Update RecyclerView & Groupie 2021-10-19 17:31:59 -04:00
litetex
231b7492fb Merge pull request #7265 from TacoTheDank/userVisibleHintBGone
Remove deprecated setUserVisibleHint
2021-10-18 20:02:33 +02:00
TacoTheDank
b4950fcb2e Clean up .gitignore files 2021-10-17 13:22:05 +02:00
TobiGr
b79ea7b51b NewPipe 0.21.13 (979) 2021-10-17 12:55:06 +02:00
TobiGr
28c72e7f63 Fix new version check still occassionally started in background 2021-10-17 12:55:06 +02:00
TobiGr
5fcc3b4dab [Player] Fix resuming playback
This was caused by #6872
2021-10-17 12:13:38 +02:00
TacoTheDank
51837ce36f Get rid of setUserVisibleHint 2021-10-16 15:33:45 -04:00
TiA4f8R
ddaafb68c8 Adress new requested changes 2021-10-16 15:32:56 +02:00
TiA4f8R
a744775fe7 Adress requested changes and remove an unused return value in NewPipeTextViewHelper 2021-10-16 13:41:05 +02:00
TiA4f8R
50b85a7734 Simplify code 2021-10-16 13:41:05 +02:00
TiA4f8R
aab09c0c65 Merge the Share process of the two classes into one
A new class has been added in the util package: NewPipeTextViewHelper.
It shares the selected text of a TextView with ShareUtils#shareText (with the created shareSelectedTextWithShareUtils static method).
Only this static method can be used by other classes, other methods are private.
2021-10-16 13:41:04 +02:00
TiA4f8R
3ded6feddb Improve code of created views
Use the same logic as Android TextViews
2021-10-16 13:41:04 +02:00
TiA4f8R
c8802fe5d0 Add JavaDocs on created views 2021-10-16 13:41:04 +02:00
TiA4f8R
411b3129f9 Use a custom EditText everywhere to be able to share with ShareUtils the selected text
This EditText class extends the AppCompatEditText class from androidx.

These changes (only in XML ressources) allow us to share the selected text by using ShareUtils.shareText, which opens the Android system chooser instead of the Huawei system chooser on EMUI devices.
2021-10-16 13:41:03 +02:00
TiA4f8R
a55acd38df Use a custom TextView everywhere to be able to share with ShareUtils the selected text
This TextView class extends the AppCompatTextView class from androidx.

These changes (only in XML ressources) allow us to share the selected text by using ShareUtils.shareText, which opens the Android system chooser instead of the Huawei system chooser on EMUI devices.
2021-10-16 13:40:54 +02:00
TacoTheDank
e7773d8807 Update plugins 2021-10-15 16:48:44 -04:00
litetex
7edef8d5a2 Merge pull request #7222 from ktprograms/queue-menu-channel-details
Added the 'Show Channel Details' menu item to the Queue long press menu
2021-10-15 20:28:18 +02:00
litetex
03d2ca9f9f Fixed format of code 2021-10-15 20:18:52 +02:00
litetex
2271ea4281 Improved documentation 2021-10-15 20:16:34 +02:00
ktprograms
afc8db8f81 Add reasoning for separate openChannelFragmentUsingIntent method 2021-10-14 09:51:25 +08:00
litetex
4af49ee5a6 Merge pull request #7194 from KalleStruik/add-to-playlist-in-share
Add a "add to playlist" option in the share menu
2021-10-13 20:34:07 +02:00
TobiGr
d7b29aae5c Merge branch 'master' into dev 2021-10-12 20:03:42 +02:00
litetex
9f7a8407ca Merge pull request #7224 from vhouriet/vhouriet_fix_check-background-player-type
Check if background player already active before displaying player toast
2021-10-12 19:47:50 +02:00
litetex
a2050a5211 Merge pull request #7215 from litetex/code-cleanup-drawer-main-activity
Deduplicated drawer code in MainActivity
2021-10-11 21:29:42 +02:00
litetex
048743c062 Merge pull request #7148 from TacoTheDank/androidxMediaBump
Update AndroidX Media library to 1.4.x
2021-10-11 21:28:49 +02:00
litetex
e9bd2934c3 Merge pull request #7202 from vhouriet/vhouriet_bug_issue-6662
Fix clicking timestamp shows Toast "Playing in popup mode"
2021-10-11 21:20:26 +02:00
vhouriet
50634eb2b3 Check player type before displaying background player toast 2021-10-11 19:41:22 +02:00
Tobi
08489b81fb Merge pull request #7220 from TeamNewPipe/code-improvements
Simplify code and add annotations
2021-10-11 16:36:13 +02:00
ktprograms
a2ff770afc Added the 'Show Channel Details' menu item to the Queue long press menu
Created a method in NavigationHelper that opens the channel fragment using an Intent to MainActivity instead of replacing fragments.
2021-10-11 14:47:37 +08:00
TobiGr
658d988254 Simplify code and add annotations 2021-10-10 20:33:05 +02:00
Kalle Struik
9d7e9289bb Fix cursor color in PlaylistCreationDialog 2021-10-10 12:32:57 +02:00
litetex
12aac09c7b Fixed typo 2021-10-09 18:56:10 +02:00
litetex
d7d87691cb Add to playlist - Showing toast that this may take a moment 2021-10-09 18:47:36 +02:00
litetex
731640997e Cleaned up PlaylistDialog-related code 2021-10-09 18:46:20 +02:00
litetex
64d7432852 Deduplicated drawer code in MainActivity 2021-10-09 16:37:34 +02:00
vhouriet
1c9f68bcae Fix clicking timestamp shows Toast "Playing in popup mode"
Fixes #6662
2021-10-05 18:15:36 +02:00
Kalle Struik
4fde62ff89 Reorder preferred open action menu 2021-10-04 21:23:56 +02:00
Kalle Struik
ceb55d0ede Set the theme for PlaylistCreationDialog explicitly. 2021-10-03 14:25:50 +02:00
Kalle Struik
87c958b2e7 Rename the "append_playlist" string to "add_to_playlist" 2021-10-03 13:27:24 +02:00
Kalle Struik
d844e0aba6 Add a add to playlist option in the share menu. 2021-10-02 19:21:25 +02:00
TacoTheDank
a953aab9b4 Update AndroidX Media to 1.4.x 2021-09-30 15:33:20 -04:00
Nathan Schulzke
108af48b76 Enable Mark as Watched in all the other playlist fragments. 2021-09-23 21:39:47 -06:00
306 changed files with 3806 additions and 1477 deletions

16
.gitignore vendored
View File

@@ -1,15 +1,15 @@
.gitignore
.gradle
/local.properties
.gradle/
local.properties
.DS_Store
/build
/captures
/app/app.iml
/.idea
/*.iml
build/
captures/
.idea/
*.iml
*~
.weblate
*.class
**/debug/
**/release/
# vscode / eclipse files
*.classpath

3
app/.gitignore vendored
View File

@@ -1,3 +0,0 @@
.gitignore
/build
*.iml

View File

@@ -17,8 +17,8 @@ android {
resValue "string", "app_name", "NewPipe"
minSdkVersion 19
targetSdkVersion 29
versionCode 978
versionName "0.21.12"
versionCode 982
versionName "0.21.16"
multiDexEnabled true
@@ -105,9 +105,9 @@ ext {
androidxRoomVersion = '2.3.0'
icepickVersion = '3.2.0'
exoPlayerVersion = '2.12.3'
exoPlayerVersion = '2.14.2'
googleAutoServiceVersion = '1.0'
groupieVersion = '2.9.0'
groupieVersion = '2.10.0'
markwonVersion = '4.6.2'
leakCanaryVersion = '2.5'
@@ -189,7 +189,7 @@ dependencies {
// name and the commit hash with the commit hash of the (pushed) commit you want to test
// This works thanks to JitPack: https://jitpack.io/
implementation 'com.github.TeamNewPipe:nanojson:1d9e1aea9049fc9f85e68b43ba39fe7be1c1f751'
implementation 'com.github.TeamNewPipe:NewPipeExtractor:v0.21.11'
implementation 'com.github.TeamNewPipe:NewPipeExtractor:v0.21.13'
/** Checkstyle **/
checkstyle "com.puppycrawl.tools:checkstyle:${checkstyleVersion}"
@@ -208,14 +208,17 @@ dependencies {
implementation "androidx.lifecycle:lifecycle-livedata:${androidxLifecycleVersion}"
implementation "androidx.lifecycle:lifecycle-viewmodel:${androidxLifecycleVersion}"
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
implementation 'androidx.media:media:1.3.1'
implementation 'androidx.media:media:1.4.3'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.preference:preference:1.1.1'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation "androidx.room:room-runtime:${androidxRoomVersion}"
implementation "androidx.room:room-rxjava3:${androidxRoomVersion}"
kapt "androidx.room:room-compiler:${androidxRoomVersion}"
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
// Newer version specified to prevent accessibility regressions with RecyclerView, see:
// https://developer.android.com/jetpack/androidx/releases/viewpager2#1.1.0-alpha01
implementation 'androidx.viewpager2:viewpager2:1.1.0-beta01'
implementation 'androidx.webkit:webkit:1.4.0'
implementation 'com.google.android.material:material:1.2.1'

View File

@@ -256,6 +256,21 @@
<data android:pathPrefix="/" />
</intent-filter>
<!-- y2u.be filter -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH" />
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:host="y2u.be" />
<data android:pathPrefix="/" />
</intent-filter>
<!-- Soundcloud filter -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
@@ -325,8 +340,12 @@
<data android:host="skeptikon.fr" />
<data android:pathPrefix="/videos/" /> <!-- it contains playlists -->
<data android:pathPrefix="/w/" /> <!-- short video URLs -->
<data android:pathPrefix="/w/p/" /> <!-- short playlist URLs -->
<data android:pathPrefix="/accounts/" />
<data android:pathPrefix="/a/" /> <!-- short account URLs -->
<data android:pathPrefix="/video-channels/" />
<data android:pathPrefix="/c/" /> <!-- short video-channels URLs -->
</intent-filter>
<!-- Bandcamp filter for tracks, albums and playlists -->

View File

@@ -51,8 +51,12 @@ import java.util.ArrayList;
* <li>{@link #saveState()}</li>
* <li>{@link #restoreState(Parcelable, ClassLoader)}</li>
* </ul>
*
* @deprecated Switch to {@link androidx.viewpager2.widget.ViewPager2} and use
* {@link androidx.viewpager2.adapter.FragmentStateAdapter} instead.
*/
@SuppressWarnings("deprecation")
@Deprecated
public abstract class FragmentStatePagerAdapterMenuWorkaround extends PagerAdapter {
private static final String TAG = "FragmentStatePagerAdapt";
private static final boolean DEBUG = false;
@@ -86,9 +90,10 @@ public abstract class FragmentStatePagerAdapterMenuWorkaround extends PagerAdapt
private final int mBehavior;
private FragmentTransaction mCurTransaction = null;
private final ArrayList<Fragment.SavedState> mSavedState = new ArrayList<Fragment.SavedState>();
private final ArrayList<Fragment> mFragments = new ArrayList<Fragment>();
private final ArrayList<Fragment.SavedState> mSavedState = new ArrayList<>();
private final ArrayList<Fragment> mFragments = new ArrayList<>();
private Fragment mCurrentPrimaryItem = null;
private boolean mExecutingFinishUpdate;
/**
* Constructor for {@link FragmentStatePagerAdapterMenuWorkaround}
@@ -208,7 +213,7 @@ public abstract class FragmentStatePagerAdapterMenuWorkaround extends PagerAdapt
mFragments.set(position, null);
mCurTransaction.remove(fragment);
if (fragment == mCurrentPrimaryItem) {
if (fragment.equals(mCurrentPrimaryItem)) {
mCurrentPrimaryItem = null;
}
}
@@ -247,7 +252,19 @@ public abstract class FragmentStatePagerAdapterMenuWorkaround extends PagerAdapt
@Override
public void finishUpdate(@NonNull final ViewGroup container) {
if (mCurTransaction != null) {
mCurTransaction.commitNowAllowingStateLoss();
// We drop any transactions that attempt to be committed
// from a re-entrant call to finishUpdate(). We need to
// do this as a workaround for Robolectric running measure/layout
// calls inline rather than allowing them to be posted
// as they would on a real device.
if (!mExecutingFinishUpdate) {
try {
mExecutingFinishUpdate = true;
mCurTransaction.commitNowAllowingStateLoss();
} finally {
mExecutingFinishUpdate = false;
}
}
mCurTransaction = null;
}
}

View File

@@ -254,4 +254,5 @@ public class App extends MultiDexApplication {
protected boolean isDisposedRxExceptionsReported() {
return false;
}
}

View File

@@ -21,7 +21,6 @@ public abstract class BaseFragment extends Fragment {
//These values are used for controlling fragments when they are part of the frontpage
@State
protected boolean useAsFrontPage = false;
private boolean mIsVisibleToUser = false;
public void useAsFrontPage(final boolean value) {
useAsFrontPage = value;
@@ -85,12 +84,6 @@ public abstract class BaseFragment extends Fragment {
AppWatcher.INSTANCE.getObjectWatcher().watch(this);
}
@Override
public void setUserVisibleHint(final boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
mIsVisibleToUser = isVisibleToUser;
}
/*//////////////////////////////////////////////////////////////////////////
// Init
//////////////////////////////////////////////////////////////////////////*/
@@ -109,8 +102,7 @@ public abstract class BaseFragment extends Fragment {
if (DEBUG) {
Log.d(TAG, "setTitle() called with: title = [" + title + "]");
}
if ((!useAsFrontPage || mIsVisibleToUser)
&& (activity != null && activity.getSupportActionBar() != null)) {
if (!useAsFrontPage && activity != null && activity.getSupportActionBar() != null) {
activity.getSupportActionBar().setDisplayShowTitleEnabled(true);
activity.getSupportActionBar().setTitle(title);
}

View File

@@ -7,7 +7,6 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.content.pm.Signature;
import android.net.ConnectivityManager;
import android.net.Uri;
import android.util.Log;
@@ -15,7 +14,6 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.app.NotificationCompat;
import androidx.core.app.NotificationManagerCompat;
import androidx.core.content.ContextCompat;
import androidx.core.content.pm.PackageInfoCompat;
import androidx.preference.PreferenceManager;
@@ -48,7 +46,8 @@ public final class CheckForNewAppVersion extends IntentService {
private static final boolean DEBUG = MainActivity.DEBUG;
private static final String TAG = CheckForNewAppVersion.class.getSimpleName();
private static final String GITHUB_APK_SHA1
// Public key of the certificate that is used in NewPipe release versions
private static final String RELEASE_CERT_PUBLIC_KEY_SHA1
= "B0:2E:90:7C:1C:D6:FC:57:C3:35:F0:88:D0:8F:50:5F:94:E4:D2:15";
private static final String NEWPIPE_API_URL = "https://newpipe.net/api/data.json";
@@ -129,44 +128,37 @@ public final class CheckForNewAppVersion extends IntentService {
final String versionName,
final String apkLocationUrl,
final int versionCode) {
final int notificationId = 2000;
if (BuildConfig.VERSION_CODE < versionCode) {
// A pending intent to open the apk location url in the browser.
final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(apkLocationUrl));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
final PendingIntent pendingIntent
= PendingIntent.getActivity(application, 0, intent, 0);
final String channelId = application
.getString(R.string.app_update_notification_channel_id);
final NotificationCompat.Builder notificationBuilder
= new NotificationCompat.Builder(application, channelId)
.setSmallIcon(R.drawable.ic_newpipe_update)
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
.setContentIntent(pendingIntent)
.setAutoCancel(true)
.setContentTitle(application
.getString(R.string.app_update_notification_content_title))
.setContentText(application
.getString(R.string.app_update_notification_content_text)
+ " " + versionName);
final NotificationManagerCompat notificationManager
= NotificationManagerCompat.from(application);
notificationManager.notify(notificationId, notificationBuilder.build());
if (BuildConfig.VERSION_CODE >= versionCode) {
return;
}
// A pending intent to open the apk location url in the browser.
final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(apkLocationUrl));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
final PendingIntent pendingIntent
= PendingIntent.getActivity(application, 0, intent, 0);
final String channelId = application
.getString(R.string.app_update_notification_channel_id);
final NotificationCompat.Builder notificationBuilder
= new NotificationCompat.Builder(application, channelId)
.setSmallIcon(R.drawable.ic_newpipe_update)
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
.setContentIntent(pendingIntent)
.setAutoCancel(true)
.setContentTitle(application
.getString(R.string.app_update_notification_content_title))
.setContentText(application
.getString(R.string.app_update_notification_content_text)
+ " " + versionName);
final NotificationManagerCompat notificationManager
= NotificationManagerCompat.from(application);
notificationManager.notify(2000, notificationBuilder.build());
}
private static boolean isConnected(@NonNull final App app) {
final ConnectivityManager connectivityManager =
ContextCompat.getSystemService(app, ConnectivityManager.class);
return connectivityManager != null && connectivityManager.getActiveNetworkInfo() != null
&& connectivityManager.getActiveNetworkInfo().isConnected();
}
public static boolean isGithubApk(@NonNull final App app) {
return getCertificateSHA1Fingerprint(app).equals(GITHUB_APK_SHA1);
public static boolean isReleaseApk(@NonNull final App app) {
return getCertificateSHA1Fingerprint(app).equals(RELEASE_CERT_PUBLIC_KEY_SHA1);
}
private void checkNewVersion() throws IOException, ReCaptchaException {
@@ -175,9 +167,8 @@ public final class CheckForNewAppVersion extends IntentService {
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(app);
final NewVersionManager manager = new NewVersionManager();
// Check if user has enabled/disabled update checking
// and if the current apk is a github one or not.
if (!prefs.getBoolean(app.getString(R.string.update_app_key), true) || !isGithubApk(app)) {
// Check if the current apk is a github one or not.
if (!isReleaseApk(app)) {
return;
}
@@ -213,6 +204,7 @@ public final class CheckForNewAppVersion extends IntentService {
// Parse the json from the response.
try {
final JsonObject githubStableObject = JsonParser.object()
.from(response.responseBody()).getObject("flavors")
.getObject("github").getObject("stable");
@@ -235,6 +227,23 @@ public final class CheckForNewAppVersion extends IntentService {
}
}
/**
* Start a new service which
* checks if all conditions for performing a version check are met,
* fetches the API endpoint {@link #NEWPIPE_API_URL} containing info
* about the latest NewPipe version
* and displays a notification about ana available update.
* <br>
* Following conditions need to be met, before data is request from the server:
* <ul>
* <li> The app is signed with the correct signing key (by TeamNewPipe / schabi).
* If the signing key differs from the one used upstream, the update cannot be installed.</li>
* <li>The user enabled searching for and notifying about updates in the settings.</li>
* <li>The app did not recently check for updates.
* We do not want to make unnecessary connections and DOS our servers.</li>
* </ul>
* <b>Must not be executed</b> when the app is in background.
*/
public static void startNewVersionCheckService() {
final Intent intent = new Intent(App.getApp().getApplicationContext(),
CheckForNewAppVersion.class);

View File

@@ -21,6 +21,7 @@
package org.schabi.newpipe;
import static org.schabi.newpipe.CheckForNewAppVersion.startNewVersionCheckService;
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -93,8 +94,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
public class MainActivity extends AppCompatActivity {
private static final String TAG = "MainActivity";
@SuppressWarnings("ConstantConditions")
@@ -165,12 +164,59 @@ public class MainActivity extends AppCompatActivity {
FocusOverlayView.setupFocusObserver(this);
}
openMiniPlayerUponPlayerStarted();
// Check for new version
startNewVersionCheckService();
}
private void setupDrawer() throws Exception {
@Override
protected void onPostCreate(final Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
final App app = App.getApp();
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(app);
if (prefs.getBoolean(app.getString(R.string.update_app_key), true)) {
// Start the service which is checking all conditions
// and eventually searching for a new version.
// The service searching for a new NewPipe version must not be started in background.
startNewVersionCheckService();
}
}
private void setupDrawer() throws ExtractionException {
addDrawerMenuForCurrentService();
toggle = new ActionBarDrawerToggle(this, mainBinding.getRoot(),
toolbarLayoutBinding.toolbar, R.string.drawer_open, R.string.drawer_close);
toggle.syncState();
mainBinding.getRoot().addDrawerListener(toggle);
mainBinding.getRoot().addDrawerListener(new DrawerLayout.SimpleDrawerListener() {
private int lastService;
@Override
public void onDrawerOpened(final View drawerView) {
lastService = ServiceHelper.getSelectedServiceId(MainActivity.this);
}
@Override
public void onDrawerClosed(final View drawerView) {
if (servicesShown) {
toggleServices();
}
if (lastService != ServiceHelper.getSelectedServiceId(MainActivity.this)) {
ActivityCompat.recreate(MainActivity.this);
}
}
});
drawerLayoutBinding.navigation.setNavigationItemSelectedListener(this::drawerItemSelected);
setupDrawerHeader();
}
/**
* Builds the drawer menu for the current service.
*
* @throws ExtractionException
*/
private void addDrawerMenuForCurrentService() throws ExtractionException {
//Tabs
final int currentServiceId = ServiceHelper.getSelectedServiceId(this);
final StreamingService service = NewPipe.getService(currentServiceId);
@@ -209,32 +255,6 @@ public class MainActivity extends AppCompatActivity {
drawerLayoutBinding.navigation.getMenu()
.add(R.id.menu_options_about_group, ITEM_ID_ABOUT, ORDER, R.string.tab_about)
.setIcon(R.drawable.ic_info_outline);
toggle = new ActionBarDrawerToggle(this, mainBinding.getRoot(),
toolbarLayoutBinding.toolbar, R.string.drawer_open, R.string.drawer_close);
toggle.syncState();
mainBinding.getRoot().addDrawerListener(toggle);
mainBinding.getRoot().addDrawerListener(new DrawerLayout.SimpleDrawerListener() {
private int lastService;
@Override
public void onDrawerOpened(final View drawerView) {
lastService = ServiceHelper.getSelectedServiceId(MainActivity.this);
}
@Override
public void onDrawerClosed(final View drawerView) {
if (servicesShown) {
toggleServices();
}
if (lastService != ServiceHelper.getSelectedServiceId(MainActivity.this)) {
ActivityCompat.recreate(MainActivity.this);
}
}
});
drawerLayoutBinding.navigation.setNavigationItemSelectedListener(this::drawerItemSelected);
setupDrawerHeader();
}
private boolean drawerItemSelected(final MenuItem item) {
@@ -342,11 +362,15 @@ public class MainActivity extends AppCompatActivity {
drawerLayoutBinding.navigation.getMenu().removeGroup(R.id.menu_tabs_group);
drawerLayoutBinding.navigation.getMenu().removeGroup(R.id.menu_options_about_group);
// Show up or down arrow
drawerHeaderBinding.drawerArrow.setImageResource(
servicesShown ? R.drawable.ic_arrow_drop_up : R.drawable.ic_arrow_drop_down);
if (servicesShown) {
showServices();
} else {
try {
showTabs();
addDrawerMenuForCurrentService();
} catch (final Exception e) {
ErrorActivity.reportUiErrorInSnackbar(this, "Showing main page tabs", e);
}
@@ -354,8 +378,6 @@ public class MainActivity extends AppCompatActivity {
}
private void showServices() {
drawerHeaderBinding.drawerArrow.setImageResource(R.drawable.ic_arrow_drop_up);
for (final StreamingService s : NewPipe.getServices()) {
final String title = s.getServiceInfo().getName()
+ (ServiceHelper.isBeta(s) ? " (beta)" : "");
@@ -419,48 +441,6 @@ public class MainActivity extends AppCompatActivity {
menuItem.setActionView(spinner);
}
private void showTabs() throws ExtractionException {
drawerHeaderBinding.drawerArrow.setImageResource(R.drawable.ic_arrow_drop_down);
//Tabs
final int currentServiceId = ServiceHelper.getSelectedServiceId(this);
final StreamingService service = NewPipe.getService(currentServiceId);
int kioskId = 0;
for (final String ks : service.getKioskList().getAvailableKiosks()) {
drawerLayoutBinding.navigation.getMenu()
.add(R.id.menu_tabs_group, kioskId, ORDER,
KioskTranslator.getTranslatedKioskName(ks, this))
.setIcon(KioskTranslator.getKioskIcon(ks, this));
kioskId++;
}
drawerLayoutBinding.navigation.getMenu()
.add(R.id.menu_tabs_group, ITEM_ID_SUBSCRIPTIONS, ORDER, R.string.tab_subscriptions)
.setIcon(R.drawable.ic_tv);
drawerLayoutBinding.navigation.getMenu()
.add(R.id.menu_tabs_group, ITEM_ID_FEED, ORDER, R.string.fragment_feed_title)
.setIcon(R.drawable.ic_rss_feed);
drawerLayoutBinding.navigation.getMenu()
.add(R.id.menu_tabs_group, ITEM_ID_BOOKMARKS, ORDER, R.string.tab_bookmarks)
.setIcon(R.drawable.ic_bookmark);
drawerLayoutBinding.navigation.getMenu()
.add(R.id.menu_tabs_group, ITEM_ID_DOWNLOADS, ORDER, R.string.downloads)
.setIcon(R.drawable.ic_file_download);
drawerLayoutBinding.navigation.getMenu()
.add(R.id.menu_tabs_group, ITEM_ID_HISTORY, ORDER, R.string.action_history)
.setIcon(R.drawable.ic_history);
//Settings and About
drawerLayoutBinding.navigation.getMenu()
.add(R.id.menu_options_about_group, ITEM_ID_SETTINGS, ORDER, R.string.settings)
.setIcon(R.drawable.ic_settings);
drawerLayoutBinding.navigation.getMenu()
.add(R.id.menu_options_about_group, ITEM_ID_ABOUT, ORDER, R.string.tab_about)
.setIcon(R.drawable.ic_info_outline);
}
@Override
protected void onDestroy() {
super.onDestroy();

View File

@@ -9,8 +9,8 @@ import android.widget.PopupMenu;
import androidx.fragment.app.FragmentManager;
import org.schabi.newpipe.local.dialog.PlaylistAppendDialog;
import org.schabi.newpipe.local.dialog.PlaylistCreationDialog;
import org.schabi.newpipe.database.stream.model.StreamEntity;
import org.schabi.newpipe.local.dialog.PlaylistDialog;
import org.schabi.newpipe.player.playqueue.PlayQueue;
import org.schabi.newpipe.player.playqueue.PlayQueueItem;
import org.schabi.newpipe.util.NavigationHelper;
@@ -18,6 +18,9 @@ import org.schabi.newpipe.util.NavigationHelper;
import java.util.Collections;
public final class QueueItemMenuUtil {
private QueueItemMenuUtil() {
}
public static void openPopupMenu(final PlayQueue playQueue,
final PlayQueueItem item,
final View view,
@@ -47,13 +50,22 @@ public final class QueueItemMenuUtil {
false);
return true;
case R.id.menu_item_append_playlist:
final PlaylistAppendDialog d = PlaylistAppendDialog.fromPlayQueueItems(
Collections.singletonList(item)
PlaylistDialog.createCorrespondingDialog(
context,
Collections.singletonList(new StreamEntity(item)),
dialog -> dialog.show(
fragmentManager,
"QueueItemMenuUtil@append_playlist"
)
);
PlaylistAppendDialog.onPlaylistFound(context,
() -> d.show(fragmentManager, "QueueItemMenuUtil@append_playlist"),
() -> PlaylistCreationDialog.newInstance(d)
.show(fragmentManager, "QueueItemMenuUtil@append_playlist"));
return true;
case R.id.menu_item_channel_details:
// An intent must be used here.
// Opening with FragmentManager transactions is not working,
// as PlayQueueActivity doesn't use fragments.
NavigationHelper.openChannelFragmentUsingIntent(context, item.getServiceId(),
item.getUploaderUrl(), item.getUploader());
return true;
case R.id.menu_item_share:
shareText(context, item.getTitle(), item.getUrl(),
@@ -65,6 +77,4 @@ public final class QueueItemMenuUtil {
popupMenu.show();
}
private QueueItemMenuUtil() { }
}

View File

@@ -1,5 +1,8 @@
package org.schabi.newpipe;
import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.AUDIO;
import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.VIDEO;
import android.annotation.SuppressLint;
import android.app.IntentService;
import android.content.Context;
@@ -30,6 +33,7 @@ import androidx.core.widget.TextViewCompat;
import androidx.fragment.app.FragmentManager;
import androidx.preference.PreferenceManager;
import org.schabi.newpipe.database.stream.model.StreamEntity;
import org.schabi.newpipe.databinding.ListRadioIconItemBinding;
import org.schabi.newpipe.databinding.SingleChoiceDialogViewBinding;
import org.schabi.newpipe.download.DownloadDialog;
@@ -56,6 +60,7 @@ import org.schabi.newpipe.extractor.playlist.PlaylistInfo;
import org.schabi.newpipe.extractor.stream.StreamInfo;
import org.schabi.newpipe.extractor.stream.VideoStream;
import org.schabi.newpipe.ktx.ExceptionUtils;
import org.schabi.newpipe.local.dialog.PlaylistDialog;
import org.schabi.newpipe.player.MainPlayer;
import org.schabi.newpipe.player.helper.PlayerHelper;
import org.schabi.newpipe.player.helper.PlayerHolder;
@@ -69,14 +74,15 @@ import org.schabi.newpipe.util.ExtractorHelper;
import org.schabi.newpipe.util.ListHelper;
import org.schabi.newpipe.util.NavigationHelper;
import org.schabi.newpipe.util.PermissionHelper;
import org.schabi.newpipe.util.external_communication.ShareUtils;
import org.schabi.newpipe.util.ThemeHelper;
import org.schabi.newpipe.util.external_communication.ShareUtils;
import org.schabi.newpipe.util.urlfinder.UrlFinder;
import org.schabi.newpipe.views.FocusOverlayView;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import icepick.Icepick;
@@ -89,9 +95,6 @@ import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.functions.Consumer;
import io.reactivex.rxjava3.schedulers.Schedulers;
import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.AUDIO;
import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.VIDEO;
/**
* Get the url from the intent and open it in the chosen preferred player.
*/
@@ -107,6 +110,7 @@ public class RouterActivity extends AppCompatActivity {
protected String currentUrl;
private StreamingService currentService;
private boolean selectionIsDownload = false;
private boolean selectionIsAddToPlaylist = false;
private AlertDialog alertDialogChoice = null;
@Override
@@ -350,7 +354,7 @@ public class RouterActivity extends AppCompatActivity {
.setNegativeButton(R.string.just_once, dialogButtonsClickListener)
.setPositiveButton(R.string.always, dialogButtonsClickListener)
.setOnDismissListener((dialog) -> {
if (!selectionIsDownload) {
if (!selectionIsDownload && !selectionIsAddToPlaylist) {
finish();
}
})
@@ -446,6 +450,10 @@ public class RouterActivity extends AppCompatActivity {
final AdapterChoiceItem backgroundPlayer = new AdapterChoiceItem(
getString(R.string.background_player_key), getString(R.string.background_player),
R.drawable.ic_headset);
final AdapterChoiceItem addToPlaylist = new AdapterChoiceItem(
getString(R.string.add_to_playlist_key), getString(R.string.add_to_playlist),
R.drawable.ic_add);
if (linkType == LinkType.STREAM) {
if (isExtVideoEnabled) {
@@ -482,6 +490,10 @@ public class RouterActivity extends AppCompatActivity {
getString(R.string.download),
R.drawable.ic_file_download));
// Add to playlist is not necessary for CHANNEL and PLAYLIST linkType since those can
// not be added to a playlist
returnList.add(addToPlaylist);
} else {
returnList.add(showInfo);
if (capabilities.contains(VIDEO) && !isExtVideoEnabled) {
@@ -547,6 +559,12 @@ public class RouterActivity extends AppCompatActivity {
return;
}
if (selectedChoiceKey.equals(getString(R.string.add_to_playlist_key))) {
selectionIsAddToPlaylist = true;
openAddToPlaylistDialog();
return;
}
// stop and bypass FetcherService if InfoScreen was selected since
// StreamDetailFragment can fetch data itself
if (selectedChoiceKey.equals(getString(R.string.show_info_key))) {
@@ -572,6 +590,41 @@ public class RouterActivity extends AppCompatActivity {
finish();
}
private void openAddToPlaylistDialog() {
// Getting the stream info usually takes a moment
// Notifying the user here to ensure that no confusion arises
Toast.makeText(
getApplicationContext(),
getString(R.string.processing_may_take_a_moment),
Toast.LENGTH_SHORT)
.show();
disposables.add(ExtractorHelper.getStreamInfo(currentServiceId, currentUrl, false)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(
info -> PlaylistDialog.createCorrespondingDialog(
getThemeWrapperContext(),
Collections.singletonList(new StreamEntity(info)),
playlistDialog -> {
playlistDialog.setOnDismissListener(dialog -> finish());
playlistDialog.show(
this.getSupportFragmentManager(),
"addToPlaylistDialog"
);
}
),
throwable -> handleError(this, new ErrorInfo(
throwable,
UserAction.REQUESTED_STREAM,
"Tried to add " + currentUrl + " to a playlist",
currentService.getServiceId())
)
)
);
}
@SuppressLint("CheckResult")
private void openDownloadDialog() {
disposables.add(ExtractorHelper.getStreamInfo(currentServiceId, currentUrl, true)

View File

@@ -7,6 +7,7 @@ import androidx.room.Query
import androidx.room.Transaction
import androidx.room.Update
import io.reactivex.rxjava3.core.Flowable
import io.reactivex.rxjava3.core.Maybe
import org.schabi.newpipe.database.feed.model.FeedEntity
import org.schabi.newpipe.database.feed.model.FeedLastUpdatedEntity
import org.schabi.newpipe.database.stream.StreamWithState
@@ -37,7 +38,7 @@ abstract class FeedDAO {
LIMIT 500
"""
)
abstract fun getAllStreams(): Flowable<List<StreamWithState>>
abstract fun getAllStreams(): Maybe<List<StreamWithState>>
@Query(
"""
@@ -62,7 +63,7 @@ abstract class FeedDAO {
LIMIT 500
"""
)
abstract fun getAllStreamsForGroup(groupId: Long): Flowable<List<StreamWithState>>
abstract fun getAllStreamsForGroup(groupId: Long): Maybe<List<StreamWithState>>
/**
* @see StreamStateEntity.isFinished()
@@ -97,7 +98,7 @@ abstract class FeedDAO {
LIMIT 500
"""
)
abstract fun getLiveOrNotPlayedStreams(): Flowable<List<StreamWithState>>
abstract fun getLiveOrNotPlayedStreams(): Maybe<List<StreamWithState>>
/**
* @see StreamStateEntity.isFinished()
@@ -137,7 +138,7 @@ abstract class FeedDAO {
LIMIT 500
"""
)
abstract fun getLiveOrNotPlayedStreamsForGroup(groupId: Long): Flowable<List<StreamWithState>>
abstract fun getLiveOrNotPlayedStreamsForGroup(groupId: Long): Maybe<List<StreamWithState>>
@Query(
"""

View File

@@ -0,0 +1,103 @@
package org.schabi.newpipe.error;
import android.util.Log;
import androidx.annotation.NonNull;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* Ensures that a Exception is serializable.
* This is
*/
public final class EnsureExceptionSerializable {
private static final String TAG = "EnsureExSerializable";
private EnsureExceptionSerializable() {
// No instance
}
/**
* Ensures that an exception is serializable.
* <br/>
* If that is not the case a {@link WorkaroundNotSerializableException} is created.
*
* @param exception
* @return if an exception is not serializable a new {@link WorkaroundNotSerializableException}
* otherwise the exception from the parameter
*/
public static Exception ensureSerializable(@NonNull final Exception exception) {
return checkIfSerializable(exception)
? exception
: WorkaroundNotSerializableException.create(exception);
}
public static boolean checkIfSerializable(@NonNull final Exception exception) {
try {
// Check by creating a new ObjectOutputStream which does the serialization
try (ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(bos)
) {
oos.writeObject(exception);
oos.flush();
bos.toByteArray();
}
return true;
} catch (final IOException ex) {
Log.d(TAG, "Exception is not serializable", ex);
return false;
}
}
public static class WorkaroundNotSerializableException extends Exception {
protected WorkaroundNotSerializableException(
final Throwable notSerializableException,
final Throwable cause) {
super(notSerializableException.toString(), cause);
setStackTrace(notSerializableException.getStackTrace());
}
protected WorkaroundNotSerializableException(final Throwable notSerializableException) {
super(notSerializableException.toString());
setStackTrace(notSerializableException.getStackTrace());
}
public static WorkaroundNotSerializableException create(
@NonNull final Exception notSerializableException
) {
// Build a list of the exception + all causes
final List<Throwable> throwableList = new ArrayList<>();
int pos = 0;
Throwable throwableToProcess = notSerializableException;
while (throwableToProcess != null) {
throwableList.add(throwableToProcess);
pos++;
throwableToProcess = throwableToProcess.getCause();
}
// Reverse list so that it starts with the last one
Collections.reverse(throwableList);
// Build exception stack
WorkaroundNotSerializableException cause = null;
for (final Throwable t : throwableList) {
cause = cause == null
? new WorkaroundNotSerializableException(t)
: new WorkaroundNotSerializableException(t, cause);
}
return cause;
}
}
}

View File

@@ -77,6 +77,16 @@ public class ErrorActivity extends AppCompatActivity {
private ActivityErrorBinding activityErrorBinding;
/**
* Reports a new error by starting a new activity.
* <br/>
* Ensure that the data within errorInfo is serializable otherwise
* an exception will be thrown!<br/>
* {@link EnsureExceptionSerializable} might help.
*
* @param context
* @param errorInfo
*/
public static void reportError(final Context context, final ErrorInfo errorInfo) {
final Intent intent = new Intent(context, ErrorActivity.class);
intent.putExtra(ERROR_INFO, errorInfo);

View File

@@ -20,8 +20,8 @@ public class BlankFragment extends BaseFragment {
}
@Override
public void setUserVisibleHint(final boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
public void onResume() {
super.onResume();
setTitle("NewPipe");
// leave this inline. Will make it harder for copy cats.
// If you are a Copy cat FUCK YOU.

View File

@@ -52,6 +52,7 @@ import com.squareup.picasso.Callback;
import org.schabi.newpipe.App;
import org.schabi.newpipe.R;
import org.schabi.newpipe.database.stream.model.StreamEntity;
import org.schabi.newpipe.databinding.FragmentVideoDetailBinding;
import org.schabi.newpipe.download.DownloadDialog;
import org.schabi.newpipe.error.ErrorActivity;
@@ -73,8 +74,7 @@ import org.schabi.newpipe.fragments.EmptyFragment;
import org.schabi.newpipe.fragments.list.comments.CommentsFragment;
import org.schabi.newpipe.fragments.list.videos.RelatedItemsFragment;
import org.schabi.newpipe.ktx.AnimationType;
import org.schabi.newpipe.local.dialog.PlaylistAppendDialog;
import org.schabi.newpipe.local.dialog.PlaylistCreationDialog;
import org.schabi.newpipe.local.dialog.PlaylistDialog;
import org.schabi.newpipe.local.history.HistoryRecordManager;
import org.schabi.newpipe.player.MainPlayer;
import org.schabi.newpipe.player.MainPlayer.PlayerType;
@@ -99,6 +99,7 @@ import org.schabi.newpipe.util.external_communication.KoreUtils;
import org.schabi.newpipe.util.external_communication.ShareUtils;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@@ -444,12 +445,11 @@ public final class VideoDetailFragment
break;
case R.id.detail_controls_playlist_append:
if (getFM() != null && currentInfo != null) {
final PlaylistAppendDialog d = PlaylistAppendDialog.fromStreamInfo(currentInfo);
disposables.add(
PlaylistAppendDialog.onPlaylistFound(getContext(),
() -> d.show(getFM(), TAG),
() -> PlaylistCreationDialog.newInstance(d).show(getFM(), TAG)
PlaylistDialog.createCorrespondingDialog(
getContext(),
Collections.singletonList(new StreamEntity(currentInfo)),
dialog -> dialog.show(getFM(), TAG)
)
);
}
@@ -594,6 +594,11 @@ public final class VideoDetailFragment
// Init
//////////////////////////////////////////////////////////////////////////*/
@Override
public void onViewCreated(@NonNull final View rootView, final Bundle savedInstanceState) {
super.onViewCreated(rootView, savedInstanceState);
}
@Override // called from onViewCreated in {@link BaseFragment#onViewCreated}
protected void initViews(final View rootView, final Bundle savedInstanceState) {
super.initViews(rootView, savedInstanceState);
@@ -604,6 +609,18 @@ public final class VideoDetailFragment
binding.detailThumbnailRootLayout.requestFocus();
binding.detailControlsPlayWithKodi.setVisibility(
KoreUtils.shouldShowPlayWithKodi(requireContext(), serviceId)
? View.VISIBLE
: View.GONE
);
binding.detailControlsCrashThePlayer.setVisibility(
DEBUG && PreferenceManager.getDefaultSharedPreferences(getContext())
.getBoolean(getString(R.string.show_crash_the_player_key), false)
? View.VISIBLE
: View.GONE
);
if (DeviceUtils.isTv(getContext())) {
// remove ripple effects from detail controls
final int transparent = ContextCompat.getColor(requireContext(),
@@ -638,8 +655,14 @@ public final class VideoDetailFragment
binding.detailControlsShare.setOnClickListener(this);
binding.detailControlsOpenInBrowser.setOnClickListener(this);
binding.detailControlsPlayWithKodi.setOnClickListener(this);
binding.detailControlsPlayWithKodi.setVisibility(KoreUtils.shouldShowPlayWithKodi(
requireContext(), serviceId) ? View.VISIBLE : View.GONE);
if (DEBUG) {
binding.detailControlsCrashThePlayer.setOnClickListener(
v -> VideoDetailPlayerCrasher.onCrashThePlayer(
this.getContext(),
this.player,
getLayoutInflater())
);
}
binding.overlayThumbnail.setOnClickListener(this);
binding.overlayThumbnail.setOnLongClickListener(this);
@@ -1181,7 +1204,7 @@ public final class VideoDetailFragment
addVideoPlayerView();
final Intent playerIntent = NavigationHelper.getPlayerIntent(requireContext(),
MainPlayer.class, queue, autoPlayEnabled);
MainPlayer.class, queue, true, autoPlayEnabled);
ContextCompat.startForegroundService(activity, playerIntent);
}

View File

@@ -0,0 +1,159 @@
package org.schabi.newpipe.fragments.detail;
import android.content.Context;
import android.util.Log;
import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.ExoPlaybackException;
import org.schabi.newpipe.R;
import org.schabi.newpipe.databinding.ListRadioIconItemBinding;
import org.schabi.newpipe.databinding.SingleChoiceDialogViewBinding;
import org.schabi.newpipe.player.Player;
import org.schabi.newpipe.util.ThemeHelper;
import java.io.IOException;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.function.Supplier;
/**
* Outsourced logic for crashing the player in the {@link VideoDetailFragment}.
*/
public final class VideoDetailPlayerCrasher {
// This has to be <= 23 chars on devices running Android 7 or lower (API <= 25)
// or it fails with an IllegalArgumentException
// https://stackoverflow.com/a/54744028
private static final String TAG = "VideoDetPlayerCrasher";
private static final Map<String, Supplier<ExoPlaybackException>> AVAILABLE_EXCEPTION_TYPES =
getExceptionTypes();
private VideoDetailPlayerCrasher() {
// No impls
}
private static Map<String, Supplier<ExoPlaybackException>> getExceptionTypes() {
final String defaultMsg = "Dummy";
final Map<String, Supplier<ExoPlaybackException>> exceptionTypes = new LinkedHashMap<>();
exceptionTypes.put(
"Source",
() -> ExoPlaybackException.createForSource(
new IOException(defaultMsg)
)
);
exceptionTypes.put(
"Renderer",
() -> ExoPlaybackException.createForRenderer(
new Exception(defaultMsg),
"Dummy renderer",
0,
null,
C.FORMAT_HANDLED
)
);
exceptionTypes.put(
"Unexpected",
() -> ExoPlaybackException.createForUnexpected(
new RuntimeException(defaultMsg)
)
);
exceptionTypes.put(
"Remote",
() -> ExoPlaybackException.createForRemote(defaultMsg)
);
return Collections.unmodifiableMap(exceptionTypes);
}
private static Context getThemeWrapperContext(final Context context) {
return new ContextThemeWrapper(
context,
ThemeHelper.isLightThemeSelected(context)
? R.style.LightTheme
: R.style.DarkTheme);
}
public static void onCrashThePlayer(
@NonNull final Context context,
@Nullable final Player player,
@NonNull final LayoutInflater layoutInflater
) {
if (player == null) {
Log.d(TAG, "Player is not available");
Toast.makeText(context, "Player is not available", Toast.LENGTH_SHORT)
.show();
return;
}
// -- Build the dialog/UI --
final Context themeWrapperContext = getThemeWrapperContext(context);
final LayoutInflater inflater = LayoutInflater.from(themeWrapperContext);
final RadioGroup radioGroup = SingleChoiceDialogViewBinding.inflate(layoutInflater)
.list;
final AlertDialog alertDialog = new AlertDialog.Builder(getThemeWrapperContext(context))
.setTitle("Choose an exception")
.setView(radioGroup)
.setCancelable(true)
.setNegativeButton(R.string.cancel, null)
.create();
for (final Map.Entry<String, Supplier<ExoPlaybackException>> entry
: AVAILABLE_EXCEPTION_TYPES.entrySet()) {
final RadioButton radioButton = ListRadioIconItemBinding.inflate(inflater).getRoot();
radioButton.setText(entry.getKey());
radioButton.setChecked(false);
radioButton.setLayoutParams(
new RadioGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT
)
);
radioButton.setOnClickListener(v -> {
tryCrashPlayerWith(player, entry.getValue().get());
if (alertDialog != null) {
alertDialog.cancel();
}
});
radioGroup.addView(radioButton);
}
alertDialog.show();
}
/**
* Note that this method does not crash the underlying exoplayer directly (it's not possible).
* It simply supplies a Exception to {@link Player#onPlayerError(ExoPlaybackException)}.
* @param player
* @param exception
*/
private static void tryCrashPlayerWith(
@NonNull final Player player,
@NonNull final ExoPlaybackException exception
) {
Log.d(TAG, "Crashing the player using player.onPlayerError(ex)");
try {
player.onPlayerError(exception);
} catch (final Exception exPlayer) {
Log.e(TAG,
"Run into an exception while crashing the player:",
exPlayer);
}
}
}

View File

@@ -143,7 +143,7 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I>
final View focusedItem = itemsList.getFocusedChild();
final RecyclerView.ViewHolder itemHolder =
itemsList.findContainingViewHolder(focusedItem);
return itemHolder.getAdapterPosition();
return itemHolder.getBindingAdapterPosition();
} catch (final NullPointerException e) {
return -1;
}
@@ -378,6 +378,13 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I>
if (KoreUtils.shouldShowPlayWithKodi(context, item.getServiceId())) {
entries.add(StreamDialogEntry.play_with_kodi);
}
// show "mark as watched" only when watch history is enabled
if (StreamDialogEntry.shouldAddMarkAsWatched(item.getStreamType(), context)) {
entries.add(
StreamDialogEntry.mark_as_watched
);
}
if (!isNullOrEmpty(item.getUploaderUrl())) {
entries.add(StreamDialogEntry.show_channel_details);
}

View File

@@ -98,11 +98,9 @@ public class ChannelFragment extends BaseListInfoFragment<ChannelInfo>
}
@Override
public void setUserVisibleHint(final boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
if (activity != null
&& useAsFrontPage
&& isVisibleToUser) {
public void onResume() {
super.onResume();
if (activity != null && useAsFrontPage) {
setTitle(currentInfo != null ? currentInfo.getName() : name);
}
}

View File

@@ -99,9 +99,12 @@ public class KioskFragment extends BaseListInfoFragment<KioskInfo> {
}
@Override
public void setUserVisibleHint(final boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
if (useAsFrontPage && isVisibleToUser && activity != null) {
public void onResume() {
super.onResume();
if (!Localization.getPreferredContentCountry(requireContext()).equals(contentCountry)) {
reloadContent();
}
if (useAsFrontPage && activity != null) {
try {
setTitle(kioskTranslatedName);
} catch (final Exception e) {
@@ -117,15 +120,6 @@ public class KioskFragment extends BaseListInfoFragment<KioskInfo> {
return inflater.inflate(R.layout.fragment_kiosk, container, false);
}
@Override
public void onResume() {
super.onResume();
if (!Localization.getPreferredContentCountry(requireContext()).equals(contentCountry)) {
reloadContent();
}
}
/*//////////////////////////////////////////////////////////////////////////
// Menu
//////////////////////////////////////////////////////////////////////////*/

View File

@@ -176,6 +176,12 @@ public class PlaylistFragment extends BaseListInfoFragment<PlaylistInfo> {
entries.add(StreamDialogEntry.play_with_kodi);
}
// show "mark as watched" only when watch history is enabled
if (StreamDialogEntry.shouldAddMarkAsWatched(item.getStreamType(), context)) {
entries.add(
StreamDialogEntry.mark_as_watched
);
}
if (!isNullOrEmpty(item.getUploaderUrl())) {
entries.add(StreamDialogEntry.show_channel_details);
}

View File

@@ -1088,7 +1088,7 @@ public class SearchFragment extends BaseListFragment<SearchInfo, ListExtractor.I
//////////////////////////////////////////////////////////////////////////*/
public int getSuggestionMovementFlags(@NonNull final RecyclerView.ViewHolder viewHolder) {
final int position = viewHolder.getAdapterPosition();
final int position = viewHolder.getBindingAdapterPosition();
if (position == RecyclerView.NO_POSITION) {
return 0;
}
@@ -1099,7 +1099,7 @@ public class SearchFragment extends BaseListFragment<SearchInfo, ListExtractor.I
}
public void onSuggestionItemSwiped(@NonNull final RecyclerView.ViewHolder viewHolder) {
final int position = viewHolder.getAdapterPosition();
final int position = viewHolder.getBindingAdapterPosition();
final String query = suggestionListAdapter.getItem(position).query;
final Disposable onDelete = historyRecordManager.deleteSearchHistory(query)
.observeOn(AndroidSchedulers.mainThread())

View File

@@ -299,18 +299,36 @@ private fun View.animateLightSlideAndAlpha(enterOrExit: Boolean, duration: Long,
}
}
fun View.slideUp(duration: Long, delay: Long, @FloatRange(from = 0.0, to = 1.0) translationPercent: Float) {
fun View.slideUp(
duration: Long,
delay: Long,
@FloatRange(from = 0.0, to = 1.0) translationPercent: Float
) {
slideUp(duration, delay, translationPercent, null)
}
fun View.slideUp(
duration: Long,
delay: Long = 0L,
@FloatRange(from = 0.0, to = 1.0) translationPercent: Float = 1.0F,
execOnEnd: Runnable? = null
) {
val newTranslationY = (resources.displayMetrics.heightPixels * translationPercent).toInt()
animate().setListener(null).cancel()
alpha = 0f
translationY = newTranslationY.toFloat()
visibility = View.VISIBLE
isVisible = true
animate()
.alpha(1f)
.translationY(0f)
.setStartDelay(delay)
.setDuration(duration)
.setInterpolator(FastOutSlowInInterpolator())
.setListener(object : AnimatorListenerAdapter() {
override fun onAnimationEnd(animation: Animator) {
execOnEnd?.run()
}
})
.start()
}

View File

@@ -78,9 +78,9 @@ public final class BookmarkFragment extends BaseLocalListFragment<List<PlaylistL
}
@Override
public void setUserVisibleHint(final boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
if (activity != null && isVisibleToUser) {
public void onResume() {
super.onResume();
if (activity != null) {
setTitle(activity.getString(R.string.tab_bookmarks));
}
}

View File

@@ -1,6 +1,5 @@
package org.schabi.newpipe.local.dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
@@ -17,20 +16,14 @@ import org.schabi.newpipe.R;
import org.schabi.newpipe.database.LocalItem;
import org.schabi.newpipe.database.playlist.PlaylistMetadataEntry;
import org.schabi.newpipe.database.stream.model.StreamEntity;
import org.schabi.newpipe.extractor.stream.StreamInfo;
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import org.schabi.newpipe.local.LocalItemListAdapter;
import org.schabi.newpipe.local.playlist.LocalPlaylistManager;
import org.schabi.newpipe.player.playqueue.PlayQueueItem;
import org.schabi.newpipe.util.OnClickGesture;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.disposables.CompositeDisposable;
import io.reactivex.rxjava3.disposables.Disposable;
public final class PlaylistAppendDialog extends PlaylistDialog {
private static final String TAG = PlaylistAppendDialog.class.getCanonicalName();
@@ -40,47 +33,8 @@ public final class PlaylistAppendDialog extends PlaylistDialog {
private final CompositeDisposable playlistDisposables = new CompositeDisposable();
public static Disposable onPlaylistFound(
final Context context, final Runnable onSuccess, final Runnable onFailed
) {
final LocalPlaylistManager playlistManager =
new LocalPlaylistManager(NewPipeDatabase.getInstance(context));
return playlistManager.hasPlaylists()
.observeOn(AndroidSchedulers.mainThread())
.subscribe(hasPlaylists -> {
if (hasPlaylists) {
onSuccess.run();
} else {
onFailed.run();
}
});
}
public static PlaylistAppendDialog fromStreamInfo(final StreamInfo info) {
final PlaylistAppendDialog dialog = new PlaylistAppendDialog();
dialog.setInfo(Collections.singletonList(new StreamEntity(info)));
return dialog;
}
public static PlaylistAppendDialog fromStreamInfoItems(final List<StreamInfoItem> items) {
final PlaylistAppendDialog dialog = new PlaylistAppendDialog();
final List<StreamEntity> entities = new ArrayList<>(items.size());
for (final StreamInfoItem item : items) {
entities.add(new StreamEntity(item));
}
dialog.setInfo(entities);
return dialog;
}
public static PlaylistAppendDialog fromPlayQueueItems(final List<PlayQueueItem> items) {
final PlaylistAppendDialog dialog = new PlaylistAppendDialog();
final List<StreamEntity> entities = new ArrayList<>(items.size());
for (final PlayQueueItem item : items) {
entities.add(new StreamEntity(item));
}
dialog.setInfo(entities);
return dialog;
public PlaylistAppendDialog(final List<StreamEntity> streamEntities) {
super(streamEntities);
}
/*//////////////////////////////////////////////////////////////////////////
@@ -104,11 +58,15 @@ public final class PlaylistAppendDialog extends PlaylistDialog {
playlistAdapter.setSelectedListener(new OnClickGesture<LocalItem>() {
@Override
public void selected(final LocalItem selectedItem) {
if (!(selectedItem instanceof PlaylistMetadataEntry) || getStreams() == null) {
if (!(selectedItem instanceof PlaylistMetadataEntry)
|| getStreamEntities() == null) {
return;
}
onPlaylistSelected(playlistManager, (PlaylistMetadataEntry) selectedItem,
getStreams());
onPlaylistSelected(
playlistManager,
(PlaylistMetadataEntry) selectedItem,
getStreamEntities()
);
}
});
@@ -146,11 +104,17 @@ public final class PlaylistAppendDialog extends PlaylistDialog {
//////////////////////////////////////////////////////////////////////////*/
public void openCreatePlaylistDialog() {
if (getStreams() == null || !isAdded()) {
if (getStreamEntities() == null || !isAdded()) {
return;
}
PlaylistCreationDialog.newInstance(getStreams()).show(getParentFragmentManager(), TAG);
final PlaylistCreationDialog playlistCreationDialog =
new PlaylistCreationDialog(getStreamEntities());
// Move the dismissListener to the new dialog.
playlistCreationDialog.setOnDismissListener(this.getOnDismissListener());
this.setOnDismissListener(null);
playlistCreationDialog.show(getParentFragmentManager(), TAG);
requireDialog().dismiss();
}
@@ -165,7 +129,7 @@ public final class PlaylistAppendDialog extends PlaylistDialog {
private void onPlaylistSelected(@NonNull final LocalPlaylistManager manager,
@NonNull final PlaylistMetadataEntry playlist,
@NonNull final List<StreamEntity> streams) {
if (getStreams() == null) {
if (getStreamEntities() == null) {
return;
}

View File

@@ -7,29 +7,22 @@ import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AlertDialog.Builder;
import org.schabi.newpipe.NewPipeDatabase;
import org.schabi.newpipe.R;
import org.schabi.newpipe.database.stream.model.StreamEntity;
import org.schabi.newpipe.databinding.DialogEditTextBinding;
import org.schabi.newpipe.local.playlist.LocalPlaylistManager;
import org.schabi.newpipe.util.ThemeHelper;
import java.util.List;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
public final class PlaylistCreationDialog extends PlaylistDialog {
public static PlaylistCreationDialog newInstance(final List<StreamEntity> streams) {
final PlaylistCreationDialog dialog = new PlaylistCreationDialog();
dialog.setInfo(streams);
return dialog;
}
public static PlaylistCreationDialog newInstance(final PlaylistAppendDialog appendDialog) {
final PlaylistCreationDialog dialog = new PlaylistCreationDialog();
dialog.setInfo(appendDialog.getStreams());
return dialog;
public PlaylistCreationDialog(final List<StreamEntity> streamEntities) {
super(streamEntities);
}
/*//////////////////////////////////////////////////////////////////////////
@@ -39,16 +32,18 @@ public final class PlaylistCreationDialog extends PlaylistDialog {
@NonNull
@Override
public Dialog onCreateDialog(@Nullable final Bundle savedInstanceState) {
if (getStreams() == null) {
if (getStreamEntities() == null) {
return super.onCreateDialog(savedInstanceState);
}
final DialogEditTextBinding dialogBinding
= DialogEditTextBinding.inflate(getLayoutInflater());
dialogBinding.getRoot().getContext().setTheme(ThemeHelper.getDialogTheme(requireContext()));
dialogBinding.dialogEditText.setHint(R.string.name);
dialogBinding.dialogEditText.setInputType(InputType.TYPE_CLASS_TEXT);
final AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(requireContext())
final Builder dialogBuilder = new Builder(requireContext(),
ThemeHelper.getDialogTheme(requireContext()))
.setTitle(R.string.create_playlist)
.setView(dialogBinding.getRoot())
.setCancelable(true)
@@ -61,11 +56,10 @@ public final class PlaylistCreationDialog extends PlaylistDialog {
R.string.playlist_creation_success,
Toast.LENGTH_SHORT);
playlistManager.createPlaylist(name, getStreams())
playlistManager.createPlaylist(name, getStreamEntities())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(longs -> successToast.show());
});
return dialogBuilder.create();
}
}

View File

@@ -1,6 +1,8 @@
package org.schabi.newpipe.local.dialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.Window;
@@ -8,23 +10,29 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.DialogFragment;
import org.schabi.newpipe.NewPipeDatabase;
import org.schabi.newpipe.database.stream.model.StreamEntity;
import org.schabi.newpipe.local.playlist.LocalPlaylistManager;
import org.schabi.newpipe.util.StateSaver;
import java.util.List;
import java.util.Queue;
import java.util.function.Consumer;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.disposables.Disposable;
public abstract class PlaylistDialog extends DialogFragment implements StateSaver.WriteRead {
@Nullable
private DialogInterface.OnDismissListener onDismissListener = null;
private List<StreamEntity> streamEntities;
private org.schabi.newpipe.util.SavedState savedState;
protected void setInfo(final List<StreamEntity> entities) {
this.streamEntities = entities;
}
protected List<StreamEntity> getStreams() {
return streamEntities;
public PlaylistDialog(final List<StreamEntity> streamEntities) {
this.streamEntities = streamEntities;
}
/*//////////////////////////////////////////////////////////////////////////
@@ -43,6 +51,10 @@ public abstract class PlaylistDialog extends DialogFragment implements StateSave
StateSaver.onDestroy(savedState);
}
public List<StreamEntity> getStreamEntities() {
return streamEntities;
}
@NonNull
@Override
public Dialog onCreateDialog(final Bundle savedInstanceState) {
@@ -55,6 +67,14 @@ public abstract class PlaylistDialog extends DialogFragment implements StateSave
return dialog;
}
@Override
public void onDismiss(@NonNull final DialogInterface dialog) {
super.onDismiss(dialog);
if (onDismissListener != null) {
onDismissListener.onDismiss(dialog);
}
}
/*//////////////////////////////////////////////////////////////////////////
// State Saving
//////////////////////////////////////////////////////////////////////////*/
@@ -84,4 +104,47 @@ public abstract class PlaylistDialog extends DialogFragment implements StateSave
savedState, outState, this);
}
}
/*//////////////////////////////////////////////////////////////////////////
// Getter + Setter
//////////////////////////////////////////////////////////////////////////*/
@Nullable
public DialogInterface.OnDismissListener getOnDismissListener() {
return onDismissListener;
}
public void setOnDismissListener(
@Nullable final DialogInterface.OnDismissListener onDismissListener
) {
this.onDismissListener = onDismissListener;
}
/*//////////////////////////////////////////////////////////////////////////
// Dialog creation
//////////////////////////////////////////////////////////////////////////*/
/**
* Creates a {@link PlaylistAppendDialog} when playlists exists,
* otherwise a {@link PlaylistCreationDialog}.
*
* @param context context used for accessing the database
* @param streamEntities used for crating the dialog
* @param onExec execution that should occur after a dialog got created, e.g. showing it
* @return Disposable
*/
public static Disposable createCorrespondingDialog(
final Context context,
final List<StreamEntity> streamEntities,
final Consumer<PlaylistDialog> onExec
) {
return new LocalPlaylistManager(NewPipeDatabase.getInstance(context))
.hasPlaylists()
.observeOn(AndroidSchedulers.mainThread())
.subscribe(hasPlaylists ->
onExec.accept(hasPlaylists
? new PlaylistAppendDialog(streamEntities)
: new PlaylistCreationDialog(streamEntities))
);
}
}

View File

@@ -42,7 +42,7 @@ class FeedDatabaseManager(context: Context) {
fun getStreams(
groupId: Long = FeedGroupEntity.GROUP_ALL_ID,
getPlayedStreams: Boolean = true
): Flowable<List<StreamWithState>> {
): Maybe<List<StreamWithState>> {
return when (groupId) {
FeedGroupEntity.GROUP_ALL_ID -> {
if (getPlayedStreams) feedTable.getAllStreams()

View File

@@ -1,15 +1,18 @@
package org.schabi.newpipe.local.feed
import android.content.Context
import androidx.core.content.edit
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import androidx.preference.PreferenceManager
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
import io.reactivex.rxjava3.core.Flowable
import io.reactivex.rxjava3.functions.Function4
import io.reactivex.rxjava3.processors.BehaviorProcessor
import io.reactivex.rxjava3.schedulers.Schedulers
import org.schabi.newpipe.R
import org.schabi.newpipe.database.feed.model.FeedGroupEntity
import org.schabi.newpipe.database.stream.StreamWithState
import org.schabi.newpipe.local.feed.item.StreamItem
@@ -23,19 +26,16 @@ import java.time.OffsetDateTime
import java.util.concurrent.TimeUnit
class FeedViewModel(
applicationContext: Context,
private val applicationContext: Context,
groupId: Long = FeedGroupEntity.GROUP_ALL_ID,
initialShowPlayedItems: Boolean = true
) : ViewModel() {
private var feedDatabaseManager: FeedDatabaseManager = FeedDatabaseManager(applicationContext)
private val toggleShowPlayedItems = BehaviorProcessor.create<Boolean>()
private val streamItems = toggleShowPlayedItems
private val toggleShowPlayedItemsFlowable = toggleShowPlayedItems
.startWithItem(initialShowPlayedItems)
.distinctUntilChanged()
.switchMap { showPlayedItems ->
feedDatabaseManager.getStreams(groupId, showPlayedItems)
}
private val mutableStateLiveData = MutableLiveData<FeedState>()
val stateLiveData: LiveData<FeedState> = mutableStateLiveData
@@ -43,17 +43,28 @@ class FeedViewModel(
private var combineDisposable = Flowable
.combineLatest(
FeedEventManager.events(),
streamItems,
toggleShowPlayedItemsFlowable,
feedDatabaseManager.notLoadedCount(groupId),
feedDatabaseManager.oldestSubscriptionUpdate(groupId),
Function4 { t1: FeedEventManager.Event, t2: List<StreamWithState>,
Function4 { t1: FeedEventManager.Event, t2: Boolean,
t3: Long, t4: List<OffsetDateTime> ->
return@Function4 CombineResultHolder(t1, t2, t3, t4.firstOrNull())
return@Function4 CombineResultEventHolder(t1, t2, t3, t4.firstOrNull())
}
)
.throttleLatest(DEFAULT_THROTTLE_TIMEOUT, TimeUnit.MILLISECONDS)
.subscribeOn(Schedulers.io())
.observeOn(Schedulers.io())
.map { (event, showPlayedItems, notLoadedCount, oldestUpdate) ->
var streamItems = if (event is SuccessResultEvent || event is IdleEvent)
feedDatabaseManager
.getStreams(groupId, showPlayedItems)
.blockingGet(arrayListOf())
else
arrayListOf()
CombineResultDataHolder(event, streamItems, notLoadedCount, oldestUpdate)
}
.observeOn(AndroidSchedulers.mainThread())
.subscribe { (event, listFromDB, notLoadedCount, oldestUpdate) ->
mutableStateLiveData.postValue(
@@ -75,20 +86,50 @@ class FeedViewModel(
combineDisposable.dispose()
}
private data class CombineResultHolder(val t1: FeedEventManager.Event, val t2: List<StreamWithState>, val t3: Long, val t4: OffsetDateTime?)
private data class CombineResultEventHolder(
val t1: FeedEventManager.Event,
val t2: Boolean,
val t3: Long,
val t4: OffsetDateTime?
)
private data class CombineResultDataHolder(
val t1: FeedEventManager.Event,
val t2: List<StreamWithState>,
val t3: Long,
val t4: OffsetDateTime?
)
fun togglePlayedItems(showPlayedItems: Boolean) {
toggleShowPlayedItems.onNext(showPlayedItems)
}
fun saveShowPlayedItemsToPreferences(showPlayedItems: Boolean) =
PreferenceManager.getDefaultSharedPreferences(applicationContext).edit {
this.putBoolean(applicationContext.getString(R.string.feed_show_played_items_key), showPlayedItems)
this.apply()
}
fun getShowPlayedItemsFromPreferences() = getShowPlayedItemsFromPreferences(applicationContext)
companion object {
private fun getShowPlayedItemsFromPreferences(context: Context) =
PreferenceManager.getDefaultSharedPreferences(context)
.getBoolean(context.getString(R.string.feed_show_played_items_key), true)
}
class Factory(
private val context: Context,
private val groupId: Long = FeedGroupEntity.GROUP_ALL_ID,
private val showPlayedItems: Boolean
private val groupId: Long = FeedGroupEntity.GROUP_ALL_ID
) : ViewModelProvider.Factory {
@Suppress("UNCHECKED_CAST")
override fun <T : ViewModel?> create(modelClass: Class<T>): T {
return FeedViewModel(context.applicationContext, groupId, showPlayedItems) as T
return FeedViewModel(
context.applicationContext,
groupId,
// Read initial value from preferences
getShowPlayedItemsFromPreferences(context.applicationContext)
) as T
}
}
}

View File

@@ -19,6 +19,7 @@ import org.schabi.newpipe.util.Localization
import org.schabi.newpipe.util.PicassoHelper
import org.schabi.newpipe.util.StreamTypeUtil
import java.util.concurrent.TimeUnit
import java.util.function.Consumer
data class StreamItem(
val streamWithState: StreamWithState,
@@ -31,6 +32,12 @@ data class StreamItem(
private val stream: StreamEntity = streamWithState.stream
private val stateProgressTime: Long? = streamWithState.stateProgressMillis
/**
* Will be executed at the end of the [StreamItem.bind] (with (ListStreamItemBinding,Int)).
* Can be used e.g. for highlighting a item.
*/
var execBindEnd: Consumer<ListStreamItemBinding>? = null
override fun getId(): Long = stream.uid
enum class ItemVersion { NORMAL, MINI, GRID }
@@ -97,6 +104,8 @@ data class StreamItem(
viewBinding.itemAdditionalDetails.text =
getStreamInfoDetailLine(viewBinding.itemAdditionalDetails.context)
}
execBindEnd?.accept(viewBinding)
}
override fun isLongClickable() = when (stream.streamType) {

View File

@@ -120,19 +120,11 @@ public class HistoryRecordManager {
}
// Update the stream progress to the full duration of the video
final List<StreamStateEntity> states = streamStateTable.getState(streamId)
.blockingFirst();
if (!states.isEmpty()) {
final StreamStateEntity entity = states.get(0);
entity.setProgressMillis(duration * 1000);
streamStateTable.update(entity);
} else {
final StreamStateEntity entity = new StreamStateEntity(
streamId,
duration * 1000
);
streamStateTable.insert(entity);
}
final StreamStateEntity entity = new StreamStateEntity(
streamId,
duration * 1000
);
streamStateTable.upsert(entity);
// Add a history entry
final StreamHistoryEntity latestEntry = streamHistoryTable.getLatestEntry(streamId);
@@ -334,9 +326,9 @@ public class HistoryRecordManager {
.getState(entities.get(0).getUid()).blockingFirst();
if (states.isEmpty()) {
result.add(null);
continue;
} else {
result.add(states.get(0));
}
result.add(states.get(0));
}
return result;
}).subscribeOn(Schedulers.io());
@@ -362,9 +354,9 @@ public class HistoryRecordManager {
.blockingFirst();
if (states.isEmpty()) {
result.add(null);
continue;
} else {
result.add(states.get(0));
}
result.add(states.get(0));
}
return result;
}).subscribeOn(Schedulers.io());

Some files were not shown because too many files have changed in this diff Show More