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

Compare commits

..

347 Commits

Author SHA1 Message Date
TobiGr
4674431829 Release 0.18.6 (860) 2020-03-01 15:43:12 +01:00
TobiGr
2b9c7fee20 Update extractor version 2020-03-01 15:37:47 +01:00
TobiGr
fbab80145e Merge remote-tracking branch 'Weblate/dev' into dev 2020-02-29 21:50:45 +01:00
Éfrit
95d8b12065 Translated using Weblate (French)
Currently translated at 100.0% (533 of 533 strings)
2020-02-29 18:51:26 +01:00
Hosted Weblate
9f8b7a180f Merge branch 'origin/dev' into Weblate. 2020-02-29 17:04:56 +01:00
Allan Nordhøy
7f62f56661 Translated using Weblate (Norwegian Bokmål)
Currently translated at 91.9% (490 of 533 strings)
2020-02-29 17:04:56 +01:00
Xiang Xu
28ecf98fa6 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (533 of 533 strings)
2020-02-29 17:04:55 +01:00
Jeff Huang
68f55e6639 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (533 of 533 strings)
2020-02-29 17:04:55 +01:00
Isak Holmström
83e7af4503 Translated using Weblate (Swedish)
Currently translated at 81.4% (434 of 533 strings)
2020-02-29 17:04:55 +01:00
Éfrit
fbfaa8d25f Translated using Weblate (French)
Currently translated at 100.0% (533 of 533 strings)
2020-02-29 17:04:54 +01:00
Erik Peeremand
b46d199086 Translated using Weblate (Dutch)
Currently translated at 82.1% (438 of 533 strings)
2020-02-29 17:04:54 +01:00
pjammo
64c6aac0cf Translated using Weblate (Italian)
Currently translated at 100.0% (533 of 533 strings)
2020-02-29 17:04:54 +01:00
WaldiS
f3c64edf6e Translated using Weblate (Polish)
Currently translated at 99.8% (532 of 533 strings)
2020-02-29 17:04:52 +01:00
Vojtěch Šamla
61673cda70 Translated using Weblate (Czech)
Currently translated at 100.0% (533 of 533 strings)
2020-02-29 17:04:52 +01:00
Enol P
d71e6b18c0 Translated using Weblate (Asturian)
Currently translated at 50.8% (271 of 533 strings)
2020-02-29 17:04:52 +01:00
Nicu Borta
19fe47f71e Translated using Weblate (Romanian)
Currently translated at 74.1% (395 of 533 strings)
2020-02-29 17:04:50 +01:00
Gontzal Manuel Pujana Onaindia
720bcbf8ac Translated using Weblate (Basque)
Currently translated at 100.0% (533 of 533 strings)
2020-02-29 17:04:49 +01:00
nautilusx
bb3b7d68c1 Translated using Weblate (German)
Currently translated at 100.0% (533 of 533 strings)
2020-02-29 17:04:47 +01:00
Eduardo Caron
eb4b6d2a7f Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (533 of 533 strings)
2020-02-29 17:04:46 +01:00
Daniele Lira Mereb
abc3e8d59c Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (533 of 533 strings)
2020-02-29 17:04:45 +01:00
Oğuz Ersen
9f05f360f9 Translated using Weblate (Turkish)
Currently translated at 100.0% (533 of 533 strings)
2020-02-29 17:04:44 +01:00
Lucas Thuries
9b2dc1b263 Translated using Weblate (French)
Currently translated at 99.8% (532 of 533 strings)
2020-02-29 17:04:41 +01:00
Alexandre Hô
50777d8d2c Translated using Weblate (French)
Currently translated at 99.8% (532 of 533 strings)
2020-02-29 17:04:41 +01:00
Florian
63e85fe4be Translated using Weblate (French)
Currently translated at 99.8% (532 of 533 strings)
2020-02-29 17:04:40 +01:00
Tobias Groza
b1eaf5616a Merge pull request #3154 from B0pol/round
Round at one place for Localization.shortCount()
2020-02-29 00:08:20 +01:00
bopol
22aa6d16a2 public Utils.round() moved to private Localization.round() 2020-02-28 17:04:25 +01:00
bopol
dfaa5675b6 Round at one place for Localization.shortCount() 2020-02-28 17:04:25 +01:00
Tobias Groza
ab4e1819c1 Merge pull request #2967 from moneytoo/cutout
Support display cutout
2020-02-26 20:05:57 +01:00
Marcel Dopita
91aa65e717 Support display cutout
Fixes #2682
2020-02-26 17:47:22 +01:00
TobiGr
ec684434dc Merge branch 'master' into dev 2020-02-26 17:46:59 +01:00
TobiGr
3b5b9d7dab Release 0.18.5 (850) and update extractor version
Update User-Agent
2020-02-25 23:38:51 +01:00
TobiGr
e7082baaff Exception is ignored in SearchFragment 2020-02-25 23:12:12 +01:00
Hosted Weblate
1caafac89a Merge branch 'origin/dev' into Weblate. 2020-02-23 20:37:42 +01:00
chr56
26e2fc6d91 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (533 of 533 strings)
2020-02-23 20:37:39 +01:00
JoC
740fa67a4e Translated using Weblate (Spanish)
Currently translated at 100.0% (533 of 533 strings)
2020-02-23 20:37:37 +01:00
ButterflyOfFire
d468423db3 Translated using Weblate (Arabic)
Currently translated at 97.1% (518 of 533 strings)
2020-02-23 20:37:36 +01:00
Yaron Shahrabani
84664ebcdc Translated using Weblate (Hebrew)
Currently translated at 100.0% (533 of 533 strings)
2020-02-23 20:37:34 +01:00
Tobias Groza
987078fab5 Merge pull request #3043 from Stypox/unhook-save-restore
Save and restore whether pitch and tempo are unhooked or not
2020-02-23 00:36:10 +01:00
Tobias Groza
7da28f28e5 Merge branch 'dev' into unhook-save-restore 2020-02-23 00:19:44 +01:00
Hosted Weblate
3c9af84ea2 Merge branch 'origin/dev' into Weblate. 2020-02-23 00:10:49 +01:00
chr56
286fd19ba2 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (533 of 533 strings)
2020-02-23 00:10:49 +01:00
MohammedSR Vevo
39dce71c28 Translated using Weblate (Kurdish)
Currently translated at 99.8% (532 of 533 strings)
2020-02-23 00:10:49 +01:00
zmni
b3b1d6d706 Translated using Weblate (Indonesian)
Currently translated at 100.0% (533 of 533 strings)
2020-02-23 00:10:48 +01:00
Yaron Shahrabani
c04040468e Translated using Weblate (Hebrew)
Currently translated at 99.4% (530 of 533 strings)
2020-02-23 00:10:48 +01:00
Vojtěch Šamla
aee7777478 Translated using Weblate (Czech)
Currently translated at 100.0% (533 of 533 strings)
2020-02-23 00:10:48 +01:00
Igor Nedoboy
09c1e21560 Translated using Weblate (Russian)
Currently translated at 100.0% (533 of 533 strings)
2020-02-23 00:10:47 +01:00
nautilusx
60e9f56b0f Translated using Weblate (German)
Currently translated at 100.0% (533 of 533 strings)
2020-02-23 00:10:47 +01:00
Oğuz Ersen
302e4ab664 Translated using Weblate (Turkish)
Currently translated at 100.0% (533 of 533 strings)
2020-02-23 00:10:46 +01:00
chr56
484c3aa320 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (533 of 533 strings)
2020-02-23 00:10:41 +01:00
TobiGr
0bc769b971 Fix regression: Unable to find explicit activity class
See https://github.com/TeamNewPipe/NewPipe/issues/3114#issuecomment-589940878 for info on this crash.
This reverts ef90493c27 partly.
2020-02-22 20:43:38 +01:00
TobiGr
5b98d41637 Merge branch 'dev' 2020-02-22 14:09:26 +01:00
Tobias Groza
e14b7851b1 Merge pull request #3128 from Stypox/drawer-fix
Reintroduce "Settings" button in app bar
2020-02-22 14:08:37 +01:00
Hosted Weblate
13d2334a45 Merge branch 'origin/dev' into Weblate. 2020-02-22 12:07:27 +01:00
Jeff Huang
9864e04aae Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (532 of 532 strings)
2020-02-22 12:07:26 +01:00
B0pol
4d6bbbf004 Translated using Weblate (French)
Currently translated at 97.9% (521 of 532 strings)
2020-02-22 12:07:26 +01:00
C. Rüdinger
44305b4ccd Translated using Weblate (German)
Currently translated at 99.4% (529 of 532 strings)
2020-02-22 12:07:23 +01:00
Igor Nedoboy
7f86b13d93 Translated using Weblate (Russian)
Currently translated at 100.0% (532 of 532 strings)
2020-02-22 12:07:19 +01:00
Stypox
d65b8d7d18 Address @mauriciocolli suggestions in #2960
Simplify code to enable history button
2020-02-22 11:34:08 +01:00
Stypox
6968dd266a Remove empty about menu 2020-02-22 11:30:57 +01:00
Stypox
8754cbb38f Remove Settings button from download activity 2020-02-22 11:12:22 +01:00
Stypox
c7b4705538 Implement Settings buttons 2020-02-22 10:36:10 +01:00
Stypox
065faf31b6 Add settings button back in dot menu 2020-02-22 10:23:01 +01:00
Stypox
da4b27f606 Merge branch 'dev' of github.com:TeamNewPipe/NewPipe into dev 2020-02-22 10:01:11 +01:00
Tobias Groza
e1cc84ab5f Merge pull request #3113 from TeamNewPipe/dev
Release v0.18.4
2020-02-22 00:44:21 +01:00
TobiGr
533aede80f Update bump version to 0.18.4 (840) 2020-02-22 00:37:46 +01:00
TobiGr
e84d5311f9 Update extractor version to latest release 2020-02-22 00:37:46 +01:00
TobiGr
476b3f804b Add changelog 2020-02-22 00:37:46 +01:00
TobiGr
9445e8e8a0 Remove 'duration_live_button' string from translations 2020-02-22 00:37:46 +01:00
TobiGr
e539753279 Clean translations 2020-02-21 21:59:36 +01:00
TobiGr
f5f81be6fe Merge remote-tracking branch 'Weblate/dev' into dev 2020-02-21 21:31:17 +01:00
Tobias Groza
3b8a55f0d3 Merge pull request #3098 from B0pol/localisation
Multiple localization fixes
2020-02-21 21:29:03 +01:00
Stypox
b1dd6cbb6e Merge branch 'B0pol-localisation' into dev 2020-02-21 20:31:52 +01:00
Hosted Weblate
431724f637 Merge branch 'origin/dev' into Weblate. 2020-02-21 16:58:08 +01:00
Brikkho
6e5851aea8 Translated using Weblate (Bengali (Bangladesh))
Currently translated at 28.5% (152 of 532 strings)
2020-02-21 16:58:08 +01:00
chr56
30e5e58178 Translated using Weblate (Chinese (Simplified))
Currently translated at 93.0% (495 of 532 strings)
2020-02-21 16:58:07 +01:00
Jeff Huang
40207b515d Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (532 of 532 strings)
2020-02-21 16:58:07 +01:00
MohammedSR Vevo
95a6aaac76 Translated using Weblate (Kurdish)
Currently translated at 100.0% (532 of 532 strings)
2020-02-21 16:58:06 +01:00
zmni
da43f47487 Translated using Weblate (Indonesian)
Currently translated at 100.0% (532 of 532 strings)
2020-02-21 16:58:05 +01:00
WaldiS
ae5360fb27 Translated using Weblate (Polish)
Currently translated at 99.6% (530 of 532 strings)
2020-02-21 16:58:03 +01:00
Karol Kosek
47d2ae5c5e Translated using Weblate (Polish)
Currently translated at 99.6% (530 of 532 strings)
2020-02-21 16:58:03 +01:00
Yaron Shahrabani
e1101dd6f1 Translated using Weblate (Hebrew)
Currently translated at 100.0% (532 of 532 strings)
2020-02-21 16:58:01 +01:00
Oğuz Ersen
d460351da2 Translated using Weblate (Turkish)
Currently translated at 100.0% (532 of 532 strings)
2020-02-21 16:58:00 +01:00
zeritti
fd076f5a58 Translated using Weblate (Czech)
Currently translated at 100.0% (532 of 532 strings)
2020-02-21 16:57:57 +01:00
Vojtěch Šamla
f7d73fc21b Translated using Weblate (Czech)
Currently translated at 100.0% (532 of 532 strings)
2020-02-21 16:57:56 +01:00
Stypox
5680b7c477 Merge branch 'dev' into localisation 2020-02-21 14:34:40 +01:00
bopol
9f9b53c067 remove unecessary «few» and «many» for plural string in english 2020-02-20 18:55:22 +01:00
Tobias Groza
18d986a57d Merge pull request #3117 from kapodamy/fixup
fixup for #3081
2020-02-20 18:15:21 +01:00
kapodamy
61632b3d9d fixup for #3081
* dont write the "sbpg" box in video tracks
2020-02-20 13:20:20 -03:00
Hosted Weblate
f1688fb8b1 Merge branch 'origin/dev' into Weblate. 2020-02-20 00:07:22 +01:00
mk3z
f0e85b31aa Translated using Weblate (Finnish)
Currently translated at 64.8% (345 of 532 strings)
2020-02-20 00:07:19 +01:00
B0pol
316871714a Update app/.gitignore
Co-Authored-By: Stypox <stypox@pm.me>
2020-02-19 17:40:03 +01:00
Stypox
12c72842ff Merge pull request #3102 from vhsw/dev
Fix initial brightness value
2020-02-19 15:26:40 +01:00
Alexey Dubrov
4230e11c4d Merge branch 'dev' into dev 2020-02-19 15:05:42 +03:00
Tobias Groza
c76ff8d367 Merge pull request #3109 from spk/fix-androidx-nonnull
Migrate annotation to androidx on ReCaptchaActivity
2020-02-18 22:40:29 +01:00
Laurent Arnoud
831e9985e2 Migrate annotation to androidx on ReCaptchaActivity 2020-02-18 21:50:28 +01:00
bopol
9912ee8199 give info if content language is system on crash 2020-02-18 18:35:13 +01:00
bopol
55d17b556a added all the .iml files in gitignore, not only app.iml
if somehow your module name isn't app, it will create a module-name.iml file, and isn't needed
2020-02-17 10:18:20 +01:00
Alexey Dubrov
5495be749b Merge branch 'dev' into dev 2020-02-17 12:14:07 +03:00
bopol
54f71c623a use plural string for dynamic_seek_duration_description 2020-02-17 10:12:08 +01:00
Alexey Dubrov
e3a891688b Get brightness from settings if screenBrightness is set to auto 2020-02-17 12:11:00 +03:00
B0pol
09d36a5dbc Merge branch 'dev' into localisation 2020-02-17 09:27:03 +01:00
Tobias Groza
ff493406cf Merge pull request #2938 from comradekingu/patch-10
Spelling: Language reworked 2
2020-02-17 08:41:39 +01:00
Tobias Groza
fbcee61e04 Apply suggestions from code review
Co-Authored-By: Stypox <stypox@pm.me>
2020-02-16 22:41:56 +01:00
bopol
e62e34fd5c created default_localization_key 2020-02-16 22:41:32 +01:00
Stypox
3b57135a6e Merge branch 'dev' into patch-10 2020-02-16 21:58:44 +01:00
Alexey Dubrov
69934dee52 Merge branch 'dev' into dev 2020-02-16 16:11:56 +03:00
Alexey Dubrov
51f2efd48c Fix initial brightness value 2020-02-16 16:08:53 +03:00
B0pol
4de2cfdcc6 Added translation using Weblate (Chuvash) 2020-02-16 10:12:55 +01:00
Hosted Weblate
7845b7678d Merge branch 'origin/dev' into Weblate. 2020-02-16 05:21:17 +01:00
B0pol
6f9543b9cf Translated using Weblate (Esperanto)
Currently translated at 100.0% (532 of 532 strings)
2020-02-16 05:21:15 +01:00
bopol
5b541cc9fb resolve merge conflicts 2020-02-15 14:53:05 +01:00
B0pol
ea54520e0b Merge branch 'dev' into localisation 2020-02-15 14:14:33 +01:00
Tobias Groza
00b6bd517a Merge pull request #2865 from chr56/dev
Fix wrong lang code of Chinese,and clean up useless strings.xml
2020-02-15 13:31:56 +01:00
TobiGr
9fb5aa4b46 Merge remote-tracking branch 'Weblate/dev' into dev 2020-02-15 13:28:30 +01:00
bopol
f089cd027e Multiple localization fixes
With the extractor PR, fixes title & description shown in the wrong language.
Fixed views / spectators counts possibly in the wrong language
Fixed live spectators not showing full count on detail page
Fixed LIVE shown on players, it shows translated instead

Fixed Videos string in search / three dots not available in Weblate
(because it was videos, but there already was a plural string named videos, in Weblate)

Subscriber count is always giving the short count.
We can't get exact number since this YouTube update: https://support.google.com/youtube/thread/6543166
But only short count (B, M, k), so showing full number, eg for 1.9M: 1,900,000, is wrong because the number could be 1,923,490 or 1,897,789…

Added a « sytem default » option to content language and country language selector.
It's the one selected by default (not en-GB anymore then), and correspond to the
language of the system / country of the system
By system I mean phone, tablet, TV…

Fixed russian showing - before time ago (eg 19hrs ago)
This is a workaround fix, I opened an issue on prettytime library repo.

Fixed russian plurals:
other was used instead of many for videos and subscribers

Fixed seek_duration english only
2020-02-15 12:40:23 +01:00
chr56
5151c6cb54 fix wrong langcode of Chinesein settings_keys.xml 2020-02-15 18:39:41 +08:00
chr56
9407ac8c24 fix reCaptcha strings in zh-rCN 2020-02-15 13:07:34 +08:00
chr56
6a91a3a947 reapply changes after merging 2020-02-15 12:52:19 +08:00
chr56
ac0bcea371 Merge branch 'TeamNewPipe-dev' into dev 2020-02-15 12:46:44 +08:00
chr56
302a6ff4e8 Merge branch 'dev' of https://github.com/TeamNewPipe/NewPipe into TeamNewPipe-dev 2020-02-15 12:45:09 +08:00
B0pol
0d89667428 Translated using Weblate (French)
Currently translated at 100.0% (532 of 532 strings)
2020-02-15 01:57:32 +01:00
B0pol
dbb6848a9b Translated using Weblate (Esperanto)
Currently translated at 100.0% (532 of 532 strings)
2020-02-15 01:57:31 +01:00
TobiGr
a843e808d1 Merge branch 'master' into dev 2020-02-15 00:53:05 +01:00
Tobias Groza
67af05e504 Use "Report error" instead of "Report Error"
Co-Authored-By: Stypox <stypox@pm.me>
2020-02-14 19:12:59 +01:00
Milo Ivir
c995c6fda5 Translated using Weblate (Croatian)
Currently translated at 88.2% (469 of 532 strings)
2020-02-14 04:17:43 +01:00
Nogooduser
3b5cf0e37c Translated using Weblate (Portuguese)
Currently translated at 100.0% (532 of 532 strings)
2020-02-14 04:17:40 +01:00
Daniele Lira Mereb
c7a9847e66 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (532 of 532 strings)
2020-02-14 04:17:38 +01:00
burstw0w
3624f1b9a2 Translated using Weblate (Serbian)
Currently translated at 46.6% (248 of 532 strings)
2020-02-12 02:50:24 +01:00
Adolfo Jayme Barrientos
aecc908152 Translated using Weblate (Spanish)
Currently translated at 100.0% (532 of 532 strings)
2020-02-12 02:50:24 +01:00
Shafiq Jamzuri
9f9c6eff00 Translated using Weblate (Malay)
Currently translated at 84.2% (448 of 532 strings)
2020-02-12 02:50:23 +01:00
zeritti
99400fa570 Translated using Weblate (Czech)
Currently translated at 100.0% (532 of 532 strings)
2020-02-12 02:50:22 +01:00
vkhomenk
17d00837bd Translated using Weblate (Ukrainian)
Currently translated at 99.2% (528 of 532 strings)
2020-02-12 02:50:21 +01:00
Ali Demirtas
0882d9d66b Translated using Weblate (Turkish)
Currently translated at 100.0% (532 of 532 strings)
2020-02-12 02:50:19 +01:00
TobiGr
0df81409bf Update extractor and release 0.18.3 (830) 2020-02-10 22:32:10 +01:00
Allan Nordhøy
a75deb6ba2 Reverted changes 2020-02-09 16:29:51 +01:00
Stypox
4b8474b0ac Merge branch 'dev' into unhook-save-restore 2020-02-09 13:10:35 +01:00
Hosted Weblate
7478e96a15 Merge branch 'origin/dev' into Weblate. 2020-02-09 04:54:59 +01:00
pjammo
c1d9a253b0 Translated using Weblate (Italian)
Currently translated at 100.0% (532 of 532 strings)
2020-02-09 04:54:57 +01:00
AioiLight
eb7d9f76e5 Translated using Weblate (Japanese)
Currently translated at 100.0% (532 of 532 strings)
2020-02-09 04:54:56 +01:00
Tobias Groza
ec45d4a729 Merge pull request #2959 from kapodamy/m4a-stsc-stco
mp4 muxer fix
2020-02-09 00:27:57 +01:00
Tobias Groza
07544cd198 Merge pull request #3044 from B0pol/tubepeer
Description fix and some PeerTube fixes
2020-02-09 00:11:49 +01:00
bopol
3f3d1bfccf update extractor version 2020-02-09 00:00:14 +01:00
kapodamy
d3cb887ff0 Merge branch 'dev' into m4a-stsc-stco 2020-02-08 16:04:28 -03:00
B0pol
88c68315f6 Merge branch 'dev' into tubepeer 2020-02-08 10:54:05 +01:00
bopol
2d62fa401d real markdown support for descriptions
and update third-party licences in about page
2020-02-08 10:48:36 +01:00
TobiGr
3ff85c2ab7 Make report error title in snackbar uppercase again 2020-02-07 22:22:27 +01:00
Hosted Weblate
13f5d3b5ac Merge branch 'origin/dev' into Weblate. 2020-02-07 21:15:53 +01:00
Allan Nordhøy
9eb55e1be5 Translated using Weblate (Norwegian Bokmål)
Currently translated at 98.1% (522 of 532 strings)
2020-02-07 21:15:50 +01:00
Jeff Huang
6adbfade2b Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (532 of 532 strings)
2020-02-07 21:15:50 +01:00
MohammedSR Vevo
7568616f8e Translated using Weblate (Kurdish)
Currently translated at 99.8% (531 of 532 strings)
2020-02-07 21:15:49 +01:00
B0pol
c93be13dfe Translated using Weblate (French)
Currently translated at 100.0% (532 of 532 strings)
2020-02-07 21:15:49 +01:00
JoC
e9dc96944b Translated using Weblate (Spanish)
Currently translated at 99.8% (531 of 532 strings)
2020-02-07 21:15:48 +01:00
zmni
06e536eb45 Translated using Weblate (Indonesian)
Currently translated at 99.6% (530 of 532 strings)
2020-02-07 21:15:48 +01:00
thami simo
72e90b4d57 Translated using Weblate (Arabic)
Currently translated at 100.0% (532 of 532 strings)
2020-02-07 21:15:47 +01:00
WaldiS
83d43f845f Translated using Weblate (Polish)
Currently translated at 99.8% (531 of 532 strings)
2020-02-07 21:15:47 +01:00
Yaron Shahrabani
5ed5a81708 Translated using Weblate (Hebrew)
Currently translated at 99.8% (531 of 532 strings)
2020-02-07 21:15:46 +01:00
Vojtěch Šamla
ce003d2683 Translated using Weblate (Czech)
Currently translated at 100.0% (532 of 532 strings)
2020-02-07 21:15:46 +01:00
Osoitz
75248d7a12 Translated using Weblate (Basque)
Currently translated at 100.0% (532 of 532 strings)
2020-02-07 21:15:45 +01:00
B0pol
06eff256f3 Translated using Weblate (Esperanto)
Currently translated at 100.0% (532 of 532 strings)
2020-02-07 21:15:44 +01:00
B0pol
a476f332f7 Translated using Weblate (German)
Currently translated at 100.0% (532 of 532 strings)
2020-02-07 21:15:43 +01:00
Oğuz Ersen
6d49148c32 Translated using Weblate (Turkish)
Currently translated at 100.0% (532 of 532 strings)
2020-02-07 21:15:43 +01:00
Allan Nordhøy
85acc53d40 Spelling: Video thumbnail shown 2020-02-07 18:06:09 +01:00
Allan Nordhøy
f319e3e75a Spelling: Treat the NewPipe makers to something you like 2020-02-07 18:01:45 +01:00
Allan Nordhøy
3abc660eb3 Spelling: Install the fresh NewPipe version. 2020-02-07 17:57:38 +01:00
Allan Nordhøy
4c13dda1f9 Spelling: Could not establish secure connection 2020-02-07 17:55:37 +01:00
Allan Nordhøy
294c35b2fb Spelling: the settings
Co-Authored-By: Tobias Groza <TobiGr@users.noreply.github.com>
2020-02-07 17:51:14 +01:00
bopol
badaff8ebc refactor Description 2020-02-07 14:14:55 +01:00
bopol
7045f9711c fix thumbnail for PeerTube, and description changes
description:
- PeerTube: it's now full description (it cut at 250 characters before), and it displays ok (newlines are ok, but markdown isn't)
- MediaCCC: descriptions are now displayed well (newlines added)
- YouTube: timestamps in descriptions are clickable and work

more PeerTube fixes:
thumbnail is now high quality
age limit is now handled
upload date in «recently added» feed is good now (it was one hour delayed)
all fixes come from https://github.com/TeamNewPipe/NewPipeExtractor/pull/239, so it need to be merged before this PR
2020-02-06 22:42:09 +01:00
kapodamy
aaf5d7b89c Update DataReader.java
make rewind() method fully rewind the stream
2020-02-06 17:00:32 -03:00
Tobias Groza
487952f52e Merge pull request #3053 from harshlele/copy-comment-long-press
added ability to copy comments on long press
2020-02-06 20:35:30 +01:00
harshlele
34e31807fc removed empty line 2020-02-06 18:33:06 +05:30
harshlele
21184f8755 Update CommentsMiniInfoItemHolder.java
Co-Authored-By: yausername <5203007+yausername@users.noreply.github.com>
2020-02-05 14:48:39 +05:30
nautilusx
2bac66b5fe Translated using Weblate (German)
Currently translated at 99.8% (531 of 532 strings)
2020-02-05 01:01:07 +01:00
Igor Nedoboy
b5f069d080 Translated using Weblate (Russian)
Currently translated at 100.0% (532 of 532 strings)
2020-02-04 19:16:46 +01:00
Harshal Lele
bc393e6bcd removed settings entry 2020-02-04 18:01:39 +05:30
Harshal Lele
af411a61ae added ability to copy comments on long press 2020-02-04 16:40:57 +05:30
Hosted Weblate
2805850711 Merge branch 'origin/dev' into Weblate. 2020-02-03 21:20:50 +01:00
Jeff Huang
0f0a367174 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (530 of 530 strings)
2020-02-03 21:20:48 +01:00
MohammedSR Vevo
7009dc574f Translated using Weblate (Kurdish)
Currently translated at 99.8% (529 of 530 strings)
2020-02-03 21:20:48 +01:00
Marian Hanzel
6941917c75 Translated using Weblate (Slovak)
Currently translated at 98.5% (522 of 530 strings)
2020-02-03 21:20:47 +01:00
Isak Holmström
9560cf59be Translated using Weblate (Swedish)
Currently translated at 87.9% (466 of 530 strings)
2020-02-03 21:20:35 +01:00
B0pol
0a2374892c Translated using Weblate (French)
Currently translated at 100.0% (530 of 530 strings)
2020-02-03 21:20:35 +01:00
JoC
5d5c2ae2ed Translated using Weblate (Spanish)
Currently translated at 100.0% (530 of 530 strings)
2020-02-03 21:20:34 +01:00
WaldiS
2cceb048e3 Translated using Weblate (Polish)
Currently translated at 99.8% (529 of 530 strings)
2020-02-03 21:20:33 +01:00
Yaron Shahrabani
ed9c85b25a Translated using Weblate (Hebrew)
Currently translated at 99.8% (529 of 530 strings)
2020-02-03 21:20:32 +01:00
Vojtěch Šamla
bb8bcf3c33 Translated using Weblate (Czech)
Currently translated at 100.0% (530 of 530 strings)
2020-02-03 21:20:31 +01:00
B0pol
b5684ee7df Translated using Weblate (Esperanto)
Currently translated at 100.0% (530 of 530 strings)
2020-02-03 21:20:30 +01:00
Oğuz Ersen
2c27f784f7 Translated using Weblate (Turkish)
Currently translated at 100.0% (530 of 530 strings)
2020-02-03 21:20:29 +01:00
Emin Tufan Çetin
46c1155c64 Translated using Weblate (Turkish)
Currently translated at 100.0% (530 of 530 strings)
2020-02-03 21:20:29 +01:00
Tobias Groza
471ce4a24b Merge pull request #3035 from Stypox/recaptcha
Fix ReCaptcha activity and correctly save obtained cookies
2020-02-02 22:16:21 +01:00
Stypox
b6841158df Remove unused imports and clean up comment style 2020-02-02 21:48:45 +01:00
Stypox
3372bacc62 Merge branch 'dev' into recaptcha 2020-02-02 21:36:15 +01:00
Stypox
6da9096176 Fix addYoutubeCookies functions (Yt changed things lately) 2020-02-02 21:33:07 +01:00
Stypox
244009a1cd Change "Unlink" to "Unhook" in unhook_checkbox string
"Unlink" is not an english word, and "Unhook" is used everywhere in the code
2020-02-02 15:54:31 +01:00
Stypox
0f22833ad5 Save and restore whether pitch and tempo are unhooked or not
Fixes #1536
2020-02-02 15:52:35 +01:00
Stypox
b589ee6c26 Merge pull request #2954 from XiangRongLin/1907renamePlaylist
Rename local playlist by long-clicking in BookmarkFragment.
2020-02-02 14:34:54 +01:00
Emin Tufan Çetin
9f0efdd544 Translated using Weblate (Turkish)
Currently translated at 100.0% (530 of 530 strings)
2020-02-02 13:43:18 +01:00
Oğuz Ersen
07c7398a96 Translated using Weblate (Turkish)
Currently translated at 100.0% (530 of 530 strings)
2020-02-02 13:43:18 +01:00
Xiang Rong Lin
a117e459b0 Use AlertDialog.Builder instead of BookmarkDialog class for the same look.
Use "rename" string instead of "save" string.
2020-02-02 12:54:43 +01:00
chr_56
7568af408a fix wrong strings in Simplified Chinese 2020-02-02 09:42:56 +08:00
kapodamy
d1801e1dbc Merge branch 'dev' into m4a-stsc-stco 2020-02-01 18:59:22 -03:00
Igor Nedoboy
38d193899c Translated using Weblate (Russian)
Currently translated at 100.0% (530 of 530 strings)
2020-02-01 20:18:24 +01:00
Stypox
f95d51b307 Merge branch 'dev' of github.com:TeamNewPipe/NewPipe into recaptcha 2020-02-01 18:27:00 +01:00
Stypox
1bf55c2139 Remove left-behind Log 2020-02-01 18:24:16 +01:00
Stypox
9b09028440 Try to extract cookies just before closing recaptcha activity
Even if the page didn't auto-close
2020-02-01 18:24:16 +01:00
Stypox
0cc890a1d1 Move "Done" button and make it theme conpliant in ReCaptcha 2020-02-01 18:24:16 +01:00
Stypox
fe138f6d61 Improve formatting 2020-02-01 18:24:16 +01:00
Stypox
4e1638f86e Remove space between "Done" button and ReCaptchaActivity title 2020-02-01 18:24:16 +01:00
Stypox
daa4fd5103 Fix ReCaptchaActivity crash and save cookies correctly 2020-02-01 18:24:16 +01:00
Stypox
a3d8848825 Add "Done" drawable (only white since it is used on toolbar) 2020-02-01 18:24:16 +01:00
Stypox
61d102dc75 Change recaptcha string names to match style 2020-02-01 18:24:16 +01:00
Markus Richter
c0519d8313 fixes #3021, see also https://github.com/TeamNewPipe/NewPipe-legacy/pull/21 2020-02-01 18:24:16 +01:00
Hosted Weblate
48a2d2d24b Merge branch 'origin/dev' into Weblate. 2020-02-01 17:48:01 +01:00
Isak Holmström
fb0d626cb2 Translated using Weblate (Swedish)
Currently translated at 88.2% (465 of 527 strings)
2020-02-01 17:47:58 +01:00
B0pol
766326ad8c Translated using Weblate (French)
Currently translated at 100.0% (527 of 527 strings)
2020-02-01 17:47:57 +01:00
C. Rüdinger
2a903f66dd Translated using Weblate (German)
Currently translated at 99.8% (526 of 527 strings)
2020-02-01 17:47:55 +01:00
Xiang Rong Lin
8712310ad9 Move more log statements into "if (DEBUG)" 2020-02-01 16:36:45 +01:00
XiangRongLin
e8c3ab87c4 Merge branch 'dev' into 1907renamePlaylist 2020-02-01 16:29:21 +01:00
Xiang Rong Lin
90c20f124b Move log statement into "if (DEBUG)" 2020-02-01 16:27:53 +01:00
chr56
cd225eb5fe Merge branch 'dev' into dev 2020-02-01 23:14:00 +08:00
Tobias Groza
14e852237f Merge pull request #2921 from B0pol/dev
Add language selector to change the app language
2020-02-01 15:47:13 +01:00
TobiGr
d36ac7a5de Improve formatting 2020-02-01 15:35:33 +01:00
bopol
55a138e8da fix toast on app language change
I forgot to change the key here when I renamed it
2020-02-01 15:30:51 +01:00
bopol
c5e6bb58bc Merge remote-tracking branch 'upstream/dev' into dev
merging dev
2020-02-01 15:11:01 +01:00
TobiGr
2642d6f5f0 Merge remote-tracking branch 'Weblate/dev' into dev 2020-02-01 14:32:21 +01:00
Tobias Groza
bcb3cb9125 Merge pull request #3004 from harshlele/ask-overlay-perm-settings
ask for display over other apps permission in settings
2020-02-01 14:28:02 +01:00
TobiGr
f7203d4ac9 Fix formatting and use lamda functions 2020-02-01 13:41:03 +01:00
bopol
6be23a0a6f fix wrong language shown many popup dialogs
Changed android.R.string.ok, which is "OK", into R.string.finish, which is also OK, but from our strings
Then for a small amount of languages that don't have Android translation, it will show the good string.
2020-02-01 09:44:49 +01:00
nautilusx
089a9f1a9c Translated using Weblate (German)
Currently translated at 100.0% (527 of 527 strings)
2020-01-31 18:06:46 +01:00
Abu Sarim Hindi
2977de1df2 Translated using Weblate (Urdu)
Currently translated at 100.0% (527 of 527 strings)
2020-01-30 22:00:38 +01:00
Hosted Weblate
eab3f8b3ff Merge branch 'origin/dev' into Weblate. 2020-01-29 22:50:16 +01:00
Abu Sarim Hindi
d686a2c9dc Translated using Weblate (Urdu)
Currently translated at 100.0% (527 of 527 strings)
2020-01-29 22:50:13 +01:00
Gergely Szarka
d34e5f78a9 Translated using Weblate (Hungarian)
Currently translated at 67.4% (355 of 527 strings)
2020-01-29 22:50:11 +01:00
bopol
edc9d47da7 app language: refactoring
renamed NewPipe's language into App language, and same for all the
concerning thing (keys, comments…)

we now call assureCorrectAppLanguage(CONTEXT) in activities needing it
instead of changeAppLanguage(getAppLocale(CONTEXT), RESOURCES)
changeAppLanguage becomes private.
2020-01-29 21:21:00 +01:00
kapodamy
0c5608506e typo fixup 2020-01-29 16:06:40 -03:00
kapodamy
bda6139f42 Merge branch 'dev' into m4a-stsc-stco 2020-01-29 15:58:20 -03:00
kapodamy
1ae8ca1e21 Merge branch 'm4a-stsc-stco' of https://github.com/kapodamy/NewPipe into m4a-stsc-stco 2020-01-29 16:08:32 -03:00
kapodamy
342377e69a restore offset after writting lastest CTTS entries 2020-01-29 16:04:24 -03:00
Tobias Groza
0447e4e664 Merge pull request #3032 from mqus/fix_subtitles
Fixes #3021
2020-01-29 15:10:05 +01:00
Markus Richter
fd3d61c6a0 fixes #3021, see also https://github.com/TeamNewPipe/NewPipe-legacy/pull/21 2020-01-29 13:48:02 +01:00
chr56
69bf1c5d81 Merge branch 'dev' into dev 2020-01-29 12:14:21 +08:00
Abu Sarim Hindi
fbf6351b99 Translated using Weblate (Urdu)
Currently translated at 100.0% (527 of 527 strings)
2020-01-28 22:01:31 +01:00
Harshal Lele
a78762756a reformatted code 2020-01-28 20:54:24 +05:30
Harshal Lele
1f24c18614 reformatted and commented code 2020-01-28 20:14:35 +05:30
Igor Nedoboy
153790d80a Translated using Weblate (Russian)
Currently translated at 100.0% (527 of 527 strings)
2020-01-28 12:49:24 +01:00
Hosted Weblate
e98f27cb66 Merge branch 'origin/dev' into Weblate. 2020-01-28 04:20:51 +01:00
Abu Sarim Hindi
c17d80948c Translated using Weblate (Urdu)
Currently translated at 100.0% (527 of 527 strings)
2020-01-28 04:20:45 +01:00
Ryan
c486368b9b Translated using Weblate (Korean)
Currently translated at 100.0% (527 of 527 strings)
2020-01-28 04:20:44 +01:00
Laura Arjona Reina
42bb96af23 Translated using Weblate (Spanish)
Currently translated at 100.0% (527 of 527 strings)
2020-01-28 04:20:41 +01:00
Sithananthan
e082976914 Translated using Weblate (Tamil)
Currently translated at 43.3% (228 of 527 strings)
2020-01-28 04:20:41 +01:00
bopol
156a2eb4ff update prettytime dependency
see https://github.com/TeamNewPipe/NewPipe/pull/2921#issuecomment-572601812
It will add Esperanto, add bengali, update vietnamese
pretty time is the library used in the home page: … days ago
2020-01-27 19:32:40 +01:00
B0pol
e94981e6f7 Merge branch 'dev' into dev 2020-01-27 19:24:18 +01:00
Tobias Groza
be92921034 Merge pull request #2310 from christophehenry/add-kodi-share-player
Add send to Kodi button to player next to share button
2020-01-27 10:46:59 +01:00
Christophe
94403a9c3c Add send to Kodi button to player next to share button 2020-01-27 10:27:24 +01:00
XiangRongLin
b5ea61a079 Merge branch 'dev' into 1907renamePlaylist 2020-01-26 20:36:18 +01:00
Hosted Weblate
af9e2420a6 Merge branch 'origin/dev' into Weblate. 2020-01-26 20:21:35 +01:00
Ian Emmanuel M. Enanoria
14b3cf7ccd Translated using Weblate (Filipino)
Currently translated at 12.7% (67 of 527 strings)
2020-01-26 20:21:29 +01:00
AioiLight
9c58a07a72 Translated using Weblate (Japanese)
Currently translated at 99.8% (526 of 527 strings)
2020-01-26 20:21:28 +01:00
Tobias Groza
609855f774 Merge pull request #2917 from raphj/patch-1
Allow a BasePlayer to start paused
2020-01-26 17:39:39 +01:00
XiangRongLin
37409e7d90 Merge branch 'dev' into 1907renamePlaylist 2020-01-26 15:34:12 +01:00
Tobias Groza
cc83991d8d Merge pull request #2958 from kapodamy/android5-temp-dir-issue
fix #2889
2020-01-26 11:04:45 +01:00
Tobias Groza
bf5e94fc1a Merge pull request #2957 from kapodamy/subtitles
Rewrite ttml conversion
2020-01-26 11:03:13 +01:00
harshlele
52420d4bf1 Merge branch 'dev' into ask-overlay-perm-settings 2020-01-26 09:57:30 +05:30
Tobias Groza
7f7bf8474e Add link to FAQ in README 2020-01-25 21:35:07 +01:00
Harshal Lele
e1145f16f2 ask for display over other apps permission in settings 2020-01-25 22:30:49 +05:30
XiangRongLin
b430a23df1 Merge branch 'dev' into 1907renamePlaylist 2020-01-25 14:24:07 +01:00
Hosted Weblate
fa7173b3d5 Merge branch 'origin/dev' into Weblate. 2020-01-24 21:41:36 +01:00
Abu Sarim Hindi
b2d78786c2 Translated using Weblate (Urdu)
Currently translated at 100.0% (527 of 527 strings)
2020-01-24 21:41:31 +01:00
B0pol
489420e855 Merge branch 'dev' into dev 2020-01-24 20:19:51 +01:00
TobiGr
5bc0d2c31b Merge branch 'master' into dev 2020-01-24 19:20:26 +01:00
Allan Nordhøy
e9fda96aa1 Translated using Weblate (Norwegian Bokmål)
Currently translated at 98.3% (518 of 527 strings)
2020-01-24 09:26:04 +01:00
Abu Sarim Hindi
64b0ccd574 Translated using Weblate (Urdu)
Currently translated at 100.0% (527 of 527 strings)
2020-01-24 09:26:04 +01:00
B0pol
d3aadc71b1 Translated using Weblate (Urdu)
Currently translated at 100.0% (527 of 527 strings)
2020-01-24 09:26:03 +01:00
B0pol
c21ccef7bc Translated using Weblate (Esperanto)
Currently translated at 100.0% (527 of 527 strings)
2020-01-24 09:26:03 +01:00
TobiGr
2152375227 Bump version to 0.18.2 [hotfix release] 2020-01-24 02:30:08 +01:00
TobiGr
10d57afaac Update extractor version 2020-01-24 02:29:21 +01:00
Abu Sarim Hindi
e224f8ca28 Translated using Weblate (Urdu)
Currently translated at 100.0% (527 of 527 strings)
2020-01-24 01:13:33 +01:00
Allan Nordhøy
1f975c0a3a Translated using Weblate (Norwegian Bokmål)
Currently translated at 98.1% (517 of 527 strings)
2020-01-23 00:33:15 +01:00
MohammedSR Vevo
ce075395a1 Translated using Weblate (Kurdish)
Currently translated at 100.0% (527 of 527 strings)
2020-01-23 00:33:13 +01:00
chr56
167653ac60 fix wrong strings in values-zh-rCN. 2020-01-22 13:00:00 +08:00
chr56
ee0f94c232 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (527 of 527 strings)
2020-01-22 04:52:39 +01:00
Xiang Rong Lin
0ed3354cee Use custom dialog to edit and delete local playlists at once 2020-01-21 20:56:06 +01:00
kapodamy
b8f726153f Merge branch 'dev' into subtitles 2020-01-20 23:23:51 -03:00
kapodamy
afc362d2b6 readability changes 2020-01-20 23:33:30 -03:00
kapodamy
776d8a4406 Merge branch 'dev' into android5-temp-dir-issue 2020-01-20 23:23:44 -03:00
kapodamy
7718581882 Merge branch 'dev' into m4a-stsc-stco 2020-01-20 23:23:39 -03:00
Hosted Weblate
ba245c49da Merge branch 'origin/dev' into Weblate. 2020-01-19 20:41:20 +01:00
Allan Nordhøy
cf60033424 Translated using Weblate (Norwegian Bokmål)
Currently translated at 96.4% (508 of 527 strings)
2020-01-19 20:41:14 +01:00
B0pol
0e39071b5e Translated using Weblate (Urdu)
Currently translated at 94.3% (497 of 527 strings)
2020-01-19 20:41:14 +01:00
MohammedSR Vevo
b6028cef5b Translated using Weblate (Kurdish)
Currently translated at 100.0% (527 of 527 strings)
2020-01-19 20:41:13 +01:00
Jeff Huang
62906fb84a Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (527 of 527 strings)
2020-01-19 20:41:13 +01:00
Matsuri
4797cd9184 Translated using Weblate (Chinese (Simplified))
Currently translated at 98.5% (519 of 527 strings)
2020-01-19 20:41:12 +01:00
B0pol
366c55c8f4 Translated using Weblate (Polish)
Currently translated at 100.0% (527 of 527 strings)
2020-01-19 20:41:12 +01:00
zmni
7e93456805 Translated using Weblate (Indonesian)
Currently translated at 99.8% (526 of 527 strings)
2020-01-19 20:41:12 +01:00
thami simo
de1a92539a Translated using Weblate (Arabic)
Currently translated at 100.0% (527 of 527 strings)
2020-01-19 20:41:11 +01:00
zeritti
84dd1a688e Translated using Weblate (Czech)
Currently translated at 100.0% (527 of 527 strings)
2020-01-19 20:41:10 +01:00
B0pol
36c4063db6 Translated using Weblate (Esperanto)
Currently translated at 100.0% (527 of 527 strings)
2020-01-19 20:41:08 +01:00
Osoitz
9c9a432ea0 Translated using Weblate (Basque)
Currently translated at 100.0% (527 of 527 strings)
2020-01-19 20:41:07 +01:00
ssantos
1c53b22239 Translated using Weblate (Portuguese)
Currently translated at 100.0% (527 of 527 strings)
2020-01-19 20:41:06 +01:00
pjammo
5dbab85505 Translated using Weblate (Italian)
Currently translated at 100.0% (527 of 527 strings)
2020-01-19 20:41:06 +01:00
Igor Nedoboy
2873f723e8 Translated using Weblate (Russian)
Currently translated at 100.0% (527 of 527 strings)
2020-01-19 20:41:04 +01:00
B0pol
6b7043fb9d Translated using Weblate (French)
Currently translated at 100.0% (527 of 527 strings)
2020-01-19 20:41:04 +01:00
B0pol
9d5612d104 Translated using Weblate (German)
Currently translated at 100.0% (527 of 527 strings)
2020-01-19 20:41:03 +01:00
B0pol
e58088d290 Merge branch 'dev' into dev 2020-01-19 18:09:17 +01:00
Xiang Rong Lin
77aa12dd81 Rename local playlist by long-clicking in BookmarkFragment.
After long clicking on a local playlist, show a dialog with 2 options for "rename" and "delete"
Rename shows another dialog to let the user rename the playlist.
Delete lets the user delete a playlist like before.
2020-01-19 14:39:40 +01:00
Stypox
8c3be2c9df Merge pull request #2960 from karkaminski/issue-#2254
Issue #2254
2020-01-19 12:55:55 +01:00
Stypox
266c3d03fc Merge branch 'dev' into issue-#2254 2020-01-19 12:50:08 +01:00
bopol
e08e724573 upload date in description now matches newpipe's language 2020-01-18 10:46:53 +01:00
bopol
b155f23d27 fix: wrong language shown in playback parameters dialog
This is a hardly reproduceable bug that I hopefully fixed. After a long time of watching videos, you could have your system language shown in playback parameters dialog.
Calling changeAppLanguage(getAppLocale(…),…) onCreate will most certainly fix this bug
2020-01-18 09:46:38 +01:00
kapodamy
a2d3e2c7e0 2 typo fixup
* add missing namespace of StandardCharsets
* use an unused constructor argument
2020-01-18 01:10:25 -03:00
kapodamy
ed18466c3b Merge branch 'dev' into subtitles 2020-01-18 00:35:48 -03:00
kapodamy
845767e2f8 StandardCharsets.UTF_8 instead of Charset.forName("utf-8") 2020-01-18 00:43:38 -03:00
kapodamy
a0548fdbf8 Merge branch 'dev' into android5-temp-dir-issue 2020-01-18 00:35:38 -03:00
kapodamy
b837912e75 Merge branch 'dev' into m4a-stsc-stco 2020-01-18 00:35:35 -03:00
B0pol
0cd9fb32a8 Merge branch 'dev' into dev 2020-01-18 00:26:04 +01:00
Raphaël Jakse
7dbb2b206c Simplify an if expression 2020-01-17 11:49:33 +01:00
Raphaël Jakse
ef90493c27 Deduplicate code switching to another player into a function 2020-01-17 11:49:20 +01:00
Raphaël Jakse
570dded8d6 Add field START_PAUSED to the Player Intent
This allows fixing spurious playback resume when minimizing to the background player.
2020-01-16 20:57:55 +01:00
B0pol
9d8fcbbffe fix: wrong language shown when rotating screen in popup player 2020-01-15 08:33:57 +01:00
chr56
590722d929 manually update the Simplified Chinese lang file.
/values-b+zh+HANS+CN was updated.
Action: copy file in /values-b+zh+HANS+CN to /values-zh-rCN
2020-01-15 12:30:17 +08:00
karkaminski
a0ee1b1653 Merge branch 'dev' into issue-#2254 2020-01-14 22:23:32 +01:00
Karol Kaminski
b965f88eb2 removed main_menu.xml 2020-01-14 22:08:07 +01:00
Karol Kaminski
a228e702da menu-item History visibility accordingly to settings 2020-01-14 19:30:36 +01:00
bopol
105981b2eb made system translatable + renamed it to system's language 2020-01-14 19:11:46 +01:00
bopol
055365a449 added Occitan to the selector 2020-01-14 14:26:53 +01:00
bopol
f8a7aac40d fixed indonesian, see https://stackoverflow.com/questions/13291578/how-to-localize-an-android-app-in-indonesian-language 2020-01-14 14:15:42 +01:00
chr56
6712ea5e6f Merge branch 'dev' into dev 2020-01-14 21:00:40 +08:00
B0pol
382e69273e Merge branch 'dev' into dev 2020-01-14 11:11:45 +01:00
kapodamy
9b71828b97 implement sgpd and sbgp boxes in audio tracks 2020-01-14 01:08:46 -03:00
kapodamy
00eddcb237 android 5 (lollipop) fixup
this commit attempts to fix the pickAvailableTemporalDir() method in ROMS that not are CTS compliant.
2020-01-14 00:05:34 -03:00
kapodamy
49cc643dcc decrease the size of samples per chunk 2020-01-14 00:04:53 -03:00
kapodamy
42ec6f0810 ttml to srt conversion
rewrite SubtitleConverter (use JSoup library instead, remove unused methods)
2020-01-14 00:04:16 -03:00
Karol Kaminski
9d773d6e8a removed dot menu where its no longer needed 2020-01-13 20:28:32 +01:00
bopol
11d06dc86d remove todo as it's already done 2020-01-10 16:03:24 +01:00
bopol
8f46432391 fixed some activities where the wrong languages would be set 2020-01-10 15:50:15 +01:00
bopol
b32935a1b0 app language now changes time formatting (3hrs ago), was system language b4 2020-01-09 15:51:41 +01:00
bopol
ed9a3517c6 removed unused imports 2020-01-09 12:15:01 +01:00
B0pol
e0a39efa2b Merge branch 'dev' into dev 2020-01-09 10:07:22 +01:00
bopol
3ad0e313ca changed the way to change language, now is «NewPipe's language» selector 2020-01-09 09:40:05 +01:00
Allan Nordhøy
bca547ce44 \'Storage Access Framework\' 2020-01-09 04:38:47 +01:00
Allan Nordhøy
6bc697f926 Continue ending playback queue 2020-01-09 04:36:39 +01:00
Allan Nordhøy
694013c9df Spelling: Language reworked 2 2020-01-08 21:55:17 +01:00
bopol
dea1e0dcb9 Update localizations settings
1) now, on « content language » change, it will also change the app language
2) added Esperanto to the list of language in content language
2020-01-04 21:38:27 +01:00
chr56
ab7f3c7399 Merge branch 'dev' into dev 2019-12-31 17:29:46 +08:00
chr56
9f789167da Merge branch 'dev' into dev 2019-12-21 17:31:50 +08:00
chr_56
9309159c38 copy file in /values-b+zh+HANS+CN to /values-zh-rCN ,in order to manually update the lang file. 2019-12-14 21:25:19 +08:00
chr_56
8e45296826 remove values-cmn/strings.xml (useless) 2019-12-14 21:16:40 +08:00
130 changed files with 3320 additions and 2900 deletions

View File

@@ -13,7 +13,7 @@
</p>
<hr>
<p align="center"><a href="#screenshots">Screenshots</a> &bull; <a href="#description">Description</a> &bull; <a href="#features">Features</a> &bull; <a href="#updates">Updates</a> &bull; <a href="#contribution">Contribution</a> &bull; <a href="#donate">Donate</a> &bull; <a href="#license">License</a></p>
<p align="center"><a href="https://newpipe.schabi.org">Website</a> &bull; <a href="https://newpipe.schabi.org/blog/">Blog</a> &bull; <a href="https://newpipe.schabi.org/press/">Press</a></p>
<p align="center"><a href="https://newpipe.schabi.org">Website</a> &bull; <a href="https://newpipe.schabi.org/blog/">Blog</a> &bull; <a href="https://newpipe.schabi.org/FAQ/">FAQ</a> &bull; <a href="https://newpipe.schabi.org/press/">Press</a></p>
<hr>
<b>WARNING: THIS IS A BETA VERSION, THEREFORE YOU MAY ENCOUNTER BUGS. IF YOU DO, OPEN AN ISSUE VIA OUR GITHUB REPOSITORY.</b>

2
app/.gitignore vendored
View File

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

View File

@@ -11,8 +11,8 @@ android {
applicationId "org.schabi.newpipe"
minSdkVersion 19
targetSdkVersion 28
versionCode 810
versionName "0.18.1"
versionCode 860
versionName "0.18.6"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
@@ -53,6 +53,7 @@ ext {
okHttpLibVersion = '3.12.6'
icepickLibVersion = '3.2.0'
stethoLibVersion = '1.5.0'
markwonVersion = '4.2.1'
}
dependencies {
@@ -62,7 +63,7 @@ dependencies {
exclude module: 'support-annotations'
})
implementation 'com.github.TeamNewPipe:NewPipeExtractor:2ee558fb'
implementation 'com.github.TeamNewPipe:NewPipeExtractor:6446abc6d'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.23.0'
@@ -94,7 +95,7 @@ dependencies {
implementation 'io.reactivex.rxjava2:rxjava:2.2.2'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
implementation 'com.jakewharton.rxbinding2:rxbinding:2.1.1'
implementation 'org.ocpsoft.prettytime:prettytime:4.0.1.Final'
implementation 'org.ocpsoft.prettytime:prettytime:4.0.3.Final'
implementation "androidx.room:room-runtime:${roomDbLibVersion}"
implementation "androidx.room:room-rxjava2:${roomDbLibVersion}"
@@ -108,4 +109,7 @@ dependencies {
implementation "com.squareup.okhttp3:okhttp:${okHttpLibVersion}"
debugImplementation "com.facebook.stetho:stetho-okhttp3:${stethoLibVersion}"
implementation "io.noties.markwon:core:${markwonVersion}"
implementation "io.noties.markwon:linkify:${markwonVersion}"
}

View File

@@ -61,7 +61,8 @@
android:name=".player.MainVideoPlayer"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:label="@string/app_name"
android:launchMode="singleTask"/>
android:launchMode="singleTask"
android:theme="@style/VideoPlayerTheme"/>
<activity
android:name=".settings.SettingsActivity"
@@ -112,7 +113,7 @@
<activity
android:name=".ReCaptchaActivity"
android:label="@string/reCaptchaActivity"/>
android:label="@string/recaptcha"/>
<provider
android:name="androidx.core.content.FileProvider"

View File

@@ -99,7 +99,7 @@ public class App extends Application {
NewPipe.init(getDownloader(),
Localization.getPreferredLocalization(this),
Localization.getPreferredContentCountry(this));
Localization.init();
Localization.init(getApplicationContext());
StateSaver.init(this);
initNotificationChannel();

View File

@@ -38,7 +38,7 @@ import okhttp3.ResponseBody;
import static org.schabi.newpipe.MainActivity.DEBUG;
public class DownloaderImpl extends Downloader {
public static final String USER_AGENT = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0";
public static final String USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Firefox/68.0";
private static DownloaderImpl instance;
private String mCookies;
@@ -171,7 +171,8 @@ public class DownloaderImpl extends Downloader {
responseBodyToReturn = body.string();
}
return new Response(response.code(), response.message(), response.headers().toMultimap(), responseBodyToReturn);
final String latestUrl = response.request().url().toString();
return new Response(response.code(), response.message(), response.headers().toMultimap(), responseBodyToReturn, latestUrl);
}
/**

View File

@@ -31,7 +31,6 @@ import android.preference.PreferenceManager;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.Window;
@@ -56,7 +55,6 @@ import androidx.fragment.app.FragmentManager;
import com.google.android.material.navigation.NavigationView;
import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.ServiceList;
import org.schabi.newpipe.extractor.StreamingService;
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.extractor.services.peertube.PeertubeInstance;
@@ -67,6 +65,7 @@ import org.schabi.newpipe.fragments.list.search.SearchFragment;
import org.schabi.newpipe.report.ErrorActivity;
import org.schabi.newpipe.util.Constants;
import org.schabi.newpipe.util.KioskTranslator;
import org.schabi.newpipe.util.Localization;
import org.schabi.newpipe.util.NavigationHelper;
import org.schabi.newpipe.util.PeertubeHelper;
import org.schabi.newpipe.util.PermissionHelper;
@@ -78,6 +77,8 @@ import org.schabi.newpipe.util.ThemeHelper;
import java.util.ArrayList;
import java.util.List;
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
public class MainActivity extends AppCompatActivity {
private static final String TAG = "MainActivity";
public static final boolean DEBUG = !BuildConfig.BUILD_TYPE.equals("release");
@@ -113,9 +114,9 @@ public class MainActivity extends AppCompatActivity {
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) {
TLSSocketFactoryCompat.setAsDefault();
}
ThemeHelper.setTheme(this, ServiceHelper.getSelectedServiceId(this));
assureCorrectAppLanguage(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
@@ -419,6 +420,8 @@ public class MainActivity extends AppCompatActivity {
@Override
protected void onResume() {
assureCorrectAppLanguage(this);
Localization.init(getApplicationContext()); //change the date format to match the selected language on resume
super.onResume();
// close drawer on return, and don't show animation, so its looks like the drawer isn't open
@@ -449,6 +452,10 @@ public class MainActivity extends AppCompatActivity {
sharedPreferences.edit().putBoolean(Constants.KEY_MAIN_PAGE_CHANGE, false).apply();
NavigationHelper.openMainActivity(this);
}
final boolean isHistoryEnabled = sharedPreferences.getBoolean(
getString(R.string.enable_watch_history_key), true);
drawerItems.getMenu().findItem(ITEM_ID_HISTORY).setVisible(isHistoryEnabled);
}
@Override
@@ -551,8 +558,6 @@ public class MainActivity extends AppCompatActivity {
if (!(fragment instanceof SearchFragment)) {
findViewById(R.id.toolbar).findViewById(R.id.toolbar_search_container).setVisibility(View.GONE);
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.main_menu, menu);
}
ActionBar actionBar = getSupportActionBar();
@@ -574,14 +579,6 @@ public class MainActivity extends AppCompatActivity {
case android.R.id.home:
onHomeButtonPressed();
return true;
case R.id.action_show_downloads:
return NavigationHelper.openDownloads(this);
case R.id.action_history:
NavigationHelper.openStatisticFragment(getSupportFragmentManager());
return true;
case R.id.action_settings:
NavigationHelper.openSettings(this);
return true;
default:
return super.onOptionsItemSelected(item);
}

View File

@@ -1,20 +1,25 @@
package org.schabi.newpipe;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Build;
import android.os.Bundle;
import androidx.core.app.NavUtils;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.webkit.CookieManager;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import org.schabi.newpipe.util.ThemeHelper;
import androidx.annotation.NonNull;
/*
* Created by beneth <bmauduit@beneth.fr> on 06.12.16.
*
@@ -37,48 +42,46 @@ import android.webkit.WebViewClient;
public class ReCaptchaActivity extends AppCompatActivity {
public static final int RECAPTCHA_REQUEST = 10;
public static final String RECAPTCHA_URL_EXTRA = "recaptcha_url_extra";
public static final String TAG = ReCaptchaActivity.class.toString();
public static final String YT_URL = "https://www.youtube.com";
private String url;
private WebView webView;
private String foundCookies = "";
@Override
protected void onCreate(Bundle savedInstanceState) {
ThemeHelper.setTheme(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_recaptcha);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
url = getIntent().getStringExtra(RECAPTCHA_URL_EXTRA);
String url = getIntent().getStringExtra(RECAPTCHA_URL_EXTRA);
if (url == null || url.isEmpty()) {
url = YT_URL;
}
// Set return to Cancel by default
// set return to Cancel by default
setResult(RESULT_CANCELED);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setTitle(R.string.reCaptcha_title);
actionBar.setDisplayShowTitleEnabled(true);
}
webView = findViewById(R.id.reCaptchaWebView);
WebView myWebView = findViewById(R.id.reCaptchaWebView);
// Enable Javascript
WebSettings webSettings = myWebView.getSettings();
// enable Javascript
WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true);
ReCaptchaWebViewClient webClient = new ReCaptchaWebViewClient(this);
myWebView.setWebViewClient(webClient);
webView.setWebViewClient(new WebViewClient() {
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
handleCookies(url);
}
});
// Cleaning cache, history and cookies from webView
myWebView.clearCache(true);
myWebView.clearHistory();
// cleaning cache, history and cookies from webView
webView.clearCache(true);
webView.clearHistory();
android.webkit.CookieManager cookieManager = CookieManager.getInstance();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
cookieManager.removeAllCookies(aBoolean -> {});
@@ -86,77 +89,82 @@ public class ReCaptchaActivity extends AppCompatActivity {
cookieManager.removeAllCookie();
}
myWebView.loadUrl(url);
webView.loadUrl(url);
}
private class ReCaptchaWebViewClient extends WebViewClient {
private final Activity context;
private String mCookies;
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_recaptcha, menu);
ReCaptchaWebViewClient(Activity ctx) {
context = ctx;
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(false);
actionBar.setTitle(R.string.title_activity_recaptcha);
actionBar.setSubtitle(R.string.subtitle_activity_recaptcha);
}
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
// TODO: Start Loader
super.onPageStarted(view, url, favicon);
}
return true;
}
@Override
public void onPageFinished(WebView view, String url) {
String cookies = CookieManager.getInstance().getCookie(url);
// TODO: Stop Loader
// find cookies : s_gl & goojf and Add cookies to Downloader
if (find_access_cookies(cookies)) {
// Give cookies to Downloader class
DownloaderImpl.getInstance().setCookies(mCookies);
// Closing activity and return to parent
setResult(RESULT_OK);
finish();
}
}
private boolean find_access_cookies(String cookies) {
boolean ret = false;
String c_s_gl = "";
String c_goojf = "";
String[] parts = cookies.split("; ");
for (String part : parts) {
if (part.trim().startsWith("s_gl")) {
c_s_gl = part.trim();
}
if (part.trim().startsWith("goojf")) {
c_goojf = part.trim();
}
}
if (c_s_gl.length() > 0 && c_goojf.length() > 0) {
ret = true;
//mCookies = c_s_gl + "; " + c_goojf;
// Youtube seems to also need the other cookies:
mCookies = cookies;
}
return ret;
}
@Override
public void onBackPressed() {
saveCookiesAndFinish();
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
switch (id) {
case android.R.id.home: {
Intent intent = new Intent(this, org.schabi.newpipe.MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
NavUtils.navigateUpTo(this, intent);
case R.id.menu_item_done:
saveCookiesAndFinish();
return true;
}
default:
return false;
}
}
private void saveCookiesAndFinish() {
handleCookies(webView.getUrl()); // try to get cookies of unclosed page
if (!foundCookies.isEmpty()) {
// give cookies to Downloader class
DownloaderImpl.getInstance().setCookies(foundCookies);
setResult(RESULT_OK);
}
Intent intent = new Intent(this, org.schabi.newpipe.MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
NavUtils.navigateUpTo(this, intent);
}
private void handleCookies(String url) {
String cookies = CookieManager.getInstance().getCookie(url);
if (MainActivity.DEBUG) Log.d(TAG, "handleCookies: url=" + url + "; cookies=" + (cookies == null ? "null" : cookies));
if (cookies == null) return;
addYoutubeCookies(cookies);
// add other methods to extract cookies here
}
private void addYoutubeCookies(@NonNull String cookies) {
if (cookies.contains("s_gl=") || cookies.contains("goojf=") || cookies.contains("VISITOR_INFO1_LIVE=")) {
// youtube seems to also need the other cookies:
addCookie(cookies);
}
}
private void addCookie(String cookie) {
if (foundCookies.contains(cookie)) {
return;
}
if (foundCookies.isEmpty() || foundCookies.endsWith("; ")) {
foundCookies += cookie;
} else if (foundCookies.endsWith(";")) {
foundCookies += " " + cookie;
} else {
foundCookies += "; " + cookie;
}
}
}

View File

@@ -22,27 +22,30 @@ import android.widget.TextView;
import org.schabi.newpipe.BuildConfig;
import org.schabi.newpipe.R;
import org.schabi.newpipe.util.NavigationHelper;
import org.schabi.newpipe.util.ThemeHelper;
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
public class AboutActivity extends AppCompatActivity {
/**
* List of all software components
*/
private static final SoftwareComponent[] SOFTWARE_COMPONENTS = new SoftwareComponent[]{
new SoftwareComponent("Giga Get", "2014", "Peter Cai", "https://github.com/PaperAirplane-Dev-Team/GigaGet", StandardLicenses.GPL2),
new SoftwareComponent("NewPipe Extractor", "2017", "Christian Schabesberger", "https://github.com/TeamNewPipe/NewPipeExtractor", StandardLicenses.GPL3),
new SoftwareComponent("Giga Get", "2014 - 2015", "Peter Cai", "https://github.com/PaperAirplane-Dev-Team/GigaGet", StandardLicenses.GPL2),
new SoftwareComponent("NewPipe Extractor", "2017 - 2020", "Christian Schabesberger", "https://github.com/TeamNewPipe/NewPipeExtractor", StandardLicenses.GPL3),
new SoftwareComponent("Jsoup", "2017", "Jonathan Hedley", "https://github.com/jhy/jsoup", StandardLicenses.MIT),
new SoftwareComponent("Rhino", "2015", "Mozilla", "https://www.mozilla.org/rhino/", StandardLicenses.MPL2),
new SoftwareComponent("ACRA", "2013", "Kevin Gaudin", "http://www.acra.ch", StandardLicenses.APACHE2),
new SoftwareComponent("Universal Image Loader", "2011 - 2015", "Sergey Tarasevich", "https://github.com/nostra13/Android-Universal-Image-Loader", StandardLicenses.APACHE2),
new SoftwareComponent("CircleImageView", "2014 - 2017", "Henning Dodenhof", "https://github.com/hdodenhof/CircleImageView", StandardLicenses.APACHE2),
new SoftwareComponent("CircleImageView", "2014 - 2020", "Henning Dodenhof", "https://github.com/hdodenhof/CircleImageView", StandardLicenses.APACHE2),
new SoftwareComponent("NoNonsense-FilePicker", "2016", "Jonas Kalderstam", "https://github.com/spacecowboy/NoNonsense-FilePicker", StandardLicenses.MPL2),
new SoftwareComponent("ExoPlayer", "2014-2017", "Google Inc", "https://github.com/google/ExoPlayer", StandardLicenses.APACHE2),
new SoftwareComponent("RxAndroid", "2015", "The RxAndroid authors", "https://github.com/ReactiveX/RxAndroid", StandardLicenses.APACHE2),
new SoftwareComponent("RxJava", "2016-present", "RxJava Contributors", "https://github.com/ReactiveX/RxJava", StandardLicenses.APACHE2),
new SoftwareComponent("RxBinding", "2015", "Jake Wharton", "https://github.com/JakeWharton/RxBinding", StandardLicenses.APACHE2)
new SoftwareComponent("ExoPlayer", "2014 - 2020", "Google Inc", "https://github.com/google/ExoPlayer", StandardLicenses.APACHE2),
new SoftwareComponent("RxAndroid", "2015 - 2018", "The RxAndroid authors", "https://github.com/ReactiveX/RxAndroid", StandardLicenses.APACHE2),
new SoftwareComponent("RxJava", "2016 - 2020", "RxJava Contributors", "https://github.com/ReactiveX/RxJava", StandardLicenses.APACHE2),
new SoftwareComponent("RxBinding", "2015 - 2018", "Jake Wharton", "https://github.com/JakeWharton/RxBinding", StandardLicenses.APACHE2),
new SoftwareComponent("PrettyTime", "2012 - 2020", "Lincoln Baxter, III", "https://github.com/ocpsoft/prettytime", StandardLicenses.APACHE2),
new SoftwareComponent("Markwon", "2017 - 2020", "Noties", "https://github.com/noties/Markwon", StandardLicenses.APACHE2)
};
/**
@@ -62,8 +65,10 @@ public class AboutActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
assureCorrectAppLanguage(this);
super.onCreate(savedInstanceState);
ThemeHelper.setTheme(this);
this.setTitle(getString(R.string.title_activity_about));
setContentView(R.layout.activity_about);
@@ -83,13 +88,6 @@ public class AboutActivity extends AppCompatActivity {
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_about, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
@@ -99,11 +97,6 @@ public class AboutActivity extends AppCompatActivity {
case android.R.id.home:
finish();
return true;
case R.id.action_settings:
NavigationHelper.openSettings(this);
return true;
case R.id.action_show_downloads:
return NavigationHelper.openDownloads(this);
}
return super.onOptionsItemSelected(item);

View File

@@ -3,6 +3,7 @@ package org.schabi.newpipe.about;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.res.Resources;
import android.os.AsyncTask;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
@@ -14,6 +15,8 @@ import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.ref.WeakReference;
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
public class LicenseFragmentHelper extends AsyncTask<Object, Void, Integer> {
final WeakReference<Activity> weakReference;
@@ -55,15 +58,15 @@ public class LicenseFragmentHelper extends AsyncTask<Object, Void, Integer> {
wv.loadData(webViewData, "text/html; charset=UTF-8", null);
alert.setView(wv);
alert.setNegativeButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
});
assureCorrectAppLanguage(activity.getApplicationContext());
alert.setNegativeButton(getFinishString(activity), (dialog, which) -> dialog.dismiss());
alert.show();
}
private static String getFinishString(Activity activity) {
return activity.getApplicationContext().getResources().getString(R.string.finish);
}
/**
* @param context the context to use
* @param license the license

View File

@@ -12,12 +12,14 @@ import android.view.MenuItem;
import android.view.ViewTreeObserver;
import org.schabi.newpipe.R;
import org.schabi.newpipe.settings.SettingsActivity;
import org.schabi.newpipe.util.NavigationHelper;
import org.schabi.newpipe.util.ThemeHelper;
import us.shandian.giga.service.DownloadManagerService;
import us.shandian.giga.ui.fragment.MissionsFragment;
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
public class DownloadActivity extends AppCompatActivity {
private static final String MISSIONS_FRAGMENT_TAG = "fragment_tag";
@@ -29,6 +31,7 @@ public class DownloadActivity extends AppCompatActivity {
i.setClass(this, DownloadManagerService.class);
startService(i);
assureCorrectAppLanguage(this);
ThemeHelper.setTheme(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_downloader);
@@ -74,15 +77,9 @@ public class DownloadActivity extends AppCompatActivity {
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home: {
case android.R.id.home:
onBackPressed();
return true;
}
case R.id.action_settings: {
Intent intent = new Intent(this, SettingsActivity.class);
startActivity(intent);
return true;
}
default:
return super.onOptionsItemSelected(item);
}

View File

@@ -11,15 +11,6 @@ import android.os.Bundle;
import android.os.Environment;
import android.os.IBinder;
import android.preference.PreferenceManager;
import androidx.annotation.IdRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.fragment.app.DialogFragment;
import androidx.documentfile.provider.DocumentFile;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.view.menu.ActionMenuItemView;
import androidx.appcompat.widget.Toolbar;
import android.util.Log;
import android.util.SparseArray;
import android.view.LayoutInflater;
@@ -34,6 +25,16 @@ import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.IdRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.view.menu.ActionMenuItemView;
import androidx.appcompat.widget.Toolbar;
import androidx.documentfile.provider.DocumentFile;
import androidx.fragment.app.DialogFragment;
import com.nononsenseapps.filepicker.Utils;
import org.schabi.newpipe.MainActivity;
@@ -78,6 +79,8 @@ import us.shandian.giga.service.DownloadManagerService;
import us.shandian.giga.service.DownloadManagerService.DownloadManagerBinder;
import us.shandian.giga.service.MissionState;
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
public class DownloadDialog extends DialogFragment implements RadioGroup.OnCheckedChangeListener, AdapterView.OnItemSelectedListener {
private static final String TAG = "DialogFragment";
private static final boolean DEBUG = MainActivity.DEBUG;
@@ -527,10 +530,11 @@ public class DownloadDialog extends DialogFragment implements RadioGroup.OnCheck
}
private void showFailedDialog(@StringRes int msg) {
assureCorrectAppLanguage(getContext());
new AlertDialog.Builder(context)
.setTitle(R.string.general_error)
.setMessage(msg)
.setNegativeButton(android.R.string.ok, null)
.setNegativeButton(getString(R.string.finish), null)
.create()
.show();
}
@@ -832,7 +836,6 @@ public class DownloadDialog extends DialogFragment implements RadioGroup.OnCheck
psArgs = new String[]{
selectedStream.getFormat().getSuffix(),
"false",// ignore empty frames
"false",// detect youtube duplicate lines
};
}
break;

View File

@@ -2,7 +2,6 @@ package org.schabi.newpipe.fragments.detail;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
@@ -18,7 +17,6 @@ import androidx.fragment.app.Fragment;
import androidx.core.content.ContextCompat;
import androidx.viewpager.widget.ViewPager;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import android.text.Html;
import android.text.Spanned;
@@ -58,6 +56,7 @@ import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.extractor.exceptions.ParsingException;
import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor;
import org.schabi.newpipe.extractor.stream.AudioStream;
import org.schabi.newpipe.extractor.stream.Description;
import org.schabi.newpipe.extractor.stream.Stream;
import org.schabi.newpipe.extractor.stream.StreamInfo;
import org.schabi.newpipe.extractor.stream.StreamType;
@@ -79,6 +78,7 @@ import org.schabi.newpipe.util.Constants;
import org.schabi.newpipe.util.ExtractorHelper;
import org.schabi.newpipe.util.ImageDisplayConstants;
import org.schabi.newpipe.util.InfoCache;
import org.schabi.newpipe.util.KoreUtil;
import org.schabi.newpipe.util.ListHelper;
import org.schabi.newpipe.util.Localization;
import org.schabi.newpipe.util.NavigationHelper;
@@ -95,6 +95,8 @@ import java.util.List;
import java.util.concurrent.TimeUnit;
import icepick.State;
import io.noties.markwon.Markwon;
import io.noties.markwon.linkify.LinkifyPlugin;
import io.reactivex.Single;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
@@ -482,7 +484,6 @@ public class VideoDetailFragment
videoUploadDateView = rootView.findViewById(R.id.detail_upload_date_view);
videoDescriptionView = rootView.findViewById(R.id.detail_description_view);
videoDescriptionView.setMovementMethod(LinkMovementMethod.getInstance());
videoDescriptionView.setAutoLinkMask(Linkify.WEB_URLS);
thumbsUpTextView = rootView.findViewById(R.id.detail_thumbs_up_count_view);
thumbsUpImageView = rootView.findViewById(R.id.detail_thumbs_up_img_view);
@@ -599,22 +600,27 @@ public class VideoDetailFragment
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (isLoading.get()) {
// if is still loading block menu
int id = item.getItemId();
if (id == R.id.action_settings) {
NavigationHelper.openSettings(requireContext());
return true;
}
if (isLoading.get()) {
// if still loading, block menu buttons related to video info
return true;
}
int id = item.getItemId();
switch (id) {
case R.id.menu_item_share: {
if (currentInfo != null) {
ShareUtils.shareUrl(this.getContext(), currentInfo.getName(), currentInfo.getOriginalUrl());
ShareUtils.shareUrl(requireContext(), currentInfo.getName(), currentInfo.getOriginalUrl());
}
return true;
}
case R.id.menu_item_openInBrowser: {
if (currentInfo != null) {
ShareUtils.openUrlInBrowser(this.getContext(), currentInfo.getOriginalUrl());
ShareUtils.openUrlInBrowser(requireContext(), currentInfo.getOriginalUrl());
}
return true;
}
@@ -624,7 +630,7 @@ public class VideoDetailFragment
url.replace("https", "http")));
} catch (Exception e) {
if (DEBUG) Log.i(TAG, "Failed to start kore", e);
showInstallKoreDialog(activity);
KoreUtil.showInstallKoreDialog(activity);
}
return true;
default:
@@ -632,16 +638,6 @@ public class VideoDetailFragment
}
}
private static void showInstallKoreDialog(final Context context) {
final AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setMessage(R.string.kore_not_found)
.setPositiveButton(R.string.install, (DialogInterface dialog, int which) ->
NavigationHelper.installKore(context))
.setNegativeButton(R.string.cancel, (DialogInterface dialog, int which) -> {
});
builder.create().show();
}
private void setupActionBarOnError(final String url) {
if (DEBUG) Log.d(TAG, "setupActionBarHandlerOnError() called with: url = [" + url + "]");
Log.e("-----", "missing code");
@@ -928,28 +924,41 @@ public class VideoDetailFragment
return sortedVideoStreams != null ? sortedVideoStreams.get(selectedVideoStreamIndex) : null;
}
private void prepareDescription(final String descriptionHtml) {
if (TextUtils.isEmpty(descriptionHtml)) {
private void prepareDescription(Description description) {
if (TextUtils.isEmpty(description.getContent()) || description == Description.emptyDescription) {
return;
}
disposables.add(Single.just(descriptionHtml)
.map((@io.reactivex.annotations.NonNull String description) -> {
Spanned parsedDescription;
if (Build.VERSION.SDK_INT >= 24) {
parsedDescription = Html.fromHtml(description, 0);
} else {
//noinspection deprecation
parsedDescription = Html.fromHtml(description);
}
return parsedDescription;
})
.subscribeOn(Schedulers.computation())
.observeOn(AndroidSchedulers.mainThread())
.subscribe((@io.reactivex.annotations.NonNull Spanned spanned) -> {
videoDescriptionView.setText(spanned);
videoDescriptionView.setVisibility(View.VISIBLE);
}));
if (description.getType() == Description.HTML) {
disposables.add(Single.just(description.getContent())
.map((@io.reactivex.annotations.NonNull String descriptionText) -> {
Spanned parsedDescription;
if (Build.VERSION.SDK_INT >= 24) {
parsedDescription = Html.fromHtml(descriptionText, 0);
} else {
//noinspection deprecation
parsedDescription = Html.fromHtml(descriptionText);
}
return parsedDescription;
})
.subscribeOn(Schedulers.computation())
.observeOn(AndroidSchedulers.mainThread())
.subscribe((@io.reactivex.annotations.NonNull Spanned spanned) -> {
videoDescriptionView.setText(spanned);
videoDescriptionView.setVisibility(View.VISIBLE);
}));
} else if (description.getType() == Description.MARKDOWN) {
final Markwon markwon = Markwon.builder(getContext())
.usePlugin(LinkifyPlugin.create())
.build();
markwon.setMarkdown(videoDescriptionView, description.getContent());
videoDescriptionView.setVisibility(View.VISIBLE);
} else {
//== Description.PLAIN_TEXT
videoDescriptionView.setAutoLinkMask(Linkify.WEB_URLS);
videoDescriptionView.setText(description.getContent(), TextView.BufferType.SPANNABLE);
videoDescriptionView.setVisibility(View.VISIBLE);
}
}
private void setHeightThumbnail() {
@@ -1070,7 +1079,7 @@ public class VideoDetailFragment
if (info.getStreamType().equals(StreamType.AUDIO_LIVE_STREAM)) {
videoCountView.setText(Localization.listeningCount(activity, info.getViewCount()));
} else if (info.getStreamType().equals(StreamType.LIVE_STREAM)) {
videoCountView.setText(Localization.watchingCount(activity, info.getViewCount()));
videoCountView.setText(Localization.localizeWatchingCount(activity, info.getViewCount()));
} else {
videoCountView.setText(Localization.localizeViewCount(activity, info.getViewCount()));
}

View File

@@ -175,17 +175,20 @@ public class ChannelFragment extends BaseListInfoFragment<ChannelInfo> {
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.action_settings:
NavigationHelper.openSettings(requireContext());
break;
case R.id.menu_item_rss:
openRssFeed();
break;
case R.id.menu_item_openInBrowser:
if (currentInfo != null) {
ShareUtils.openUrlInBrowser(this.getContext(), currentInfo.getOriginalUrl());
ShareUtils.openUrlInBrowser(requireContext(), currentInfo.getOriginalUrl());
}
break;
case R.id.menu_item_share:
if (currentInfo != null) {
ShareUtils.shareUrl(this.getContext(), name, currentInfo.getOriginalUrl());
ShareUtils.shareUrl(requireContext(), name, currentInfo.getOriginalUrl());
}
break;
default:
@@ -370,7 +373,7 @@ public class ChannelFragment extends BaseListInfoFragment<ChannelInfo> {
headerSubscribersTextView.setVisibility(View.VISIBLE);
if (result.getSubscriberCount() >= 0) {
headerSubscribersTextView.setText(Localization.localizeSubscribersCount(activity, result.getSubscriberCount()));
headerSubscribersTextView.setText(Localization.shortSubscriberCount(activity, result.getSubscriberCount()));
} else {
headerSubscribersTextView.setText(R.string.subscribers_count_not_available);
}

View File

@@ -222,11 +222,14 @@ public class PlaylistFragment extends BaseListInfoFragment<PlaylistInfo> {
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.action_settings:
NavigationHelper.openSettings(requireContext());
break;
case R.id.menu_item_openInBrowser:
ShareUtils.openUrlInBrowser(this.getContext(), url);
ShareUtils.openUrlInBrowser(requireContext(), url);
break;
case R.id.menu_item_share:
ShareUtils.shareUrl(this.getContext(), name, url);
ShareUtils.shareUrl(requireContext(), name, url);
break;
case R.id.menu_item_bookmark:
onBookmarkClicked();

View File

@@ -190,7 +190,7 @@ public class SearchFragment
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(activity);
isSuggestionsEnabled = preferences.getBoolean(getString(R.string.show_search_suggestions_key), true);
contentCountry = preferences.getString(getString(R.string.content_country_key), getString(R.string.default_country_value));
contentCountry = preferences.getString(getString(R.string.content_country_key), getString(R.string.default_localization_key));
}
@Override
@@ -723,7 +723,7 @@ public class SearchFragment
showError(getString(R.string.url_not_supported_toast), false)));
return;
}
} catch (Exception e) {
} catch (Exception ignored) {
// Exception occurred, it's not a url
}

View File

@@ -1,9 +1,15 @@
package org.schabi.newpipe.info_list.holder;
import androidx.appcompat.app.AppCompatActivity;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.text.util.Linkify;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import org.jsoup.helper.StringUtil;
import org.schabi.newpipe.R;
@@ -120,6 +126,21 @@ public class CommentsMiniInfoItemHolder extends InfoItemHolder {
itemBuilder.getOnCommentsSelectedListener().selected(item);
}
});
itemView.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View view) {
ClipboardManager clipboardManager = (ClipboardManager) itemBuilder.getContext()
.getSystemService(Context.CLIPBOARD_SERVICE);
clipboardManager.setPrimaryClip(ClipData.newPlainText(null,commentText));
Toast.makeText(itemBuilder.getContext(), R.string.msg_copied, Toast.LENGTH_SHORT).show();
return true;
}
});
}
private void ellipsize() {

View File

@@ -60,7 +60,7 @@ public class StreamInfoItemHolder extends StreamMiniInfoItemHolder {
if (infoItem.getStreamType().equals(StreamType.AUDIO_LIVE_STREAM)) {
viewsAndDate = Localization.listeningCount(itemBuilder.getContext(), infoItem.getViewCount());
} else if (infoItem.getStreamType().equals(StreamType.LIVE_STREAM)) {
viewsAndDate = Localization.watchingCount(itemBuilder.getContext(), infoItem.getViewCount());
viewsAndDate = Localization.shortWatchingCount(itemBuilder.getContext(), infoItem.getViewCount());
} else {
viewsAndDate = Localization.shortViewCount(itemBuilder.getContext(), infoItem.getViewCount());
}

View File

@@ -1,8 +1,11 @@
package org.schabi.newpipe.local.bookmark;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.os.Bundle;
import android.os.Parcelable;
import android.util.Log;
import android.widget.EditText;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentManager;
@@ -10,6 +13,7 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import io.reactivex.disposables.Disposable;
import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;
import org.schabi.newpipe.NewPipeDatabase;
@@ -118,8 +122,7 @@ public final class BookmarkFragment
@Override
public void held(LocalItem selectedItem) {
if (selectedItem instanceof PlaylistMetadataEntry) {
showLocalDeleteDialog((PlaylistMetadataEntry) selectedItem);
showLocalDialog((PlaylistMetadataEntry) selectedItem);
} else if (selectedItem instanceof PlaylistRemoteEntity) {
showRemoteDeleteDialog((PlaylistRemoteEntity) selectedItem);
}
@@ -247,14 +250,30 @@ public final class BookmarkFragment
// Utils
///////////////////////////////////////////////////////////////////////////
private void showLocalDeleteDialog(final PlaylistMetadataEntry item) {
showDeleteDialog(item.name, localPlaylistManager.deletePlaylist(item.uid));
}
private void showRemoteDeleteDialog(final PlaylistRemoteEntity item) {
showDeleteDialog(item.getName(), remotePlaylistManager.deletePlaylist(item.getUid()));
}
private void showLocalDialog(PlaylistMetadataEntry selectedItem) {
View dialogView = View.inflate(getContext(), R.layout.dialog_bookmark, null);
EditText editText = dialogView.findViewById(R.id.playlist_name_edit_text);
editText.setText(selectedItem.name);
Builder builder = new AlertDialog.Builder(activity);
builder.setView(dialogView)
.setPositiveButton(R.string.rename_playlist, (dialog, which) -> {
changeLocalPlaylistName(selectedItem.uid, editText.getText().toString());
})
.setNegativeButton(R.string.cancel, null)
.setNeutralButton(R.string.delete, (dialog, which) -> {
showDeleteDialog(selectedItem.name,
localPlaylistManager.deletePlaylist(selectedItem.uid));
dialog.dismiss();
})
.create()
.show();
}
private void showDeleteDialog(final String name, final Single<Integer> deleteReactor) {
if (activity == null || disposables == null) return;
@@ -271,6 +290,23 @@ public final class BookmarkFragment
.show();
}
private void changeLocalPlaylistName(long id, String name) {
if (localPlaylistManager == null) {
return;
}
if (DEBUG) {
Log.d(TAG, "Updating playlist id=[" + id +
"] with new name=[" + name + "] items");
}
localPlaylistManager.renamePlaylist(id, name);
final Disposable disposable = localPlaylistManager.renamePlaylist(id, name)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(longs -> {/*Do nothing on success*/}, this::onError);
disposables.add(disposable);
}
private static List<PlaylistLocalItem> merge(final List<PlaylistMetadataEntry> localPlaylists,
final List<PlaylistRemoteEntity> remotePlaylists) {
List<PlaylistLocalItem> items = new ArrayList<>(

View File

@@ -388,8 +388,10 @@ public class LocalPlaylistFragment extends BaseLocalListFragment<List<PlaylistSt
this.name = name;
setTitle(name);
Log.d(TAG, "Updating playlist id=[" + playlistId +
if (DEBUG) {
Log.d(TAG, "Updating playlist id=[" + playlistId +
"] with new name=[" + name + "] items");
}
final Disposable disposable = playlistManager.renamePlaylist(playlistId, name)
.observeOn(AndroidSchedulers.mainThread())
@@ -404,8 +406,10 @@ public class LocalPlaylistFragment extends BaseLocalListFragment<List<PlaylistSt
R.string.playlist_thumbnail_change_success,
Toast.LENGTH_SHORT);
Log.d(TAG, "Updating playlist id=[" + playlistId +
if (DEBUG) {
Log.d(TAG, "Updating playlist id=[" + playlistId +
"] with new thumbnail url=[" + thumbnailUrl + "]");
}
final Disposable disposable = playlistManager
.changePlaylistThumbnail(playlistId, thumbnailUrl)
@@ -472,8 +476,10 @@ public class LocalPlaylistFragment extends BaseLocalListFragment<List<PlaylistSt
}
}
Log.d(TAG, "Updating playlist id=[" + playlistId +
if (DEBUG) {
Log.d(TAG, "Updating playlist id=[" + playlistId +
"] with [" + streamIds.size() + "] items");
}
final Disposable disposable = playlistManager.updateJoin(playlistId, streamIds)
.observeOn(AndroidSchedulers.mainThread())

View File

@@ -15,6 +15,8 @@ import org.schabi.newpipe.util.ThemeHelper;
import icepick.Icepick;
import icepick.State;
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
public class ImportConfirmationDialog extends DialogFragment {
@State
protected Intent resultServiceIntent;
@@ -34,11 +36,12 @@ public class ImportConfirmationDialog extends DialogFragment {
@NonNull
@Override
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
assureCorrectAppLanguage(getContext());
return new AlertDialog.Builder(getContext(), ThemeHelper.getDialogTheme(getContext()))
.setMessage(R.string.import_network_expensive_warning)
.setCancelable(true)
.setNegativeButton(R.string.cancel, null)
.setPositiveButton(android.R.string.ok, (dialogInterface, i) -> {
.setPositiveButton(R.string.finish, (dialogInterface, i) -> {
if (resultServiceIntent != null && getContext() != null) {
getContext().startService(resultServiceIntent);
}

View File

@@ -58,7 +58,7 @@ import org.schabi.newpipe.util.NavigationHelper;
import org.schabi.newpipe.util.ThemeHelper;
import static org.schabi.newpipe.player.helper.PlayerHelper.getTimeString;
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
/**
* Base players joining the common properties
@@ -115,7 +115,7 @@ public final class BackgroundPlayer extends Service {
notificationManager = ((NotificationManager) getSystemService(NOTIFICATION_SERVICE));
lockManager = new LockManager(this);
sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
assureCorrectAppLanguage(this);
ThemeHelper.setTheme(this);
basePlayerImpl = new BasePlayerImpl(this);
basePlayerImpl.setup();

View File

@@ -57,7 +57,10 @@ public final class BackgroundPlayerActivity extends ServicePlayerActivity {
this.player.setRecovery();
getApplicationContext().sendBroadcast(getPlayerShutdownIntent());
getApplicationContext().startService(getSwitchIntent(PopupVideoPlayer.class));
getApplicationContext().startService(
getSwitchIntent(PopupVideoPlayer.class)
.putExtra(BasePlayer.START_PAUSED, !this.player.isPlaying())
);
return true;
}
return false;

View File

@@ -150,6 +150,8 @@ public abstract class BasePlayer implements
@NonNull
public static final String RESUME_PLAYBACK = "resume_playback";
@NonNull
public static final String START_PAUSED = "start_paused";
@NonNull
public static final String SELECT_ON_APPEND = "select_on_append";
/*//////////////////////////////////////////////////////////////////////////
@@ -304,7 +306,7 @@ public abstract class BasePlayer implements
}
// Good to go...
initPlayback(queue, repeatMode, playbackSpeed, playbackPitch, playbackSkipSilence,
/*playOnInit=*/true);
/*playOnInit=*/!intent.getBooleanExtra(START_PAUSED, false));
}
protected void initPlayback(@NonNull final PlayQueue queue,
@@ -944,10 +946,10 @@ public abstract class BasePlayer implements
public void onPlayPause() {
if (DEBUG) Log.d(TAG, "onPlayPause() called");
if (!isPlaying()) {
onPlay();
} else {
if (isPlaying()) {
onPause();
} else {
onPlay();
}
}

View File

@@ -28,6 +28,7 @@ import android.database.ContentObserver;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.media.AudioManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
@@ -44,9 +45,11 @@ import androidx.recyclerview.widget.ItemTouchHelper;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.TypedValue;
import android.view.DisplayCutout;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
import android.view.WindowInsets;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.ImageButton;
@@ -75,6 +78,7 @@ import org.schabi.newpipe.player.playqueue.PlayQueueItemTouchCallback;
import org.schabi.newpipe.player.resolver.MediaSourceTag;
import org.schabi.newpipe.player.resolver.VideoPlaybackResolver;
import org.schabi.newpipe.util.AnimationUtils;
import org.schabi.newpipe.util.KoreUtil;
import org.schabi.newpipe.util.ListHelper;
import org.schabi.newpipe.util.NavigationHelper;
import org.schabi.newpipe.util.PermissionHelper;
@@ -93,6 +97,7 @@ import static org.schabi.newpipe.util.AnimationUtils.Type.SCALE_AND_ALPHA;
import static org.schabi.newpipe.util.AnimationUtils.Type.SLIDE_AND_ALPHA;
import static org.schabi.newpipe.util.AnimationUtils.animateRotation;
import static org.schabi.newpipe.util.AnimationUtils.animateView;
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
import static org.schabi.newpipe.util.StateSaver.KEY_SAVED_STATE;
/**
@@ -123,6 +128,7 @@ public final class MainVideoPlayer extends AppCompatActivity
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
assureCorrectAppLanguage(this);
super.onCreate(savedInstanceState);
if (DEBUG) Log.d(TAG, "onCreate() called with: savedInstanceState = [" + savedInstanceState + "]");
defaultPreferences = PreferenceManager.getDefaultSharedPreferences(this);
@@ -190,6 +196,7 @@ public final class MainVideoPlayer extends AppCompatActivity
@Override
protected void onResume() {
if (DEBUG) Log.d(TAG, "onResume() called");
assureCorrectAppLanguage(this);
super.onResume();
if (globalScreenOrientationLocked()) {
@@ -220,6 +227,7 @@ public final class MainVideoPlayer extends AppCompatActivity
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
assureCorrectAppLanguage(this);
if (playerImpl.isSomePopupMenuVisible()) {
playerImpl.getQualityPopupMenu().dismiss();
@@ -364,8 +372,8 @@ public final class MainVideoPlayer extends AppCompatActivity
}
private boolean globalScreenOrientationLocked() {
// 1: Screen orientation changes using acelerometer
// 0: Screen orientatino is locked
// 1: Screen orientation changes using accelerometer
// 0: Screen orientation is locked
return !(android.provider.Settings.System.getInt(getContentResolver(), Settings.System.ACCELEROMETER_ROTATION, 0) == 1);
}
@@ -435,6 +443,7 @@ public final class MainVideoPlayer extends AppCompatActivity
private boolean queueVisible;
private ImageButton moreOptionsButton;
private ImageButton kodiButton;
private ImageButton shareButton;
private ImageButton toggleOrientationButton;
private ImageButton switchPopupButton;
@@ -471,6 +480,7 @@ public final class MainVideoPlayer extends AppCompatActivity
this.moreOptionsButton = rootView.findViewById(R.id.moreOptionsButton);
this.secondaryControls = rootView.findViewById(R.id.secondaryControls);
this.kodiButton = rootView.findViewById(R.id.kodi);
this.shareButton = rootView.findViewById(R.id.share);
this.toggleOrientationButton = rootView.findViewById(R.id.toggleOrientation);
this.switchBackgroundButton = rootView.findViewById(R.id.switchBackground);
@@ -482,6 +492,9 @@ public final class MainVideoPlayer extends AppCompatActivity
titleTextView.setSelected(true);
channelTextView.setSelected(true);
boolean showKodiButton = PreferenceManager.getDefaultSharedPreferences(this.context).getBoolean(
this.context.getString(R.string.show_play_with_kodi_key), false);
kodiButton.setVisibility(showKodiButton ? View.VISIBLE : View.GONE);
getRootView().setKeepScreenOn(true);
}
@@ -518,6 +531,7 @@ public final class MainVideoPlayer extends AppCompatActivity
closeButton.setOnClickListener(this);
moreOptionsButton.setOnClickListener(this);
kodiButton.setOnClickListener(this);
shareButton.setOnClickListener(this);
toggleOrientationButton.setOnClickListener(this);
switchBackgroundButton.setOnClickListener(this);
@@ -538,6 +552,19 @@ public final class MainVideoPlayer extends AppCompatActivity
setInitialGestureValues();
}
});
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
queueLayout.setOnApplyWindowInsetsListener(new View.OnApplyWindowInsetsListener() {
@Override
public WindowInsets onApplyWindowInsets(View view, WindowInsets windowInsets) {
final DisplayCutout cutout = windowInsets.getDisplayCutout();
if (cutout != null)
view.setPadding(cutout.getSafeInsetLeft(), cutout.getSafeInsetTop(),
cutout.getSafeInsetRight(), cutout.getSafeInsetBottom());
return windowInsets;
}
});
}
}
public void minimize() {
@@ -588,6 +615,17 @@ public final class MainVideoPlayer extends AppCompatActivity
finish();
}
public void onKodiShare() {
onPause();
try {
NavigationHelper.playWithKore(this.context, Uri.parse(
playerImpl.getVideoUrl().replace("https", "http")));
} catch (Exception e) {
if (DEBUG) Log.i(TAG, "Failed to start kore", e);
KoreUtil.showInstallKoreDialog(this.context);
}
}
/*//////////////////////////////////////////////////////////////////////////
// Player Overrides
//////////////////////////////////////////////////////////////////////////*/
@@ -614,7 +652,8 @@ public final class MainVideoPlayer extends AppCompatActivity
this.getPlaybackPitch(),
this.getPlaybackSkipSilence(),
this.getPlaybackQuality(),
false
false,
!isPlaying()
);
context.startService(intent);
@@ -637,7 +676,8 @@ public final class MainVideoPlayer extends AppCompatActivity
this.getPlaybackPitch(),
this.getPlaybackSkipSilence(),
this.getPlaybackQuality(),
false
false,
!isPlaying()
);
context.startService(intent);
@@ -686,6 +726,8 @@ public final class MainVideoPlayer extends AppCompatActivity
} else if (v.getId() == closeButton.getId()) {
onPlaybackShutdown();
return;
} else if (v.getId() == kodiButton.getId()) {
onKodiShare();
}
if (getCurrentState() != STATE_COMPLETED) {
@@ -882,6 +924,18 @@ public final class MainVideoPlayer extends AppCompatActivity
final float currentVolumeNormalized = (float) getAudioReactor().getVolume() / getAudioReactor().getMaxVolume();
volumeProgressBar.setProgress((int) (volumeProgressBar.getMax() * currentVolumeNormalized));
}
float screenBrightness = getWindow().getAttributes().screenBrightness;
if (screenBrightness < 0)
screenBrightness = Settings.System.getInt(getContentResolver(),
Settings.System.SCREEN_BRIGHTNESS, 0) / 255.0f;
brightnessProgressBar.setProgress((int) (brightnessProgressBar.getMax() * screenBrightness));
if (DEBUG) Log.d(TAG, "setInitialGestureValues: volumeProgressBar.getProgress() ["
+ volumeProgressBar.getProgress() + "] "
+ "brightnessProgressBar.getProgress() ["
+ brightnessProgressBar.getProgress() + "]");
}
@Override

View File

@@ -80,6 +80,7 @@ import static org.schabi.newpipe.player.BasePlayer.STATE_PLAYING;
import static org.schabi.newpipe.player.VideoPlayer.DEFAULT_CONTROLS_DURATION;
import static org.schabi.newpipe.player.VideoPlayer.DEFAULT_CONTROLS_HIDE_TIME;
import static org.schabi.newpipe.util.AnimationUtils.animateView;
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
/**
* Service Popup Player implementing VideoPlayer
@@ -142,6 +143,7 @@ public final class PopupVideoPlayer extends Service {
@Override
public void onCreate() {
assureCorrectAppLanguage(this);
windowManager = (WindowManager) getSystemService(WINDOW_SERVICE);
notificationManager = ((NotificationManager) getSystemService(NOTIFICATION_SERVICE));
@@ -169,6 +171,7 @@ public final class PopupVideoPlayer extends Service {
@Override
public void onConfigurationChanged(Configuration newConfig) {
assureCorrectAppLanguage(this);
if (DEBUG) Log.d(TAG, "onConfigurationChanged() called with: newConfig = [" + newConfig + "]");
updateScreenSize();
updatePopupSize(popupLayoutParams.width, -1);
@@ -567,7 +570,8 @@ public final class PopupVideoPlayer extends Service {
this.getPlaybackPitch(),
this.getPlaybackSkipSilence(),
this.getPlaybackQuality(),
false
false,
!isPlaying()
);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
@@ -1123,4 +1127,4 @@ public final class PopupVideoPlayer extends Service {
return distanceFromCloseButton(popupMotionEvent) <= getClosingRadius();
}
}
}
}

View File

@@ -50,7 +50,10 @@ public final class PopupVideoPlayerActivity extends ServicePlayerActivity {
if (item.getItemId() == R.id.action_switch_background) {
this.player.setRecovery();
getApplicationContext().sendBroadcast(getPlayerShutdownIntent());
getApplicationContext().startService(getSwitchIntent(BackgroundPlayer.class));
getApplicationContext().startService(
getSwitchIntent(BackgroundPlayer.class)
.putExtra(BasePlayer.START_PAUSED, !this.player.isPlaying())
);
return true;
}
return false;

View File

@@ -46,6 +46,7 @@ import java.util.List;
import static org.schabi.newpipe.player.helper.PlayerHelper.formatPitch;
import static org.schabi.newpipe.player.helper.PlayerHelper.formatSpeed;
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
public abstract class ServicePlayerActivity extends AppCompatActivity
implements PlayerEventListener, SeekBar.OnSeekBarChangeListener,
@@ -116,6 +117,7 @@ public abstract class ServicePlayerActivity extends AppCompatActivity
@Override
protected void onCreate(Bundle savedInstanceState) {
assureCorrectAppLanguage(this);
super.onCreate(savedInstanceState);
ThemeHelper.setTheme(this);
setContentView(R.layout.activity_player_queue_control);
@@ -154,12 +156,11 @@ public abstract class ServicePlayerActivity extends AppCompatActivity
case android.R.id.home:
finish();
return true;
case R.id.action_append_playlist:
appendAllToPlaylist();
return true;
case R.id.action_settings:
NavigationHelper.openSettings(this);
redraw = true;
return true;
case R.id.action_append_playlist:
appendAllToPlaylist();
return true;
case R.id.action_system_audio:
startActivity(new Intent(Settings.ACTION_SOUND_SETTINGS));
@@ -167,7 +168,10 @@ public abstract class ServicePlayerActivity extends AppCompatActivity
case R.id.action_switch_main:
this.player.setRecovery();
getApplicationContext().sendBroadcast(getPlayerShutdownIntent());
getApplicationContext().startActivity(getSwitchIntent(MainVideoPlayer.class));
getApplicationContext().startActivity(
getSwitchIntent(MainVideoPlayer.class)
.putExtra(BasePlayer.START_PAUSED, !this.player.isPlaying())
);
return true;
}
return onPlayerOptionSelected(item) || super.onOptionsItemSelected(item);
@@ -189,8 +193,10 @@ public abstract class ServicePlayerActivity extends AppCompatActivity
this.player.getPlaybackPitch(),
this.player.getPlaybackSkipSilence(),
null,
false,
false
).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
.putExtra(BasePlayer.START_PAUSED, !this.player.isPlaying());
}
////////////////////////////////////////////////////////////////////////////

View File

@@ -7,6 +7,8 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.DialogFragment;
import androidx.appcompat.app.AlertDialog;
import android.preference.PreferenceManager;
import android.util.Log;
import android.view.View;
import android.widget.CheckBox;
@@ -17,6 +19,7 @@ import org.schabi.newpipe.R;
import org.schabi.newpipe.util.SliderStrategy;
import static org.schabi.newpipe.player.BasePlayer.DEBUG;
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
public class PlaybackParameterDialog extends DialogFragment {
@NonNull private static final String TAG = "PlaybackParameterDialog";
@@ -108,6 +111,7 @@ public class PlaybackParameterDialog extends DialogFragment {
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
assureCorrectAppLanguage(getContext());
super.onCreate(savedInstanceState);
if (savedInstanceState != null) {
initialTempo = savedInstanceState.getDouble(INITIAL_TEMPO_KEY, DEFAULT_TEMPO);
@@ -137,6 +141,7 @@ public class PlaybackParameterDialog extends DialogFragment {
@NonNull
@Override
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
assureCorrectAppLanguage(getContext());
final View view = View.inflate(getContext(), R.layout.dialog_playback_parameter, null);
setupControlViews(view);
@@ -216,13 +221,23 @@ public class PlaybackParameterDialog extends DialogFragment {
private void setupHookingControl(@NonNull View rootView) {
unhookingCheckbox = rootView.findViewById(R.id.unhookCheckbox);
if (unhookingCheckbox != null) {
unhookingCheckbox.setChecked(pitch != tempo);
// restore whether pitch and tempo are unhooked or not
unhookingCheckbox.setChecked(PreferenceManager.getDefaultSharedPreferences(getContext())
.getBoolean(getString(R.string.playback_unhook_key), true));
unhookingCheckbox.setOnCheckedChangeListener((compoundButton, isChecked) -> {
if (isChecked) return;
// When unchecked, slide back to the minimum of current tempo or pitch
final double minimum = Math.min(getCurrentPitch(), getCurrentTempo());
setSliders(minimum);
setCurrentPlaybackParameters();
// save whether pitch and tempo are unhooked or not
PreferenceManager.getDefaultSharedPreferences(getContext())
.edit()
.putBoolean(getString(R.string.playback_unhook_key), isChecked)
.apply();
if (!isChecked) {
// when unchecked, slide back to the minimum of current tempo or pitch
final double minimum = Math.min(getCurrentPitch(), getCurrentTempo());
setSliders(minimum);
setCurrentPlaybackParameters();
}
});
}
}

View File

@@ -43,9 +43,12 @@ import java.io.StringWriter;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.TimeZone;
import java.util.Vector;
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
/*
* Created by Christian Schabesberger on 24.10.15.
*
@@ -91,7 +94,7 @@ public class ErrorActivity extends AppCompatActivity {
if (rootView != null) {
Snackbar.make(rootView, R.string.error_snackbar_message, 3 * 1000)
.setActionTextColor(Color.YELLOW)
.setAction(R.string.error_snackbar_action, v ->
.setAction(context.getString(R.string.error_snackbar_action).toUpperCase(), v ->
startErrorActivity(returnActivity, context, errorInfo, el)).show();
} else {
startErrorActivity(returnActivity, context, errorInfo, el);
@@ -171,6 +174,7 @@ public class ErrorActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
assureCorrectAppLanguage(this);
super.onCreate(savedInstanceState);
ThemeHelper.setTheme(this);
setContentView(R.layout.activity_error);
@@ -374,8 +378,12 @@ public class ErrorActivity extends AppCompatActivity {
}
private String getContentLangString() {
return PreferenceManager.getDefaultSharedPreferences(this)
String contentLanguage = PreferenceManager.getDefaultSharedPreferences(this)
.getString(this.getString(R.string.content_country_key), "none");
if (contentLanguage.equals(getString(R.string.default_localization_key))) {
contentLanguage = Locale.getDefault().toString();
}
return contentLanguage;
}
private String getOsString() {

View File

@@ -7,11 +7,12 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.util.Log;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.preference.Preference;
import android.util.Log;
import android.widget.Toast;
import com.nononsenseapps.filepicker.Utils;
import com.nostra13.universalimageloader.core.ImageLoader;
@@ -40,6 +41,8 @@ import java.util.Map;
import java.util.zip.ZipFile;
import java.util.zip.ZipOutputStream;
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
public class ContentSettingsFragment extends BasePreferenceFragment {
private static final int REQUEST_IMPORT_PATH = 8945;
@@ -56,6 +59,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
private Localization initialSelectedLocalization;
private ContentCountry initialSelectedContentCountry;
private String initialLanguage;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
@@ -64,6 +68,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
initialSelectedLocalization = org.schabi.newpipe.util.Localization.getPreferredLocalization(requireContext());
initialSelectedContentCountry = org.schabi.newpipe.util.Localization.getPreferredContentCountry(requireContext());
initialLanguage = PreferenceManager.getDefaultSharedPreferences(getContext()).getString("app_language_key", "en");
}
@Override
@@ -125,9 +130,10 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
.getPreferredLocalization(requireContext());
final ContentCountry selectedContentCountry = org.schabi.newpipe.util.Localization
.getPreferredContentCountry(requireContext());
final String selectedLanguage = PreferenceManager.getDefaultSharedPreferences(getContext()).getString("app_language_key", "en");
if (!selectedLocalization.equals(initialSelectedLocalization)
|| !selectedContentCountry.equals(initialSelectedContentCountry)) {
|| !selectedContentCountry.equals(initialSelectedContentCountry) || !selectedLanguage.equals(initialLanguage)) {
Toast.makeText(requireContext(), R.string.localization_changes_requires_app_restart, Toast.LENGTH_LONG).show();
NewPipe.setupLocalization(selectedLocalization, selectedContentCountry);
@@ -136,6 +142,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
@Override
public void onActivityResult(int requestCode, int resultCode, @NonNull Intent data) {
assureCorrectAppLanguage(getContext());
super.onActivityResult(requestCode, resultCode, data);
if (DEBUG) {
Log.d(TAG, "onActivityResult() called with: requestCode = [" + requestCode + "], resultCode = [" + resultCode + "], data = [" + data + "]");
@@ -150,7 +157,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
} else {
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setMessage(R.string.override_current_data)
.setPositiveButton(android.R.string.ok,
.setPositiveButton(getString(R.string.finish),
(DialogInterface d, int id) -> importDatabase(path))
.setNegativeButton(android.R.string.cancel,
(DialogInterface d, int id) -> d.cancel());
@@ -189,7 +196,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}finally {
} finally {
try {
if (output != null) {
output.flush();
@@ -236,7 +243,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
}
//If settings file exist, ask if it should be imported.
if(ZipHelper.extractFileFromZip(filePath, newpipe_settings.getPath(), "newpipe.settings")) {
if (ZipHelper.extractFileFromZip(filePath, newpipe_settings.getPath(), "newpipe.settings")) {
AlertDialog.Builder alert = new AlertDialog.Builder(getContext());
alert.setTitle(R.string.import_settings);
@@ -245,7 +252,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
// restart app to properly load db
System.exit(0);
});
alert.setPositiveButton(android.R.string.yes, (dialog, which) -> {
alert.setPositiveButton(getString(R.string.finish), (dialog, which) -> {
dialog.dismiss();
loadSharedPreferences(newpipe_settings);
// restart app to properly load db
@@ -291,7 +298,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}finally {
} finally {
try {
if (input != null) {
input.close();

View File

@@ -8,11 +8,12 @@ import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.preference.Preference;
import android.util.Log;
import android.widget.Toast;
import com.nononsenseapps.filepicker.Utils;
@@ -28,6 +29,8 @@ import java.nio.charset.StandardCharsets;
import us.shandian.giga.io.StoredDirectoryHelper;
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
public class DownloadSettingsFragment extends BasePreferenceFragment {
private static final int REQUEST_DOWNLOAD_VIDEO_PATH = 0x1235;
private static final int REQUEST_DOWNLOAD_AUDIO_PATH = 0x1236;
@@ -159,7 +162,7 @@ public class DownloadSettingsFragment extends BasePreferenceFragment {
AlertDialog.Builder msg = new AlertDialog.Builder(ctx);
msg.setTitle(title);
msg.setMessage(message);
msg.setPositiveButton(android.R.string.ok, null);
msg.setPositiveButton(getString(R.string.finish), null);
msg.show();
}
@@ -202,6 +205,7 @@ public class DownloadSettingsFragment extends BasePreferenceFragment {
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
assureCorrectAppLanguage(getContext());
super.onActivityResult(requestCode, resultCode, data);
if (DEBUG) {
Log.d(TAG, "onActivityResult() called with: requestCode = [" + requestCode + "], " +

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