1
mirror of https://github.com/TeamNewPipe/NewPipe synced 2025-09-21 22:20:50 +02:00

Compare commits

..

407 Commits

Author SHA1 Message Date
Christian Schabesberger
48f966e7db add changelog for 730 2019-03-14 09:24:02 +01:00
Christian Schabesberger
d8746dc592 hotfix decrypt function and move on to version v0.16.1 2019-03-14 09:20:37 +01:00
Christian Schabesberger
f24fab0fa2 fix brake when selecting a mediaccc channel form subscription page 2019-02-25 12:24:48 +01:00
Christian Schabesberger
261620fd13 Merge branch 'master' into release_v0.16.0 2019-02-24 23:06:06 +01:00
Christian Schabesberger
9af6effad9 move on to version 0.16.0 2019-02-24 22:52:07 +01:00
Christian Schabesberger
92602916dd merge weblate 2019-02-24 22:51:08 +01:00
Nathan Follens
6c7b90e1c3 Translated using Weblate (Flemish)
Currently translated at 100.0% (443 of 443 strings)
2019-02-24 06:18:27 +01:00
Nathan Follens
d8e57144f7 Translated using Weblate (Dutch)
Currently translated at 100.0% (443 of 443 strings)
2019-02-24 06:18:27 +01:00
Christian Schabesberger
e69c45a246 Merge pull request #1650 from yausername/dev
comments support
2019-02-21 15:50:21 +01:00
Ritvik Saraf
3f87a6d714 Merge remote-tracking branch 'origin/dev' into dev 2019-02-20 05:29:34 +05:30
Ritvik Saraf
841124b1f3 updated extractor, fixed settings padding 2019-02-20 05:24:33 +05:30
Hosted Weblate
257a878ef4 Merge branch 'origin/dev' into Weblate. 2019-02-19 19:18:29 +01:00
84436
07d3f82912 Translated using Weblate (Vietnamese)
Currently translated at 99.3% (440 of 443 strings)
2019-02-19 19:18:26 +01:00
Ali Demirtas
7d3eb4f5a6 Translated using Weblate (Turkish)
Currently translated at 100.0% (443 of 443 strings)
2019-02-19 19:18:12 +01:00
srkrishna
0efcc55373 Translated using Weblate (Tamil)
Currently translated at 34.5% (153 of 443 strings)
2019-02-19 19:18:12 +01:00
Christian Schabesberger
eafceb8a6c Merge branch 'dev' into dev 2019-02-19 17:35:49 +01:00
Christian Schabesberger
5ac8318e71 Merge pull request #2136 from TeamNewPipe/db_doc
add database doc in dia
2019-02-19 16:06:11 +01:00
Christian Schabesberger
7981f9dc91 add database doc in dia 2019-02-19 16:03:10 +01:00
Christian Schabesberger
a9bf04cbc6 Merge pull request #2135 from TeamNewPipe/firetv
add support for search in amazon firetv
2019-02-19 15:00:22 +01:00
Christian Schabesberger
4b5591d884 move firetv utils into utils package 2019-02-19 14:57:49 +01:00
Christian Schabesberger
c08197f025 Merge branch 'dev' into feature/amazonfiretv-search-support 2019-02-19 14:54:48 +01:00
Christian Schabesberger
5d22eabfa3 Merge pull request #2092 from connectety/updated-urls
support for youtube-nocookie.com
2019-02-19 14:30:56 +01:00
Christian Schabesberger
c3a38e384a Merge branch 'dev' into updated-urls 2019-02-19 14:30:34 +01:00
Christian Schabesberger
0d3dd94559 Merge pull request #2120 from Redirion/patch-1
Fix delayed ducking of Audio
2019-02-19 14:30:11 +01:00
Christian Schabesberger
9cdaa37519 Merge branch 'dev' into patch-1 2019-02-19 14:29:34 +01:00
Christian Schabesberger
202a319d69 Merge pull request #2129 from TeamNewPipe/remove-old-player
Remove old player from the manifest
2019-02-19 14:29:02 +01:00
Christian Schabesberger
198384b2ed Merge branch 'dev' into remove-old-player 2019-02-19 14:28:53 +01:00
Christian Schabesberger
9d8b070f1e Merge pull request #2133 from kapodamy/popup-player-fixup
Fix random Popup player crash
2019-02-19 14:28:04 +01:00
dimqua
28ba2d5008 Translated using Weblate (Russian)
Currently translated at 100.0% (443 of 443 strings)
2019-02-19 14:07:27 +01:00
Arthur
37ddd63d27 Translated using Weblate (Russian)
Currently translated at 100.0% (443 of 443 strings)
2019-02-19 14:07:26 +01:00
dimqua
d7f8b8c1e0 Translated using Weblate (Russian)
Currently translated at 97.5% (432 of 443 strings)
2019-02-18 13:28:20 +01:00
Arthur
9e70c5bbea Translated using Weblate (Russian)
Currently translated at 97.5% (432 of 443 strings)
2019-02-18 13:28:19 +01:00
kapodamy
4dd572063e fix crash while switching from popup to fullscreen player, or closing the popup player. 2019-02-17 16:59:35 -03:00
TobiGr
db9cf95648 Remove old player from the manifest
See https://github.com/TeamNewPipe/NewPipe/pull/1884 for more info
2019-02-17 09:52:05 +01:00
Ritvik Saraf
df6bae4712 merged upstream/dev 2019-02-16 02:06:18 +05:30
Ritvik Saraf
56cb8209b8 refactored comments capability 2019-02-16 01:23:26 +05:30
WaldiS
aba9c2e113 Translated using Weblate (Polish)
Currently translated at 100.0% (443 of 443 strings)
2019-02-15 17:24:20 +01:00
Ali Demirtas
3d25008739 Translated using Weblate (Turkish)
Currently translated at 97.5% (432 of 443 strings)
2019-02-14 10:11:03 +01:00
Redirion
9437f057d0 Fix delayed ducking of Audio
Scenario: listening to a video on NewPipe over Bluetooth and a Notification Sound causes audio focus event AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK.

Problem: With the current implementation animateAudio would cause the audio to reach the target volume AFTER the notification sound is played, which is irritating and annoying.

Solution: animateAudio should just be used on focusGain where it is sensible to increase audio gradually. On ducking event the reaction should be immediate.

This very simple fix does this. Please approve.
2019-02-14 09:52:46 +01:00
Emanuele Petriglia
917d6089a7 Translated using Weblate (Italian)
Currently translated at 97.5% (432 of 443 strings)
2019-02-13 19:10:46 +01:00
toanpv
f19e99e3ad Translated using Weblate (Vietnamese)
Currently translated at 74.9% (332 of 443 strings)
2019-02-13 12:11:48 +01:00
Allan Nordhøy
2d0fb05fa6 Translated using Weblate (Norwegian Bokmål)
Currently translated at 96.8% (429 of 443 strings)
2019-02-13 12:11:46 +01:00
Chris
c617f2dfad Translated using Weblate (Malay)
Currently translated at 100.0% (443 of 443 strings)
2019-02-13 12:11:46 +01:00
naofum
747c5fc89a Translated using Weblate (Japanese)
Currently translated at 96.6% (428 of 443 strings)
2019-02-13 12:11:14 +01:00
Chris
4f662ef203 Translated using Weblate (Indonesian)
Currently translated at 100.0% (443 of 443 strings)
2019-02-13 12:11:13 +01:00
Le Poisson Libre
eb274ad88f Translated using Weblate (French)
Currently translated at 91.9% (407 of 443 strings)
2019-02-13 12:11:09 +01:00
Chris
bd7b41be9b Translated using Weblate (English)
Currently translated at 99.1% (439 of 443 strings)
2019-02-13 12:11:07 +01:00
Chris
076720bfff Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (443 of 443 strings)
2019-02-13 12:11:06 +01:00
Osoitz
2aadae407e Translated using Weblate (Basque)
Currently translated at 100.0% (443 of 443 strings)
2019-02-13 12:11:05 +01:00
Rex_sa
b16bb07774 Translated using Weblate (Arabic)
Currently translated at 100.0% (443 of 443 strings)
2019-02-13 12:11:00 +01:00
naofum
81dd083388 Translated using Weblate (Japanese)
Currently translated at 98.4% (436 of 443 strings)
2019-02-12 16:20:23 +01:00
Chris
92d4cef1e2 Translated using Weblate (Japanese)
Currently translated at 98.4% (436 of 443 strings)
2019-02-12 16:20:22 +01:00
C. Rüdinger
d2cd79dcf5 Translated using Weblate (German)
Currently translated at 99.8% (442 of 443 strings)
2019-02-10 23:34:08 +01:00
Hosted Weblate
0ef8b391e4 Merge branch 'origin/dev' into Weblate. 2019-02-09 13:57:02 +01:00
Eduardo Caron
0fbd105977 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (443 of 443 strings)
2019-02-09 13:57:02 +01:00
ssantos
5c23af541e Translated using Weblate (Portuguese)
Currently translated at 100.0% (443 of 443 strings)
2019-02-09 13:56:57 +01:00
WaldiS
db021ff78b Translated using Weblate (Polish)
Currently translated at 100.0% (443 of 443 strings)
2019-02-09 13:56:57 +01:00
Allan Nordhøy
31294c6f54 Translated using Weblate (Norwegian Bokmål)
Currently translated at 96.8% (429 of 443 strings)
2019-02-09 13:56:56 +01:00
JS Ahn
03d3495759 Translated using Weblate (Korean)
Currently translated at 78.6% (348 of 443 strings)
2019-02-09 13:56:56 +01:00
ssantos
4644e105a8 Translated using Weblate (German)
Currently translated at 100.0% (443 of 443 strings)
2019-02-09 13:56:53 +01:00
Tobias Groza
af5002508d Translated using Weblate (German)
Currently translated at 100.0% (443 of 443 strings)
2019-02-09 13:56:52 +01:00
Nathan Follens
9416d2b9c7 Translated using Weblate (Flemish)
Currently translated at 100.0% (443 of 443 strings)
2019-02-09 13:56:52 +01:00
Nathan Follens
f60f5d5a6c Translated using Weblate (Dutch)
Currently translated at 100.0% (443 of 443 strings)
2019-02-09 13:56:46 +01:00
ezjerry liao
26d00f87a8 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (443 of 443 strings)
2019-02-09 13:56:44 +01:00
Nathan Follens
6c33ea423c Translated using Weblate (Norwegian Bokmål)
Currently translated at 96.6% (428 of 443 strings)
2019-02-09 13:56:40 +01:00
Connectety-W
ad354aca4e added support for youtube-nocookie.com 2019-02-09 12:30:14 +01:00
Christian Schabesberger
ce6a5ebf0a Merge pull request #2107 from chin123/fix_padding_settings
Fix padding in settings layout (Fixes #1866)
2019-02-09 09:08:20 +01:00
Yaron Shahrabani
d66ef38e8d Translated using Weblate (Hebrew)
Currently translated at 100.0% (443 of 443 strings)
2019-02-09 03:38:29 +01:00
Chinmaya Krishnan Mahesh
1b6c49f621 Fix padding in settings layout (Fixes #1866) 2019-02-08 17:33:35 -06:00
Allan Nordhøy
0262c83815 Translated using Weblate (English)
Currently translated at 98.9% (438 of 443 strings)
2019-02-08 21:38:01 +01:00
Allan Nordhøy
c212934130 Translated using Weblate (Norwegian Bokmål)
Currently translated at 96.8% (429 of 443 strings)
2019-02-07 15:12:26 +01:00
Yaron Shahrabani
ac30e47e59 Translated using Weblate (Hebrew)
Currently translated at 98.2% (435 of 443 strings)
2019-02-06 20:36:39 +01:00
Yehuda Levy
d640057453 Translated using Weblate (Hebrew)
Currently translated at 90.1% (399 of 443 strings)
2019-02-06 09:17:45 +01:00
Yaron Shahrabani
0cea136d4d Translated using Weblate (Hebrew)
Currently translated at 90.1% (399 of 443 strings)
2019-02-06 09:17:44 +01:00
Hosted Weblate
9b3d93e734 Merge branch 'origin/dev' into Weblate. 2019-02-06 08:40:24 +01:00
Emin Tufan Çetin
ca3782ac62 Translated using Weblate (Turkish)
Currently translated at 100.0% (441 of 441 strings)
2019-02-06 08:40:24 +01:00
dimqua
dc9ffb7fd5 Translated using Weblate (Russian)
Currently translated at 96.8% (427 of 441 strings)
2019-02-06 08:40:23 +01:00
WaldiS
b21b3a55fe Translated using Weblate (Polish)
Currently translated at 100.0% (441 of 441 strings)
2019-02-06 08:40:21 +01:00
Mostafa Ahangarha
e62bd85a7a Translated using Weblate (Persian)
Currently translated at 57.8% (255 of 441 strings)
2019-02-06 08:40:19 +01:00
Michael Moroni
fed221b008 Translated using Weblate (Italian)
Currently translated at 100.0% (441 of 441 strings)
2019-02-06 08:40:18 +01:00
Terry Louwers
935298d159 Translated using Weblate (Dutch)
Currently translated at 100.0% (441 of 441 strings)
2019-02-06 08:40:17 +01:00
Nathan Follens
909919250c Translated using Weblate (Dutch)
Currently translated at 100.0% (441 of 441 strings)
2019-02-06 08:40:14 +01:00
Emil Tang Kristensen
d24f278f7c Translated using Weblate (Danish)
Currently translated at 85.7% (378 of 441 strings)
2019-02-06 08:40:14 +01:00
赖文胜
ca408a495c Translated using Weblate (Chinese (Simplified))
Currently translated at 97.1% (428 of 441 strings)
2019-02-06 08:39:42 +01:00
Sérgio Marques
ee99719137 Translated using Weblate (Portuguese)
Currently translated at 100.0% (441 of 441 strings)
2019-02-06 08:39:36 +01:00
Christian Schabesberger
5fb0729eae Merge pull request #2083 from TeamNewPipe/ccc
Add MediaCCC support
2019-02-05 18:28:22 +01:00
Christian Schabesberger
a1db3187cd Merge branch 'dev' into ccc 2019-02-05 18:28:17 +01:00
Christian Schabesberger
488a3cf1ff Merge pull request #2084 from TeamNewPipe/splash
add splash screen
2019-02-05 18:27:15 +01:00
Christian Schabesberger
1253a620a4 Merge pull request #2094 from def14nt/add-instable-warning
Added a warning about instability
2019-02-05 18:27:02 +01:00
Christian Schabesberger
64547fc4a7 remove splash for older android 2019-02-05 18:24:34 +01:00
Emil Tang Kristensen
d643d140cf Added translation using Weblate (Danish) 2019-02-04 20:57:57 +01:00
Ali Demirtas
222e2e3242 Translated using Weblate (Turkish)
Currently translated at 100.0% (441 of 441 strings)
2019-02-04 12:37:19 +01:00
Ali Demirtas
ea7b6daf26 Translated using Weblate (Turkish)
Currently translated at 100.0% (441 of 441 strings)
2019-02-04 02:10:01 +01:00
DefiantDog66
14cfab495d Added a warning about instability
This is a follow up to TeamNewPipe#2069. I've removed the "WARNING" from the second one as it looks a bit silly to have the same thing twice, when the user is already attracted to the first one, which means they will most probably read the second warning.

I can revert this if you don't like it.
2019-02-03 19:47:51 +00:00
Alec Holmes
ed4b4a1a3c Updated search fragment to be amazon fire tv friendly 2019-02-01 13:02:28 +00:00
Hosted Weblate
511c552188 Merge branch 'origin/dev' into Weblate. 2019-02-01 09:37:22 +01:00
ssantos
8c650219eb Translated using Weblate (Portuguese)
Currently translated at 100.0% (441 of 441 strings)
2019-02-01 09:37:22 +01:00
WaldiS
189b779abe Translated using Weblate (Polish)
Currently translated at 100.0% (441 of 441 strings)
2019-02-01 09:37:18 +01:00
Michael Moroni
c26074b184 Translated using Weblate (Italian)
Currently translated at 100.0% (441 of 441 strings)
2019-02-01 09:37:16 +01:00
Emanuele Petriglia
6c70779ff1 Translated using Weblate (Italian)
Currently translated at 100.0% (441 of 441 strings)
2019-02-01 09:37:15 +01:00
Yaron Shahrabani
73897481ac Translated using Weblate (Hebrew)
Currently translated at 83.7% (369 of 441 strings)
2019-02-01 09:37:11 +01:00
C. Rüdinger
a62c523ed5 Translated using Weblate (German)
Currently translated at 100.0% (441 of 441 strings)
2019-02-01 09:37:08 +01:00
Florian
0f46f57b52 Translated using Weblate (French)
Currently translated at 89.8% (396 of 441 strings)
2019-02-01 09:37:08 +01:00
Nathan Follens
bc4d65a20c Translated using Weblate (Dutch)
Currently translated at 86.4% (381 of 441 strings)
2019-02-01 09:37:07 +01:00
Vojtěch Šamla
f1e9a44ad9 Translated using Weblate (Czech)
Currently translated at 88.4% (390 of 441 strings)
2019-02-01 09:37:06 +01:00
Marc Riera
61972c4719 Translated using Weblate (Catalan)
Currently translated at 92.1% (406 of 441 strings)
2019-02-01 09:37:05 +01:00
Almin Agic
9183c9c220 Translated using Weblate (Bosnian (latin))
Currently translated at 4.3% (19 of 441 strings)
2019-02-01 09:37:03 +01:00
Rex_sa
1ce59f13ff Translated using Weblate (Arabic)
Currently translated at 87.8% (387 of 441 strings)
2019-02-01 09:37:00 +01:00
Christian Schabesberger
1bac5db6d5 add splash 2019-01-31 18:13:00 +01:00
Christian Schabesberger
58f2c4d8e6 Merge branch 'dev' into ccc 2019-01-31 16:48:22 +01:00
Robin
2c2c61b2fc Add Artist and Duration to MediaDescription 2019-01-31 16:47:33 +01:00
Christian Schabesberger
98b04a4a83 Merge branch 'dev' into ccc 2019-01-31 14:28:10 +01:00
Christian Schabesberger
3ac64c44f4 Merge pull request #1900 from anoymouserver/patch-1
support for invidio.us links
2019-01-31 14:10:10 +01:00
Christian Schabesberger
3375847302 Merge branch 'dev' into patch-1 2019-01-31 14:02:24 +01:00
Christian Schabesberger
14043c86f5 fix backstack issue with mediaccc 2019-01-31 13:24:02 +01:00
Jeff Huang
030117780a Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (441 of 441 strings)
2019-01-31 08:57:07 +01:00
Benedikt Freisen
971c9fe5a1 Translated using Weblate (German)
Currently translated at 100.0% (441 of 441 strings)
2019-01-30 08:49:53 +01:00
Ritvik Saraf
77c6d3d576 merged upstream/dev 2019-01-29 22:32:58 +05:30
Christian Schabesberger
6edbfe2a6f add content filter to mediaccc 2019-01-29 17:20:30 +01:00
Christian Schabesberger
d0a3125df4 fox ogg 2019-01-29 16:13:46 +01:00
Christian Schabesberger
d8c76d4c21 add conferences 2019-01-29 15:39:18 +01:00
Christian Schabesberger
a1cc0897df make frontend not crash on scrolling on ccc search 2019-01-29 15:39:18 +01:00
Christian Schabesberger
e88a90f242 add theming to mediaccc 2019-01-29 15:39:18 +01:00
Christian Schabesberger
1ae54f6f8c further compatiblity fix for meadic.ccc 2019-01-29 15:39:18 +01:00
Hosted Weblate
8a4cb484fa Merge branch 'origin/dev' into Weblate. 2019-01-29 14:17:45 +01:00
Licaon Kter
93defbf341 Translated using Weblate (Romanian)
Currently translated at 84.1% (322 of 383 strings)
2019-01-29 14:17:45 +01:00
Allan Nordhøy
ca1089da9a Translated using Weblate (Norwegian Bokmål)
Currently translated at 97.7% (374 of 383 strings)
2019-01-29 14:17:44 +01:00
Rex_sa
dd07c7db0e Translated using Weblate (Arabic)
Currently translated at 100.0% (383 of 383 strings)
2019-01-29 14:17:42 +01:00
Almin Agic
dfe932e37a Added translation using Weblate (Bosnian (latin)) 2019-01-29 14:17:38 +01:00
Christian Schabesberger
568cf9c259 Merge pull request #2067 from TeamNewPipe/release_v0.15.1
release v0.15.1
2019-01-29 13:40:15 +01:00
Christian Schabesberger
b4ef20e785 fix failing tests 2019-01-29 13:38:38 +01:00
Christian Schabesberger
3a56dabf42 fix exception on viewing downloads 2019-01-29 13:23:39 +01:00
anoy
3ac4899b96 Merge branch 'dev' into patch-1 2019-01-28 21:19:21 +01:00
Christian Schabesberger
b7b228d9ce merge weblate 2019-01-27 22:00:00 +01:00
Laura Arjona Reina
45339fd6d2 Translated using Weblate (Spanish)
Currently translated at 100.0% (383 of 383 strings)
2019-01-27 17:26:10 +01:00
nautilusx
1856a5a82f Translated using Weblate (German)
Currently translated at 100.0% (383 of 383 strings)
2019-01-27 17:26:02 +01:00
Christian Schabesberger
b2aa703b62 add changelog for version v0.15.1 2019-01-27 16:57:56 +01:00
Christian Schabesberger
b31897d65d Merge pull request #2066 from TeamNewPipe/fix_icons
fix icon messup
2019-01-27 16:48:01 +01:00
Christian Schabesberger
a92f776ebe fix icon messup 2019-01-27 16:46:44 +01:00
Christian Schabesberger
b84ed675f5 Merge pull request #2062 from kapodamy/anoth-buggy-giga-fix
Downloads: add null checks
2019-01-25 22:21:28 +01:00
kapodamy
21eb98a52c add null check
add checks for null. This happens after rotating the screen while is turned off
2019-01-24 23:23:30 -03:00
qazaxtan
75dd8d492b Translated using Weblate (Romanian)
Currently translated at 84.1% (322 of 383 strings)
2019-01-23 18:05:27 +01:00
Christian Schabesberger
338893ded4 fix merge conflict 2019-01-23 16:12:21 +01:00
Christian Schabesberger
b459900040 Merge branch 'fix_download' into dev 2019-01-23 14:14:49 +01:00
Christian Schabesberger
d31300f4f9 Merge pull request #2048 from gkeegan/dev
Add updating section to README
2019-01-23 12:54:52 +01:00
kapodamy
f2285c0b19 MP4 muxer +misc modifications
* allow retry downloads with "post-processing failed" error in the new muxer
* MPEG-4 muxer  ¡¡ no DASH output!!
* keep the progress if download fails
* remove TODO in SecondaryStreamHelper.java
* misc clean-up
* delete TestAlgo.java
* delete ExtSDDownloadFailedActivity.java and remove it from AndroidManifest.xml
* use hardcored version for changing icon colors
2019-01-22 18:53:31 -03:00
kapodamy
684cb81974 Update MissionsFragment.java
work-around for reading the current theme icons
2019-01-22 18:53:31 -03:00
kapodamy
9db272f30e Update MissionsFragment.java
use another way to get the "Context"
2019-01-22 18:53:31 -03:00
kapodamy
c4a5e8dc86 misc fixes
* add null checks before resuming a download
* (MissionAdapter.java) reset percent after resuming a download. prevents the "Error" string get stuck, until the download start
2019-01-22 18:53:30 -03:00
kapodamy
df4dd0122f Update missions_header.xml
make the separator line """"""""simetric""""""""""
2019-01-22 18:53:30 -03:00
kapodamy
8fed18b2ac Update MissionAdapter.java
* check if the iterator is initialized
2019-01-22 18:53:30 -03:00
kapodamy
ecabbb57e6 Update download_menu.xml
* hide clear button by default
2019-01-22 18:53:30 -03:00
kapodamy
8d1d4092aa add missing icons in bright theme
* missing white icons
* update attrs.xml and styles.xml
2019-01-22 18:53:30 -03:00
kapodamy
6185c4ddcf delete list and grid icons
* delete all grid.png files
* delete all list.png files
2019-01-22 18:53:29 -03:00
SiD ViCiO
3ccbbccd10 Translated using Weblate (Spanish)
Currently translated at 91.9% (352 of 383 strings)
2019-01-22 02:53:19 +01:00
YONGLE
30e0ccc77b Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (383 of 383 strings)
2019-01-22 02:53:18 +01:00
thami simo
50f7b72b09 Translated using Weblate (Arabic)
Currently translated at 93.2% (357 of 383 strings)
2019-01-22 02:52:58 +01:00
qazaxtan
a5828c7949 Translated using Weblate (Romanian)
Currently translated at 72.1% (276 of 383 strings)
2019-01-22 02:52:55 +01:00
Tobias Groza
22a5e72470 Translated using Weblate (Romanian)
Currently translated at 72.1% (276 of 383 strings)
2019-01-22 02:52:54 +01:00
Keegan Given
5d14dca818 Add link to #1981 2019-01-21 22:21:24 +00:00
Keegan Given
f97cb821f8 Update README.md
Move Updates underneath Coming Features. Make it linkable.
2019-01-21 21:55:45 +00:00
Keegan Given
d02dce5562 Add updating section to README
This will help cull the number of "how to update?" Issues whenever we need to push out a fix, like how recently NewPipe got completely broken.

This attempts to be an all-inclusive guide to updating NewPipe. If there are any (clean/official) links to additional info, please comment them and I will add it.

Also let me know if this section should be relocated within the README. I figured it would be best to keep it up top, so people see it right away, and then don't make a new Issue.
2019-01-21 02:35:39 +00:00
Christian Schabesberger
c6bd42843b Merge pull request #2040 from TeamNewPipe/fix_livestream
Fix livestream
2019-01-20 14:24:53 +01:00
Christian Schabesberger
43e4fbfcd0 fix livestream issue, and move on to v0.15.1 2019-01-20 14:23:41 +01:00
Igor Nedoboy
ac8430cbba Translated using Weblate (Russian)
Currently translated at 100.0% (383 of 383 strings)
2019-01-20 00:22:24 +01:00
Ritvik Saraf
86d619be30 merged upstream/dev 2019-01-19 15:48:05 +05:30
Ritvik Saraf
fec7672598 updated extractor for url decryption fix 2019-01-19 15:26:31 +05:30
Roberto Palenga
44d2744a8c Translated using Weblate (Italian)
Currently translated at 100.0% (383 of 383 strings)
2019-01-19 01:20:51 +01:00
philSism
22bfbe96c8 Translated using Weblate (Greek)
Currently translated at 100.0% (383 of 383 strings)
2019-01-19 01:20:51 +01:00
Christian Schabesberger
c5d1271894 Merge pull request #2022 from TeamNewPipe/dev
release_v0.15.0
2019-01-18 21:18:10 +01:00
Christian Schabesberger
050d3058f9 Merge pull request #2021 from TeamNewPipe/release_v0.15.0
add changelog for version v0.15.0
2019-01-18 21:16:38 +01:00
Christian Schabesberger
2ae99afa21 add changelog for version v0.15.0 2019-01-18 21:13:04 +01:00
Christian Schabesberger
b094c9190f Merge pull request #2020 from TeamNewPipe/release_v0.15.0
Release v0.15.0
2019-01-18 20:54:52 +01:00
Christian Schabesberger
1a9e1e6f7c Merge branch 'dev' into release_v0.15.0 2019-01-18 20:50:46 +01:00
Christian Schabesberger
8c94926693 move on to version 0.15.0 2019-01-18 20:46:50 +01:00
Christian Schabesberger
880a176e65 move on to version 0.15.0 2019-01-18 20:34:43 +01:00
Christian Schabesberger
8de1b5f3d9 Merge pull request #2014 from TeamNewPipe/fix_decrypt
fix decrypt error once again
2019-01-18 17:23:38 +01:00
Christian Schabesberger
178f4546fc Merge branch 'dev' into fix_decrypt 2019-01-18 17:13:49 +01:00
Christian Schabesberger
7564a49344 fix decrypt error once again 2019-01-18 17:11:31 +01:00
Edwar Tikhonov
6c5c42c2b5 Translated using Weblate (Russian)
Currently translated at 100.0% (383 of 383 strings)
2019-01-15 19:20:55 +01:00
naofum
b1653b359e Translated using Weblate (Japanese)
Currently translated at 84.3% (323 of 383 strings)
2019-01-15 19:20:52 +01:00
DeadMetaler
11098afab5 Translated using Weblate (Belarusian)
Currently translated at 86.7% (332 of 383 strings)
2019-01-13 00:19:37 +01:00
AppSoft4
a64051e0f1 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (383 of 383 strings)
2019-01-12 21:06:58 +01:00
Nathan Follens
db8ac4a9ae Translated using Weblate (Flemish)
Currently translated at 100.0% (383 of 383 strings)
2019-01-12 21:06:57 +01:00
Nathan Follens
890474a635 Translated using Weblate (Dutch)
Currently translated at 100.0% (383 of 383 strings)
2019-01-12 21:06:54 +01:00
Tobias Groza
c7941a85ed Merge pull request #1999 from thisBrian/patch-1
Correct 'description' spelling
2019-01-11 17:15:07 +01:00
Brian
fab5f26e09 Correct 'description' spelling 2019-01-12 04:41:16 +13:00
zmni
a39b10eee9 Translated using Weblate (Indonesian)
Currently translated at 100.0% (383 of 383 strings)
2019-01-08 19:07:15 +01:00
srkrishna
97b933a990 Translated using Weblate (Tamil)
Currently translated at 40.5% (155 of 383 strings)
2019-01-07 15:06:58 +01:00
Sérgio Marques
4926e90514 Translated using Weblate (Portuguese)
Currently translated at 100.0% (383 of 383 strings)
2019-01-07 15:06:58 +01:00
zmni
6dca975844 Translated using Weblate (Indonesian)
Currently translated at 100.0% (383 of 383 strings)
2019-01-04 12:07:00 +01:00
zelos-h
e31743770a Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (383 of 383 strings)
2019-01-04 12:06:59 +01:00
Markel @wakutiteo
d8aab62d75 Translated using Weblate (Spanish)
Currently translated at 90.9% (348 of 383 strings)
2019-01-03 00:48:39 +01:00
Jeff Huang
f90603a18f Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (383 of 383 strings)
2019-01-03 00:48:38 +01:00
Marc Riera
5fce9facbe Translated using Weblate (Catalan)
Currently translated at 99.7% (382 of 383 strings)
2019-01-03 00:48:37 +01:00
zelos-h
32b48d5cdb Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (383 of 383 strings)
2019-01-03 00:48:36 +01:00
Jeff Huang
3e4f0d682b Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (383 of 383 strings)
2019-01-03 00:48:35 +01:00
Yaron Shahrabani
98449ddfe0 Translated using Weblate (Hebrew)
Currently translated at 88.5% (339 of 383 strings)
2019-01-01 10:09:41 +01:00
WaldiS
26040d4e9f Translated using Weblate (Polish)
Currently translated at 100.0% (383 of 383 strings)
2018-12-30 19:03:39 +01:00
srkrishna
83cea5e1ee Translated using Weblate (Tamil)
Currently translated at 39.7% (152 of 383 strings)
2018-12-29 00:09:42 +01:00
postsorino
3e73a5dbd3 Translated using Weblate (Greek)
Currently translated at 99.5% (381 of 383 strings)
2018-12-29 00:09:41 +01:00
Tobias Groza
dd424a4cb3 Translated using Weblate (Greek)
Currently translated at 99.5% (381 of 383 strings)
2018-12-29 00:09:38 +01:00
Éfrit
0c79f5cce3 Translated using Weblate (French)
Currently translated at 100.0% (383 of 383 strings)
2018-12-29 00:09:37 +01:00
krtkush
794c3703e5 Merge branch '1520_app_update_notif' of https://github.com/krtkush/NewPipe into 1520_app_update_notif 2018-12-28 18:09:05 +05:30
krtkush
b674006fcc Conflict resolution. 2018-12-28 18:07:54 +05:30
Ritvik Saraf
559c397b2f more NPE fix 2018-12-25 20:17:56 +05:30
Ritvik Saraf
646698f1ed fixed NPE in soundcloud 2018-12-25 19:59:03 +05:30
Ritvik Saraf
c9b938ae55 readded animations 2018-12-25 15:36:15 +05:30
Ritvik Saraf
990c220fa0 updated extractor 2018-12-23 09:44:42 +05:30
Yehuda Levy
38641d4edf Translated using Weblate (Hebrew)
Currently translated at 88.5% (339 of 383 strings)
2018-12-23 02:09:26 +01:00
srkrishna
450072bd23 Translated using Weblate (Tamil)
Currently translated at 39.4% (151 of 383 strings)
2018-12-21 22:09:14 +01:00
srkrishna
25eb93fae0 Translated using Weblate (Tamil)
Currently translated at 37.1% (142 of 383 strings)
2018-12-20 14:09:13 +01:00
Ben De Meester
bcf6f60571 Translated using Weblate (Flemish)
Currently translated at 85.4% (327 of 383 strings)
2018-12-20 14:09:11 +01:00
Ben De Meester
2076b8f1d7 Translated using Weblate (Dutch)
Currently translated at 100.0% (383 of 383 strings)
2018-12-20 14:09:10 +01:00
Ritvik Saraf
f19cfb75e6 merged upstream/dev 2018-12-20 08:51:44 +05:30
Ritvik Saraf
ceaacc771d removed jerky animations 2018-12-19 10:58:59 +05:30
Ritvik Saraf
48067e3285 up next text alignment 2018-12-17 10:03:04 +05:30
sXp
003855a94c Translated using Weblate (Hindi)
Currently translated at 85.4% (327 of 383 strings)
2018-12-15 19:03:36 +01:00
Christian Schabesberger
3599ab3caf Merge pull request #1759 from kapodamy/giga-postprocessing
Fucking travis
2018-12-11 16:37:28 +01:00
srkrishna
e7a26b436d Translated using Weblate (Tamil)
Currently translated at 32.9% (126 of 383 strings)
2018-12-10 19:42:55 +01:00
AB
ab94bc18dc Translated using Weblate (Ukrainian)
Currently translated at 100.0% (383 of 383 strings)
2018-12-10 13:08:54 +01:00
Eduardo Caron
36e91ea155 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (383 of 383 strings)
2018-12-10 13:08:53 +01:00
Christian Schabesberger
6035be9ce6 Merge branch 'dev' into giga-postprocessing 2018-12-10 12:12:38 +01:00
Kartikey Kushwaha
67499bdc65 Merge branch 'dev' into 1520_app_update_notif 2018-12-09 18:43:20 +05:30
Ritvik Saraf
222c8fdb62 tablet ui support for comments 2018-12-09 03:21:55 +05:30
srkrishna
9d648bad51 Translated using Weblate (Tamil)
Currently translated at 30.3% (116 of 383 strings)
2018-12-08 22:08:52 +01:00
Ritvik Saraf
1a62b9a161 removed dislike button, added comment published time 2018-12-08 20:32:28 +05:30
Echelon Arpa
33021e8fe0 Translated using Weblate (Turkish)
Currently translated at 100.0% (383 of 383 strings)
2018-12-07 21:09:01 +01:00
Emin Tufan Çetin
5a2ae4c3e3 Translated using Weblate (Turkish)
Currently translated at 100.0% (383 of 383 strings)
2018-12-07 21:09:01 +01:00
srkrishna
9eaef84cc8 Translated using Weblate (Tamil)
Currently translated at 29.8% (114 of 383 strings)
2018-12-07 21:09:00 +01:00
Rintaro matsuo
fcc4d655f5 Translated using Weblate (Japanese)
Currently translated at 81.5% (312 of 383 strings)
2018-12-07 21:08:59 +01:00
ScratchBuild
8d0ac4f5f0 Translated using Weblate (Japanese)
Currently translated at 81.5% (312 of 383 strings)
2018-12-07 21:08:58 +01:00
Tobias Groza
d56cf003f8 Translated using Weblate (German)
Currently translated at 100.0% (383 of 383 strings)
2018-12-07 21:08:58 +01:00
Kristjan Räts
34d0c0b1ba Translated using Weblate (Estonian)
Currently translated at 100.0% (383 of 383 strings)
2018-12-07 21:08:56 +01:00
Vojtěch Šamla
9bbbffbe7a Translated using Weblate (Czech)
Currently translated at 100.0% (383 of 383 strings)
2018-12-07 21:08:55 +01:00
Tobias Groza
ccd0f7d9cc Merge pull request #1878 from shivanju/auto_queue_logic
#1336 Fix for inserting new streams when auto queuing is enabled
2018-12-07 19:43:41 +01:00
Ritvik Saraf
ccb9bceecc removed unused imports 2018-12-07 08:42:05 +05:30
Ritvik Saraf
c1a67ff1f8 minor scrolling fix and ellipsize fix 2018-12-07 06:45:33 +05:30
Kartikey Kushwaha
bfda8dcc02 Merge branch 'dev' into 1520_app_update_notif 2018-12-05 13:04:24 +05:30
kapodamy
8746e7c9ad Merge branch 'dev' into giga-postprocessing 2018-12-05 01:15:39 -03:00
kapodamy
e2aa36d083 fast download pausing
* fast download pausing
* fix UI thread blocking when calling pause()
* check running threads before start the download
* fix null pointer exception in onDestroy in the download service, without calling onCreate method (android 8)
2018-12-05 01:07:59 -03:00
Ritvik Saraf
ff90f257cc removed useless log statement 2018-12-04 23:37:02 +05:30
Ritvik Saraf
9b84046865 merged upstream/dev 2018-12-04 23:19:57 +05:30
Shivanju Awasthi
51434a39f8 Merge branch 'dev' into auto_queue_logic 2018-12-04 16:22:18 +00:00
Christian Schabesberger
3e2031be7c Merge pull request #1925 from TeamNewPipe/stale
disable stalebot again
2018-12-03 23:30:58 +01:00
Christian Schabesberger
ea4e8805b7 disable stalebot again 2018-12-03 23:30:28 +01:00
Tobias Groza
f62bfeac08 Merge branch 'dev' into 1520_app_update_notif 2018-12-03 16:33:46 +01:00
Tobias Groza
b9042c37f9 Merge pull request #1915 from agarwalakash06/issue-1505
Issue 1505: Delete on right swipe
2018-12-03 16:06:27 +01:00
srkrishna
49a58dcab1 Translated using Weblate (Tamil)
Currently translated at 29.0% (111 of 383 strings)
2018-12-02 16:08:42 +01:00
notramo
e2acbeddc2 Translated using Weblate (Hungarian)
Currently translated at 84.9% (325 of 383 strings)
2018-12-02 16:08:41 +01:00
Kristjan Räts
449b17d830 Translated using Weblate (Estonian)
Currently translated at 86.4% (331 of 383 strings)
2018-12-02 16:08:39 +01:00
Kartikey Kushwaha
7ed460ce02 Merge branch 'dev' into 1520_app_update_notif 2018-12-02 18:07:08 +05:30
kapodamy
9f4a7e664f more of the same
* misc code clean-up
* fix weird download speed, before switching the list view
* fix CircularFile.java getting stuck on post-processing huge files >2GiB
* keep crashed post-processing downloads visible to the user
2018-12-01 22:14:56 -03:00
Akash Agarwal
38eb75b13f Merge branch 'dev' into issue-1505 2018-12-01 14:12:28 +05:30
Christian Schabesberger
0ad56874b4 Merge pull request #1918 from TeamNewPipe/stale
add stalebot confic
2018-12-01 09:36:45 +01:00
Christian Schabesberger
c1168693fa add stalebot confic 2018-12-01 09:35:42 +01:00
Christian Schabesberger
feb8c27f1f Merge branch 'dev' into giga-postprocessing 2018-12-01 09:30:38 +01:00
Christian Schabesberger
c20ebd66e5 Merge branch 'dev' into auto_queue_logic 2018-12-01 09:29:25 +01:00
Christian Schabesberger
4d78d530dc Merge pull request #1917 from TeamNewPipe/cont
update contribution guidelines
2018-12-01 09:23:58 +01:00
Christian Schabesberger
22b20c15de update contribution guidelines 2018-12-01 09:21:57 +01:00
Akash Agarwal
c69b224c65 Issue 1505: Delete on right swipe 2018-12-01 00:42:56 +05:30
Christian Schabesberger
805d328d6c Merge pull request #1902 from Ping20002015/master
Fix NPE for issue #1901
2018-11-30 12:08:59 +01:00
mahmut özcan
edcb692f78 Translated using Weblate (Turkish)
Currently translated at 97.1% (372 of 383 strings)
2018-11-29 22:08:34 +01:00
ask6155
f33586f062 Translated using Weblate (Hindi)
Currently translated at 81.5% (312 of 383 strings)
2018-11-29 22:08:30 +01:00
kapodamy
b8293f134d Update settings_keys.xml
* remane max_try -> maximum_try
2018-11-29 15:19:53 -03:00
kapodamy
7e9bcff0f3 Merge branch 'dev' into giga-postprocessing 2018-11-28 22:53:29 -03:00
kapodamy
eba3b32708 misc improvements
* don't show notifications while download activity
* proper icon in failed download notifications
* re-write list auto-refresh (MissionAdapter.java)
* improve I/O performance (CircularFile.java)
* fix implementation of "save thread position" on multi-thread downloads
2018-11-28 22:24:52 -03:00
Olexandr Nesterenko
d61bf26e17 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (383 of 383 strings)
2018-11-28 15:17:37 +01:00
AB
2e662b5745 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (383 of 383 strings)
2018-11-28 15:17:36 +01:00
Helios
9714fa369b Translated using Weblate (Tamil)
Currently translated at 28.7% (110 of 383 strings)
2018-11-28 15:17:34 +01:00
Markel @wakutiteo
0e8acba08e Translated using Weblate (Spanish)
Currently translated at 88.3% (338 of 383 strings)
2018-11-28 15:17:28 +01:00
Sérgio Marques
a18e588e55 Translated using Weblate (Portuguese)
Currently translated at 100.0% (383 of 383 strings)
2018-11-28 15:17:27 +01:00
ask6155
bf55e3c0cc Translated using Weblate (Hindi)
Currently translated at 79.6% (305 of 383 strings)
2018-11-28 15:17:20 +01:00
ButterflyOfFire
486d114e64 Translated using Weblate (Arabic)
Currently translated at 85.9% (329 of 383 strings)
2018-11-28 15:17:19 +01:00
Prabjot Singh
ac5c060a98 Translated using Weblate (Hindi)
Currently translated at 79.6% (305 of 383 strings)
2018-11-28 15:17:18 +01:00
ask6155
86a9d197cb Translated using Weblate (Hindi)
Currently translated at 79.6% (305 of 383 strings)
2018-11-28 15:17:17 +01:00
Shivanju Awasthi
e911dbb9d4 Merge branch 'dev' into auto_queue_logic 2018-11-26 22:56:01 +05:30
Ping20002015
e26d123f67 Merge branch 'dev' into master 2018-11-26 18:00:22 +01:00
MadderRagax
70aac81900 Translated using Weblate (Swedish)
Currently translated at 98.4% (377 of 383 strings)
2018-11-26 14:42:04 +01:00
Eduardo Caron
28e78d98f6 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (383 of 383 strings)
2018-11-26 14:42:02 +01:00
Mostafa Ahangarha
fabc5ae032 Translated using Weblate (Persian)
Currently translated at 62.4% (239 of 383 strings)
2018-11-26 14:42:01 +01:00
ditokp
e40882455d Translated using Weblate (Indonesian)
Currently translated at 99.7% (382 of 383 strings)
2018-11-26 14:41:54 +01:00
Whod
f1483e8c8e Translated using Weblate (Bulgarian)
Currently translated at 100.0% (383 of 383 strings)
2018-11-26 14:41:51 +01:00
Viktar Vauchkevich
bd40e2c3ff Translated using Weblate (Belarusian)
Currently translated at 86.7% (332 of 383 strings)
2018-11-26 14:41:49 +01:00
Gontzal Manuel Pujana Onaindia
9479498713 Translated using Weblate (Basque)
Currently translated at 100.0% (383 of 383 strings)
2018-11-26 14:41:49 +01:00
ssantos
6bd8523ec2 Translated using Weblate (Portuguese)
Currently translated at 100.0% (383 of 383 strings)
2018-11-26 14:41:46 +01:00
Christian Schabesberger
22e3cddd91 Merge pull request #1884 from TeamNewPipe/remove_4.x
Remove support for android 4.1 - 4.3
2018-11-25 22:49:13 +01:00
krtkush
c864b15c34 Test code revert. 2018-11-26 01:18:33 +05:30
krtkush
069654c5f9 vector -> png 2018-11-26 01:18:02 +05:30
kapodamy
f3d4d4747a and more fixes
* fix content length reading
* use float overflow. Expensive, double is used instead
* fix invalid cast after click the mission body
* use a list for maximum attemps (downloads)
* minor clean up (DownloadManager.java)
* dont pass SharedPreferences instace to DownloadManager
* use a switch instead of checkbox for cross_network_downloads
* notify media scanner after deleting a finished download
2018-11-24 20:13:18 -03:00
shivanju
5bbb0cd666 issue:1336 Remove auto queued stream if a new stream gets appended 2018-11-24 17:35:17 +05:30
Ping20002015
7b5ba3bdc2 Fix NPE for issue #1901 2018-11-23 19:38:01 +01:00
anoy
5ac17ee6b8 added support for invidio.us links 2018-11-23 19:18:34 +01:00
kapodamy
d647555e3a more fixes
* use bold style in status (mission_item_linear.xml)
* fix download attemps not begin updated
* dont stop the queue if a download fails
* implement partial wake-lock & wifi-lock
* show notifications for failed downloads
* ¿proper bitmap dispose? (DownloadManagerService.java)
* improve buffer filling (CircularFile.java)
* [Mp4Dash] increment reserved space from 2MiB to 15MiB. This is expensive but useful for devices with low ram
* [WebM] use 2MiB of reserved space
* fix debug warning if one thread is used
* fix wrong download speed when the activity is suspended
* Fix "Queue" menu item that appears in post-processing errors
* fix mission length dont being updated (missing commit)
2018-11-22 23:33:34 -03:00
krtkush
26e22f97ee Conflict resolution 2018-11-23 01:41:47 +05:30
Shivanju Awasthi
84976a65e0 Merge branch 'dev' into auto_queue_logic 2018-11-22 23:25:13 +05:30
kapodamy
fef9d541ed misc fixes
* use getPreferredLocalization() instead of getLocalization()
* use lastest commit in build.gradle
* fix missing cast in MissionAdapter.java
2018-11-19 15:50:15 -03:00
krtkush
ad5535af81 Code refactoring, PR changes. 2018-11-19 23:27:13 +05:30
Yaron Shahrabani
cdcfb4ffce Translated using Weblate (Hebrew)
Currently translated at 78.9% (302 of 383 strings)
2018-11-18 21:40:36 +01:00
b1a6b64a90
5403ac8893 Translated using Weblate (French)
Currently translated at 99.5% (381 of 383 strings)
2018-11-18 21:40:35 +01:00
Igor Nedoboy
9b26457781 Translated using Weblate (Russian)
Currently translated at 100.0% (383 of 383 strings)
2018-11-18 21:40:33 +01:00
krtkush
939cc56951 Pull request changes v2. 2018-11-18 19:18:16 +05:30
krtkush
23309e6fdf Pull request changes. 2018-11-18 19:15:50 +05:30
MadderRagax
3f60c961d9 Translated using Weblate (Swedish)
Currently translated at 97.9% (375 of 383 strings)
2018-11-18 13:43:46 +01:00
Ariel Shulman
9e7f07e196 Translated using Weblate (Hebrew)
Currently translated at 78.9% (302 of 383 strings)
2018-11-18 13:43:45 +01:00
ssantos
eda4439ee8 Translated using Weblate (German)
Currently translated at 100.0% (383 of 383 strings)
2018-11-18 13:43:43 +01:00
b1a6b64a90
ad02558ade Translated using Weblate (French)
Currently translated at 99.5% (381 of 383 strings)
2018-11-18 13:43:38 +01:00
WaldiS
0d1901cfe5 Translated using Weblate (Polish)
Currently translated at 100.0% (383 of 383 strings)
2018-11-17 14:08:01 +01:00
Emanuele Petriglia
ce493d1ae2 Translated using Weblate (Italian)
Currently translated at 100.0% (383 of 383 strings)
2018-11-17 14:07:59 +01:00
wellinkstein
09312ecd1d Translated using Weblate (French)
Currently translated at 98.2% (376 of 383 strings)
2018-11-17 14:07:58 +01:00
ezjerry liao
2f274d5f52 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (383 of 383 strings)
2018-11-17 14:07:56 +01:00
Marc Riera
6dbf226365 Translated using Weblate (Catalan)
Currently translated at 99.5% (381 of 383 strings)
2018-11-17 14:07:54 +01:00
Viktar Vauchkevich
6401b5f54d Translated using Weblate (Belarusian)
Currently translated at 85.1% (326 of 383 strings)
2018-11-17 14:07:50 +01:00
beriain
ac2dd81d39 Translated using Weblate (Basque)
Currently translated at 85.1% (326 of 383 strings)
2018-11-17 14:07:50 +01:00
kapodamy
6784522195 Merge branch 'dev' into giga-postprocessing 2018-11-15 20:53:30 -03:00
kapodamy
f42d077f30 misc utils
Also this include:
* Mp4 DASH reader/writter
* WebM reader/writter
* a subtitle converter for Timed Text Markup Language v1 and TranScript (v1, v2 and v3)
* SharpStream to wrap IntputStream and OutputStream in one interface
* custom implementation of DataInputStream
2018-11-15 20:17:22 -03:00
Christian Schabesberger
eaca47ebc6 Merge branch 'dev' into remove_4.x 2018-11-15 13:27:27 +01:00
Tobias Groza
4d57223847 Merge pull request #1886 from nicholasfagan/dev
Fix broken screenshots in README.md
2018-11-15 08:20:02 +01:00
Nick Fagan
d9ab96236b Fix broken screenshots in README.md 2018-11-14 15:28:44 -04:00
AB
44b2e62eef Translated using Weblate (Ukrainian)
Currently translated at 84.9% (325 of 383 strings)
2018-11-13 20:43:45 +01:00
Igor Nedoboy
7d5d4df761 Translated using Weblate (Russian)
Currently translated at 100.0% (383 of 383 strings)
2018-11-13 20:43:41 +01:00
Mostafa Ahangarha
da7716db60 Translated using Weblate (Persian)
Currently translated at 35.0% (134 of 383 strings)
2018-11-13 20:43:39 +01:00
postsorino
862c5d342b Translated using Weblate (Greek)
Currently translated at 84.6% (324 of 383 strings)
2018-11-13 20:43:34 +01:00
Igor Nedoboy
6167d5dbfc Translated using Weblate (English)
Currently translated at 100.0% (383 of 383 strings)
2018-11-13 20:43:32 +01:00
Shivanju Awasthi
2856fb029f Merge branch 'dev' into auto_queue_logic 2018-11-14 00:17:54 +05:30
Christian Schabesberger
8fb945312a put autoplay next stream setting into behaviour page 2018-11-13 17:30:04 +01:00
Christian Schabesberger
25d6806ebd set minSdk to 19 and deprecate old player 2018-11-13 17:27:47 +01:00
Christian Schabesberger
51070d9afd Merge pull request #1818 from TeamNewPipe/screenshot-order
Fix fastlane screenshot order
2018-11-13 16:58:37 +01:00
Christian Schabesberger
1048caa496 Merge branch 'dev' into screenshot-order 2018-11-13 16:58:18 +01:00
Christian Schabesberger
0cd7ac05aa Merge pull request #1879 from jludden/play_one_click
downloaded files can now be opened with one click
2018-11-13 13:43:28 +01:00
Christian Schabesberger
2793c42d91 Merge branch 'dev' into play_one_click 2018-11-13 13:18:57 +01:00
Christian Schabesberger
2eaa7288e4 Merge pull request #1876 from bboa/dev
Missed strings
2018-11-13 12:53:01 +01:00
ssantos
f9341bea79 Translated using Weblate (Portuguese)
Currently translated at 100.0% (383 of 383 strings)
2018-11-12 10:08:44 +01:00
jludden
0df8d13020 downloads can now be viewed with one click fixed 2018-11-11 22:25:37 +08:00
jludden
d27622de1e downloaded files can now be opened with one click
For consistency, I removed the view file option from the overflow menu as well
2018-11-11 19:54:35 +08:00
shivanju
47c3da131c issue:1336 Fix for inserting new streams when auto queuing is enabled 2018-11-11 16:24:49 +05:30
Igor Nedoboy
3a608bb582 Translated using Weblate (Russian)
Currently translated at 100.0% (383 of 383 strings)
2018-11-11 00:47:04 +01:00
Igor Nedoboy
64f9228ee3 Update strings.xml 2018-11-11 02:44:45 +03:00
Igor Nedoboy
c926482b3c Translated using Weblate (Russian)
Currently translated at 100.0% (383 of 383 strings)
2018-11-10 23:38:19 +01:00
Igor Nedoboy
9562972c42 Translated using Weblate (Russian)
Currently translated at 100.0% (383 of 383 strings)
2018-11-10 23:02:17 +01:00
Igor Nedoboy
b462b7fcc4 Update strings.xml 2018-11-10 17:08:04 +03:00
Igor Nedoboy
b34f9d7fd3 Update strings.xml 2018-11-10 03:06:55 +03:00
Igor Nedoboy
57732c3e5f Update strings.xml 2018-11-10 02:56:14 +03:00
kapodamy
eb1f56488f resbase (08/11/2018) 2018-11-08 22:00:13 -03:00
kapodamy
5825843f68 main commit
Post-processing infrastructure
* remove interfaces with one implementation
* fix download resources with unknow length
* marquee style for ProgressDrawable
* "view details" option in mission context menu
* notification for finished downloads
* postprocessing infrastructure: sub-missions, circular file, layers for layers of abstractions for Java IO streams
* Mp4 muxing (only DASH brand)
* WebM muxing
* Captions downloading
* alert dialog for overwrite existing downloads finished or not.

Misc changes
* delete SQLiteDownloadDataSource.java
* delete DownloadMissionSQLiteHelper.java
* implement Localization from #114

Misc fixes (this branch)
* restore old mission listeners variables. Prevents registered listeners get de-referenced on low-end devices
* DownloadManagerService.checkForRunningMission() now return false if the mission has a error.
* use Intent.FLAG_ACTIVITY_NEW_TASK when launching an activity from gigaget threads (apparently it is required in old versions of android)

More changes
* proper error handling "infrastructure"
* queue instead of multiple downloads
* move serialized pending downloads (.giga files) to app data
* stop downloads when swicthing to mobile network (never works, see 2nd point)
* save the thread count for next downloads
* a lot of incoherences fixed
* delete DownloadManagerTest.java (too many changes to keep this file updated)
2018-11-08 19:00:44 -03:00
Андрій
dd56a5d869 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (383 of 383 strings)
2018-11-08 17:07:53 +01:00
Nitin Khanna
86f82c0e61 pop-up player crash fixed 2018-11-07 22:01:39 +05:30
rimasx
8ae45240b2 Translated using Weblate (Estonian)
Currently translated at 99.7% (382 of 383 strings)
2018-11-06 15:02:39 +01:00
WaldiS
6d845af7f1 Translated using Weblate (Polish)
Currently translated at 100.0% (383 of 383 strings)
2018-11-02 08:23:47 +01:00
Piotr Kaczmarek
733ebb8caf Translated using Weblate (Polish)
Currently translated at 100.0% (383 of 383 strings)
2018-11-02 08:23:47 +01:00
Max Mathys
695a194467 Translated using Weblate (Finnish)
Currently translated at 100.0% (383 of 383 strings)
2018-11-02 08:23:46 +01:00
simo
8a56257ade Translated using Weblate (Arabic)
Currently translated at 100.0% (383 of 383 strings)
2018-11-02 08:23:45 +01:00
Christian Schabesberger
45fea983b9 Merge pull request #1835 from ritiek/fix-res-crash
Fix crash with default resolution set to best and limited mobile data resolution
2018-11-01 20:22:44 +01:00
Ritiek Malhotra
642b499e70 Fix crash with default resolution best on mobile data 2018-10-31 21:44:12 +05:30
Christian Schabesberger
5c5575bb72 Merge branch 'dev' into screenshot-order 2018-10-31 10:26:31 +01:00
Dual Natan
4d5dc0d39c Translated using Weblate (Macedonian)
Currently translated at 100.0% (383 of 383 strings)
2018-10-29 19:23:30 +01:00
Eduardo Caron
8589ee14ff Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (383 of 383 strings)
2018-10-25 17:26:00 +02:00
Stjepan
1727387c9c Translated using Weblate (Croatian)
Currently translated at 86.9% (333 of 383 strings)
2018-10-25 17:25:58 +02:00
ezjerry liao
e1146e4655 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (383 of 383 strings)
2018-10-25 17:25:54 +02:00
krtkush
c29b0645bd Merge branch '1520_app_update_notif' of https://github.com/krtkush/NewPipe into 1520_app_update_notif 2018-10-22 23:12:51 +05:30
krtkush
96dac0f979 Code review suggested changes. 2018-10-22 23:12:25 +05:30
Tobias Groza
fda9b59129 Code review changes.
Co-Authored-By: krtkush <kartikey92@gmail.com>
2018-10-22 23:08:46 +05:30
Ritvik Saraf
fa5896ee5b fixed screen rotation for viewpager 2018-10-19 18:44:03 +05:30
Kartikey Kushwaha
3c6d27b504 Delete R.java 2018-10-18 23:04:07 +05:30
Kartikey Kushwaha
6ef25eb861 Delete Manifest.java 2018-10-18 23:03:21 +05:30
Kartikey Kushwaha
ec28e972bb Delete BuildConfig.java 2018-10-18 23:02:59 +05:30
Kartikey Kushwaha
d1a9033525 Delete R.java 2018-10-18 23:02:38 +05:30
Kartikey Kushwaha
2d5bc3ada8 Delete Manifest.java 2018-10-18 23:02:30 +05:30
Kartikey Kushwaha
506ffb9885 Delete BuildConfig.java 2018-10-18 23:02:19 +05:30
krtkush
8ef702fa07 Removed updates options from settings in case of non github apk. 2018-10-18 22:59:33 +05:30
Ritvik Saraf
9fc38b5bb8 improved fling behavior, added tab indicator dots, added next video in related videos 2018-10-17 00:23:02 +05:30
TobiGr
907e5a10d6 Rename screenshots to display them in correct order in the F-Droid app 2018-10-16 16:33:09 +02:00
krtkush
54ac5e8940 Merge branch '1520_app_update_notif' of https://github.com/krtkush/NewPipe into 1520_app_update_notif 2018-10-14 19:16:59 +05:30
krtkush
e2341363d4 Added check for SHA1 key. 2018-10-14 19:16:28 +05:30
Christian Schabesberger
f1aa3d8c90 Merge branch 'dev' into 1520_app_update_notif 2018-10-06 18:04:39 +02:00
Ritvik Saraf
cf3e53eb71 update notify on dataset change 2018-10-02 21:30:11 +05:30
Ritvik Saraf
b8865e925d added content setting to disable comments 2018-10-02 20:56:14 +05:30
Ritvik Saraf
2e9a860aaa added viewpager. changed from parallaxscrollview to coordinate layout 2018-10-02 20:39:16 +05:30
Ritvik Saraf
e4bef056e6 merged upstream/dev 2018-09-29 15:46:47 +05:30
Ritvik Saraf
803b8eab28 updated extractor version 2018-09-28 05:04:36 +05:30
Ritvik Saraf
08bbfc50ee updated extractor 2018-09-27 23:27:52 +05:30
Ritvik Saraf
4e6722f201 updated extractor and downloader 2018-09-27 04:20:57 +05:30
Ritvik Saraf
a29e2116a7 handling error while loading comments 2018-09-27 00:53:36 +05:30
Ritvik Saraf
515be677a9 no comments 2018-09-24 14:53:43 +05:30
Ritvik Saraf
d694c5f511 smoother transition to comments fragment 2018-09-23 19:45:26 +05:30
Ritvik Saraf
66c753f3a3 changed comments fragment loading animation 2018-09-23 15:22:45 +05:30
Ritvik Saraf
7047b62442 added comments fragment 2018-09-23 07:02:19 +05:30
Ritvik Saraf
5cc73555cd updated extractor version 2018-09-19 05:41:01 +05:30
Ritvik Saraf
219922cd82 added commentsInfo in streamInfo 2018-09-19 05:13:55 +05:30
Kartikey Kushwaha
7124d9bca5 Removed flvor checks. Added update settings under main settings. 2018-09-15 20:51:17 +05:30
Ritvik Saraf
08127e5806 added basic/crappy comments support 2018-09-15 17:15:44 +05:30
Kartikey Kushwaha
6417bd91ef Pull request changes v1. 2018-09-15 14:08:32 +05:30
Kartikey Kushwaha
cde5f7d12e Merge branch 'dev' of https://github.com/krtkush/NewPipe into 1520_app_update_notif 2018-09-15 13:30:09 +05:30
Kartikey Kushwaha
395c9587b6 Conflict resolution. 2018-09-15 13:22:13 +05:30
Kartikey Kushwaha
17197ad670 Pull request changes begins here. 2018-09-15 12:51:39 +05:30
Kartikey Kushwaha
910c10f554 Removed debug code 2018-08-17 01:46:33 +05:30
Kartikey Kushwaha
04e974b326 Bug fix. 2018-08-17 01:11:51 +05:30
Kartikey Kushwaha
e7abeb5ad9 Added version code check. 2018-08-17 00:53:42 +05:30
Kartikey Kushwaha
2a18eacf62 More refactoring. 2018-08-12 20:57:30 +05:30
Kartikey Kushwaha
af42e32ae6 Code refactored and added comments. 2018-08-12 18:34:20 +05:30
Kartikey Kushwaha
12b93d6637 Added new icon for update notification. 2018-08-12 17:18:46 +05:30
Kartikey Kushwaha
930c971035 Added version check in the pop-up player 2018-08-12 16:41:21 +05:30
Kartikey Kushwaha
06f20c66f8 Moved the new version check to the application class. 2018-08-12 16:35:53 +05:30
Kartikey Kushwaha
7c875a8541 Merge branch 'dev' of https://github.com/krtkush/NewPipe into 1520_app_update_notif 2018-08-12 15:19:15 +05:30
Kartikey Kushwaha
f85e19c75d Added notification channel and code to show notification. 2018-08-12 15:01:50 +05:30
Kartikey Kushwaha
5e2aa51627 Moved the asynctask to its own class. 2018-08-11 19:36:23 +05:30
Kartikey Kushwaha
75a44fb30a Added HTTPS request to get version data. Added APK flaor for github and fdroid. 2018-08-11 19:13:52 +05:30
239 changed files with 16214 additions and 5747 deletions

View File

@@ -5,44 +5,64 @@ PLEASE READ THESE GUIDELINES CAREFULLY BEFORE ANY CONTRIBUTION!
## Crash reporting
Do not report crashes in the GitHub issue tracker. NewPipe has an automated crash report system that will ask you to send a report via e-mail when a crash occurs. This contains all the data we need for debugging, and allows you to even add a comment to it. You'll see exactly what is sent, the system is 100% transparent.
Do not report crashes in the GitHub issue tracker. NewPipe has an automated crash report system that will ask you to
send a report via e-mail when a crash occurs. This contains all the data we need for debugging, and allows you to even
add a comment to it. You'll see exactly what is sent, the system is 100% transparent.
## Issue reporting/feature requests
* Search the [existing issues](https://github.com/TeamNewPipe/NewPipe/issues) first to make sure your issue/feature hasn't been reported/requested before
* Search the [existing issues](https://github.com/TeamNewPipe/NewPipe/issues) first to make sure your issue/feature
hasn't been reported/requested before
* Check whether your issue/feature is already fixed/implemented
* Check if the issue still exists in the latest release/beta version
* If you are an Android/Java developer, you are always welcome to fix/implement an issue/a feature yourself. PRs welcome!
* We use English for development. Issues in other languages will be closed and ignored.
* Please only add *one* issue at a time. Do not put multiple issues into one thread.
* When reporting a bug please give us a context, and a description how to reproduce it.
* Issues that only contain a generated bug report, but no describtion might be closed.
* Issues that only contain a generated bug report, but no description might be closed.
## Bug Fixing
* If you want to help NewPipe to become free of bugs (this is our utopic goal for NewPipe), you can send us an email to tnp@newpipe.schabi.org to let me know that you intend to help. We'll send you further instructions. You may, on request, register at our [Sentry](https://sentry.schabi.org) instance (see section "Crash reporting" for more information.
* If you want to help NewPipe to become free of bugs (this is our utopic goal for NewPipe), you can send us an email to
tnp@newpipe.schabi.org to let me know that you intend to help. We'll send you further instructions. You may, on request,
register at our [Sentry](https://sentry.schabi.org) instance (see section "Crash reporting" for more information.
## Translation
* NewPipe can be translated via [Weblate](https://hosted.weblate.org/projects/newpipe/strings/). You can log in there with your GitHub account.
* NewPipe can be translated via [Weblate](https://hosted.weblate.org/projects/newpipe/strings/). You can log in there
with your GitHub account.
## Code contribution
* Stick to NewPipe's style conventions (well, just look the other code and then do it the same way :))
* Do not bring non-free software (e.g., binary blobs) into the project. Also, make sure you do not introduce Google libraries.
* Do not bring non-free software (e.g., binary blobs) into the project. Also, make sure you do not introduce Google
libraries.
* Stick to [F-Droid contribution guidelines](https://f-droid.org/wiki/page/Inclusion_Policy)
* Make changes on a separate branch, not on the master branch. This is commonly known as *feature branch workflow*. You may then send your changes as a pull request on GitHub. Patches to the email address mentioned in this document might not be considered, GitHub is the primary platform. (This only affects you if you are a member of TeamNewPipe)
* When submitting changes, you confirm that your code is licensed under the terms of the [GNU General Public License v3](https://www.gnu.org/licenses/gpl-3.0.html).
* Please test (compile and run) your code before you submit changes! Ideally, provide test feedback in the PR description. Untested code will **not** be merged!
* Make changes on a separate branch, not on the master branch. This is commonly known as *feature branch workflow*. You
may then send your changes as a pull request on GitHub. Patches to the email address mentioned in this document might
not be considered, GitHub is the primary platform. (This only affects you if you are a member of TeamNewPipe)
* When submitting changes, you confirm that your code is licensed under the terms of the
[GNU General Public License v3](https://www.gnu.org/licenses/gpl-3.0.html).
* Please test (compile and run) your code before you submit changes! Ideally, provide test feedback in the PR
description. Untested code will **not** be merged!
* Try to figure out yourself why builds on our CI fail.
* Make sure your PR is up-to-date with the rest of the code. Often, a simple click on "Update branch" will do the job, but if not, you are asked to merge the master branch manually and resolve the problems on your own. That will make the maintainers' jobs way easier.
* Please show intention to maintain your features and code after you contributed it. Unmaintained code is a hassle for the core developers, and just adds work. If you do not intend to maintain features you contributed, please think again about submission, or clearly state that in the description of your PR.
* Make sure your PR is up-to-date with the rest of the code. Often, a simple click on "Update branch" will do the job,
but if not, you are asked to merge the master branch manually and resolve the problems on your own. That will make the
maintainers' jobs way easier.
* Please show intention to maintain your features and code after you contributed it. Unmaintained code is a hassle for
the core developers, and just adds work. If you do not intend to maintain features you contributed, please think again
about submission, or clearly state that in the description of your PR.
* Respond yourselves if someone requests changes or otherwise raises issues about your PRs.
* Check if your contributions align with the [fdroid inclusion guidelines](https://f-droid.org/en/docs/Inclusion_Policy/).
* Check if your submission can be build with the current fdroid build server setup.
* Send PR that only cover one specific issue/solution/bug. Do not send PRs that are huge and consists of multiple
independent solutions.
## Communication
* WE DO NOW HAVE A MAILING LIST: [newpipe@list.schabi.org](https://list.schabi.org/cgi-bin/mailman/listinfo/newpipe).
* There is an IRC channel on Freenode which is regularly visited by the core team and other developers: [#newpipe](irc:irc.freenode.net/newpipe). [Click here for Webchat](https://webchat.freenode.net/?channels=newpipe)!
* If you want to get in touch with the core team or one of our other contributors you can send an email to tnp(at)schabi.org. Please do not send issue reports, they will be ignored and remain unanswered! Use the GitHub issue tracker described above!
* There is an IRC channel on Freenode which is regularly visited by the core team and other developers:
[#newpipe](irc:irc.freenode.net/newpipe). [Click here for Webchat](https://webchat.freenode.net/?channels=newpipe)!
* If you want to get in touch with the core team or one of our other contributors you can send an email to
tnp(at)schabi.org. Please do not send issue reports, they will be ignored and remain unanswered! Use the GitHub issue
tracker described above!
* Feel free to post suggestions, changes, ideas etc. on GitHub, IRC or the mailing list!

File diff suppressed because one or more lines are too long

View File

@@ -6,20 +6,22 @@ android {
defaultConfig {
applicationId "org.schabi.newpipe"
minSdkVersion 15
minSdkVersion 19
targetSdkVersion 28
versionCode 69
versionName "0.14.2"
versionCode 730
versionName "0.16.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
multiDexEnabled true
debuggable true
@@ -33,6 +35,7 @@ android {
// but continue the build even when errors are found:
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
@@ -54,7 +57,7 @@ dependencies {
exclude module: 'support-annotations'
})
implementation 'com.github.TeamNewPipe:NewPipeExtractor:32d316330c26'
implementation 'com.github.TeamNewPipe:NewPipeExtractor:e072bf6461b295'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.23.0'

View File

@@ -1,13 +0,0 @@
package org.schabi.newpipe;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}

View File

@@ -35,12 +35,6 @@
</intent-filter>
</receiver>
<activity
android:name=".player.old.PlayVideoActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="@style/OldVideoPlayerTheme"
tools:ignore="UnusedAttribute"/>
<service
android:name=".player.BackgroundPlayer"
android:exported="false">
@@ -119,7 +113,6 @@
<activity
android:name=".ReCaptchaActivity"
android:label="@string/reCaptchaActivity"/>
<activity android:name=".download.ExtSDDownloadFailedActivity" />
<provider
android:name="android.support.v4.content.FileProvider"
@@ -184,6 +177,19 @@
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="http"/>
<data android:scheme="https"/>
<data android:host="www.youtube-nocookie.com"/>
<data android:pathPrefix="/embed/"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH"/>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="vnd.youtube"/>
<data android:scheme="vnd.youtube.launch"/>
</intent-filter>
@@ -210,6 +216,29 @@
<data android:pathPrefix="/user/"/>
</intent-filter>
<!-- Invidious filter -->
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH"/>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="http"/>
<data android:scheme="https"/>
<data android:host="invidio.us"/>
<data android:host="www.invidio.us"/>
<!-- video prefix -->
<data android:pathPrefix="/embed/"/>
<data android:pathPrefix="/watch"/>
<!-- channel prefix -->
<data android:pathPrefix="/channel/"/>
<data android:pathPrefix="/user/"/>
<!-- playlist prefix -->
<data android:pathPrefix="/playlist"/>
</intent-filter>
<!-- Soundcloud filter -->
<intent-filter>
<action android:name="android.intent.action.VIEW"/>

View File

@@ -0,0 +1,116 @@
package android.support.design.widget;
import android.animation.ValueAnimator;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.design.animation.AnimationUtils;
import android.util.AttributeSet;
import android.view.View;
// check this https://github.com/ToDou/appbarlayout-spring-behavior/blob/master/appbarspring/src/main/java/android/support/design/widget/AppBarFlingFixBehavior.java
public final class FlingBehavior extends AppBarLayout.Behavior {
private ValueAnimator mOffsetAnimator;
private static final int MAX_OFFSET_ANIMATION_DURATION = 600; // ms
public FlingBehavior() {
}
public FlingBehavior(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public void onNestedPreScroll(CoordinatorLayout coordinatorLayout, AppBarLayout child, View target, int dx, int dy, int[] consumed, int type) {
if (dy != 0) {
int val = child.getBottom();
if (val != 0) {
int min, max;
if (dy < 0) {
// We're scrolling down
} else {
// We're scrolling up
if (mOffsetAnimator != null && mOffsetAnimator.isRunning()) {
mOffsetAnimator.cancel();
}
min = -child.getUpNestedPreScrollRange();
max = 0;
consumed[1] = scroll(coordinatorLayout, child, dy, min, max);
}
}
}
}
@Override
public boolean onNestedPreFling(@NonNull CoordinatorLayout coordinatorLayout, @NonNull AppBarLayout child, @NonNull View target, float velocityX, float velocityY) {
if (velocityY != 0) {
if (velocityY < 0) {
// We're flinging down
int val = child.getBottom();
if (val != 0) {
final int targetScroll =
+child.getDownNestedPreScrollRange();
animateOffsetTo(coordinatorLayout, child, targetScroll, velocityY);
}
} else {
// We're flinging up
int val = child.getBottom();
if (val != 0) {
final int targetScroll = -child.getUpNestedPreScrollRange();
if (getTopBottomOffsetForScrollingSibling() > targetScroll) {
animateOffsetTo(coordinatorLayout, child, targetScroll, velocityY);
}
}
}
}
return super.onNestedPreFling(coordinatorLayout, child, target, velocityX, velocityY);
}
private void animateOffsetTo(final CoordinatorLayout coordinatorLayout,
final AppBarLayout child, final int offset, float velocity) {
final int distance = Math.abs(getTopBottomOffsetForScrollingSibling() - offset);
final int duration;
velocity = Math.abs(velocity);
if (velocity > 0) {
duration = 3 * Math.round(1000 * (distance / velocity));
} else {
final float distanceRatio = (float) distance / child.getHeight();
duration = (int) ((distanceRatio + 1) * 150);
}
animateOffsetWithDuration(coordinatorLayout, child, offset, duration);
}
private void animateOffsetWithDuration(final CoordinatorLayout coordinatorLayout,
final AppBarLayout child, final int offset, final int duration) {
final int currentOffset = getTopBottomOffsetForScrollingSibling();
if (currentOffset == offset) {
if (mOffsetAnimator != null && mOffsetAnimator.isRunning()) {
mOffsetAnimator.cancel();
}
return;
}
if (mOffsetAnimator == null) {
mOffsetAnimator = new ValueAnimator();
mOffsetAnimator.setInterpolator(AnimationUtils.DECELERATE_INTERPOLATOR);
mOffsetAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animator) {
setHeaderTopBottomOffset(coordinatorLayout, child,
(Integer) animator.getAnimatedValue());
}
});
} else {
mOffsetAnimator.cancel();
}
mOffsetAnimator.setDuration(Math.min(duration, MAX_OFFSET_ANIMATION_DURATION));
mOffsetAnimator.setIntValues(currentOffset, offset);
mOffsetAnimator.start();
}
}

View File

@@ -1,5 +1,6 @@
package org.schabi.newpipe;
import android.annotation.TargetApi;
import android.app.Application;
import android.app.NotificationChannel;
import android.app.NotificationManager;
@@ -65,6 +66,7 @@ import io.reactivex.plugins.RxJavaPlugins;
public class App extends Application {
protected static final String TAG = App.class.toString();
private RefWatcher refWatcher;
private static App app;
@SuppressWarnings("unchecked")
private static final Class<? extends ReportSenderFactory>[]
@@ -88,6 +90,8 @@ public class App extends Application {
}
refWatcher = installLeakCanary();
app = this;
// Initialize settings first because others inits can use its values
SettingsActivity.initSettings(this);
@@ -100,6 +104,9 @@ public class App extends Application {
ImageLoader.getInstance().init(getImageLoaderConfigurations(10, 50));
configureRxJavaErrorHandler();
// Check for new version
new CheckForNewAppVersionTask().execute();
}
protected Downloader getDownloader() {
@@ -211,6 +218,31 @@ public class App extends Application {
NotificationManager mNotificationManager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.createNotificationChannel(mChannel);
setUpUpdateNotificationChannel(importance);
}
/**
* Set up notification channel for app update.
* @param importance
*/
@TargetApi(Build.VERSION_CODES.O)
private void setUpUpdateNotificationChannel(int importance) {
final String appUpdateId
= getString(R.string.app_update_notification_channel_id);
final CharSequence appUpdateName
= getString(R.string.app_update_notification_channel_name);
final String appUpdateDescription
= getString(R.string.app_update_notification_channel_description);
NotificationChannel appUpdateChannel
= new NotificationChannel(appUpdateId, appUpdateName, importance);
appUpdateChannel.setDescription(appUpdateDescription);
NotificationManager appUpdateNotificationManager
= (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
appUpdateNotificationManager.createNotificationChannel(appUpdateChannel);
}
@Nullable
@@ -226,4 +258,8 @@ public class App extends Application {
protected boolean isDisposedRxExceptionsReported() {
return false;
}
public static App getApp() {
return app;
}
}

View File

@@ -0,0 +1,230 @@
package org.schabi.newpipe;
import android.app.Application;
import android.app.PendingIntent;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.Signature;
import android.net.Uri;
import android.os.AsyncTask;
import android.preference.PreferenceManager;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.NotificationManagerCompat;
import org.json.JSONException;
import org.json.JSONObject;
import org.schabi.newpipe.report.ErrorActivity;
import org.schabi.newpipe.report.UserAction;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateEncodingException;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.util.concurrent.TimeUnit;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
/**
* AsyncTask to check if there is a newer version of the NewPipe github apk available or not.
* If there is a newer version we show a notification, informing the user. On tapping
* the notification, the user will be directed to the download link.
*/
public class CheckForNewAppVersionTask extends AsyncTask<Void, Void, String> {
private static final Application app = App.getApp();
private static final String GITHUB_APK_SHA1 = "B0:2E:90:7C:1C:D6:FC:57:C3:35:F0:88:D0:8F:50:5F:94:E4:D2:15";
private static final String newPipeApiUrl = "https://newpipe.schabi.org/api/data.json";
private static final int timeoutPeriod = 30;
private SharedPreferences mPrefs;
private OkHttpClient client;
@Override
protected void onPreExecute() {
mPrefs = PreferenceManager.getDefaultSharedPreferences(app);
// Check if user has enabled/ disabled update checking
// and if the current apk is a github one or not.
if (!mPrefs.getBoolean(app.getString(R.string.update_app_key), true)
|| !isGithubApk()) {
this.cancel(true);
}
}
@Override
protected String doInBackground(Void... voids) {
// Make a network request to get latest NewPipe data.
if (client == null) {
client = new OkHttpClient
.Builder()
.readTimeout(timeoutPeriod, TimeUnit.SECONDS)
.build();
}
Request request = new Request.Builder()
.url(newPipeApiUrl)
.build();
try {
Response response = client.newCall(request).execute();
return response.body().string();
} catch (IOException ex) {
ErrorActivity.reportError(app, ex, null, null,
ErrorActivity.ErrorInfo.make(UserAction.SOMETHING_ELSE, "none",
"app update API fail", R.string.app_ui_crash));
}
return null;
}
@Override
protected void onPostExecute(String response) {
// Parse the json from the response.
if (response != null) {
try {
JSONObject mainObject = new JSONObject(response);
JSONObject flavoursObject = mainObject.getJSONObject("flavors");
JSONObject githubObject = flavoursObject.getJSONObject("github");
JSONObject githubStableObject = githubObject.getJSONObject("stable");
String versionName = githubStableObject.getString("version");
String versionCode = githubStableObject.getString("version_code");
String apkLocationUrl = githubStableObject.getString("apk");
compareAppVersionAndShowNotification(versionName, apkLocationUrl, versionCode);
} catch (JSONException ex) {
ErrorActivity.reportError(app, ex, null, null,
ErrorActivity.ErrorInfo.make(UserAction.SOMETHING_ELSE, "none",
"could not parse app update JSON data", R.string.app_ui_crash));
}
}
}
/**
* Method to compare the current and latest available app version.
* If a newer version is available, we show the update notification.
* @param versionName
* @param apkLocationUrl
*/
private void compareAppVersionAndShowNotification(String versionName,
String apkLocationUrl,
String versionCode) {
int NOTIFICATION_ID = 2000;
if (BuildConfig.VERSION_CODE < Integer.valueOf(versionCode)) {
// A pending intent to open the apk location url in the browser.
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(apkLocationUrl));
PendingIntent pendingIntent
= PendingIntent.getActivity(app, 0, intent, 0);
NotificationCompat.Builder notificationBuilder = new NotificationCompat
.Builder(app, app.getString(R.string.app_update_notification_channel_id))
.setSmallIcon(R.drawable.ic_newpipe_update)
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
.setContentIntent(pendingIntent)
.setAutoCancel(true)
.setContentTitle(app.getString(R.string.app_update_notification_content_title))
.setContentText(app.getString(R.string.app_update_notification_content_text)
+ " " + versionName);
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(app);
notificationManager.notify(NOTIFICATION_ID, notificationBuilder.build());
}
}
/**
* Method to get the apk's SHA1 key.
* https://stackoverflow.com/questions/9293019/get-certificate-fingerprint-from-android-app#22506133
*/
private static String getCertificateSHA1Fingerprint() {
PackageManager pm = app.getPackageManager();
String packageName = app.getPackageName();
int flags = PackageManager.GET_SIGNATURES;
PackageInfo packageInfo = null;
try {
packageInfo = pm.getPackageInfo(packageName, flags);
} catch (PackageManager.NameNotFoundException ex) {
ErrorActivity.reportError(app, ex, null, null,
ErrorActivity.ErrorInfo.make(UserAction.SOMETHING_ELSE, "none",
"Could not find package info", R.string.app_ui_crash));
}
Signature[] signatures = packageInfo.signatures;
byte[] cert = signatures[0].toByteArray();
InputStream input = new ByteArrayInputStream(cert);
CertificateFactory cf = null;
X509Certificate c = null;
try {
cf = CertificateFactory.getInstance("X509");
c = (X509Certificate) cf.generateCertificate(input);
} catch (CertificateException ex) {
ErrorActivity.reportError(app, ex, null, null,
ErrorActivity.ErrorInfo.make(UserAction.SOMETHING_ELSE, "none",
"Certificate error", R.string.app_ui_crash));
}
String hexString = null;
try {
MessageDigest md = MessageDigest.getInstance("SHA1");
byte[] publicKey = md.digest(c.getEncoded());
hexString = byte2HexFormatted(publicKey);
} catch (NoSuchAlgorithmException ex1) {
ErrorActivity.reportError(app, ex1, null, null,
ErrorActivity.ErrorInfo.make(UserAction.SOMETHING_ELSE, "none",
"Could not retrieve SHA1 key", R.string.app_ui_crash));
} catch (CertificateEncodingException ex2) {
ErrorActivity.reportError(app, ex2, null, null,
ErrorActivity.ErrorInfo.make(UserAction.SOMETHING_ELSE, "none",
"Could not retrieve SHA1 key", R.string.app_ui_crash));
}
return hexString;
}
private static String byte2HexFormatted(byte[] arr) {
StringBuilder str = new StringBuilder(arr.length * 2);
for (int i = 0; i < arr.length; i++) {
String h = Integer.toHexString(arr[i]);
int l = h.length();
if (l == 1) h = "0" + h;
if (l > 2) h = h.substring(l - 2, l);
str.append(h.toUpperCase());
if (i < (arr.length - 1)) str.append(':');
}
return str.toString();
}
public static boolean isGithubApk() {
return getCertificateSHA1Fingerprint().equals(GITHUB_APK_SHA1);
}
}

View File

@@ -3,18 +3,24 @@ package org.schabi.newpipe;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import org.schabi.newpipe.extractor.DownloadRequest;
import org.schabi.newpipe.extractor.DownloadResponse;
import org.schabi.newpipe.extractor.exceptions.ReCaptchaException;
import org.schabi.newpipe.extractor.utils.Localization;
import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
import okhttp3.ResponseBody;
@@ -89,7 +95,8 @@ public class Downloader implements org.schabi.newpipe.extractor.Downloader {
.build();
response = client.newCall(request).execute();
return Long.parseLong(response.header("Content-Length"));
String contentLength = response.header("Content-Length");
return contentLength == null ? -1 : Long.parseLong(contentLength);
} catch (NumberFormatException e) {
throw new IOException("Invalid content length", e);
} finally {
@@ -138,13 +145,16 @@ public class Downloader implements org.schabi.newpipe.extractor.Downloader {
private ResponseBody getBody(String siteUrl, Map<String, String> customProperties) throws IOException, ReCaptchaException {
final Request.Builder requestBuilder = new Request.Builder()
.method("GET", null).url(siteUrl)
.addHeader("User-Agent", USER_AGENT);
.method("GET", null).url(siteUrl);
for (Map.Entry<String, String> header : customProperties.entrySet()) {
requestBuilder.addHeader(header.getKey(), header.getValue());
}
if (!customProperties.containsKey("User-Agent")) {
requestBuilder.header("User-Agent", USER_AGENT);
}
if (!TextUtils.isEmpty(mCookies)) {
requestBuilder.addHeader("Cookie", mCookies);
}
@@ -176,4 +186,96 @@ public class Downloader implements org.schabi.newpipe.extractor.Downloader {
public String download(String siteUrl) throws IOException, ReCaptchaException {
return download(siteUrl, Collections.emptyMap());
}
}
@Override
public DownloadResponse get(String siteUrl, DownloadRequest request) throws IOException, ReCaptchaException {
final Request.Builder requestBuilder = new Request.Builder()
.method("GET", null).url(siteUrl);
Map<String, List<String>> requestHeaders = request.getRequestHeaders();
// set custom headers in request
for (Map.Entry<String, List<String>> pair : requestHeaders.entrySet()) {
for(String value : pair.getValue()){
requestBuilder.addHeader(pair.getKey(), value);
}
}
if (!requestHeaders.containsKey("User-Agent")) {
requestBuilder.header("User-Agent", USER_AGENT);
}
if (!TextUtils.isEmpty(mCookies)) {
requestBuilder.addHeader("Cookie", mCookies);
}
final Request okRequest = requestBuilder.build();
final Response response = client.newCall(okRequest).execute();
final ResponseBody body = response.body();
if (response.code() == 429) {
throw new ReCaptchaException("reCaptcha Challenge requested");
}
if (body == null) {
response.close();
return null;
}
return new DownloadResponse(body.string(), response.headers().toMultimap());
}
@Override
public DownloadResponse get(String siteUrl) throws IOException, ReCaptchaException {
return get(siteUrl, DownloadRequest.emptyRequest);
}
@Override
public DownloadResponse post(String siteUrl, DownloadRequest request) throws IOException, ReCaptchaException {
Map<String, List<String>> requestHeaders = request.getRequestHeaders();
if(null == requestHeaders.get("Content-Type") || requestHeaders.get("Content-Type").isEmpty()){
// content type header is required. maybe throw an exception here
return null;
}
String contentType = requestHeaders.get("Content-Type").get(0);
RequestBody okRequestBody = null;
if(null != request.getRequestBody()){
okRequestBody = RequestBody.create(MediaType.parse(contentType), request.getRequestBody());
}
final Request.Builder requestBuilder = new Request.Builder()
.method("POST", okRequestBody).url(siteUrl);
// set custom headers in request
for (Map.Entry<String, List<String>> pair : requestHeaders.entrySet()) {
for(String value : pair.getValue()){
requestBuilder.addHeader(pair.getKey(), value);
}
}
if (!requestHeaders.containsKey("User-Agent")) {
requestBuilder.header("User-Agent", USER_AGENT);
}
if (!TextUtils.isEmpty(mCookies)) {
requestBuilder.addHeader("Cookie", mCookies);
}
final Request okRequest = requestBuilder.build();
final Response response = client.newCall(okRequest).execute();
final ResponseBody body = response.body();
if (response.code() == 429) {
throw new ReCaptchaException("reCaptcha Challenge requested");
}
if (body == null) {
response.close();
return null;
}
return new DownloadResponse(body.string(), response.headers().toMultimap());
}
}

View File

@@ -542,8 +542,7 @@ public class RouterActivity extends AppCompatActivity {
final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
boolean isExtVideoEnabled = preferences.getBoolean(getString(R.string.use_external_video_player_key), false);
boolean isExtAudioEnabled = preferences.getBoolean(getString(R.string.use_external_audio_player_key), false);
boolean useOldVideoPlayer = PlayerHelper.isUsingOldPlayer(this);
boolean isExtAudioEnabled = preferences.getBoolean(getString(R.string.use_external_audio_player_key), false);;
PlayQueue playQueue;
String playerChoice = choice.playerChoice;
@@ -555,9 +554,6 @@ public class RouterActivity extends AppCompatActivity {
} else if (playerChoice.equals(videoPlayerKey) && isExtVideoEnabled) {
NavigationHelper.playOnExternalVideoPlayer(this, (StreamInfo) info);
} else if (playerChoice.equals(videoPlayerKey) && useOldVideoPlayer) {
NavigationHelper.playOnOldVideoPlayer(this, (StreamInfo) info);
} else {
playQueue = new SinglePlayQueue((StreamInfo) info);

View File

@@ -1,158 +0,0 @@
package org.schabi.newpipe.download;
import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.design.widget.BaseTransientBottomBar;
import android.support.design.widget.Snackbar;
import android.view.View;
import org.schabi.newpipe.R;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.concurrent.TimeUnit;
import io.reactivex.Completable;
import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
import io.reactivex.subjects.PublishSubject;
import us.shandian.giga.get.DownloadManager;
import us.shandian.giga.get.DownloadMission;
public class DeleteDownloadManager {
private static final String KEY_STATE = "delete_manager_state";
private final View mView;
private final HashSet<String> mPendingMap;
private final List<Disposable> mDisposableList;
private DownloadManager mDownloadManager;
private final PublishSubject<DownloadMission> publishSubject = PublishSubject.create();
DeleteDownloadManager(Activity activity) {
mPendingMap = new HashSet<>();
mDisposableList = new ArrayList<>();
mView = activity.findViewById(android.R.id.content);
}
public Observable<DownloadMission> getUndoObservable() {
return publishSubject;
}
public boolean contains(@NonNull DownloadMission mission) {
return mPendingMap.contains(mission.url);
}
public void add(@NonNull DownloadMission mission) {
mPendingMap.add(mission.url);
if (mPendingMap.size() == 1) {
showUndoDeleteSnackbar(mission);
}
}
public void setDownloadManager(@NonNull DownloadManager downloadManager) {
mDownloadManager = downloadManager;
if (mPendingMap.size() < 1) return;
showUndoDeleteSnackbar();
}
public void restoreState(@Nullable Bundle savedInstanceState) {
if (savedInstanceState == null) return;
List<String> list = savedInstanceState.getStringArrayList(KEY_STATE);
if (list != null) {
mPendingMap.addAll(list);
}
}
public void saveState(@Nullable Bundle outState) {
if (outState == null) return;
for (Disposable disposable : mDisposableList) {
disposable.dispose();
}
outState.putStringArrayList(KEY_STATE, new ArrayList<>(mPendingMap));
}
private void showUndoDeleteSnackbar() {
if (mPendingMap.size() < 1) return;
String url = mPendingMap.iterator().next();
for (int i = 0; i < mDownloadManager.getCount(); i++) {
DownloadMission mission = mDownloadManager.getMission(i);
if (url.equals(mission.url)) {
showUndoDeleteSnackbar(mission);
break;
}
}
}
private void showUndoDeleteSnackbar(@NonNull DownloadMission mission) {
final Snackbar snackbar = Snackbar.make(mView, mission.name, Snackbar.LENGTH_INDEFINITE);
final Disposable disposable = Observable.timer(3, TimeUnit.SECONDS)
.subscribeOn(AndroidSchedulers.mainThread())
.subscribe(l -> snackbar.dismiss());
mDisposableList.add(disposable);
snackbar.setAction(R.string.undo, v -> {
mPendingMap.remove(mission.url);
publishSubject.onNext(mission);
disposable.dispose();
snackbar.dismiss();
});
snackbar.addCallback(new BaseTransientBottomBar.BaseCallback<Snackbar>() {
@Override
public void onDismissed(Snackbar transientBottomBar, int event) {
if (!disposable.isDisposed()) {
Completable.fromAction(() -> deletePending(mission))
.subscribeOn(Schedulers.io())
.subscribe();
}
mPendingMap.remove(mission.url);
snackbar.removeCallback(this);
mDisposableList.remove(disposable);
showUndoDeleteSnackbar();
}
});
snackbar.show();
}
public void deletePending() {
if (mPendingMap.size() < 1) return;
HashSet<Integer> idSet = new HashSet<>();
for (int i = 0; i < mDownloadManager.getCount(); i++) {
if (contains(mDownloadManager.getMission(i))) {
idSet.add(i);
}
}
for (Integer id : idSet) {
mDownloadManager.deleteMission(id);
}
mPendingMap.clear();
}
private void deletePending(@NonNull DownloadMission mission) {
for (int i = 0; i < mDownloadManager.getCount(); i++) {
if (mission.url.equals(mDownloadManager.getMission(i).url)) {
mDownloadManager.deleteMission(i);
break;
}
}
}
}

View File

@@ -15,16 +15,12 @@ import org.schabi.newpipe.R;
import org.schabi.newpipe.settings.SettingsActivity;
import org.schabi.newpipe.util.ThemeHelper;
import io.reactivex.Completable;
import io.reactivex.schedulers.Schedulers;
import us.shandian.giga.service.DownloadManagerService;
import us.shandian.giga.ui.fragment.AllMissionsFragment;
import us.shandian.giga.ui.fragment.MissionsFragment;
public class DownloadActivity extends AppCompatActivity {
private static final String MISSIONS_FRAGMENT_TAG = "fragment_tag";
private DeleteDownloadManager mDeleteDownloadManager;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -47,32 +43,17 @@ public class DownloadActivity extends AppCompatActivity {
actionBar.setDisplayShowTitleEnabled(true);
}
mDeleteDownloadManager = new DeleteDownloadManager(this);
mDeleteDownloadManager.restoreState(savedInstanceState);
MissionsFragment fragment = (MissionsFragment) getFragmentManager().findFragmentByTag(MISSIONS_FRAGMENT_TAG);
if (fragment != null) {
fragment.setDeleteManager(mDeleteDownloadManager);
} else {
getWindow().getDecorView().getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
updateFragments();
getWindow().getDecorView().getViewTreeObserver().removeGlobalOnLayoutListener(this);
}
});
}
}
@Override
protected void onSaveInstanceState(Bundle outState) {
mDeleteDownloadManager.saveState(outState);
super.onSaveInstanceState(outState);
getWindow().getDecorView().getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
updateFragments();
getWindow().getDecorView().getViewTreeObserver().removeGlobalOnLayoutListener(this);
}
});
}
private void updateFragments() {
MissionsFragment fragment = new AllMissionsFragment();
fragment.setDeleteManager(mDeleteDownloadManager);
MissionsFragment fragment = new MissionsFragment();
getFragmentManager().beginTransaction()
.replace(R.id.frame, fragment, MISSIONS_FRAGMENT_TAG)
@@ -99,7 +80,6 @@ public class DownloadActivity extends AppCompatActivity {
case R.id.action_settings: {
Intent intent = new Intent(this, SettingsActivity.class);
startActivity(intent);
deletePending();
return true;
}
default:
@@ -108,14 +88,7 @@ public class DownloadActivity extends AppCompatActivity {
}
@Override
public void onBackPressed() {
super.onBackPressed();
deletePending();
}
private void deletePending() {
Completable.fromAction(mDeleteDownloadManager::deletePending)
.subscribeOn(Schedulers.io())
.subscribe();
public void onRestoreInstanceState(Bundle inState){
super.onRestoreInstanceState(inState);
}
}

View File

@@ -1,38 +0,0 @@
package org.schabi.newpipe.download;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import org.schabi.newpipe.R;
import org.schabi.newpipe.settings.NewPipeSettings;
import org.schabi.newpipe.util.ServiceHelper;
import org.schabi.newpipe.util.ThemeHelper;
public class ExtSDDownloadFailedActivity extends AppCompatActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ThemeHelper.setTheme(this, ServiceHelper.getSelectedServiceId(this));
}
@Override
protected void onStart() {
super.onStart();
new AlertDialog.Builder(this)
.setTitle(R.string.download_to_sdcard_error_title)
.setMessage(R.string.download_to_sdcard_error_message)
.setPositiveButton(R.string.yes, (DialogInterface dialogInterface, int i) -> {
NewPipeSettings.resetDownloadFolders(this);
finish();
})
.setNegativeButton(R.string.cancel, (DialogInterface dialogInterface, int i) -> {
dialogInterface.dismiss();
finish();
})
.create()
.show();
}
}

View File

@@ -0,0 +1,73 @@
package org.schabi.newpipe.fragments.detail;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.view.ViewGroup;
import java.util.ArrayList;
import java.util.List;
public class TabAdaptor extends FragmentPagerAdapter {
private final List<Fragment> mFragmentList = new ArrayList<>();
private final List<String> mFragmentTitleList = new ArrayList<>();
private final FragmentManager fragmentManager;
public TabAdaptor(FragmentManager fm) {
super(fm);
this.fragmentManager = fm;
}
@Override
public Fragment getItem(int position) {
return mFragmentList.get(position);
}
@Override
public int getCount() {
return mFragmentList.size();
}
public void addFragment(Fragment fragment, String title) {
mFragmentList.add(fragment);
mFragmentTitleList.add(title);
}
public void clearAllItems() {
mFragmentList.clear();
mFragmentTitleList.clear();
}
public void removeItem(int position){
mFragmentList.remove(position == 0 ? 0 : position - 1);
mFragmentTitleList.remove(position == 0 ? 0 : position - 1);
}
public void updateItem(int position, Fragment fragment){
mFragmentList.set(position, fragment);
}
public void updateItem(String title, Fragment fragment){
int index = mFragmentTitleList.indexOf(title);
if(index != -1){
updateItem(index, fragment);
}
}
@Override
public int getItemPosition(Object object) {
if (mFragmentList.contains(object)) return mFragmentList.indexOf(object);
else return POSITION_NONE;
}
public void notifyDataSetUpdate(){
notifyDataSetChanged();
}
@Override
public void destroyItem(ViewGroup container, int position, Object object) {
fragmentManager.beginTransaction().remove((Fragment) object).commitNowAllowingStateLoss();
}
}

View File

@@ -22,6 +22,7 @@ import android.view.View;
import org.schabi.newpipe.R;
import org.schabi.newpipe.extractor.InfoItem;
import org.schabi.newpipe.extractor.channel.ChannelInfoItem;
import org.schabi.newpipe.extractor.comments.CommentsInfoItem;
import org.schabi.newpipe.extractor.playlist.PlaylistInfoItem;
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import org.schabi.newpipe.fragments.BaseStateFragment;
@@ -220,6 +221,13 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implem
}
});
infoListAdapter.setOnCommentsSelectedListener(new OnClickGesture<CommentsInfoItem>() {
@Override
public void selected(CommentsInfoItem selectedItem) {
onItemSelected(selectedItem);
}
});
itemsList.clearOnScrollListeners();
itemsList.addOnScrollListener(new OnScrollBelowItemsListener() {
@Override

View File

@@ -233,10 +233,10 @@ public class ChannelFragment extends BaseListInfoFragment<ChannelInfo> {
openRssFeed();
break;
case R.id.menu_item_openInBrowser:
openUrlInBrowser(url);
openUrlInBrowser(currentInfo.getOriginalUrl());
break;
case R.id.menu_item_share:
shareUrl(name, url);
shareUrl(name, currentInfo.getOriginalUrl());
break;
default:
return super.onOptionsItemSelected(item);

View File

@@ -0,0 +1,149 @@
package org.schabi.newpipe.fragments.list.comments;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;
import android.view.ViewGroup;
import org.schabi.newpipe.R;
import org.schabi.newpipe.extractor.ListExtractor;
import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.comments.CommentsInfo;
import org.schabi.newpipe.fragments.list.BaseListInfoFragment;
import org.schabi.newpipe.report.UserAction;
import org.schabi.newpipe.util.AnimationUtils;
import org.schabi.newpipe.util.ExtractorHelper;
import io.reactivex.Single;
import io.reactivex.disposables.CompositeDisposable;
public class CommentsFragment extends BaseListInfoFragment<CommentsInfo> {
private CompositeDisposable disposables = new CompositeDisposable();
/*//////////////////////////////////////////////////////////////////////////
// Views
//////////////////////////////////////////////////////////////////////////*/
private boolean mIsVisibleToUser = false;
public static CommentsFragment getInstance(int serviceId, String url, String name) {
CommentsFragment instance = new CommentsFragment();
instance.setInitialData(serviceId, url, name);
return instance;
}
/*//////////////////////////////////////////////////////////////////////////
// LifeCycle
//////////////////////////////////////////////////////////////////////////*/
@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
mIsVisibleToUser = isVisibleToUser;
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
}
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_comments, container, false);
}
@Override
public void onDestroy() {
super.onDestroy();
if (disposables != null) disposables.clear();
}
/*//////////////////////////////////////////////////////////////////////////
// Load and handle
//////////////////////////////////////////////////////////////////////////*/
@Override
protected Single<ListExtractor.InfoItemsPage> loadMoreItemsLogic() {
return ExtractorHelper.getMoreCommentItems(serviceId, currentInfo, currentNextPageUrl);
}
@Override
protected Single<CommentsInfo> loadResult(boolean forceLoad) {
return ExtractorHelper.getCommentsInfo(serviceId, url, forceLoad);
}
/*//////////////////////////////////////////////////////////////////////////
// Contract
//////////////////////////////////////////////////////////////////////////*/
@Override
public void showLoading() {
super.showLoading();
}
@Override
public void handleResult(@NonNull CommentsInfo result) {
super.handleResult(result);
AnimationUtils.slideUp(getView(),120, 96, 0.06f);
if (!result.getErrors().isEmpty()) {
showSnackBarError(result.getErrors(), UserAction.REQUESTED_COMMENTS, NewPipe.getNameOfService(result.getServiceId()), result.getUrl(), 0);
}
if (disposables != null) disposables.clear();
}
@Override
public void handleNextItems(ListExtractor.InfoItemsPage result) {
super.handleNextItems(result);
if (!result.getErrors().isEmpty()) {
showSnackBarError(result.getErrors(),
UserAction.REQUESTED_COMMENTS,
NewPipe.getNameOfService(serviceId),
"Get next page of: " + url,
R.string.general_error);
}
}
/*//////////////////////////////////////////////////////////////////////////
// OnError
//////////////////////////////////////////////////////////////////////////*/
@Override
protected boolean onError(Throwable exception) {
if (super.onError(exception)) return true;
hideLoading();
showSnackBarError(exception, UserAction.REQUESTED_COMMENTS, NewPipe.getNameOfService(serviceId), url, R.string.error_unable_to_load_comments);
return true;
}
/*//////////////////////////////////////////////////////////////////////////
// Utils
//////////////////////////////////////////////////////////////////////////*/
@Override
public void setTitle(String title) {
return;
}
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
return;
}
@Override
protected boolean isGridLayout() {
return false;
}
}

View File

@@ -39,6 +39,7 @@ import org.schabi.newpipe.extractor.StreamingService;
import org.schabi.newpipe.extractor.exceptions.ParsingException;
import org.schabi.newpipe.extractor.search.SearchExtractor;
import org.schabi.newpipe.extractor.search.SearchInfo;
import org.schabi.newpipe.util.FireTvUtils;
import org.schabi.newpipe.fragments.BackPressable;
import org.schabi.newpipe.fragments.list.BaseListFragment;
import org.schabi.newpipe.local.history.HistoryRecordManager;
@@ -104,8 +105,13 @@ public class SearchFragment
// this three represet the current search query
@State
protected String searchString;
/**
* No content filter should add like contentfilter = all
* be aware of this when implementing an extractor.
*/
@State
protected String[] contentFilter;
protected String[] contentFilter = new String[0];
@State
protected String sortFilter;
@@ -335,7 +341,7 @@ public class SearchFragment
|| (searchEditText != null && !TextUtils.isEmpty(searchEditText.getText()))) {
search(!TextUtils.isEmpty(searchString)
? searchString
: searchEditText.getText().toString(), new String[0], "");
: searchEditText.getText().toString(), this.contentFilter, "");
} else {
if (searchEditText != null) {
searchEditText.setText("");
@@ -449,6 +455,9 @@ public class SearchFragment
if (isSuggestionsEnabled && errorPanelRoot.getVisibility() != View.VISIBLE) {
showSuggestionsPanel();
}
if(FireTvUtils.isFireTv()){
showKeyboardSearch();
}
});
searchEditText.setOnFocusChangeListener((View v, boolean hasFocus) -> {
@@ -499,7 +508,9 @@ public class SearchFragment
if (DEBUG) {
Log.d(TAG, "onEditorAction() called with: v = [" + v + "], actionId = [" + actionId + "], event = [" + event + "]");
}
if (event != null
if(actionId == EditorInfo.IME_ACTION_PREVIOUS){
hideKeyboardSearch();
} else if (event != null
&& (event.getKeyCode() == KeyEvent.KEYCODE_ENTER
|| event.getAction() == EditorInfo.IME_ACTION_SEARCH)) {
search(searchEditText.getText().toString(), new String[0], "");
@@ -541,7 +552,7 @@ public class SearchFragment
if (searchEditText.requestFocus()) {
InputMethodManager imm = (InputMethodManager) activity.getSystemService(
Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(searchEditText, InputMethodManager.SHOW_IMPLICIT);
imm.showSoftInput(searchEditText, InputMethodManager.SHOW_FORCED);
}
}
@@ -551,8 +562,7 @@ public class SearchFragment
InputMethodManager imm = (InputMethodManager) activity.getSystemService(
Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(searchEditText.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS);
imm.hideSoftInputFromWindow(searchEditText.getWindowToken(), InputMethodManager.RESULT_UNCHANGED_SHOWN);
searchEditText.clearFocus();
}
@@ -736,6 +746,7 @@ public class SearchFragment
@Override
protected void loadMoreItems() {
if(nextPageUrl == null || nextPageUrl.isEmpty()) return;
isLoading.set(true);
showListFooter(true);
if (searchDisposable != null) searchDisposable.dispose();

View File

@@ -0,0 +1,208 @@
package org.schabi.newpipe.fragments.list.videos;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CompoundButton;
import android.widget.Switch;
import org.schabi.newpipe.R;
import org.schabi.newpipe.extractor.ListExtractor;
import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.stream.StreamInfo;
import org.schabi.newpipe.fragments.list.BaseListInfoFragment;
import org.schabi.newpipe.report.UserAction;
import org.schabi.newpipe.util.AnimationUtils;
import org.schabi.newpipe.util.RelatedStreamInfo;
import java.io.Serializable;
import io.reactivex.Single;
import io.reactivex.disposables.CompositeDisposable;
public class RelatedVideosFragment extends BaseListInfoFragment<RelatedStreamInfo> implements SharedPreferences.OnSharedPreferenceChangeListener{
private CompositeDisposable disposables = new CompositeDisposable();
private RelatedStreamInfo relatedStreamInfo;
/*//////////////////////////////////////////////////////////////////////////
// Views
//////////////////////////////////////////////////////////////////////////*/
private View headerRootLayout;
private Switch aSwitch;
private boolean mIsVisibleToUser = false;
public static RelatedVideosFragment getInstance(StreamInfo info) {
RelatedVideosFragment instance = new RelatedVideosFragment();
instance.setInitialData(info);
return instance;
}
/*//////////////////////////////////////////////////////////////////////////
// LifeCycle
//////////////////////////////////////////////////////////////////////////*/
@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
mIsVisibleToUser = isVisibleToUser;
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
}
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_related_streams, container, false);
}
@Override
public void onDestroy() {
super.onDestroy();
if (disposables != null) disposables.clear();
}
protected View getListHeader(){
if(relatedStreamInfo != null && relatedStreamInfo.getNextStream() != null){
headerRootLayout = activity.getLayoutInflater().inflate(R.layout.related_streams_header, itemsList, false);
aSwitch = headerRootLayout.findViewById(R.id.autoplay_switch);
SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(getContext());
Boolean autoplay = pref.getBoolean(getString(R.string.auto_queue_key), false);
aSwitch.setChecked(autoplay);
aSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
SharedPreferences.Editor prefEdit = PreferenceManager.getDefaultSharedPreferences(getContext()).edit();
prefEdit.putBoolean(getString(R.string.auto_queue_key), b);
prefEdit.apply();
}
});
return headerRootLayout;
}else{
return null;
}
}
@Override
protected Single<ListExtractor.InfoItemsPage> loadMoreItemsLogic() {
return Single.fromCallable(() -> ListExtractor.InfoItemsPage.emptyPage());
}
@Override
protected Single<RelatedStreamInfo> loadResult(boolean forceLoad) {
return Single.fromCallable(() -> relatedStreamInfo);
}
/*//////////////////////////////////////////////////////////////////////////
// Contract
//////////////////////////////////////////////////////////////////////////*/
@Override
public void showLoading() {
super.showLoading();
if(null != headerRootLayout) headerRootLayout.setVisibility(View.INVISIBLE);
}
@Override
public void handleResult(@NonNull RelatedStreamInfo result) {
super.handleResult(result);
if(null != headerRootLayout) headerRootLayout.setVisibility(View.VISIBLE);
AnimationUtils.slideUp(getView(),120, 96, 0.06f);
if (!result.getErrors().isEmpty()) {
showSnackBarError(result.getErrors(), UserAction.REQUESTED_STREAM, NewPipe.getNameOfService(result.getServiceId()), result.getUrl(), 0);
}
if (disposables != null) disposables.clear();
}
@Override
public void handleNextItems(ListExtractor.InfoItemsPage result) {
super.handleNextItems(result);
if (!result.getErrors().isEmpty()) {
showSnackBarError(result.getErrors(),
UserAction.REQUESTED_STREAM,
NewPipe.getNameOfService(serviceId),
"Get next page of: " + url,
R.string.general_error);
}
}
/*//////////////////////////////////////////////////////////////////////////
// OnError
//////////////////////////////////////////////////////////////////////////*/
@Override
protected boolean onError(Throwable exception) {
if (super.onError(exception)) return true;
hideLoading();
showSnackBarError(exception, UserAction.REQUESTED_STREAM, NewPipe.getNameOfService(serviceId), url, R.string.general_error);
return true;
}
/*//////////////////////////////////////////////////////////////////////////
// Utils
//////////////////////////////////////////////////////////////////////////*/
@Override
public void setTitle(String title) {
return;
}
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
return;
}
private void setInitialData(StreamInfo info) {
super.setInitialData(info.getServiceId(), info.getUrl(), info.getName());
if(this.relatedStreamInfo == null) this.relatedStreamInfo = RelatedStreamInfo.getInfo(info);
}
private static final String INFO_KEY = "related_info_key";
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putSerializable(INFO_KEY, relatedStreamInfo);
}
@Override
protected void onRestoreInstanceState(@NonNull Bundle savedState) {
super.onRestoreInstanceState(savedState);
if (savedState != null) {
Serializable serializable = savedState.getSerializable(INFO_KEY);
if(serializable instanceof RelatedStreamInfo){
this.relatedStreamInfo = (RelatedStreamInfo) serializable;
}
}
}
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String s) {
SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(getContext());
Boolean autoplay = pref.getBoolean(getString(R.string.auto_queue_key), false);
if(null != aSwitch) aSwitch.setChecked(autoplay);
}
@Override
protected boolean isGridLayout() {
return false;
}
}

View File

@@ -10,10 +10,13 @@ import com.nostra13.universalimageloader.core.ImageLoader;
import org.schabi.newpipe.extractor.InfoItem;
import org.schabi.newpipe.extractor.channel.ChannelInfoItem;
import org.schabi.newpipe.extractor.comments.CommentsInfoItem;
import org.schabi.newpipe.extractor.playlist.PlaylistInfoItem;
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import org.schabi.newpipe.info_list.holder.ChannelInfoItemHolder;
import org.schabi.newpipe.info_list.holder.ChannelMiniInfoItemHolder;
import org.schabi.newpipe.info_list.holder.CommentsInfoItemHolder;
import org.schabi.newpipe.info_list.holder.CommentsMiniInfoItemHolder;
import org.schabi.newpipe.info_list.holder.InfoItemHolder;
import org.schabi.newpipe.info_list.holder.PlaylistInfoItemHolder;
import org.schabi.newpipe.info_list.holder.PlaylistMiniInfoItemHolder;
@@ -50,6 +53,7 @@ public class InfoItemBuilder {
private OnClickGesture<StreamInfoItem> onStreamSelectedListener;
private OnClickGesture<ChannelInfoItem> onChannelSelectedListener;
private OnClickGesture<PlaylistInfoItem> onPlaylistSelectedListener;
private OnClickGesture<CommentsInfoItem> onCommentsSelectedListener;
public InfoItemBuilder(Context context) {
this.context = context;
@@ -73,6 +77,8 @@ public class InfoItemBuilder {
return useMiniVariant ? new ChannelMiniInfoItemHolder(this, parent) : new ChannelInfoItemHolder(this, parent);
case PLAYLIST:
return useMiniVariant ? new PlaylistMiniInfoItemHolder(this, parent) : new PlaylistInfoItemHolder(this, parent);
case COMMENT:
return useMiniVariant ? new CommentsMiniInfoItemHolder(this, parent) : new CommentsInfoItemHolder(this, parent);
default:
Log.e(TAG, "Trollolo");
throw new RuntimeException("InfoType not expected = " + infoType.name());
@@ -111,4 +117,12 @@ public class InfoItemBuilder {
this.onPlaylistSelectedListener = listener;
}
public OnClickGesture<CommentsInfoItem> getOnCommentsSelectedListener() {
return onCommentsSelectedListener;
}
public void setOnCommentsSelectedListener(OnClickGesture<CommentsInfoItem> onCommentsSelectedListener) {
this.onCommentsSelectedListener = onCommentsSelectedListener;
}
}

View File

@@ -9,10 +9,13 @@ import android.view.ViewGroup;
import org.schabi.newpipe.extractor.InfoItem;
import org.schabi.newpipe.extractor.channel.ChannelInfoItem;
import org.schabi.newpipe.extractor.comments.CommentsInfoItem;
import org.schabi.newpipe.extractor.playlist.PlaylistInfoItem;
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import org.schabi.newpipe.info_list.holder.ChannelInfoItemHolder;
import org.schabi.newpipe.info_list.holder.ChannelMiniInfoItemHolder;
import org.schabi.newpipe.info_list.holder.CommentsInfoItemHolder;
import org.schabi.newpipe.info_list.holder.CommentsMiniInfoItemHolder;
import org.schabi.newpipe.info_list.holder.ChannelGridInfoItemHolder;
import org.schabi.newpipe.info_list.holder.InfoItemHolder;
import org.schabi.newpipe.info_list.holder.PlaylistGridInfoItemHolder;
@@ -63,6 +66,8 @@ public class InfoListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
private static final int MINI_PLAYLIST_HOLDER_TYPE = 0x300;
private static final int PLAYLIST_HOLDER_TYPE = 0x301;
private static final int GRID_PLAYLIST_HOLDER_TYPE = 0x302;
private static final int MINI_COMMENT_HOLDER_TYPE = 0x400;
private static final int COMMENT_HOLDER_TYPE = 0x401;
private final InfoItemBuilder infoItemBuilder;
private final ArrayList<InfoItem> infoItemList;
@@ -98,6 +103,10 @@ public class InfoListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
infoItemBuilder.setOnPlaylistSelectedListener(listener);
}
public void setOnCommentsSelectedListener(OnClickGesture<CommentsInfoItem> listener) {
infoItemBuilder.setOnCommentsSelectedListener(listener);
}
public void useMiniItemVariants(boolean useMiniVariant) {
this.useMiniVariant = useMiniVariant;
}
@@ -223,6 +232,8 @@ public class InfoListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
return useGridVariant ? GRID_CHANNEL_HOLDER_TYPE : useMiniVariant ? MINI_CHANNEL_HOLDER_TYPE : CHANNEL_HOLDER_TYPE;
case PLAYLIST:
return useGridVariant ? GRID_PLAYLIST_HOLDER_TYPE : useMiniVariant ? MINI_PLAYLIST_HOLDER_TYPE : PLAYLIST_HOLDER_TYPE;
case COMMENT:
return useMiniVariant ? MINI_COMMENT_HOLDER_TYPE : COMMENT_HOLDER_TYPE;
default:
Log.e(TAG, "Trollolo");
return -1;
@@ -231,7 +242,8 @@ public class InfoListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int type) {
if (DEBUG) Log.d(TAG, "onCreateViewHolder() called with: parent = [" + parent + "], type = [" + type + "]");
if (DEBUG)
Log.d(TAG, "onCreateViewHolder() called with: parent = [" + parent + "], type = [" + type + "]");
switch (type) {
case HEADER_TYPE:
return new HFHolder(header);
@@ -255,6 +267,10 @@ public class InfoListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
return new PlaylistInfoItemHolder(infoItemBuilder, parent);
case GRID_PLAYLIST_HOLDER_TYPE:
return new PlaylistGridInfoItemHolder(infoItemBuilder, parent);
case MINI_COMMENT_HOLDER_TYPE:
return new CommentsMiniInfoItemHolder(infoItemBuilder, parent);
case COMMENT_HOLDER_TYPE:
return new CommentsInfoItemHolder(infoItemBuilder, parent);
default:
Log.e(TAG, "Trollolo");
return new FallbackViewHolder(new View(parent.getContext()));

View File

@@ -0,0 +1,53 @@
package org.schabi.newpipe.info_list.holder;
import android.view.ViewGroup;
import android.widget.TextView;
import org.schabi.newpipe.R;
import org.schabi.newpipe.extractor.InfoItem;
import org.schabi.newpipe.extractor.channel.ChannelInfoItem;
import org.schabi.newpipe.extractor.comments.CommentsInfoItem;
import org.schabi.newpipe.info_list.InfoItemBuilder;
import org.schabi.newpipe.util.Localization;
/*
* Created by Christian Schabesberger on 12.02.17.
*
* Copyright (C) Christian Schabesberger 2016 <chris.schabesberger@mailbox.org>
* ChannelInfoItemHolder .java is part of NewPipe.
*
* NewPipe is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NewPipe is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
public class CommentsInfoItemHolder extends CommentsMiniInfoItemHolder {
public final TextView itemTitleView;
public CommentsInfoItemHolder(InfoItemBuilder infoItemBuilder, ViewGroup parent) {
super(infoItemBuilder, R.layout.list_comments_item, parent);
itemTitleView = itemView.findViewById(R.id.itemTitleView);
}
@Override
public void updateFromItem(final InfoItem infoItem) {
super.updateFromItem(infoItem);
if (!(infoItem instanceof CommentsInfoItem)) return;
final CommentsInfoItem item = (CommentsInfoItem) infoItem;
itemTitleView.setText(item.getAuthorName());
}
}

View File

@@ -0,0 +1,99 @@
package org.schabi.newpipe.info_list.holder;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import org.schabi.newpipe.R;
import org.schabi.newpipe.extractor.InfoItem;
import org.schabi.newpipe.extractor.comments.CommentsInfoItem;
import org.schabi.newpipe.info_list.InfoItemBuilder;
import org.schabi.newpipe.report.ErrorActivity;
import org.schabi.newpipe.util.ImageDisplayConstants;
import org.schabi.newpipe.util.NavigationHelper;
import de.hdodenhof.circleimageview.CircleImageView;
public class CommentsMiniInfoItemHolder extends InfoItemHolder {
public final CircleImageView itemThumbnailView;
private final TextView itemContentView;
private final TextView itemLikesCountView;
private final TextView itemDislikesCountView;
private final TextView itemPublishedTime;
private static final int commentDefaultLines = 2;
private static final int commentExpandedLines = 1000;
CommentsMiniInfoItemHolder(InfoItemBuilder infoItemBuilder, int layoutId, ViewGroup parent) {
super(infoItemBuilder, layoutId, parent);
itemThumbnailView = itemView.findViewById(R.id.itemThumbnailView);
itemLikesCountView = itemView.findViewById(R.id.detail_thumbs_up_count_view);
itemDislikesCountView = itemView.findViewById(R.id.detail_thumbs_down_count_view);
itemPublishedTime = itemView.findViewById(R.id.itemPublishedTime);
itemContentView = itemView.findViewById(R.id.itemCommentContentView);
}
public CommentsMiniInfoItemHolder(InfoItemBuilder infoItemBuilder, ViewGroup parent) {
this(infoItemBuilder, R.layout.list_comments_mini_item, parent);
}
@Override
public void updateFromItem(final InfoItem infoItem) {
if (!(infoItem instanceof CommentsInfoItem)) return;
final CommentsInfoItem item = (CommentsInfoItem) infoItem;
itemBuilder.getImageLoader()
.displayImage(item.getAuthorThumbnail(),
itemThumbnailView,
ImageDisplayConstants.DISPLAY_THUMBNAIL_OPTIONS);
itemThumbnailView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
try {
final AppCompatActivity activity = (AppCompatActivity) itemBuilder.getContext();
NavigationHelper.openChannelFragment(
activity.getSupportFragmentManager(),
item.getServiceId(),
item.getAuthorEndpoint(),
item.getAuthorName());
} catch (Exception e) {
ErrorActivity.reportUiError((AppCompatActivity) itemBuilder.getContext(), e);
}
}
});
// ellipsize if not already ellipsized
if (null == itemContentView.getEllipsize()) {
itemContentView.setEllipsize(TextUtils.TruncateAt.END);
itemContentView.setMaxLines(commentDefaultLines);
}
itemContentView.setText(item.getCommentText());
if (null != item.getLikeCount()) {
itemLikesCountView.setText(String.valueOf(item.getLikeCount()));
}
itemPublishedTime.setText(item.getPublishedTime());
itemView.setOnClickListener(view -> {
toggleEllipsize(item.getCommentText());
if (itemBuilder.getOnCommentsSelectedListener() != null) {
itemBuilder.getOnCommentsSelectedListener().selected(item);
}
});
}
private void toggleEllipsize(String text) {
// toggle ellipsize
if (null == itemContentView.getEllipsize()) {
itemContentView.setEllipsize(TextUtils.TruncateAt.END);
itemContentView.setMaxLines(commentDefaultLines);
} else {
itemContentView.setEllipsize(null);
itemContentView.setMaxLines(commentExpandedLines);
}
}
}

View File

@@ -147,11 +147,16 @@ public class SubscriptionService {
}
private boolean isSubscriptionUpToDate(final ChannelInfo info, final SubscriptionEntity entity) {
return info.getUrl().equals(entity.getUrl()) &&
return equalsAndNotNull(info.getUrl(), entity.getUrl()) &&
info.getServiceId() == entity.getServiceId() &&
info.getName().equals(entity.getName()) &&
info.getAvatarUrl().equals(entity.getAvatarUrl()) &&
info.getDescription().equals(entity.getDescription()) &&
equalsAndNotNull(info.getAvatarUrl(), entity.getAvatarUrl()) &&
equalsAndNotNull(info.getDescription(), entity.getDescription()) &&
info.getSubscriberCount() == entity.getSubscriberCount();
}
private boolean equalsAndNotNull(final Object o1, final Object o2) {
return (o1 != null && o2 != null)
&& o1.equals(o2);
}
}

View File

@@ -98,35 +98,54 @@ public abstract class BasePlayer implements
Player.EventListener, PlaybackListener, ImageLoadingListener {
public static final boolean DEBUG = !BuildConfig.BUILD_TYPE.equals("release");
@NonNull public static final String TAG = "BasePlayer";
@NonNull
public static final String TAG = "BasePlayer";
@NonNull final protected Context context;
@NonNull
final protected Context context;
@NonNull final protected BroadcastReceiver broadcastReceiver;
@NonNull final protected IntentFilter intentFilter;
@NonNull
final protected BroadcastReceiver broadcastReceiver;
@NonNull
final protected IntentFilter intentFilter;
@NonNull final protected HistoryRecordManager recordManager;
@NonNull
final protected HistoryRecordManager recordManager;
@NonNull final protected CustomTrackSelector trackSelector;
@NonNull final protected PlayerDataSource dataSource;
@NonNull
final protected CustomTrackSelector trackSelector;
@NonNull
final protected PlayerDataSource dataSource;
@NonNull final private LoadControl loadControl;
@NonNull final private RenderersFactory renderFactory;
@NonNull
final private LoadControl loadControl;
@NonNull
final private RenderersFactory renderFactory;
@NonNull final private SerialDisposable progressUpdateReactor;
@NonNull final private CompositeDisposable databaseUpdateReactor;
@NonNull
final private SerialDisposable progressUpdateReactor;
@NonNull
final private CompositeDisposable databaseUpdateReactor;
/*//////////////////////////////////////////////////////////////////////////
// Intent
//////////////////////////////////////////////////////////////////////////*/
@NonNull public static final String REPEAT_MODE = "repeat_mode";
@NonNull public static final String PLAYBACK_PITCH = "playback_pitch";
@NonNull public static final String PLAYBACK_SPEED = "playback_speed";
@NonNull public static final String PLAYBACK_SKIP_SILENCE = "playback_skip_silence";
@NonNull public static final String PLAYBACK_QUALITY = "playback_quality";
@NonNull public static final String PLAY_QUEUE_KEY = "play_queue_key";
@NonNull public static final String APPEND_ONLY = "append_only";
@NonNull public static final String SELECT_ON_APPEND = "select_on_append";
@NonNull
public static final String REPEAT_MODE = "repeat_mode";
@NonNull
public static final String PLAYBACK_PITCH = "playback_pitch";
@NonNull
public static final String PLAYBACK_SPEED = "playback_speed";
@NonNull
public static final String PLAYBACK_SKIP_SILENCE = "playback_skip_silence";
@NonNull
public static final String PLAYBACK_QUALITY = "playback_quality";
@NonNull
public static final String PLAY_QUEUE_KEY = "play_queue_key";
@NonNull
public static final String APPEND_ONLY = "append_only";
@NonNull
public static final String SELECT_ON_APPEND = "select_on_append";
/*//////////////////////////////////////////////////////////////////////////
// Playback
@@ -137,13 +156,18 @@ public abstract class BasePlayer implements
protected PlayQueue playQueue;
protected PlayQueueAdapter playQueueAdapter;
@Nullable protected MediaSourceManager playbackManager;
@Nullable
protected MediaSourceManager playbackManager;
@Nullable private PlayQueueItem currentItem;
@Nullable private MediaSourceTag currentMetadata;
@Nullable private Bitmap currentThumbnail;
@Nullable
private PlayQueueItem currentItem;
@Nullable
private MediaSourceTag currentMetadata;
@Nullable
private Bitmap currentThumbnail;
@Nullable protected Toast errorToast;
@Nullable
protected Toast errorToast;
/*//////////////////////////////////////////////////////////////////////////
// Player
@@ -213,7 +237,8 @@ public abstract class BasePlayer implements
registerBroadcastReceiver();
}
public void initListeners() {}
public void initListeners() {
}
public void handleIntent(Intent intent) {
if (DEBUG) Log.d(TAG, "handleIntent() called with: intent = [" + intent + "]");
@@ -297,7 +322,6 @@ public abstract class BasePlayer implements
databaseUpdateReactor.clear();
progressUpdateReactor.set(null);
simpleExoPlayer = null;
}
/*//////////////////////////////////////////////////////////////////////////
@@ -425,13 +449,15 @@ public abstract class BasePlayer implements
if (!isProgressLoopRunning()) startProgressLoop();
}
public void onBuffering() {}
public void onBuffering() {
}
public void onPaused() {
if (isProgressLoopRunning()) stopProgressLoop();
}
public void onPausedSeek() {}
public void onPausedSeek() {
}
public void onCompleted() {
if (DEBUG) Log.d(TAG, "onCompleted() called");
@@ -602,19 +628,19 @@ public abstract class BasePlayer implements
/**
* Processes the exceptions produced by {@link com.google.android.exoplayer2.ExoPlayer ExoPlayer}.
* There are multiple types of errors: <br><br>
*
* <p>
* {@link ExoPlaybackException#TYPE_SOURCE TYPE_SOURCE}: <br><br>
*
* <p>
* {@link ExoPlaybackException#TYPE_UNEXPECTED TYPE_UNEXPECTED}: <br><br>
* If a runtime error occurred, then we can try to recover it by restarting the playback
* after setting the timestamp recovery. <br><br>
*
* <p>
* {@link ExoPlaybackException#TYPE_RENDERER TYPE_RENDERER}: <br><br>
* If the renderer failed, treat the error as unrecoverable.
*
* @see #processSourceError(IOException)
* @see Player.EventListener#onPlayerError(ExoPlaybackException)
* */
*/
@Override
public void onPlayerError(ExoPlaybackException error) {
if (DEBUG) Log.d(TAG, "ExoPlayer - onPlayerError() called with: " +
@@ -900,8 +926,8 @@ public abstract class BasePlayer implements
if (DEBUG) Log.d(TAG, "onPlayPrevious() called");
/* If current playback has run for PLAY_PREV_ACTIVATION_LIMIT_MILLIS milliseconds,
* restart current track. Also restart the track if the current track
* is the first in a queue.*/
* restart current track. Also restart the track if the current track
* is the first in a queue.*/
if (simpleExoPlayer.getCurrentPosition() > PLAY_PREV_ACTIVATION_LIMIT_MILLIS ||
playQueue.getIndex() == 0) {
seekToDefault();
@@ -1010,8 +1036,8 @@ public abstract class BasePlayer implements
try {
metadata = (MediaSourceTag) simpleExoPlayer.getCurrentTag();
} catch (IndexOutOfBoundsException | ClassCastException error) {
if(DEBUG) Log.d(TAG, "Could not update metadata: " + error.getMessage());
if(DEBUG) error.printStackTrace();
if (DEBUG) Log.d(TAG, "Could not update metadata: " + error.getMessage());
if (DEBUG) error.printStackTrace();
return;
}
@@ -1075,7 +1101,9 @@ public abstract class BasePlayer implements
currentThumbnail;
}
/** Checks if the current playback is a livestream AND is playing at or beyond the live edge */
/**
* Checks if the current playback is a livestream AND is playing at or beyond the live edge
*/
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
public boolean isLiveEdge() {
if (simpleExoPlayer == null || !isLive()) return false;
@@ -1099,13 +1127,14 @@ public abstract class BasePlayer implements
} catch (@NonNull IndexOutOfBoundsException ignored) {
// Why would this even happen =(
// But lets log it anyway. Save is save
if(DEBUG) Log.d(TAG, "Could not update metadata: " + ignored.getMessage());
if(DEBUG) ignored.printStackTrace();
if (DEBUG) Log.d(TAG, "Could not update metadata: " + ignored.getMessage());
if (DEBUG) ignored.printStackTrace();
return false;
}
}
public boolean isPlaying() {
if (simpleExoPlayer == null) return false;
final int state = simpleExoPlayer.getPlaybackState();
return (state == Player.STATE_READY || state == Player.STATE_BUFFERING)
&& simpleExoPlayer.getPlayWhenReady();

View File

@@ -900,6 +900,11 @@ public final class MainVideoPlayer extends AppCompatActivity
public void onMove(int sourceIndex, int targetIndex) {
if (playQueue != null) playQueue.move(sourceIndex, targetIndex);
}
@Override
public void onSwiped(int index) {
if(index != -1) playQueue.remove(index);
}
};
}

View File

@@ -68,7 +68,6 @@ import org.schabi.newpipe.extractor.stream.VideoStream;
import org.schabi.newpipe.player.event.PlayerEventListener;
import org.schabi.newpipe.player.helper.LockManager;
import org.schabi.newpipe.player.helper.PlayerHelper;
import org.schabi.newpipe.player.old.PlayVideoActivity;
import org.schabi.newpipe.player.resolver.MediaSourceTag;
import org.schabi.newpipe.player.resolver.VideoPlaybackResolver;
import org.schabi.newpipe.util.ListHelper;
@@ -80,7 +79,6 @@ import java.util.List;
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.player.helper.PlayerHelper.isUsingOldPlayer;
import static org.schabi.newpipe.util.AnimationUtils.animateView;
/**
@@ -554,27 +552,17 @@ public final class PopupVideoPlayer extends Service {
if (DEBUG) Log.d(TAG, "onFullScreenButtonClicked() called");
setRecovery();
Intent intent;
if (!isUsingOldPlayer(getApplicationContext())) {
intent = NavigationHelper.getPlayerIntent(
context,
MainVideoPlayer.class,
this.getPlayQueue(),
this.getRepeatMode(),
this.getPlaybackSpeed(),
this.getPlaybackPitch(),
this.getPlaybackSkipSilence(),
this.getPlaybackQuality()
);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
} else {
intent = new Intent(PopupVideoPlayer.this, PlayVideoActivity.class)
.putExtra(PlayVideoActivity.VIDEO_TITLE, getVideoTitle())
.putExtra(PlayVideoActivity.STREAM_URL, getSelectedVideoStream().getUrl())
.putExtra(PlayVideoActivity.VIDEO_URL, getVideoUrl())
.putExtra(PlayVideoActivity.START_POSITION, Math.round(getPlayer().getCurrentPosition() / 1000f));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
}
final Intent intent = NavigationHelper.getPlayerIntent(
context,
MainVideoPlayer.class,
this.getPlayQueue(),
this.getRepeatMode(),
this.getPlaybackSpeed(),
this.getPlaybackPitch(),
this.getPlaybackSkipSilence(),
this.getPlaybackQuality()
);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
closePopup();
}
@@ -638,6 +626,7 @@ public final class PopupVideoPlayer extends Service {
@Override
public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
super.onLoadingComplete(imageUri, view, loadedImage);
if (playerImpl == null) return;
// rebuild notification here since remote view does not release bitmaps,
// causing memory leaks
resetNotification();

View File

@@ -375,6 +375,11 @@ public abstract class ServicePlayerActivity extends AppCompatActivity
public void onMove(int sourceIndex, int targetIndex) {
if (player != null) player.getPlayQueue().move(sourceIndex, targetIndex);
}
@Override
public void onSwiped(int index) {
if (index != -1) player.getPlayQueue().remove(index);
}
};
}

View File

@@ -131,7 +131,7 @@ public class AudioReactor implements AudioManager.OnAudioFocusChangeListener,
private void onAudioFocusLossCanDuck() {
Log.d(TAG, "onAudioFocusLossCanDuck() called");
// Set the volume to 1/10 on ducking
animateAudio(player.getVolume(), DUCK_AUDIO_TO);
player.setVolume(DUCK_AUDIO_TO);
}
private void animateAudio(final float from, final float to) {

View File

@@ -19,11 +19,11 @@ import com.google.android.exoplayer2.util.MimeTypes;
import org.schabi.newpipe.R;
import org.schabi.newpipe.extractor.InfoItem;
import org.schabi.newpipe.extractor.Subtitles;
import org.schabi.newpipe.extractor.MediaFormat;
import org.schabi.newpipe.extractor.stream.AudioStream;
import org.schabi.newpipe.extractor.stream.StreamInfo;
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import org.schabi.newpipe.extractor.stream.SubtitlesFormat;
import org.schabi.newpipe.extractor.stream.SubtitlesStream;
import org.schabi.newpipe.extractor.stream.VideoStream;
import org.schabi.newpipe.player.playqueue.PlayQueue;
import org.schabi.newpipe.player.playqueue.PlayQueueItem;
@@ -45,7 +45,9 @@ import static com.google.android.exoplayer2.ui.AspectRatioFrameLayout.RESIZE_MOD
import static com.google.android.exoplayer2.ui.AspectRatioFrameLayout.RESIZE_MODE_FIT;
import static com.google.android.exoplayer2.ui.AspectRatioFrameLayout.RESIZE_MODE_ZOOM;
import static java.lang.annotation.RetentionPolicy.SOURCE;
import static org.schabi.newpipe.player.helper.PlayerHelper.MinimizeMode.*;
import static org.schabi.newpipe.player.helper.PlayerHelper.MinimizeMode.MINIMIZE_ON_EXIT_MODE_BACKGROUND;
import static org.schabi.newpipe.player.helper.PlayerHelper.MinimizeMode.MINIMIZE_ON_EXIT_MODE_NONE;
import static org.schabi.newpipe.player.helper.PlayerHelper.MinimizeMode.MINIMIZE_ON_EXIT_MODE_POPUP;
public class PlayerHelper {
private PlayerHelper() {}
@@ -87,7 +89,7 @@ public class PlayerHelper {
return pitchFormatter.format(pitch);
}
public static String mimeTypesOf(final SubtitlesFormat format) {
public static String subtitleMimeTypesOf(final MediaFormat format) {
switch (format) {
case VTT: return MimeTypes.TEXT_VTT;
case TTML: return MimeTypes.APPLICATION_TTML;
@@ -97,8 +99,8 @@ public class PlayerHelper {
@NonNull
public static String captionLanguageOf(@NonNull final Context context,
@NonNull final Subtitles subtitles) {
final String displayName = subtitles.getLocale().getDisplayName(subtitles.getLocale());
@NonNull final SubtitlesStream subtitles) {
final String displayName = subtitles.getDisplayLanguageName();
return displayName + (subtitles.isAutoGenerated() ? " (" + context.getString(R.string.caption_auto_generated)+ ")" : "");
}
@@ -145,7 +147,7 @@ public class PlayerHelper {
final StreamInfoItem nextVideo = info.getNextVideo();
if (nextVideo != null && !urls.contains(nextVideo.getUrl())) {
return new SinglePlayQueue(nextVideo);
return getAutoQueuedSinglePlayQueue(nextVideo);
}
final List<InfoItem> relatedItems = info.getRelatedStreams();
@@ -158,7 +160,7 @@ public class PlayerHelper {
}
}
Collections.shuffle(autoQueueItems);
return autoQueueItems.isEmpty() ? null : new SinglePlayQueue(autoQueueItems.get(0));
return autoQueueItems.isEmpty() ? null : getAutoQueuedSinglePlayQueue(autoQueueItems.get(0));
}
////////////////////////////////////////////////////////////////////////////
@@ -177,10 +179,6 @@ public class PlayerHelper {
return isBrightnessGestureEnabled(context, true);
}
public static boolean isUsingOldPlayer(@NonNull final Context context) {
return isUsingOldPlayer(context, false);
}
public static boolean isRememberingPopupDimensions(@NonNull final Context context) {
return isRememberingPopupDimensions(context, true);
}
@@ -318,10 +316,6 @@ public class PlayerHelper {
return getPreferences(context).getBoolean(context.getString(R.string.brightness_gesture_control_key), b);
}
private static boolean isUsingOldPlayer(@NonNull final Context context, final boolean b) {
return getPreferences(context).getBoolean(context.getString(R.string.use_old_player_key), b);
}
private static boolean isRememberingPopupDimensions(@NonNull final Context context, final boolean b) {
return getPreferences(context).getBoolean(context.getString(R.string.popup_remember_size_pos_key), b);
}
@@ -358,4 +352,10 @@ public class PlayerHelper {
return getPreferences(context).getString(context.getString(R.string.minimize_on_exit_key),
key);
}
private static SinglePlayQueue getAutoQueuedSinglePlayQueue(StreamInfoItem streamInfoItem) {
SinglePlayQueue singlePlayQueue = new SinglePlayQueue(streamInfoItem);
singlePlayQueue.getItem().setAutoQueued(true);
return singlePlayQueue;
}
}

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