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

Compare commits

..

180 Commits

Author SHA1 Message Date
Christian Schabesberger
fba0a8036b Merge pull request #1825 from TeamNewPipe/release_0.14.2
Release 0.14.2
2018-10-27 09:58:56 +02:00
Christian Schabesberger
d82274f5d4 fucking android bullshit 2018-10-27 09:57:11 +02:00
Christian Schabesberger
3cf81230b2 Merge branch 'dev' into release_0.14.2 2018-10-26 15:02:11 +02:00
Christian Schabesberger
17bab456e4 Merge pull request #1845 from AndhikaWB/patch-1
Fix spelling of country names in settings
2018-10-26 15:01:34 +02:00
Christian Schabesberger
e1cc006db7 fix race condition when returning to main player 2018-10-26 14:59:49 +02:00
Tobias Groza
7e95dd3c76 Change from "Côte d'Ivoire" to "Côte d\'Ivoire"
Co-Authored-By: AndhikaWB <karagasnoelan@gmail.com>
2018-10-26 16:22:35 +07:00
AndhikaWB
ff3ce46a26 Update settings_keys.xml 2018-10-26 00:09:04 +07:00
AndhikaWB
4d61c2c5e0 Fix spelling in of country names in settings
- [x] I carefully read the [contribution guidelines](https://github.com/TeamNewPipe/NewPipe/blob/HEAD/.github/CONTRIBUTING.md) and agree to them.

Closes TeamNewPipe/NewPipe#1504
2018-10-26 00:04:36 +07:00
Christian Schabesberger
afaba7ccdf fix broken search result 2018-10-25 15:58:06 +02:00
Christian Schabesberger
ccb3ceae4f add release node 2018-10-25 10:58:37 +02:00
Christian Schabesberger
d0d93f6d2d Merge branch 'dev' into release_0.14.2 2018-10-25 10:57:39 +02:00
Christian Schabesberger
67f091c731 Merge pull request #1830 from boredomdenied/dev
Add foreground service permission for API 28+ devices
2018-10-25 10:54:52 +02:00
Christian Schabesberger
fa3aebb7b1 localisation to localization 2018-10-22 12:25:50 +02:00
Christian Schabesberger
988251deb6 fix weblate collision 2018-10-22 12:15:16 +02:00
Christian Schabesberger
d99a389c49 merge weblate 2018-10-22 12:07:12 +02:00
Marian Hanzel
7508f9d3bb Translated using Weblate (Slovak)
Currently translated at 100.0% (383 of 383 strings)
2018-10-21 09:45:21 +02:00
Heimen Stoffels
b2512d7aee Translated using Weblate (Dutch)
Currently translated at 100.0% (383 of 383 strings)
2018-10-21 09:45:18 +02:00
Olexandr Nesterenko
eb74e1e3b2 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (383 of 383 strings)
2018-10-21 09:45:13 +02:00
boredomdenied
bd91e82b17 Update AndroidManifest.xml
remove needless additional line
2018-10-19 21:07:59 -05:00
boredomdenied
bae60acfe7 Update AndroidManifest.xml
Fix foreground playback in android Pie API 28. Tested in emulator & Pixel 3 device.
2018-10-19 20:52:22 -05:00
Emin Tufan Çetin
426cefe8ee Translated using Weblate (Turkish)
Currently translated at 100.0% (383 of 383 strings)
2018-10-20 01:33:46 +02:00
Allan Nordhøy
a36fe3ef21 Translated using Weblate (Swedish)
Currently translated at 100.0% (383 of 383 strings)
2018-10-20 01:33:46 +02:00
Allan Nordhøy
ee0756c7c0 Translated using Weblate (Russian)
Currently translated at 99.7% (382 of 383 strings)
2018-10-20 01:33:45 +02:00
Jaggie
44b96121e4 Translated using Weblate (Punjabi)
Currently translated at 7.3% (28 of 383 strings)
2018-10-20 01:33:44 +02:00
Allan Nordhøy
8add777b34 Translated using Weblate (German)
Currently translated at 100.0% (383 of 383 strings)
2018-10-20 01:33:42 +02:00
Allan Nordhøy
6932b15144 Translated using Weblate (English)
Currently translated at 100.0% (383 of 383 strings)
2018-10-20 01:33:41 +02:00
Allan Nordhøy
c09edda797 Translated using Weblate (Norwegian Bokmål)
Currently translated at 99.7% (382 of 383 strings)
2018-10-20 01:33:38 +02:00
Christian Schabesberger
0e86010565 move on to version 0.14.2 2018-10-19 15:53:19 +02:00
Tobias Groza
6fe3fdce11 Merge pull request #1828 from comradekingu/patch-8
Spelling and linguistic updates for readme
2018-10-19 11:00:39 +02:00
Allan Nordhøy
90769a12b1 Spelling and linguistic updates 2018-10-19 02:05:29 +02:00
Mostafa Ahangarha
1d49b725b6 Translated using Weblate (Persian)
Currently translated at 23.2% (89 of 383 strings)
2018-10-18 11:31:57 +02:00
Stjepan
204feb97ce Translated using Weblate (Croatian)
Currently translated at 86.9% (333 of 383 strings)
2018-10-18 11:31:56 +02:00
maa123
e12389a748 Translated using Weblate (Japanese)
Currently translated at 96.8% (371 of 383 strings)
2018-10-18 11:31:52 +02:00
Christian Schabesberger
670591e221 Merge pull request #1792 from TeamNewPipe/lang
Add support for Localization
2018-10-16 16:16:05 +02:00
Christian Schabesberger
8006a7d578 Merge branch 'dev' into lang 2018-10-16 16:01:32 +02:00
Christian Schabesberger
8b9078b82e Merge pull request #1801 from TacoTheDank/dev
simply update gradles to 28, AS 3.2.0, and a few dependencies
2018-10-16 16:00:44 +02:00
Christian Schabesberger
56d4edd3ae Merge branch 'dev' into dev 2018-10-16 03:47:29 +02:00
Christian Schabesberger
a7f5ea865e Merge branch 'dev' into lang 2018-10-16 03:47:11 +02:00
Christian Schabesberger
2a62144abd Merge pull request #1800 from TeamNewPipe/history-screenshot
Update screenshots and readme
2018-10-16 03:46:38 +02:00
Christian Schabesberger
c7ea7a4f65 Merge branch 'dev' into dev 2018-10-16 03:45:14 +02:00
TobiGr
7ea090ba8d Update video detail screenshot 2018-10-15 15:16:24 +02:00
TobiGr
9294e353d3 Add link to privacy policy to readme
Closes TeamNewPipe/NewPipe#1789
Part of TeamNewPipe/NewPipe#1817
2018-10-15 15:02:34 +02:00
TobiGr
71c50c58ee Move tablet screenshots for better F-Droid integration 2018-10-15 15:00:41 +02:00
TobiGr
e322299fda Update history screenshot 2018-10-15 14:52:07 +02:00
Ákos Surányi
06602a568a Translated using Weblate (Hungarian)
Currently translated at 90.8% (348 of 383 strings)
2018-10-14 21:31:53 +02:00
Tobias Groza
a0f0529ad8 Merge pull request #1810 from saderror256/patch-1
Fix broken bold
2018-10-14 15:01:24 +02:00
SadError256
c371d863d9 Fix broken bold
also removed useless backslash in html5
2018-10-13 18:20:47 -04:00
Ákos Surányi
16d8c75953 Translated using Weblate (Hungarian)
Currently translated at 41.5% (159 of 383 strings)
2018-10-13 17:20:53 +02:00
Toldi Balázs
fa48c0e76b Translated using Weblate (Hungarian)
Currently translated at 41.5% (159 of 383 strings)
2018-10-13 17:20:51 +02:00
Tobias Groza
2d17cfaf2b Merge pull request #1644 from ritiek/separate-gesture-options
Separate options for volume and brightness gestures
2018-10-11 17:41:34 +02:00
Matej U
f379de0a3a Translated using Weblate (Slovenian)
Currently translated at 62.6% (240 of 383 strings)
2018-10-11 11:34:26 +02:00
TacoTheDank
d3fcb0aa6a Update build.gradle 2018-10-10 14:29:26 -04:00
Ritiek Malhotra
046740f10b Merge branch 'dev' into separate-gesture-options 2018-10-10 08:41:42 -07:00
TacoTheDank
ffae2eda83 simply update gradles to 28, and some dependencies 2018-10-09 12:22:30 -04:00
Christian Schabesberger
8334b8fe46 Merge pull request #1798 from TeamNewPipe/screenshots
add tablet screenshot
2018-10-08 12:35:57 +02:00
Christian Schabesberger
c6c6e58d28 add tablet screenshot 2018-10-08 12:35:13 +02:00
Christian Schabesberger
2ff0d6665c Merge pull request #1617 from nv95/tablet_ui
Tablet ui and grid list layout
2018-10-08 12:15:02 +02:00
Christian Schabesberger
dc6108c970 Merge branch 'dev' into tablet_ui 2018-10-08 11:56:25 +02:00
Christian Schabesberger
6f52f9b4af Merge pull request #1796 from saderror256/patch-1
Update README.md
2018-10-08 11:39:31 +02:00
zelos-h
b6eb896f0b Translated using Weblate (Chinese (Traditional))
Currently translated at 99.7% (382 of 383 strings)
2018-10-08 10:57:24 +02:00
SadError256
adf861c36d Update README.md 2018-10-07 13:39:02 -04:00
Christian Schabesberger
4e1bcdf209 Merge pull request #1516 from Somethingweirdhere/LongTapInSubs
Long-tap delete and share in subscriptions
2018-10-07 14:08:09 +02:00
Christian Schabesberger
d107fe19f7 Merge branch 'dev' into LongTapInSubs 2018-10-07 13:59:39 +02:00
Christian Schabesberger
fa03ff51d4 Merge pull request #1651 from comradekingu/patch-7
Spelling: Language rework
2018-10-07 13:39:03 +02:00
Christian Schabesberger
f6c6536b48 Merge branch 'dev' into patch-7 2018-10-07 13:26:10 +02:00
Christian Schabesberger
38e4249182 Merge branch 'dev' into lang 2018-10-07 13:25:35 +02:00
Christian Schabesberger
2dd8c0beee Merge pull request #1773 from prg318/clarify-bookmarks
[Closes #1772] change 'tab_bookmarks' string to 'Bookmarked Playlists' for UI clarity
2018-10-06 18:16:38 +02:00
Christian Schabesberger
6a35494ef1 Merge branch 'dev' into patch-7 2018-10-06 18:16:10 +02:00
Christian Schabesberger
bf1c42e085 Merge branch 'dev' into clarify-bookmarks 2018-10-06 18:10:18 +02:00
Christian Schabesberger
0ef6bf8067 Merge pull request #1783 from coin3x/enqueue-autoplay
Enqueuing now triggers video playing if the play queue has already ended
2018-10-06 17:55:22 +02:00
Christian Schabesberger
9d63e2ae97 Merge branch 'dev' into enqueue-autoplay 2018-10-06 17:35:55 +02:00
Christian Schabesberger
fdd8060296 Merge branch 'dev' into lang 2018-10-06 17:29:42 +02:00
Christian Schabesberger
ebbb23ffbb fix bugs in country search 2018-10-06 17:18:19 +02:00
Christian Schabesberger
0e413109bd Merge pull request #1748 from MaX-Lo/store_last_aspect_ratio
store and reload the last used aspect ratio
2018-10-06 12:09:14 +02:00
Christian Schabesberger
f7e29c1e00 revert sdk upgrade 2018-10-06 12:06:03 +02:00
Christian Schabesberger
42f777d49a Merge branch 'dev' into clarify-bookmarks 2018-10-06 12:01:34 +02:00
Christian Schabesberger
efb8ea4c25 make local settings be live updated 2018-10-05 16:31:23 +02:00
Christian Schabesberger
52bf5690c0 add support for content language and content country 2018-10-05 16:20:27 +02:00
Jasmine Vyas
607dff9263 Translated using Weblate (Hindi)
Currently translated at 92.6% (355 of 383 strings)
2018-10-04 22:28:46 +02:00
Coin
0510db75fb Enqueuing now triggers video playing if the play queue has done playing 2018-10-03 00:31:28 +08:00
MaX
859eecabc0 Merge branch 'dev' into store_last_aspect_ratio 2018-10-02 10:44:04 +02:00
MadderRagax
7a0253631b Translated using Weblate (Swedish)
Currently translated at 100.0% (383 of 383 strings)
2018-10-01 18:21:22 +02:00
ezjerry liao
c12a60c1ad Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (383 of 383 strings)
2018-10-01 18:21:21 +02:00
ButterflyOfFire
df9dbd6130 Translated using Weblate (Arabic)
Currently translated at 100.0% (383 of 383 strings)
2018-10-01 18:21:16 +02:00
Tobias Groza
a98e745116 Merge pull request #1771 from jludden/dev
Enable linear layout in Downloads activity with full video names
2018-10-01 17:40:40 +02:00
Lukas Sabota
61f1b10a06 Change 'tab_bookmarks' string to 'Bookmarked Playlists' for UI clarity 2018-09-30 11:34:16 -04:00
jludden
4bcb2a5c9d update linear layout
re-arrange elements and allow the video title to display over multiple lines
2018-09-30 07:42:02 +08:00
MaX
7e48648f9e Merge branch 'dev' into store_last_aspect_ratio 2018-09-29 12:45:10 +02:00
jludden
bcc97d1aa7 Adding switch view button to downloads activity
Can now switch between linear and grid layouts in the downloads activity
2018-09-29 15:13:15 +08:00
Christian Schabesberger
49f9d36718 Merge pull request #1640 from BO41/code-clean
Code clean
2018-09-28 17:17:30 +02:00
O Passante
f9cb258a5e Translated using Weblate (Galician)
Currently translated at 100.0% (383 of 383 strings)
2018-09-28 11:26:41 +02:00
O Passante
97381a4908 Translated using Weblate (Galician)
Currently translated at 100.0% (383 of 383 strings)
2018-09-27 01:28:42 +02:00
RainSlide
7a15acc546 Translated using Weblate (Chinese (Simplified))
Currently translated at 29.2% (112 of 383 strings)
2018-09-25 18:13:16 +02:00
O Passante
0265de2137 Added translation using Weblate (Galician) 2018-09-25 18:13:14 +02:00
Nigel Ticknor
595b9910f5 Translated using Weblate (Japanese)
Currently translated at 93.9% (360 of 383 strings)
2018-09-25 14:22:36 +02:00
Heimen Stoffels
f4d4d2cc35 Translated using Weblate (Dutch)
Currently translated at 100.0% (383 of 383 strings)
2018-09-25 14:22:35 +02:00
zelos-h
b4fb4d7dcf Translated using Weblate (Chinese (Traditional))
Currently translated at 96.0% (368 of 383 strings)
2018-09-25 14:22:30 +02:00
RainSlide
1a375fb523 Translated using Weblate (Chinese (Simplified))
Currently translated at 29.2% (112 of 383 strings)
2018-09-25 14:22:27 +02:00
zelos-h
658c0ff5c4 Translated using Weblate (Chinese (Hong Kong))
Currently translated at 37.8% (145 of 383 strings)
2018-09-25 14:22:23 +02:00
MaX-Lo
6092f06d46 store the last used aspect ratio in SharedPreferences and reload them on
resuming the VideoPlayer Activity (similar to storing/reloading the last used: screen rotation)
2018-09-22 11:32:13 +02:00
ezjerry liao
4671b956b3 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (383 of 383 strings)
2018-09-21 16:22:02 +02:00
postsorino
552ba6999a Translated using Weblate (Greek)
Currently translated at 99.7% (382 of 383 strings)
2018-09-20 15:16:07 +02:00
zelos-h
b86bc4455f Translated using Weblate (Chinese (Traditional))
Currently translated at 94.2% (361 of 383 strings)
2018-09-20 15:16:03 +02:00
Allan Nordhøy
b6d36ee117 Translated using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (383 of 383 strings)
2018-09-19 08:30:03 +02:00
Tobias Groza
5d57f864dc Translated using Weblate (Vietnamese)
Currently translated at 97.1% (372 of 383 strings)
2018-09-17 23:21:52 +02:00
naofum
c6ee2816db Translated using Weblate (Japanese)
Currently translated at 93.7% (359 of 383 strings)
2018-09-17 23:21:51 +02:00
Tobias Groza
0aa898b13f Translated using Weblate (Chinese (Hong Kong))
Currently translated at 37.8% (145 of 383 strings)
2018-09-17 23:21:49 +02:00
Stjepan
b22e82c8ce Translated using Weblate (Croatian)
Currently translated at 85.6% (328 of 383 strings)
2018-09-17 23:21:47 +02:00
zelos-h
63dee1e1ac Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (383 of 383 strings)
2018-09-16 13:27:50 +02:00
epsimatt
91c87ac301 Translated using Weblate (Korean)
Currently translated at 96.0% (368 of 383 strings)
2018-09-16 13:27:46 +02:00
Shuuji TAKAHASHI (shuuji3)
42371a6e8d Translated using Weblate (Japanese)
Currently translated at 88.7% (340 of 383 strings)
2018-09-14 21:20:02 +02:00
Ritiek Malhotra
d7aae849f6 Merge branch 'dev' into separate-gesture-options 2018-09-12 21:41:47 +05:30
DanieLoche
4fe9413662 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (383 of 383 strings)
2018-09-12 12:20:25 +02:00
CaptainCrumble
37bf51cebf Translated using Weblate (Portuguese)
Currently translated at 91.3% (350 of 383 strings)
2018-09-12 12:20:25 +02:00
DanieLoche
eee9cb8b87 Translated using Weblate (Portuguese)
Currently translated at 91.3% (350 of 383 strings)
2018-09-12 12:20:24 +02:00
DanieLoche
1724bca5f0 Translated using Weblate (French)
Currently translated at 100.0% (383 of 383 strings)
2018-09-12 12:20:21 +02:00
Cipisek Rumcajsu
ae6581fb55 Translated using Weblate (Czech)
Currently translated at 99.7% (382 of 383 strings)
2018-09-12 12:20:20 +02:00
Michael Moroni
0c632307ea Translated using Weblate (Italian)
Currently translated at 100.0% (383 of 383 strings)
2018-09-12 12:20:15 +02:00
BO41
479887eb84 fix broken merge resolve
fixing merge conflicts broke build
2018-09-11 19:37:12 +02:00
BO41
af280a7343 Java language level + javadoc + xml
replace with <>
String builder

BUILD SUCCESSFUL in 4s
39 actionable tasks: 4 executed, 35 up-to-date
2018-09-11 19:20:10 +02:00
BO41
802b26e870 error handling + imports + unboxing 2018-09-11 19:18:50 +02:00
BO41
0ab86937d2 data flow issue + declaration redundancy
make final
unused methods
make final

BUILD SUCCESSFUL in 0s
39 actionable tasks: 39 up-to-date
2018-09-11 19:18:41 +02:00
BO41
3ab06bf383 class structure
BUILD SUCCESSFUL in 17s
39 actionable tasks: 6 executed, 33 up-to-date
2018-09-11 19:18:14 +02:00
BO41
5db0cc5241 performance + usability
obsolete layout params
Ellipsis string can be replaced with ellipsis character
Missing inputType
Usage of showAsAction=always

BUILD SUCCESSFUL in 5s
39 actionable tasks: 4 executed, 35 up-to-date
2018-09-11 19:18:14 +02:00
BO41
a588ec084b correctness
use apply() on SharedPreferences
use dp instead of sp for text sizes

BUILD SUCCESSFUL in 22s
39 actionable tasks: 10 executed, 29 up-to-date
2018-09-11 19:18:02 +02:00
BO41
5660b5ddc6 accessibility
image without contentDescription
Keyboard inaccessible widget

BUILD SUCCESSFUL in 6s
39 actionable tasks: 4 executed, 35 up-to-date
2018-09-11 19:14:42 +02:00
BO41
27fbe69033 code cleanup
mainly removes throw statements

automated using Android Studio, staged by hand

BUILD SUCCESSFUL in 52s
39 actionable tasks: 37 executed, 2 up-to-date
2018-09-11 19:14:21 +02:00
Christian Schabesberger
1672ecb892 Merge branch 'dev' into patch-7 2018-09-11 16:34:58 +02:00
Christian Schabesberger
784e01347c fix wrong subscriptini count 2018-09-11 15:16:39 +02:00
Emin Tufan Çetin
5cc21a831b Translated using Weblate (Turkish)
Currently translated at 100.0% (383 of 383 strings)
2018-09-10 19:13:10 +02:00
Robson Cassiano
dcb9380b50 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (383 of 383 strings)
2018-09-10 19:13:08 +02:00
ButterflyOfFire
b1957773bb Translated using Weblate (Arabic)
Currently translated at 100.0% (383 of 383 strings)
2018-09-10 19:13:05 +02:00
switchtegrax1
c4f4583f20 Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.7% (382 of 383 strings)
2018-09-09 18:58:19 +02:00
Dominik Zabicki
440cdbdb23 Translated using Weblate (Polish)
Currently translated at 100.0% (383 of 383 strings)
2018-09-09 18:58:18 +02:00
Duppadaadadii
58bfde33a9 Translated using Weblate (Finnish)
Currently translated at 99.7% (382 of 383 strings)
2018-09-09 18:58:17 +02:00
skil3z
7c33e49ef6 Translated using Weblate (Finnish)
Currently translated at 99.7% (382 of 383 strings)
2018-09-09 18:58:17 +02:00
Rex_sa
3bf318e2b7 Translated using Weblate (Arabic)
Currently translated at 100.0% (383 of 383 strings)
2018-09-09 18:58:10 +02:00
Ritiek Malhotra
f56193ac18 We don't need to check this 2018-09-08 23:13:04 +05:30
ScratchBuild
31efa7a8f8 Translated using Weblate (Japanese)
Currently translated at 74.1% (284 of 383 strings)
2018-09-08 19:15:24 +02:00
skil3z
372932abaf Translated using Weblate (Finnish)
Currently translated at 74.6% (286 of 383 strings)
2018-09-08 19:15:23 +02:00
M Andreev
4c6dd2cdf2 Translated using Weblate (Bulgarian)
Currently translated at 99.4% (381 of 383 strings)
2018-09-08 19:15:18 +02:00
Stjepan
6d04e39151 Translated using Weblate (Croatian)
Currently translated at 65.7% (252 of 383 strings)
2018-09-08 19:15:15 +02:00
Ritiek Malhotra
afa257e79a Merge branch 'dev' into separate-gesture-options 2018-09-08 10:05:51 -07:00
Christian Schabesberger
05f8ee9747 fix channel links in description part 2 2018-09-07 22:23:32 +02:00
Christian Schabesberger
818ae03928 fix decrypt url and move on to v0.14.1 2018-09-07 21:51:14 +02:00
Ritiek Malhotra
97555645f8 Merge branch 'dev' into separate-gesture-options 2018-09-05 09:21:05 -07:00
kaka Thic
e350f43adc Translated using Weblate (Vietnamese)
Currently translated at 95.8% (367 of 383 strings)
2018-09-05 08:26:05 +02:00
Çağdaş Tatar
2257f3484d Translated using Weblate (Turkish)
Currently translated at 100.0% (383 of 383 strings)
2018-09-05 08:25:35 +02:00
Christian Schabesberger
f4ba8df02b Merge branch 'dev' into patch-7 2018-09-04 17:53:39 +02:00
notramo
99ebf03876 Translated using Weblate (Hungarian)
Currently translated at 40.7% (156 of 383 strings)
2018-09-03 19:18:49 +02:00
postsorino
995d79e373 Translated using Weblate (Greek)
Currently translated at 98.1% (376 of 383 strings)
2018-09-03 19:18:46 +02:00
Allan Nordhøy
0cd153ab61 Spelling: Language rework 2018-09-03 13:07:10 +02:00
Vasily
b24baa68ba Tablet UI in player 2018-08-31 17:30:06 +03:00
Vasily
d4c1b8d321 Fix: remove title from PlaylistDialog 2018-08-31 17:12:56 +03:00
Vasily
1e53d6bfab Scroll top related streams when loading 2018-08-31 17:08:13 +03:00
Ritiek Malhotra
5931cd6af7 Separate options for volume and brightness gestures 2018-08-31 19:30:40 +05:30
u1
a1be03543c Grid layout for subscriptions 2018-08-31 16:49:25 +03:00
u1
b1a5547de2 Fix reordering playlist items on grid layout 2018-08-31 16:34:35 +03:00
Vasily
ee4942dfd7 Grid layout for local lists 2018-08-31 14:34:32 +03:00
Vasily
8aef24be1e Merge branch 'tablet_ui' of https://github.com/nv95/NewPipe into tablet_ui 2018-08-29 09:00:15 +03:00
Vasily
fb25f6c7ac Automatic list layout 2018-08-29 08:19:15 +03:00
Vasily
fbd983217d Hide related streams while loading 2018-08-29 08:08:35 +03:00
Vasily
ce21fe2087 Always show description on tablets 2018-08-29 08:01:18 +03:00
Christian Schabesberger
17cd395712 Merge branch 'dev' into tablet_ui 2018-08-28 21:28:10 +02:00
Christian Schabesberger
bfe9de05cd Merge branch 'dev' into LongTapInSubs 2018-08-28 18:39:11 +02:00
Somethingweirdhere
4326354ca6 Code cleanup 2018-08-22 13:59:12 +02:00
Vasily
4208c852e1 Update translations 2018-08-22 10:33:10 +03:00
Vasily
7330b4532e Fix crash on screen rotation 2018-08-22 10:29:37 +03:00
Vasily
1e0f6f9e41 Grid view 2018-08-22 10:14:01 +03:00
Vasily
216e2367c6 Video details tablet layout 2018-08-22 08:32:58 +03:00
Somethingweirdhere
f4416fe007 Doesn't use getChannelInfo() anymore. 2018-08-16 01:04:37 +02:00
Somethingweirdhere
510591ef0f Removed use of blockingFirst() and scheduleDirect() 2018-08-16 00:45:37 +02:00
Somethingweirdhere
a5e89d1dd1 Merge branch 'dev' into LongTapInSubs 2018-08-15 23:33:59 +02:00
Somethingweirdhere
b48c251b36 Added unsubscription toast
Added error handling
Corrected threads
2018-06-30 02:42:47 +02:00
Somethingweirdhere
181a14ce59 Disposable now is cleaned properly 2018-06-30 02:20:01 +02:00
Somethingweirdhere
b9ea7ce066 Code looking nicer 2018-06-29 00:39:44 +02:00
Somethingweirdhere
f2f275512d It looks good now 2018-06-29 00:39:16 +02:00
Somethingweirdhere
5150c2ee62 This thing actually works lol 2018-06-28 23:56:39 +02:00
Somethingweirdhere
0b7593ad28 Delete on long press 2018-06-28 20:43:46 +02:00
Somethingweirdhere
a68823491c Delete on long press 2018-06-28 20:37:05 +02:00
205 changed files with 4663 additions and 1473 deletions

View File

@@ -5,13 +5,13 @@ android:
components:
# The BuildTools version used by NewPipe
- tools
- build-tools-27.0.3
- build-tools-28.0.3
# The SDK version used to compile NewPipe
- android-27
- android-28
before_install:
- yes | sdkmanager "platforms;android-27"
- yes | sdkmanager "platforms;android-28"
script: ./gradlew -Dorg.gradle.jvmargs=-Xmx1536m assembleDebug lintDebug testDebugUnitTest
licenses:

View File

@@ -1,21 +1,22 @@
<p align="center"><a href="https://newpipe.schabi.org"><img src="assets/new_pipe_icon_5.png" width="150"/></a></p>
<p align="center"><a href="https://newpipe.schabi.org"><img src="assets/new_pipe_icon_5.png" width="150"></a></p>
<h2 align="center"><b>NewPipe</b></h2>
<h4 align="center">A free lightweight YouTube frontend for Android.</h4>
<p align="center"><a href="https://f-droid.org/packages/org.schabi.newpipe/"><img src="https://f-droid.org/wiki/images/0/06/F-Droid-button_get-it-on.png"/></a></p>
<h4 align="center">A libre lightweight streaming frontend for Android.</h4>
<p align="center"><a href="https://f-droid.org/packages/org.schabi.newpipe/"><img src="https://f-droid.org/wiki/images/0/06/F-Droid-button_get-it-on.png"></a></p>
<p align="center">
<a href="https://github.com/TeamNewPipe/NewPipe" alt="GitHub release"><img src="https://img.shields.io/github/release/TeamNewPipe/NewPipe.svg" /></a>
<a href="https://www.gnu.org/licenses/gpl-3.0" alt="License: GPL v3"><img src="https://img.shields.io/badge/License-GPL%20v3-blue.svg" /></a>
<a href="https://travis-ci.org/TeamNewPipe/NewPipe" alt="Build Status"><img src="https://travis-ci.org/TeamNewPipe/NewPipe.svg" /></a>
<a href="https://hosted.weblate.org/engage/NewPipe/" alt="Translation Status"><img src="https://hosted.weblate.org/widgets/NewPipe/-/svg-badge.svg" /></a>
<a href="http://webchat.freenode.net/?channels=%23newpipe" alt="IRC channel: #newpipe"><img src="https://img.shields.io/badge/IRC%20chat-%23newpipe-brightgreen.svg" /></a>
<a href="https://www.bountysource.com/teams/newpipe" alt="Bountysource bounties"><img src="https://img.shields.io/bountysource/team/newpipe/activity.svg?colorB=cd201f"/></a>
<a href="https://github.com/TeamNewPipe/NewPipe" alt="GitHub release"><img src="https://img.shields.io/github/release/TeamNewPipe/NewPipe.svg" ></a>
<a href="https://www.gnu.org/licenses/gpl-3.0" alt="License: GPLv3"><img src="https://img.shields.io/badge/License-GPL%20v3-blue.svg"></a>
<a href="https://travis-ci.org/TeamNewPipe/NewPipe" alt="Build Status"><img src="https://travis-ci.org/TeamNewPipe/NewPipe.svg"></a>
<a href="https://hosted.weblate.org/engage/NewPipe/" alt="Translation Status"><img src="https://hosted.weblate.org/widgets/NewPipe/-/svg-badge.svg"></a>
<a href="http://webchat.freenode.net/?channels=%23newpipe" alt="IRC channel: #newpipe"><img src="https://img.shields.io/badge/IRC%20chat-%23newpipe-brightgreen.svg"></a>
<a href="https://www.bountysource.com/teams/newpipe" alt="Bountysource bounties"><img src="https://img.shields.io/bountysource/team/newpipe/activity.svg?colorB=cd201f"></a>
</p>
<hr />
<hr>
<p align="center"><a href="#screenshots">Screenshots</a> &bull; <a href="#description">Description</a> &bull; <a href="#features">Features</a> &bull; <a href="#contribution">Contribution</a> &bull; <a href="#donate">Donate</a> &bull; <a href="#license">License</a></p>
<p align="center"><a href="https://newpipe.schabi.org">Website</a> &bull; <a href="https://newpipe.schabi.org/blog/">Blog</a> &bull; <a href="https://newpipe.schabi.org/press/">Press</a></p>
<hr />
WARNING: PUTTING NEWPIPE OR ANY FORK OF IT INTO GOOGLE PLAYSTORE VIOLATES THEIR TERMS OF CONDITIONS.
<hr>
<b>WARNING: PUTTING NEWPIPE OR ANY FORK OF IT INTO GOOGLE PLAYSTORE VIOLATES THEIR TERMS OF CONDITIONS.</b>
## Screenshots
@@ -29,46 +30,48 @@ WARNING: PUTTING NEWPIPE OR ANY FORK OF IT INTO GOOGLE PLAYSTORE VIOLATES THEIR
[<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/shot_8.png" width=160>](fastlane/metadata/android/en-US/images/phoneScreenshots/shot_8.png)
[<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/shot_9.png" width=160>](fastlane/metadata/android/en-US/images/phoneScreenshots/shot_9.png)
[<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/shot_10.png" width=160>](fastlane/metadata/android/en-US/images/phoneScreenshots/shot_10.png)
[<img src="fastlane/metadata/android/en-US/images/tenInchScreenshots/shot_11.png" width=405>](fastlane/metadata/android/en-US/images/tenInchScreenshots/shot_11.png)
[<img src="fastlane/metadata/android/en-US/images/tenInchScreenshots/shot_12.png" width=405>](fastlane/metadata/android/en-US/images/tenInchScreenshots/shot_12.png)
## Description
NewPipe does not use any Google framework libraries, or the YouTube API. It only parses the website in order to gain the information it needs. Therefore this app can be used on devices without Google Services installed. Also, you don't need a YouTube account to use NewPipe, and it's FLOSS.
NewPipe does not use any Google framework libraries, nor the YouTube API. Websites are only parsed to fetch required info, so this app can be used on devices without Google services installed. Also, you don't need a YouTube account to use NewPipe, which is copylefted libre software.
### Features
* Search videos
* Display general information about a video
* Display general info about videos
* Watch YouTube videos
* Listen to YouTube videos
* Popup mode (floating player)
* Select the streaming player to watch the video with
* Download videos
* Select streaming player to watch video with
* Download videos
* Download audio only
* Open a video in Kodi
* Show Next/Related videos
* Show next/related videos
* Search YouTube in a specific language
* Watch/Block age restricted material
* Display general information about channels
* Display general info about channels
* Search channels
* Watch videos from a channel
* Orbot/Tor support (not yet directly)
* 1080p/2k/4k support
* 1080p/2K/4K support
* View history
* Subscribe to channels
* Search history
* Search/Watch Playlists
* Watch as queues Playlists
* Queuing videos
* Search/watch playlists
* Watch as enqueued playlists
* Enqueue videos
* Local playlists
* Subtitles
* Multi-service support (eg. SoundCloud in NewPipe Beta)
* Multi-service support (e.g. SoundCloud \[beta\])
* Livestream support
### Coming Features
* Livestream support
* Cast to UPnP and Cast
* Show comments
* ... and many more
* and many more
## Contribution
Whether you have ideas, translations, design changes, code cleaning, or real heavy code changes, help is always welcome.
@@ -77,26 +80,31 @@ The more is done the better it gets!
If you'd like to get involved, check our [contribution notes](.github/CONTRIBUTING.md).
## Donate
If you like NewPipe we'd be happy about a donation. You can either donate via Bitcoin, Bountysource or Liberapay. For further information about donating to NewPipe, please visit our [website](https://newpipe.schabi.org/donate).
If you like NewPipe we'd be happy about a donation. You can either send bitcoin or donate via Bountysource or Liberapay. For further info on donating to NewPipe, please visit our [website](https://newpipe.schabi.org/donate).
<table>
<tr>
<td><img src="https://bitcoin.org/img/icons/logotop.svg" alt="Bitcoin" /></td>
<td><img src="assets/bitcoin_qr_code.png" alt="Bitcoin QR Code" width="100px"/></td>
<td><img src="https://bitcoin.org/img/icons/logotop.svg" alt="Bitcoin"></td>
<td><img src="assets/bitcoin_qr_code.png" alt="Bitcoin QR code" width="100px"></td>
<td><samp>16A9J59ahMRqkLSZjhYj33n9j3fMztFxnh</samp></td>
</tr>
<tr>
<td><a href="https://liberapay.com/TeamNewPipe/"><img src="https://upload.wikimedia.org/wikipedia/commons/2/27/Liberapay_logo_v2_white-on-yellow.svg" alt="Liberapay" width="80px" /></a></td>
<td><a href="https://liberapay.com/TeamNewPipe/"><img src="assets/liberapay_qr_code.png" alt="Visit NewPipe at liberapay.com" width="100px"/></a></td>
<td><a href="https://liberapay.com/TeamNewPipe/donate"><img src="assets/liberapay_donate_button.svg" alt="Donate via Liberapay" height="35px" /></a></td>
<td><a href="https://liberapay.com/TeamNewPipe/"><img src="https://upload.wikimedia.org/wikipedia/commons/2/27/Liberapay_logo_v2_white-on-yellow.svg" alt="Liberapay" width="80px" ></a></td>
<td><a href="https://liberapay.com/TeamNewPipe/"><img src="assets/liberapay_qr_code.png" alt="Visit NewPipe at liberapay.com" width="100px"></a></td>
<td><a href="https://liberapay.com/TeamNewPipe/donate"><img src="assets/liberapay_donate_button.svg" alt="Donate via Liberapay" height="35px"></a></td>
</tr>
<tr>
<td><a href="https://www.bountysource.com/teams/newpipe"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/22/Bountysource.png/320px-Bountysource.png" alt="Bountysource" width="190px" /></a></td>
<td><a href="https://www.bountysource.com/teams/newpipe"><img src="assets/bountysource_qr_code.png" alt="Visit NewPipe at bountysource.com" width="100px"/></a></td>
<td><a href="https://www.bountysource.com/teams/newpipe/issues"><img src="https://img.shields.io/bountysource/team/newpipe/activity.svg?colorB=cd201f" height="30px" alt="Check out how many bounties you can earn." /></a></td>
<td><a href="https://www.bountysource.com/teams/newpipe"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/22/Bountysource.png/320px-Bountysource.png" alt="Bountysource" width="190px"></a></td>
<td><a href="https://www.bountysource.com/teams/newpipe"><img src="assets/bountysource_qr_code.png" alt="Visit NewPipe at bountysource.com" width="100px"></a></td>
<td><a href="https://www.bountysource.com/teams/newpipe/issues"><img src="https://img.shields.io/bountysource/team/newpipe/activity.svg?colorB=cd201f" height="30px" alt="Check out how many bounties you can earn."></a></td>
</tr>
</table>
## Privacy Policy
The NewPipe project aims to provide a private, anonymous experience for using media web services.
Therefore, the app does not collect any data without your consent. NewPipe's privacy policy explains in detail what data is sent and stored when you send a crash report, or comment in our blog. You can find the document [here](https://newpipe.schabi.org/legal/privacy/).
## License
[![GNU GPLv3 Image](https://www.gnu.org/graphics/gplv3-127x51.png)](http://www.gnu.org/licenses/gpl-3.0.en.html)

View File

@@ -1,15 +1,15 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "org.schabi.newpipe"
minSdkVersion 15
targetSdkVersion 27
versionCode 67
versionName "0.14.0"
targetSdkVersion 28
versionCode 69
versionName "0.14.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
@@ -22,7 +22,6 @@ android {
}
debug {
multiDexEnabled true
debuggable true
applicationIdSuffix ".debug"
}
@@ -41,62 +40,61 @@ android {
}
ext {
supportLibVersion = '27.1.1'
exoPlayerLibVersion = '2.8.2'
supportLibVersion = '28.0.0'
exoPlayerLibVersion = '2.8.4' //2.9.0
roomDbLibVersion = '1.1.1'
leakCanaryLibVersion = '1.5.4'
okHttpLibVersion = '3.10.0'
leakCanaryLibVersion = '1.5.4' //1.6.1
okHttpLibVersion = '3.11.0'
icepickLibVersion = '3.2.0'
stethoLibVersion = '1.5.0'
}
dependencies {
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2') {
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2', {
exclude module: 'support-annotations'
}
})
implementation 'com.github.TeamNewPipe:NewPipeExtractor:850670917fce'
implementation 'com.github.TeamNewPipe:NewPipeExtractor:32d316330c26'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.8.9'
testImplementation 'org.mockito:mockito-core:2.23.0'
implementation "com.android.support:appcompat-v7:$supportLibVersion"
implementation "com.android.support:support-v4:$supportLibVersion"
implementation "com.android.support:design:$supportLibVersion"
implementation "com.android.support:recyclerview-v7:$supportLibVersion"
implementation "com.android.support:preference-v14:$supportLibVersion"
implementation "com.android.support:appcompat-v7:${supportLibVersion}"
implementation "com.android.support:support-v4:${supportLibVersion}"
implementation "com.android.support:design:${supportLibVersion}"
implementation "com.android.support:recyclerview-v7:${supportLibVersion}"
implementation "com.android.support:preference-v14:${supportLibVersion}"
implementation "com.android.support:cardview-v7:${supportLibVersion}"
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'ch.acra:acra:4.9.2'
implementation 'ch.acra:acra:4.9.2' //4.11
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.github.nirhart:ParallaxScroll:dd53d1f9d1'
implementation 'com.nononsenseapps:filepicker:4.2.1'
implementation "com.google.android.exoplayer:exoplayer:$exoPlayerLibVersion"
implementation "com.google.android.exoplayer:extension-mediasession:$exoPlayerLibVersion"
implementation "com.google.android.exoplayer:exoplayer:${exoPlayerLibVersion}"
implementation "com.google.android.exoplayer:extension-mediasession:${exoPlayerLibVersion}"
debugImplementation "com.facebook.stetho:stetho:$stethoLibVersion"
debugImplementation "com.facebook.stetho:stetho-urlconnection:$stethoLibVersion"
debugImplementation "com.facebook.stetho:stetho:${stethoLibVersion}"
debugImplementation "com.facebook.stetho:stetho-urlconnection:${stethoLibVersion}"
debugImplementation 'com.android.support:multidex:1.0.3'
implementation 'io.reactivex.rxjava2:rxjava:2.1.14'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
implementation 'io.reactivex.rxjava2:rxjava:2.2.2'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
implementation 'com.jakewharton.rxbinding2:rxbinding:2.1.1'
implementation "android.arch.persistence.room:runtime:$roomDbLibVersion"
implementation "android.arch.persistence.room:rxjava2:$roomDbLibVersion"
annotationProcessor "android.arch.persistence.room:compiler:$roomDbLibVersion"
implementation "android.arch.persistence.room:runtime:${roomDbLibVersion}"
implementation "android.arch.persistence.room:rxjava2:${roomDbLibVersion}"
annotationProcessor "android.arch.persistence.room:compiler:${roomDbLibVersion}"
implementation "frankiesardo:icepick:$icepickLibVersion"
annotationProcessor "frankiesardo:icepick-processor:$icepickLibVersion"
implementation "frankiesardo:icepick:${icepickLibVersion}"
annotationProcessor "frankiesardo:icepick-processor:${icepickLibVersion}"
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryLibVersion"
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryLibVersion"
debugImplementation "com.squareup.leakcanary:leakcanary-android:${leakCanaryLibVersion}"
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:${leakCanaryLibVersion}"
implementation "com.squareup.okhttp3:okhttp:$okHttpLibVersion"
debugImplementation "com.facebook.stetho:stetho-okhttp3:$stethoLibVersion"
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation "com.squareup.okhttp3:okhttp:${okHttpLibVersion}"
debugImplementation "com.facebook.stetho:stetho-okhttp3:${stethoLibVersion}"
}

View File

@@ -9,6 +9,7 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<application
android:name=".App"
@@ -238,4 +239,4 @@
android:name=".RouterActivity$FetcherService"
android:exported="false"/>
</application>
</manifest>
</manifest>

View File

@@ -5,6 +5,7 @@ import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.Context;
import android.os.Build;
import android.preference.PreferenceManager;
import android.support.annotation.Nullable;
import android.util.Log;
@@ -21,6 +22,7 @@ import org.acra.config.ConfigurationBuilder;
import org.acra.sender.ReportSenderFactory;
import org.schabi.newpipe.extractor.Downloader;
import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.utils.Localization;
import org.schabi.newpipe.report.AcraReportSenderFactory;
import org.schabi.newpipe.report.ErrorActivity;
import org.schabi.newpipe.report.UserAction;
@@ -65,7 +67,8 @@ public class App extends Application {
private RefWatcher refWatcher;
@SuppressWarnings("unchecked")
private static final Class<? extends ReportSenderFactory>[] reportSenderFactoryClasses = new Class[]{AcraReportSenderFactory.class};
private static final Class<? extends ReportSenderFactory>[]
reportSenderFactoryClasses = new Class[]{AcraReportSenderFactory.class};
@Override
protected void attachBaseContext(Context base) {
@@ -88,7 +91,8 @@ public class App extends Application {
// Initialize settings first because others inits can use its values
SettingsActivity.initSettings(this);
NewPipe.init(getDownloader());
NewPipe.init(getDownloader(),
org.schabi.newpipe.util.Localization.getPreferredExtractorLocal(this));
StateSaver.init(this);
initNotificationChannel();
@@ -106,7 +110,7 @@ public class App extends Application {
// https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#error-handling
RxJavaPlugins.setErrorHandler(new Consumer<Throwable>() {
@Override
public void accept(@NonNull Throwable throwable) throws Exception {
public void accept(@NonNull Throwable throwable) {
Log.e(TAG, "RxJavaPlugins.ErrorHandler called with -> : " +
"throwable = [" + throwable.getClass().getName() + "]");
@@ -180,7 +184,11 @@ public class App extends Application {
ACRA.init(this, acraConfig);
} catch (ACRAConfigurationException ace) {
ace.printStackTrace();
ErrorActivity.reportError(this, ace, null, null, ErrorActivity.ErrorInfo.make(UserAction.SOMETHING_ELSE, "none",
ErrorActivity.reportError(this,
ace,
null,
null,
ErrorActivity.ErrorInfo.make(UserAction.SOMETHING_ELSE, "none",
"Could not initialize ACRA crash report", R.string.app_ui_crash));
}
}
@@ -200,7 +208,8 @@ public class App extends Application {
NotificationChannel mChannel = new NotificationChannel(id, name, importance);
mChannel.setDescription(description);
NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
NotificationManager mNotificationManager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.createNotificationChannel(mChannel);
}

View File

@@ -12,14 +12,12 @@ import android.view.View;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.squareup.leakcanary.RefWatcher;
import org.schabi.newpipe.report.UserAction;
import icepick.Icepick;
import icepick.State;
public abstract class BaseFragment extends Fragment {
protected final String TAG = getClass().getSimpleName() + "@" + Integer.toHexString(hashCode());
protected boolean DEBUG = MainActivity.DEBUG;
protected final boolean DEBUG = MainActivity.DEBUG;
protected AppCompatActivity activity;
public static final ImageLoader imageLoader = ImageLoader.getInstance();

View File

@@ -4,6 +4,7 @@ import android.support.annotation.Nullable;
import android.text.TextUtils;
import org.schabi.newpipe.extractor.exceptions.ReCaptchaException;
import org.schabi.newpipe.extractor.utils.Localization;
import java.io.IOException;
import java.io.InputStream;
@@ -43,7 +44,7 @@ public class Downloader implements org.schabi.newpipe.extractor.Downloader {
private static Downloader instance;
private String mCookies;
private OkHttpClient client;
private final OkHttpClient client;
private Downloader(OkHttpClient.Builder builder) {
this.client = builder
@@ -103,13 +104,13 @@ public class Downloader implements org.schabi.newpipe.extractor.Downloader {
* but set the HTTP header field "Accept-Language" to the supplied string.
*
* @param siteUrl the URL of the text file to return the contents of
* @param language the language (usually a 2-character code) to set as the preferred language
* @param localization the language and country (usually a 2-character code) to set
* @return the contents of the specified text file
*/
@Override
public String download(String siteUrl, String language) throws IOException, ReCaptchaException {
public String download(String siteUrl, Localization localization) throws IOException, ReCaptchaException {
Map<String, String> requestProperties = new HashMap<>();
requestProperties.put("Accept-Language", language);
requestProperties.put("Accept-Language", localization.getLanguage());
return download(siteUrl, requestProperties);
}

View File

@@ -23,7 +23,6 @@ package org.schabi.newpipe;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
@@ -66,8 +65,6 @@ import org.schabi.newpipe.util.ServiceHelper;
import org.schabi.newpipe.util.StateSaver;
import org.schabi.newpipe.util.ThemeHelper;
import static org.schabi.newpipe.extractor.InfoItem.InfoType.PLAYLIST;
public class MainActivity extends AppCompatActivity {
private static final String TAG = "MainActivity";
public static final boolean DEBUG = !BuildConfig.BUILD_TYPE.equals("release");

View File

@@ -85,7 +85,7 @@ public class ReCaptchaActivity extends AppCompatActivity {
}
private class ReCaptchaWebViewClient extends WebViewClient {
private Activity context;
private final Activity context;
private String mCookies;
ReCaptchaWebViewClient(Activity ctx) {

View File

@@ -1,7 +1,6 @@
package org.schabi.newpipe;
import android.annotation.SuppressLint;
import android.app.FragmentManager;
import android.app.IntentService;
import android.content.Context;
import android.content.DialogInterface;
@@ -13,7 +12,6 @@ import android.preference.PreferenceManager;
import android.support.annotation.DrawableRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.NotificationCompat;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
@@ -38,7 +36,6 @@ import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.extractor.playlist.PlaylistInfo;
import org.schabi.newpipe.extractor.stream.StreamInfo;
import org.schabi.newpipe.extractor.stream.VideoStream;
import org.schabi.newpipe.fragments.detail.VideoDetailFragment;
import org.schabi.newpipe.player.helper.PlayerHelper;
import org.schabi.newpipe.player.playqueue.ChannelPlayQueue;
import org.schabi.newpipe.player.playqueue.PlayQueue;
@@ -51,14 +48,12 @@ import org.schabi.newpipe.util.NavigationHelper;
import org.schabi.newpipe.util.PermissionHelper;
import org.schabi.newpipe.util.ThemeHelper;
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Observer;
import icepick.Icepick;
import icepick.State;
@@ -86,7 +81,7 @@ public class RouterActivity extends AppCompatActivity {
protected int selectedPreviously = -1;
protected String currentUrl;
protected CompositeDisposable disposables = new CompositeDisposable();
protected final CompositeDisposable disposables = new CompositeDisposable();
private boolean selectionIsDownload = false;
@@ -184,12 +179,16 @@ public class RouterActivity extends AppCompatActivity {
if (selectedChoiceKey.equals(alwaysAskKey)) {
final List<AdapterChoiceItem> choices = getChoicesForService(currentService, currentLinkType);
if (choices.size() == 1) {
handleChoice(choices.get(0).key);
} else if (choices.size() == 0) {
handleChoice(showInfoKey);
} else {
showDialog(choices);
switch (choices.size()) {
case 1:
handleChoice(choices.get(0).key);
break;
case 0:
handleChoice(showInfoKey);
break;
default:
showDialog(choices);
break;
}
} else if (selectedChoiceKey.equals(showInfoKey)) {
handleChoice(showInfoKey);

View File

@@ -4,7 +4,6 @@ import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.os.AsyncTask;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.app.AlertDialog;
import android.webkit.WebView;
@@ -17,7 +16,7 @@ import java.lang.ref.WeakReference;
public class LicenseFragmentHelper extends AsyncTask<Object, Void, Integer> {
WeakReference<Activity> weakReference;
final WeakReference<Activity> weakReference;
private License license;
public LicenseFragmentHelper(@Nullable Activity activity) {
@@ -78,18 +77,18 @@ public class LicenseFragmentHelper extends AsyncTask<Object, Void, Integer> {
throw new NullPointerException("license is null");
}
String licenseContent = "";
StringBuilder licenseContent = new StringBuilder();
String webViewData;
try {
BufferedReader in = new BufferedReader(new InputStreamReader(context.getAssets().open(license.getFilename()), "UTF-8"));
String str;
while ((str = in.readLine()) != null) {
licenseContent += str;
licenseContent.append(str);
}
in.close();
// split the HTML file and insert the stylesheet into the HEAD of the file
String[] insert = licenseContent.split("</head>");
String[] insert = licenseContent.toString().split("</head>");
webViewData = insert[0] + "<style type=\"text/css\">"
+ getLicenseStylesheet(context) + "</style></head>"
+ insert[1];

View File

@@ -30,7 +30,7 @@ public interface BasicDAO<Entity> {
/* Deletes */
@Delete
int delete(final Entity entity);
void delete(final Entity entity);
@Delete
int delete(final Collection<Entity> entities);
@@ -42,5 +42,5 @@ public interface BasicDAO<Entity> {
int update(final Entity entity);
@Update
int update(final Collection<Entity> entities);
void update(final Collection<Entity> entities);
}

View File

@@ -4,7 +4,6 @@ import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Query;
import android.support.annotation.Nullable;
import org.schabi.newpipe.database.BasicDAO;
import org.schabi.newpipe.database.history.model.SearchHistoryEntry;
import java.util.List;

View File

@@ -5,7 +5,6 @@ import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Query;
import android.support.annotation.Nullable;
import org.schabi.newpipe.database.BasicDAO;
import org.schabi.newpipe.database.history.model.StreamHistoryEntry;
import org.schabi.newpipe.database.stream.StreamStatisticsEntry;
import org.schabi.newpipe.database.history.model.StreamHistoryEntity;

View File

@@ -2,7 +2,6 @@ package org.schabi.newpipe.database.playlist.dao;
import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Query;
import android.arch.persistence.room.Transaction;
import org.schabi.newpipe.database.BasicDAO;
import org.schabi.newpipe.database.playlist.model.PlaylistEntity;
@@ -12,7 +11,6 @@ import java.util.List;
import io.reactivex.Flowable;
import static org.schabi.newpipe.database.playlist.model.PlaylistEntity.PLAYLIST_ID;
import static org.schabi.newpipe.database.playlist.model.PlaylistEntity.PLAYLIST_NAME;
import static org.schabi.newpipe.database.playlist.model.PlaylistEntity.PLAYLIST_TABLE;
@Dao

View File

@@ -8,7 +8,6 @@ import org.schabi.newpipe.database.BasicDAO;
import org.schabi.newpipe.database.playlist.PlaylistMetadataEntry;
import org.schabi.newpipe.database.playlist.PlaylistStreamEntry;
import org.schabi.newpipe.database.playlist.model.PlaylistStreamEntity;
import org.schabi.newpipe.database.stream.model.StreamEntity;
import java.util.List;

View File

@@ -5,8 +5,6 @@ import android.arch.persistence.room.Entity;
import android.arch.persistence.room.Index;
import android.arch.persistence.room.PrimaryKey;
import java.util.Date;
import static org.schabi.newpipe.database.playlist.model.PlaylistEntity.PLAYLIST_NAME;
import static org.schabi.newpipe.database.playlist.model.PlaylistEntity.PLAYLIST_TABLE;

View File

@@ -6,7 +6,6 @@ import android.arch.persistence.room.Ignore;
import android.arch.persistence.room.Index;
import android.arch.persistence.room.PrimaryKey;
import org.schabi.newpipe.database.LocalItem;
import org.schabi.newpipe.database.playlist.PlaylistLocalItem;
import org.schabi.newpipe.extractor.playlist.PlaylistInfo;
import org.schabi.newpipe.util.Constants;

View File

@@ -10,7 +10,6 @@ import org.schabi.newpipe.database.BasicDAO;
import org.schabi.newpipe.database.playlist.model.PlaylistStreamEntity;
import org.schabi.newpipe.database.stream.model.StreamEntity;
import org.schabi.newpipe.database.history.model.StreamHistoryEntity;
import org.schabi.newpipe.database.stream.model.StreamStateEntity;
import java.util.ArrayList;
import java.util.List;
@@ -23,7 +22,6 @@ import static org.schabi.newpipe.database.stream.model.StreamEntity.STREAM_SERVI
import static org.schabi.newpipe.database.stream.model.StreamEntity.STREAM_TABLE;
import static org.schabi.newpipe.database.stream.model.StreamEntity.STREAM_URL;
import static org.schabi.newpipe.database.history.model.StreamHistoryEntity.STREAM_HISTORY_TABLE;
import static org.schabi.newpipe.database.stream.model.StreamStateEntity.STREAM_STATE_TABLE;
@Dao
public abstract class StreamDAO implements BasicDAO<StreamEntity> {

View File

@@ -28,11 +28,11 @@ public class DeleteDownloadManager {
private static final String KEY_STATE = "delete_manager_state";
private View mView;
private HashSet<String> mPendingMap;
private List<Disposable> mDisposableList;
private final View mView;
private final HashSet<String> mPendingMap;
private final List<Disposable> mDisposableList;
private DownloadManager mDownloadManager;
private PublishSubject<DownloadMission> publishSubject = PublishSubject.create();
private final PublishSubject<DownloadMission> publishSubject = PublishSubject.create();
DeleteDownloadManager(Activity activity) {
mPendingMap = new HashSet<>();

View File

@@ -55,7 +55,7 @@ public class DownloadDialog extends DialogFragment implements RadioGroup.OnCheck
private StreamItemAdapter<AudioStream> audioStreamsAdapter;
private StreamItemAdapter<VideoStream> videoStreamsAdapter;
private CompositeDisposable disposables = new CompositeDisposable();
private final CompositeDisposable disposables = new CompositeDisposable();
private EditText nameEditText;
private Spinner streamsSpinner;

View File

@@ -32,7 +32,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
import icepick.State;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Consumer;
import static org.schabi.newpipe.util.AnimationUtils.animateView;

View File

@@ -2,7 +2,6 @@ package org.schabi.newpipe.fragments;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

View File

@@ -3,9 +3,9 @@ package org.schabi.newpipe.fragments.detail;
import java.io.Serializable;
class StackItem implements Serializable {
private int serviceId;
private final int serviceId;
private String title;
private String url;
private final String url;
StackItem(int serviceId, String url, String title) {
this.serviceId = serviceId;

View File

@@ -33,12 +33,14 @@ import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.AdapterView;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
@@ -64,19 +66,17 @@ import org.schabi.newpipe.extractor.stream.StreamType;
import org.schabi.newpipe.extractor.stream.VideoStream;
import org.schabi.newpipe.fragments.BackPressable;
import org.schabi.newpipe.fragments.BaseStateFragment;
import org.schabi.newpipe.local.history.HistoryRecordManager;
import org.schabi.newpipe.report.ErrorActivity;
import org.schabi.newpipe.util.StreamItemAdapter;
import org.schabi.newpipe.util.StreamItemAdapter.StreamSizeWrapper;
import org.schabi.newpipe.local.dialog.PlaylistAppendDialog;
import org.schabi.newpipe.info_list.InfoItemBuilder;
import org.schabi.newpipe.info_list.InfoItemDialog;
import org.schabi.newpipe.local.dialog.PlaylistAppendDialog;
import org.schabi.newpipe.local.history.HistoryRecordManager;
import org.schabi.newpipe.player.MainVideoPlayer;
import org.schabi.newpipe.player.PopupVideoPlayer;
import org.schabi.newpipe.player.helper.PlayerHelper;
import org.schabi.newpipe.player.old.PlayVideoActivity;
import org.schabi.newpipe.player.playqueue.PlayQueue;
import org.schabi.newpipe.player.playqueue.SinglePlayQueue;
import org.schabi.newpipe.report.ErrorActivity;
import org.schabi.newpipe.report.UserAction;
import org.schabi.newpipe.util.Constants;
import org.schabi.newpipe.util.ExtractorHelper;
@@ -87,6 +87,8 @@ import org.schabi.newpipe.util.Localization;
import org.schabi.newpipe.util.NavigationHelper;
import org.schabi.newpipe.util.OnClickGesture;
import org.schabi.newpipe.util.PermissionHelper;
import org.schabi.newpipe.util.StreamItemAdapter;
import org.schabi.newpipe.util.StreamItemAdapter.StreamSizeWrapper;
import org.schabi.newpipe.util.ThemeHelper;
import java.io.Serializable;
@@ -154,6 +156,7 @@ public class VideoDetailFragment
private View videoTitleRoot;
private TextView videoTitleTextView;
@Nullable
private ImageView videoTitleToggleArrow;
private TextView videoCountView;
@@ -415,14 +418,16 @@ public class VideoDetailFragment
}
private void toggleTitleAndDescription() {
if (videoDescriptionRootLayout.getVisibility() == View.VISIBLE) {
videoTitleTextView.setMaxLines(1);
videoDescriptionRootLayout.setVisibility(View.GONE);
videoTitleToggleArrow.setImageResource(R.drawable.arrow_down);
} else {
videoTitleTextView.setMaxLines(10);
videoDescriptionRootLayout.setVisibility(View.VISIBLE);
videoTitleToggleArrow.setImageResource(R.drawable.arrow_up);
if (videoTitleToggleArrow != null) { //it is null for tablets
if (videoDescriptionRootLayout.getVisibility() == View.VISIBLE) {
videoTitleTextView.setMaxLines(1);
videoDescriptionRootLayout.setVisibility(View.GONE);
videoTitleToggleArrow.setImageResource(R.drawable.arrow_down);
} else {
videoTitleTextView.setMaxLines(10);
videoDescriptionRootLayout.setVisibility(View.VISIBLE);
videoTitleToggleArrow.setImageResource(R.drawable.arrow_up);
}
}
}
@@ -622,8 +627,11 @@ public class VideoDetailFragment
relatedStreamsView.addView(
infoItemBuilder.buildView(relatedStreamsView, info.getNextVideo()));
relatedStreamsView.addView(getSeparatorView());
relatedStreamRootLayout.setVisibility(View.VISIBLE);
} else nextStreamTitle.setVisibility(View.GONE);
setRelatedStreamsVisibility(View.VISIBLE);
} else {
nextStreamTitle.setVisibility(View.GONE);
setRelatedStreamsVisibility(View.GONE);
}
if (info.getRelatedStreams() != null
&& !info.getRelatedStreams().isEmpty() && showRelatedStreams) {
@@ -639,13 +647,13 @@ public class VideoDetailFragment
}
//if (DEBUG) Log.d(TAG, "Total time " + ((System.nanoTime() - first) / 1000000L) + "ms");
relatedStreamRootLayout.setVisibility(View.VISIBLE);
setRelatedStreamsVisibility(View.VISIBLE);
relatedStreamExpandButton.setVisibility(View.VISIBLE);
relatedStreamExpandButton.setImageDrawable(ContextCompat.getDrawable(
activity, ThemeHelper.resolveResourceIdFromAttr(activity, R.attr.expand)));
} else {
if (info.getNextVideo() == null) relatedStreamRootLayout.setVisibility(View.GONE);
if (info.getNextVideo() == null) setRelatedStreamsVisibility(View.GONE);
relatedStreamExpandButton.setVisibility(View.GONE);
}
}
@@ -760,7 +768,7 @@ public class VideoDetailFragment
* Stack that contains the "navigation history".<br>
* The peek is the current video.
*/
protected LinkedList<StackItem> stack = new LinkedList<>();
protected final LinkedList<StackItem> stack = new LinkedList<>();
public void clearHistory() {
stack.clear();
@@ -1114,8 +1122,16 @@ public class VideoDetailFragment
animateView(videoTitleTextView, true, 0);
videoDescriptionRootLayout.setVisibility(View.GONE);
videoTitleToggleArrow.setImageResource(R.drawable.arrow_down);
videoTitleToggleArrow.setVisibility(View.GONE);
if (videoTitleToggleArrow != null) { //phone
videoTitleToggleArrow.setImageResource(R.drawable.arrow_down);
videoTitleToggleArrow.setVisibility(View.GONE);
} else { //tablet
final View related = (View) relatedStreamRootLayout.getParent();
//don`t need to hide it if related streams are disabled
if (related.getVisibility() == View.VISIBLE) {
related.setVisibility(View.INVISIBLE);
}
}
videoTitleRoot.setClickable(false);
imageLoader.cancelDisplayTask(thumbnailImageView);
@@ -1190,11 +1206,15 @@ public class VideoDetailFragment
detailDurationView.setVisibility(View.GONE);
}
videoTitleRoot.setClickable(true);
videoTitleToggleArrow.setVisibility(View.VISIBLE);
videoTitleToggleArrow.setImageResource(R.drawable.arrow_down);
videoDescriptionView.setVisibility(View.GONE);
videoDescriptionRootLayout.setVisibility(View.GONE);
if (videoTitleToggleArrow != null) {
videoTitleRoot.setClickable(true);
videoTitleToggleArrow.setVisibility(View.VISIBLE);
videoTitleToggleArrow.setImageResource(R.drawable.arrow_down);
videoDescriptionRootLayout.setVisibility(View.GONE);
} else {
videoDescriptionRootLayout.setVisibility(View.VISIBLE);
}
if (!TextUtils.isEmpty(info.getUploadDate())) {
videoUploadDateView.setText(Localization.localizeDate(activity, info.getUploadDate()));
}
@@ -1242,6 +1262,11 @@ public class VideoDetailFragment
// Only auto play in the first open
autoPlayEnabled = false;
}
final ViewParent related = relatedStreamRootLayout.getParent();
if (related instanceof ScrollView) {
((ScrollView) related).scrollTo(0, 0);
}
}
@@ -1299,4 +1324,13 @@ public class VideoDetailFragment
showError(getString(R.string.blocked_by_gema), false, R.drawable.gruese_die_gema);
}
private void setRelatedStreamsVisibility(int visibility) {
final ViewParent parent = relatedStreamRootLayout.getParent();
if (parent instanceof ScrollView) {
((ScrollView) parent).setVisibility(visibility);
} else {
relatedStreamRootLayout.setVisibility(visibility);
}
}
}

View File

@@ -3,10 +3,15 @@ package org.schabi.newpipe.fragments.list;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
@@ -21,9 +26,9 @@ import org.schabi.newpipe.extractor.playlist.PlaylistInfoItem;
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import org.schabi.newpipe.fragments.BaseStateFragment;
import org.schabi.newpipe.fragments.OnScrollBelowItemsListener;
import org.schabi.newpipe.local.dialog.PlaylistAppendDialog;
import org.schabi.newpipe.info_list.InfoItemDialog;
import org.schabi.newpipe.info_list.InfoListAdapter;
import org.schabi.newpipe.local.dialog.PlaylistAppendDialog;
import org.schabi.newpipe.player.playqueue.SinglePlayQueue;
import org.schabi.newpipe.report.ErrorActivity;
import org.schabi.newpipe.util.NavigationHelper;
@@ -36,7 +41,7 @@ import java.util.Queue;
import static org.schabi.newpipe.util.AnimationUtils.animateView;
public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implements ListViewContract<I, N>, StateSaver.WriteRead {
public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implements ListViewContract<I, N>, StateSaver.WriteRead, SharedPreferences.OnSharedPreferenceChangeListener {
/*//////////////////////////////////////////////////////////////////////////
// Views
@@ -44,6 +49,9 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implem
protected InfoListAdapter infoListAdapter;
protected RecyclerView itemsList;
private int updateFlags = 0;
private static final int LIST_MODE_UPDATE_FLAG = 0x32;
/*//////////////////////////////////////////////////////////////////////////
// LifeCycle
@@ -59,12 +67,31 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implem
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setHasOptionsMenu(true);
PreferenceManager.getDefaultSharedPreferences(activity)
.registerOnSharedPreferenceChangeListener(this);
}
@Override
public void onDestroy() {
super.onDestroy();
StateSaver.onDestroy(savedState);
PreferenceManager.getDefaultSharedPreferences(activity)
.unregisterOnSharedPreferenceChangeListener(this);
}
@Override
public void onResume() {
super.onResume();
if (updateFlags != 0) {
if ((updateFlags & LIST_MODE_UPDATE_FLAG) != 0) {
final boolean useGrid = isGridLayout();
itemsList.setLayoutManager(useGrid ? getGridLayoutManager() : getListLayoutManager());
infoListAdapter.setGridItemVariants(useGrid);
infoListAdapter.notifyDataSetChanged();
}
updateFlags = 0;
}
}
/*//////////////////////////////////////////////////////////////////////////
@@ -119,13 +146,25 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implem
return new LinearLayoutManager(activity);
}
protected RecyclerView.LayoutManager getGridLayoutManager() {
final Resources resources = activity.getResources();
int width = resources.getDimensionPixelSize(R.dimen.video_item_grid_thumbnail_image_width);
width += (24 * resources.getDisplayMetrics().density);
final int spanCount = (int) Math.floor(resources.getDisplayMetrics().widthPixels / (double)width);
final GridLayoutManager lm = new GridLayoutManager(activity, spanCount);
lm.setSpanSizeLookup(infoListAdapter.getSpanSizeLookup(spanCount));
return lm;
}
@Override
protected void initViews(View rootView, Bundle savedInstanceState) {
super.initViews(rootView, savedInstanceState);
final boolean useGrid = isGridLayout();
itemsList = rootView.findViewById(R.id.items_list);
itemsList.setLayoutManager(getListLayoutManager());
itemsList.setLayoutManager(useGrid ? getGridLayoutManager() : getListLayoutManager());
infoListAdapter.setGridItemVariants(useGrid);
infoListAdapter.setFooter(getListFooter());
infoListAdapter.setHeader(getListHeader());
@@ -308,4 +347,22 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implem
public void handleNextItems(N result) {
isLoading.set(false);
}
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
if (key.equals(getString(R.string.list_view_mode_key))) {
updateFlags |= LIST_MODE_UPDATE_FLAG;
}
}
protected boolean isGridLayout() {
final String list_mode = PreferenceManager.getDefaultSharedPreferences(activity).getString(getString(R.string.list_view_mode_key), getString(R.string.list_view_mode_value));
if ("auto".equals(list_mode)) {
final Configuration configuration = getResources().getConfiguration();
return configuration.orientation == Configuration.ORIENTATION_LANDSCAPE
&& configuration.isLayoutSizeAtLeast(Configuration.SCREENLAYOUT_SIZE_LARGE);
} else {
return "grid".equals(list_mode);
}
}
}

View File

@@ -8,9 +8,6 @@ import android.view.View;
import org.schabi.newpipe.extractor.ListExtractor;
import org.schabi.newpipe.extractor.ListInfo;
import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler;
import org.schabi.newpipe.extractor.linkhandler.LinkHandler;
import org.schabi.newpipe.util.Constants;
import java.util.Queue;
@@ -19,7 +16,6 @@ import icepick.State;
import io.reactivex.Single;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
public abstract class BaseListInfoFragment<I extends ListInfo>

View File

@@ -68,7 +68,7 @@ import static org.schabi.newpipe.util.AnimationUtils.animateView;
public class ChannelFragment extends BaseListInfoFragment<ChannelInfo> {
private CompositeDisposable disposables = new CompositeDisposable();
private final CompositeDisposable disposables = new CompositeDisposable();
private Disposable subscribeButtonMonitor;
private SubscriptionService subscriptionService;
@@ -90,8 +90,6 @@ public class ChannelFragment extends BaseListInfoFragment<ChannelInfo> {
private MenuItem menuRssButton;
private boolean mIsVisibleToUser = false;
public static ChannelFragment getInstance(int serviceId, String url, String name) {
ChannelFragment instance = new ChannelFragment();
instance.setInitialData(serviceId, url, name);
@@ -105,7 +103,6 @@ public class ChannelFragment extends BaseListInfoFragment<ChannelInfo> {
@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
mIsVisibleToUser = isVisibleToUser;
if(activity != null
&& useAsFrontPage
&& isVisibleToUser) {

View File

@@ -5,7 +5,6 @@ import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
@@ -19,8 +18,6 @@ import org.schabi.newpipe.extractor.StreamingService;
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.extractor.kiosk.KioskInfo;
import org.schabi.newpipe.extractor.linkhandler.ListLinkHandlerFactory;
import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler;
import org.schabi.newpipe.extractor.linkhandler.LinkHandlerFactory;
import org.schabi.newpipe.fragments.list.BaseListInfoFragment;
import org.schabi.newpipe.report.UserAction;
import org.schabi.newpipe.util.ExtractorHelper;
@@ -131,26 +128,16 @@ public class KioskFragment extends BaseListInfoFragment<KioskInfo> {
@Override
public Single<KioskInfo> loadResult(boolean forceReload) {
String contentCountry = PreferenceManager
.getDefaultSharedPreferences(activity)
.getString(getString(R.string.content_country_key),
getString(R.string.default_country_value));
return ExtractorHelper.getKioskInfo(serviceId,
url,
contentCountry,
forceReload);
}
@Override
public Single<ListExtractor.InfoItemsPage> loadMoreItemsLogic() {
String contentCountry = PreferenceManager
.getDefaultSharedPreferences(activity)
.getString(getString(R.string.content_country_key),
getString(R.string.default_country_value));
return ExtractorHelper.getMoreKioskItems(serviceId,
url,
currentNextPageUrl,
contentCountry);
currentNextPageUrl);
}
/*//////////////////////////////////////////////////////////////////////////

View File

@@ -20,7 +20,6 @@ import android.widget.TextView;
import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;
import org.schabi.newpipe.App;
import org.schabi.newpipe.NewPipeDatabase;
import org.schabi.newpipe.R;
import org.schabi.newpipe.database.playlist.model.PlaylistRemoteEntity;
@@ -30,7 +29,6 @@ import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.extractor.playlist.PlaylistInfo;
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler;
import org.schabi.newpipe.fragments.list.BaseListInfoFragment;
import org.schabi.newpipe.info_list.InfoItemDialog;
import org.schabi.newpipe.local.playlist.RemotePlaylistManager;

View File

@@ -122,12 +122,11 @@ public class SearchFragment
private String nextPageUrl;
private String contentCountry;
private boolean isSuggestionsEnabled = true;
private boolean isSearchHistoryEnabled = true;
private PublishSubject<String> suggestionPublisher = PublishSubject.create();
private final PublishSubject<String> suggestionPublisher = PublishSubject.create();
private Disposable searchDisposable;
private Disposable suggestionDisposable;
private CompositeDisposable disposables = new CompositeDisposable();
private final CompositeDisposable disposables = new CompositeDisposable();
private SuggestionListAdapter suggestionListAdapter;
private HistoryRecordManager historyRecordManager;
@@ -173,7 +172,7 @@ public class SearchFragment
suggestionListAdapter = new SuggestionListAdapter(activity);
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(activity);
isSearchHistoryEnabled = preferences.getBoolean(getString(R.string.enable_search_history_key), true);
boolean isSearchHistoryEnabled = preferences.getBoolean(getString(R.string.enable_search_history_key), true);
suggestionListAdapter.setShowSuggestionHistory(isSearchHistoryEnabled);
historyRecordManager = new HistoryRecordManager(context);
@@ -627,7 +626,7 @@ public class SearchFragment
}
final Observable<List<SuggestionItem>> network = ExtractorHelper
.suggestionsFor(serviceId, query, contentCountry)
.suggestionsFor(serviceId, query)
.toObservable()
.map(strings -> {
List<SuggestionItem> result = new ArrayList<>();
@@ -727,8 +726,7 @@ public class SearchFragment
searchDisposable = ExtractorHelper.searchFor(serviceId,
searchString,
Arrays.asList(contentFilter),
sortFilter,
contentCountry)
sortFilter)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.doOnEvent((searchResult, throwable) -> isLoading.set(false))
@@ -746,8 +744,7 @@ public class SearchFragment
searchString,
asList(contentFilter),
sortFilter,
nextPageUrl,
contentCountry)
nextPageUrl)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.doOnEvent((nextItemsResult, throwable) -> isLoading.set(false))

View File

@@ -45,7 +45,7 @@ public class InfoItemBuilder {
private static final String TAG = InfoItemBuilder.class.toString();
private final Context context;
private ImageLoader imageLoader = ImageLoader.getInstance();
private final ImageLoader imageLoader = ImageLoader.getInstance();
private OnClickGesture<StreamInfoItem> onStreamSelectedListener;
private OnClickGesture<ChannelInfoItem> onChannelSelectedListener;

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