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

Compare commits

..

230 Commits

Author SHA1 Message Date
Christian Schabesberger
a0f74e715a fix bugreport for kiosk 2018-04-01 21:54:00 +02:00
Christian Schabesberger
c13e761c3f remove global ip range label 2018-04-01 19:58:07 +02:00
Heimen Stoffels
d41e3bb41e Translated using Weblate (Dutch)
Currently translated at 100.0% (354 of 354 strings)
2018-04-01 16:43:09 +02:00
Weblate
4160bbb8c4 Merge remote-tracking branch 'origin/dev' into dev 2018-04-01 15:38:23 +02:00
Veli Tasalı
404a20f280 Translated using Weblate (Turkish)
Currently translated at 99.4% (352 of 354 strings)
2018-04-01 15:38:23 +02:00
se7entime
2241146b9f Translated using Weblate (Indonesian)
Currently translated at 89.2% (316 of 354 strings)
2018-04-01 15:38:20 +02:00
Christian Schabesberger
bcb26c5721 move on to version 0.13.1 2018-04-01 15:29:57 +02:00
Christian Schabesberger
a681d8c1ba Merge pull request #1227 from TeamNewPipe/removebeta
remove beta
2018-04-01 15:28:49 +02:00
cozyplanes
0515b74f75 Translated using Weblate (Korean)
Currently translated at 100.0% (354 of 354 strings)
2018-04-01 13:40:13 +02:00
Veli Tasalı
7eeb96d88e Translated using Weblate (Turkish)
Currently translated at 99.1% (351 of 354 strings)
2018-03-31 18:01:21 +02:00
se7entime
5b6c73ef06 Translated using Weblate (Indonesian)
Currently translated at 89.5% (317 of 354 strings)
2018-03-31 15:30:26 +02:00
se7entime
c70b866d16 Translated using Weblate (Indonesian)
Currently translated at 87.2% (309 of 354 strings)
2018-03-31 15:28:10 +02:00
se7entime
b84f2874dc Translated using Weblate (Indonesian)
Currently translated at 87.2% (309 of 354 strings)
2018-03-31 15:28:03 +02:00
se7entime
c372b5529b Translated using Weblate (Indonesian)
Currently translated at 80.5% (285 of 354 strings)
2018-03-31 15:25:16 +02:00
se7entime
a43156c38d Translated using Weblate (Indonesian)
Currently translated at 74.5% (264 of 354 strings)
2018-03-31 15:22:37 +02:00
se7entime
a15112febc Translated using Weblate (Indonesian)
Currently translated at 68.9% (244 of 354 strings)
2018-03-31 15:19:45 +02:00
se7entime
1c6a677a39 Translated using Weblate (Indonesian)
Currently translated at 67.7% (240 of 354 strings)
2018-03-31 15:18:34 +02:00
se7entime
9bf749a2c8 Translated using Weblate (Indonesian)
Currently translated at 65.5% (232 of 354 strings)
2018-03-31 15:15:16 +02:00
se7entime
f6c9d9df20 Translated using Weblate (Indonesian)
Currently translated at 57.3% (203 of 354 strings)
2018-03-31 15:04:54 +02:00
se7entime
5386e0ded9 Translated using Weblate (Indonesian)
Currently translated at 56.7% (201 of 354 strings)
2018-03-31 15:04:27 +02:00
se7entime
8fab405a3a Translated using Weblate (Indonesian)
Currently translated at 55.0% (195 of 354 strings)
2018-03-31 15:03:32 +02:00
se7entime
ee409f3ca9 Translated using Weblate (Indonesian)
Currently translated at 49.7% (176 of 354 strings)
2018-03-31 15:00:23 +02:00
Weblate
bda9beacaa Merge remote-tracking branch 'origin/dev' into dev 2018-03-31 14:59:25 +02:00
Veli Tasalı
5d8c7e5733 Translated using Weblate (Turkish)
Currently translated at 96.8% (343 of 354 strings)
2018-03-31 14:59:24 +02:00
Stnby
a68c763125 Translated using Weblate (Lithuanian)
Currently translated at 87.8% (311 of 354 strings)
2018-03-31 14:59:23 +02:00
se7entime
31ac89d9d6 Translated using Weblate (Indonesian)
Currently translated at 49.4% (175 of 354 strings)
2018-03-31 14:59:22 +02:00
se7entime
8b258cbbe4 Translated using Weblate (Indonesian)
Currently translated at 47.7% (169 of 354 strings)
2018-03-31 14:55:56 +02:00
se7entime
53676fc0fd Translated using Weblate (Indonesian)
Currently translated at 47.1% (167 of 354 strings)
2018-03-31 14:53:54 +02:00
Christian Schabesberger
42c561af9e update build tools to 27.0.3 2018-03-30 18:45:27 +02:00
Christian Schabesberger
fae777c14c make service items in drawer be dynamicly generated 2018-03-30 18:41:11 +02:00
Christian Schabesberger
1af6dc614a remove global ip range label 2018-03-30 14:46:26 +02:00
Christian Schabesberger
2986004638 remove entry points in three dot menu in main screen 2018-03-30 11:52:05 +02:00
Christian Schabesberger
d6f7b4706b remove beta build 2018-03-30 11:09:07 +02:00
Christian Schabesberger
b40dd3e5c0 update gradle 2018-03-30 10:58:32 +02:00
Schabi
2f4097ca9d Merge branch 'dev' of github.com:teamnewpipe/NewPipe into dev 2018-03-28 09:58:18 +02:00
Schabi
c8a91fbb25 add note to check if bugs exist in latest version 2018-03-28 09:58:09 +02:00
Víctor Manuel Tapia Ramírez
0ec259a5fc Translated using Weblate (Spanish)
Currently translated at 100.0% (354 of 354 strings)
2018-03-28 09:50:20 +02:00
Weblate
2fda99bdb7 Merge remote-tracking branch 'origin/dev' into dev 2018-03-28 05:36:47 +02:00
nautilusx
1bb4ac4e9c Translated using Weblate (German)
Currently translated at 95.7% (339 of 354 strings)
2018-03-28 05:36:45 +02:00
MORTI
f376b98c09 Translated using Weblate (French)
Currently translated at 96.3% (341 of 354 strings)
2018-03-28 05:36:41 +02:00
Christian Schabesberger
7382fdb2d2 Merge pull request #1217 from Grammost/patch-1
Fix broken Librepay link in README.md
2018-03-27 11:53:08 +02:00
Edwar Tikhonov
aead9592cf Translated using Weblate (Russian)
Currently translated at 94.9% (336 of 354 strings)
2018-03-27 11:39:53 +02:00
MORTI
bedacf29d9 Translated using Weblate (French)
Currently translated at 96.0% (340 of 354 strings)
2018-03-27 04:49:28 +02:00
anonymous
570e9a8307 Translated using Weblate (French)
Currently translated at 89.2% (316 of 354 strings)
2018-03-27 01:15:17 +02:00
justanidea
fcb94ec603 Translated using Weblate (French)
Currently translated at 88.9% (315 of 354 strings)
2018-03-27 01:13:44 +02:00
anonymous
69886ed58b Translated using Weblate (French)
Currently translated at 88.7% (314 of 354 strings)
2018-03-27 01:13:05 +02:00
MORTI
798235cd21 Translated using Weblate (French)
Currently translated at 88.4% (313 of 354 strings)
2018-03-27 01:12:25 +02:00
Grammost
b38b6b6f35 Update README.md 2018-03-26 15:10:03 +00:00
Grammost
2dba13c52e Fix broken Librepay link in README.md 2018-03-26 14:49:59 +00:00
ezjerry liao
ff366cb2c5 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (354 of 354 strings)
2018-03-26 11:33:45 +02:00
Weblate
a87861a993 Merge remote-tracking branch 'origin/dev' into dev 2018-03-25 23:34:16 +02:00
AB
65476356c9 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (354 of 354 strings)
2018-03-25 23:34:12 +02:00
Christian Schabesberger
8af6667f3e Merge pull request #1212 from karyogamy/sub-quick-fix
Subscription Front Page Crash Fix
2018-03-25 20:31:36 +02:00
John Zhen Mo
b546df7b95 -Fixed activity not available exception when setting title on subscription fragments when used as front pager. 2018-03-25 10:29:37 -07:00
Emanuele Petriglia
20c1f12da8 Translated using Weblate (Italian)
Currently translated at 100.0% (354 of 354 strings)
2018-03-25 13:21:40 +02:00
Weblate
e65ff201af Merge remote-tracking branch 'origin/dev' into dev 2018-03-25 11:36:18 +02:00
Tobias Groza
4f367a3dcd Translated using Weblate (German)
Currently translated at 89.8% (318 of 354 strings)
2018-03-25 11:36:16 +02:00
Heimen Stoffels
d7093bce4d Translated using Weblate (Dutch)
Currently translated at 100.0% (354 of 354 strings)
2018-03-25 11:36:13 +02:00
Christian Schabesberger
79e3e59cae move on to version 0.13.0 2018-03-25 11:18:51 +02:00
anonymous
f1b292df93 Translated using Weblate (German)
Currently translated at 89.8% (318 of 354 strings)
2018-03-25 00:41:30 +01:00
Tobias Groza
0cd383b8dd Translated using Weblate (German)
Currently translated at 88.9% (315 of 354 strings)
2018-03-25 00:40:01 +01:00
Weblate
22c404a667 Merge remote-tracking branch 'origin/dev' into dev 2018-03-24 18:40:13 +01:00
Oleh Ilnytskyi
ba11a59d89 Translated using Weblate (Polish)
Currently translated at 93.0% (319 of 343 strings)
2018-03-24 18:40:13 +01:00
Freddy Morán Jr
06020851a9 Translated using Weblate (Spanish)
Currently translated at 100.0% (343 of 343 strings)
2018-03-24 18:40:07 +01:00
Christian Schabesberger
fd5cbde18c fix readme conflict 2018-03-24 10:56:31 +01:00
Christian Schabesberger
384398a1e2 Merge branch 'qol-updates' of https://github.com/karyogamy/NewPipe into ui 2018-03-24 10:50:17 +01:00
Christian Schabesberger
2bdba4ba8b fix somehow broken librepay donate link 2018-03-24 10:35:43 +01:00
Christian Schabesberger
db4179a530 fix weird librepay link broken 2018-03-24 10:25:42 +01:00
Christian Schabesberger
b905b74dc2 Merge pull request #1201 from TobiGr/readme
Update README.md
2018-03-24 10:21:58 +01:00
Mohammad Hassan
ff05c36856 Translated using Weblate (Arabic)
Currently translated at 87.4% (300 of 343 strings)
2018-03-24 02:34:15 +01:00
TobiGr
40ea5eb53d Update README.md
Add compressed screenshots
Add liberapay to donation section
2018-03-23 16:15:50 +01:00
John Zhen Mo
02f48ccc7f -Removed duplicate dialog open instances in service player activity. 2018-03-22 18:44:03 -07:00
John Zhen Mo
72eaff148c -Fixed main player paused video not abandoning audio focus after navigating away from activity during interruption, when resume on focus regain is enabled.
-Separated onPause and onPlay functions from onPlayPause.
-Renamed onVideoPlayPause to onPlayPause.
2018-03-22 18:12:11 -07:00
John Zhen Mo
8b60397f06 -Changed detail fragment thumbnail failure to produce a snackbar error rather than a full error activity. 2018-03-22 18:11:59 -07:00
John Zhen Mo
18d019c62a -Added quadratic slider strategy implementation and tests.
-Modified playback speed control to use quadratic sliders instead of linear.
-Modified number formatters in player helper to use double instead of float.
-Simplified slider behavior in playback parameter dialog.
-Fixed potential NPE in base local fragment.
2018-03-21 20:08:33 -07:00
Weblate
27527b18e1 Merge remote-tracking branch 'origin/dev' into dev 2018-03-21 23:37:21 +01:00
Tobias Groza
ae9aa2662a Translated using Weblate (German)
Currently translated at 93.2% (320 of 343 strings)
2018-03-21 23:37:17 +01:00
Christian Schabesberger
3bfb593b21 Merge pull request #1197 from TeamNewPipe/remove-ip-range
Remove IP range
2018-03-21 20:59:41 +01:00
wb9688
8556e99241 Remove IP range
This would close #1148. I haven't tested it myself yet. @TheAssassin: Could you update the Sentry part?
2018-03-21 10:55:22 +01:00
John Zhen Mo
e885822a34 -Added playback speed control dialog to allow full user control over player tempo and pitch parameters.
-Changed tempo and pitch button in service player activity and tempo button in main video player to open speed control dialog.
-Changed LIVE button to be no longer clickable when player position is at or beyond default position.
-Changed main video player to use AppCompatActivity rather than Activity.
-Fixed video player tempo button not updating when player speed parameters change.
-Fixed player crashing on lower sdk versions due to no MediaButtonReceiver, added intent back to manifest.
-Fixed inconsistent gradle library naming.
-Fixed stetho dependencies incorrect version.
2018-03-21 00:11:54 -07:00
Weblate
8ebb564a79 Merge remote-tracking branch 'origin/dev' into dev 2018-03-20 16:36:52 +01:00
Tobias Groza
7dc176edcb Translated using Weblate (German)
Currently translated at 93.2% (320 of 343 strings)
2018-03-20 16:36:47 +01:00
John Zhen Mo
5167fe078b -Refactored synchronization checks out from MediaSourceManager to ManagedMediaSource.
-Fixed null input causing potential NPE on PlayQueueItem.
2018-03-19 16:44:18 -07:00
John Zhen Mo
bc7188c8a8 -Added media session implementation for all players.
-Extracted version numbers in gradle dependencies.
-Updated ExoPlayer to 2.7.1.
-Updated RxJava to 2.1.10, RxAndroid to 2.0.2 and RxBinding to 2.1.1.
-Removed deprecated implementation of media buttons.
2018-03-19 16:44:18 -07:00
John Zhen Mo
5a05cb96be -Changed start position seek to occur after media source window has been prepared.
-Fixed livestream not seeking to live when started from play queue.
-Fixed media source manager synchronization to only occur after timeline change has completed.
-Fixed auto queue not working when last item is replayed after the auto-queued item is removed.
-Updated ExoPlayer to 2.7.1.
2018-03-19 16:44:17 -07:00
John Zhen Mo
0258726f0a -Changed thumbnail toggle in disabled mode to load dark dummy image.
-Changed play queue items to display service names.
-Fixed Soundcloud playlist not fitting thumbnail.
-Refactored image display options to follow uniform behavior.
-Refactoring and style changes on audio reactor and media button receiver.
2018-03-19 16:44:17 -07:00
John Zhen Mo
2fa9aa04f4 -Bump support library and multidex version. 2018-03-19 16:40:40 -07:00
John Zhen Mo
a5f9927459 -Fixed main player animations not working on first call. 2018-03-19 16:40:40 -07:00
John Zhen Mo
61b422502b -[#1060] Added toggle to disable thumbnail loading.
-Added button to wipe metadata cache.
-Added more paddings on player buttons.
-Added new animations to main player secondary controls and play queue expand/collapse.
-Refactored play queue item touch callback for use in all players.
-Improved MediaSourceManager to better handle expired stream reloading.
-[#1186] Changed live sync button text to "LIVE".
-Removed MediaSourceManager loader coupling on main players.
-Moved service dependent expiry resolution to ServiceHelper.
-[#1186] Fixed livestream timeline updates causing negative time position.
-[#1186] Fixed livestream not starting from live-edge.
-Fixed main player system UI not retracting on playback start.
2018-03-19 16:40:40 -07:00
Christian Schabesberger
1e57b5ea49 Merge pull request #1193 from TeamNewPipe/fix_page
made frontend combatible to latest extractor refactorings
2018-03-19 23:22:28 +01:00
Allan Nordhøy
12ce915e8e Translated using Weblate (Norwegian Bokmål)
Currently translated at 93.2% (320 of 343 strings)
2018-03-19 22:44:34 +01:00
ezjerry liao
a32273af91 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (343 of 343 strings)
2018-03-19 12:40:50 +01:00
Christian Schabesberger
96a327af17 made frontend combatible to latest extractor refactorings 2018-03-18 16:37:49 +01:00
AB
1910e81ad9 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (343 of 343 strings)
2018-03-18 14:40:32 +01:00
ezjerry liao
80593e774c Translated using Weblate (Chinese (Traditional))
Currently translated at 99.7% (342 of 343 strings)
2018-03-18 13:35:17 +01:00
AB
c092fc8e18 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (343 of 343 strings)
2018-03-17 13:40:27 +01:00
E T
579efa15c7 Translated using Weblate (Turkish)
Currently translated at 100.0% (343 of 343 strings)
2018-03-17 12:40:00 +01:00
E T
37ff4e9aeb Translated using Weblate (Turkish)
Currently translated at 100.0% (343 of 343 strings)
2018-03-16 12:21:00 +01:00
Weblate
4e4a7de5d4 Merge remote-tracking branch 'origin/dev' into dev 2018-03-15 15:35:15 +01:00
Olexandr Nesterenko
2d1bc6436a Translated using Weblate (Ukrainian)
Currently translated at 98.8% (339 of 343 strings)
2018-03-15 15:35:15 +01:00
Edwar Tikhonov
65726d75cc Translated using Weblate (Russian)
Currently translated at 100.0% (343 of 343 strings)
2018-03-15 15:35:13 +01:00
Yaron Shahrabani
d63c0a32eb Translated using Weblate (Hebrew)
Currently translated at 75.8% (260 of 343 strings)
2018-03-15 15:35:12 +01:00
ezjerry liao
e49c4162e5 Translated using Weblate (Chinese (Traditional))
Currently translated at 98.5% (338 of 343 strings)
2018-03-15 15:35:07 +01:00
Christian Schabesberger
ffc5ad5ce7 Merge branch 'media_buttons' of https://github.com/alexandrepa/NewPipe into media 2018-03-14 18:27:17 +01:00
Edwar Tikhonov
2dbfc28d69 Translated using Weblate (Russian)
Currently translated at 100.0% (343 of 343 strings)
2018-03-14 16:34:36 +01:00
ezjerry liao
1ac7b2b8cb Translated using Weblate (Chinese (Traditional))
Currently translated at 98.2% (337 of 343 strings)
2018-03-14 13:35:30 +01:00
cozyplanes
7d047e612e Translated using Weblate (Korean)
Currently translated at 100.0% (343 of 343 strings)
2018-03-14 12:38:22 +01:00
alexandre patelli
24f2999669 Handling play/pause button from different headsets 2018-03-13 22:57:59 +01:00
Eduardo Caron
b08728b645 Translated using Weblate (Portuguese (Brazil))
Currently translated at 98.8% (339 of 343 strings)
2018-03-13 18:38:49 +01:00
cozyplanes
00dee43a1e Translated using Weblate (Korean)
Currently translated at 100.0% (343 of 343 strings)
2018-03-13 12:23:55 +01:00
Freddy Morán Jr
21e300b9f3 Translated using Weblate (Spanish)
Currently translated at 100.0% (343 of 343 strings)
2018-03-12 21:18:01 +01:00
Emanuele Petriglia
158f0aa2d9 Translated using Weblate (Italian)
Currently translated at 100.0% (343 of 343 strings)
2018-03-12 17:53:29 +01:00
Weblate
10fb763d66 Merge remote-tracking branch 'origin/dev' into dev 2018-03-12 17:00:19 +01:00
cozyplanes
4aa2c1c2c2 Translated using Weblate (Korean)
Currently translated at 95.0% (326 of 343 strings)
2018-03-12 17:00:18 +01:00
Heimen Stoffels
bdf044d264 Translated using Weblate (Dutch)
Currently translated at 100.0% (343 of 343 strings)
2018-03-12 17:00:08 +01:00
Christian Schabesberger
6049a1f2f5 fix playlist banner foo 2018-03-12 16:18:03 +01:00
Christian Schabesberger
a9fea9f606 fix release crash because of setting sidebar header 2018-03-12 16:00:38 +01:00
Weblate
11002e9d45 Merge remote-tracking branch 'origin/dev' into dev 2018-03-12 15:50:38 +01:00
cozyplanes
e7a0b850df Translated using Weblate (Korean)
Currently translated at 100.0% (324 of 324 strings)
2018-03-12 15:50:33 +01:00
Christian Schabesberger
736c902f3c fix weblate conflict 2018-03-11 21:38:19 +01:00
ButterflyOfFire
a67ff564d0 Translated using Weblate (Arabic)
Currently translated at 91.6% (297 of 324 strings)
2018-03-11 20:36:51 +01:00
Andreas Kleinert
2a778383b1 Translated using Weblate (German)
Currently translated at 93.2% (302 of 324 strings)
2018-03-11 20:36:47 +01:00
alexandre patelli
36457400e7 Review Fixes 2018-03-11 19:23:00 +01:00
alexandre patelli
1d629e7b2e Direct use of AudioManager from AudioReactor 2018-03-11 15:09:11 +01:00
alexandre patelli
5f764ab8f5 Media Button Play/Pause, Previous and Next in Background Player 2018-03-10 18:25:20 +01:00
Pablo Hinojosa
a8c9edbc3f Translated using Weblate (Spanish)
Currently translated at 100.0% (324 of 324 strings)
2018-03-10 17:38:49 +01:00
Emanuele Petriglia
0a5bffe826 Translated using Weblate (Italian)
Currently translated at 100.0% (324 of 324 strings)
2018-03-10 17:38:39 +01:00
Mauricio Colli
9c9b6bc0d6 Change thumbnail's scale strategy
- Closes #1054
2018-03-10 13:36:50 -03:00
Mauricio Colli
562f7e7e41 Add duration view to video detail fragment
- Add "textAllCaps" to the mini stream layout
- Closes #609
2018-03-10 13:20:10 -03:00
Mauricio Colli
594c55afa6 Merge pull request #1145 from mauriciocolli/dev
Implement subscriptions import/export
2018-03-10 12:11:13 -03:00
Pablo Hinojosa
0abf97e999 Translated using Weblate (Spanish)
Currently translated at 100.0% (324 of 324 strings)
2018-03-10 16:07:50 +01:00
Freddy Morán Jr
b811aec773 Translated using Weblate (Spanish)
Currently translated at 98.7% (320 of 324 strings)
2018-03-10 15:47:34 +01:00
AB
ca47f566dc Translated using Weblate (Ukrainian)
Currently translated at 100.0% (324 of 324 strings)
2018-03-10 14:41:06 +01:00
Yaron Shahrabani
65674f7fd4 Translated using Weblate (Hebrew)
Currently translated at 79.6% (258 of 324 strings)
2018-03-10 09:36:40 +01:00
Eduardo Caron
dcc510ff6c Translated using Weblate (Portuguese (Brazil))
Currently translated at 98.7% (320 of 324 strings)
2018-03-10 00:39:26 +01:00
Emanuele Petriglia
a4fe43a964 Translated using Weblate (Italian)
Currently translated at 100.0% (324 of 324 strings)
2018-03-09 16:44:18 +01:00
Kotoba Murasaki
3dab4c07cf Translated using Weblate (Ukrainian)
Currently translated at 100.0% (324 of 324 strings)
2018-03-09 13:52:18 +01:00
E T
ee3248ea5d Translated using Weblate (Turkish)
Currently translated at 100.0% (324 of 324 strings)
2018-03-09 12:28:47 +01:00
anonymous
7be5ec0521 Translated using Weblate (Hebrew)
Currently translated at 79.3% (257 of 324 strings)
2018-03-09 09:25:05 +01:00
Yaron Shahrabani
04e90cc279 Translated using Weblate (Hebrew)
Currently translated at 78.7% (255 of 324 strings)
2018-03-09 09:24:48 +01:00
anonymous
ec8d488249 Translated using Weblate (Hebrew)
Currently translated at 78.0% (253 of 324 strings)
2018-03-09 09:24:03 +01:00
Yaron Shahrabani
41fdafac45 Translated using Weblate (Hebrew)
Currently translated at 76.8% (249 of 324 strings)
2018-03-09 09:23:19 +01:00
anonymous
d2e2622279 Translated using Weblate (Hebrew)
Currently translated at 75.9% (246 of 324 strings)
2018-03-09 09:22:41 +01:00
Yaron Shahrabani
9476bd6527 Translated using Weblate (Hebrew)
Currently translated at 75.6% (245 of 324 strings)
2018-03-09 09:22:32 +01:00
anonymous
24a06ea6f6 Translated using Weblate (Hebrew)
Currently translated at 75.6% (245 of 324 strings)
2018-03-09 09:22:09 +01:00
Yaron Shahrabani
2567f8eefb Translated using Weblate (Hebrew)
Currently translated at 75.3% (244 of 324 strings)
2018-03-09 09:21:54 +01:00
ezjerry liao
fa5f5ce251 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (324 of 324 strings)
2018-03-09 02:58:02 +01:00
Heimen Stoffels
728a61756a Translated using Weblate (Dutch)
Currently translated at 100.0% (324 of 324 strings)
2018-03-08 21:25:11 +01:00
Kotoba Murasaki
736ccbe376 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (324 of 324 strings)
2018-03-08 20:38:45 +01:00
Weblate
fa2b226b9e Merge remote-tracking branch 'origin/dev' into dev 2018-03-08 20:24:24 +01:00
Kotoba Murasaki
e8c5ae194d Translated using Weblate (Ukrainian)
Currently translated at 100.0% (318 of 318 strings)
2018-03-08 20:24:19 +01:00
Mauricio Colli
cc2feab37e Implement UI for subscriptions import/export
- Nice and easy to use import/export options in the subscriptions fragment
- Includes instructions for each service (in the import fragment/screen)
2018-03-08 11:50:46 -03:00
Mauricio Colli
83b084a90b Implement subscriptions import/export
- Import subscriptions from YouTube and SoundCloud (all services that the extractor support)
- Import/export a JSON representation of the subscriptions
- [Minor] Remove some javax annotations in favor of the one provided by the android support library
2018-03-08 10:39:24 -03:00
Christian Schabesberger
e2ac0722c8 Merge pull request #1155 from TeamNewPipe/update-readme
Update README.md
2018-03-06 19:46:55 +01:00
Schabi
c3efb40b8e move to latest version of extractor 2018-03-06 19:44:17 +01:00
Schabi
03d7a416f3 add live lable to toolbar 2018-03-06 19:24:58 +01:00
Schabi
e6e812fdb0 Merge branch 'exoplayer-update' of https://github.com/karyogamy/NewPipe into live 2018-03-06 17:23:37 +01:00
John Zhen Mo
b34160eeec -Fixed main video player losing state when killed in background.
-Disabled auto queuing when repeating is enabled.
-Added method to use startForegroundService instead of startService in sdk 26 and up.
2018-03-05 19:03:49 -08:00
John Zhen Mo
d01aeab242 -Added auto-queuing to allow next or related streams to queue up when the last item on play queue is playing.
-Added toggle to enable auto-queuing.
-Modified main video player to only pause the video onPause.
-Fixed main video player not saving play queue state onStop.
2018-03-04 20:16:38 -08:00
anonymous
9904e01252 Translated using Weblate (Serbian)
Currently translated at 78.6% (250 of 318 strings)
2018-03-04 14:41:36 +01:00
John Zhen Mo
7f068b691b -Removed system ui on main player for Kitkat or above.
-[#1151] Hide video player UI on playing to avoid unnecessary interruptions after pause, seek and resize.
2018-03-03 20:58:53 -08:00
John Zhen Mo
59558efed1 -Added seamless shuffling.
-Reenabled full window loading in MediaSourceManager.
2018-03-03 20:58:06 -08:00
John Zhen Mo
a88e19a8ed -Added toggle to enable fast inexact seek in players.
-Improved player sync calls to recognize different metadata updates.
-Changed MediaSourceManager to synchronize only after timeline changes and reenabled multiple sync calls to player.
-Renamed listener and synchronization methods related to MediaSourceManager.
2018-03-03 14:24:21 -08:00
John Zhen Mo
0c17f0825b -Added loader eviction to avoid spawning too many threads in MediaSourceManager.
-Added nonnull and final constraints to variables in MediaSourceManager.
-Added nonnull and final constraints on context related objects in BasePlayer.
-Fixed Hls livestreams crashing player when behind live window for too long.
-Fixed cache miss when InfoCache key mismatch between StreamInfo and StreamInfoItem.
2018-03-03 11:42:23 -08:00
Mladen Pejaković
9384d2523a Translated using Weblate (Serbian)
Currently translated at 78.3% (249 of 318 strings)
2018-03-03 14:03:02 +01:00
anonymous
0e13172a89 Translated using Weblate (Serbian)
Currently translated at 78.3% (249 of 318 strings)
2018-03-03 14:02:34 +01:00
Mladen Pejaković
92f34452b5 Translated using Weblate (Serbian)
Currently translated at 77.9% (248 of 318 strings)
2018-03-03 14:02:17 +01:00
anonymous
db54929584 Translated using Weblate (Serbian)
Currently translated at 77.9% (248 of 318 strings)
2018-03-03 14:01:59 +01:00
Mladen Pejaković
ba23cafb18 Translated using Weblate (Serbian)
Currently translated at 77.6% (247 of 318 strings)
2018-03-03 14:01:43 +01:00
anonymous
a2e189767b Translated using Weblate (Serbian)
Currently translated at 77.3% (246 of 318 strings)
2018-03-03 14:01:30 +01:00
anonymous
0d236fd678 Translated using Weblate (Serbian)
Currently translated at 76.4% (243 of 318 strings)
2018-03-03 14:00:48 +01:00
Mladen Pejaković
9979b160c7 Translated using Weblate (Serbian)
Currently translated at 76.1% (242 of 318 strings)
2018-03-03 14:00:39 +01:00
anonymous
65b332c395 Translated using Weblate (Serbian)
Currently translated at 76.1% (242 of 318 strings)
2018-03-03 13:59:43 +01:00
Mladen Pejaković
b867ac8cc7 Translated using Weblate (Serbian)
Currently translated at 75.7% (241 of 318 strings)
2018-03-03 13:59:38 +01:00
Enol P
9a0ff24ffe Translated using Weblate (Asturian)
Currently translated at 97.4% (310 of 318 strings)
2018-03-03 03:34:28 +01:00
Eduardo Caron
9540a12b6f Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.0% (315 of 318 strings)
2018-03-03 01:41:17 +01:00
wb9688
fdfb53c05c Update README.md 2018-03-02 10:10:15 +01:00
HardLight
3ec979cc40 Translated using Weblate (Lithuanian)
Currently translated at 100.0% (318 of 318 strings)
2018-03-01 22:38:41 +01:00
John Zhen Mo
9ea08c8a4b -Re-added loading for items prior to current index in MediaSourceManager to allow faster access time.
-Added some null checks annotation.
2018-02-28 23:25:45 -08:00
Digiwizkid
629eada5c3 Translated using Weblate (Bengali (Bangladesh))
Currently translated at 40.5% (129 of 318 strings)
2018-03-01 04:34:43 +01:00
John Zhen Mo
a1220c77da -Added serialized cache for transferring serializable objects too large for intent transactions.
-Fixed potential transaction too large exceptions for player intents.
2018-02-28 17:47:12 -08:00
John Zhen Mo
b4668367c6 -Added better assertions and documentations to new mechanism in MediaSourceManager.
-Modified LoadController to allow fast playback start and increased buffer zigzag window.
-Removed unnecessary loading on timeline changes.
-Changed select message in MediaSourceManager to cause immediate load.
-Reduced default expiration time in MediaSourceManager.
-Fixed main video player not showing end time on audio-only streams.
-Fixed live stream has player view disabled after transitioning from audio stream.
-Fixed inconsistent progress bar height between live and non-live video on main player.
2018-02-28 17:45:05 -08:00
John Zhen Mo
77da40e507 -Added perpetual extractor source loading on network failures.
-Fixed play queue playlist desynchronization caused by media source manager window loading expansion on sublist prior to current item.
-Fixed failed media source not treated as ready for playback.
2018-02-26 22:37:19 -08:00
John Zhen Mo
b3b2748bb7 -Improved player queue stability by using more aggressive synchronization policy.
-Added sync buttons on live streams to allow seeking to live edge.
-Added custom cache key for extractor sources to allow more persistent reuse.
-Refactored player data source factories into own class and separating live and non-live data sources.
2018-02-26 19:57:59 -08:00
ezjerry liao
26e8143616 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (318 of 318 strings)
2018-02-26 14:30:19 +01:00
John Zhen Mo
1444fe5468 -Fixed potential NPE when obtaining broadcast receiver.
-Extracted expiration time in media source manager.
-Re-enabled long click on live stream info items.
-Fixed dash source building to use mpd instead of extractor.
2018-02-25 20:12:30 -08:00
John Zhen Mo
ac431e3ece -Fixed failed media source not treated as ready. 2018-02-25 15:32:25 -08:00
John Zhen Mo
563a4137bd -Fixed inconsistent audio focus state when audio becomes noisy (e.g. headset unplugged).
-Fixed live media sources failing when using cached data source by introducing
cacheless data sources.
-Added custom track selector to circumvent ExoPlayer's language normalization NPE.
-Updated Extractor to correctly load live streams.
-Removed deprecated deferred media source and media source manager.
-Removed Livestream exceptions.
2018-02-25 15:10:11 -08:00
John Zhen Mo
19cbcd0c1d -Fixed media source update index check.
-Fixed media source manager excessive loading.
-Remove unneeded fields in loaded media source.
2018-02-24 21:54:47 -08:00
John Zhen Mo
8803b60b28 -Updated Exoplayer to 2.7.0.
-PoC for new seamless stream loading mechanism.
2018-02-24 21:54:47 -08:00
Weblate
e9f59ae769 Merge remote-tracking branch 'origin/dev' into dev 2018-02-24 23:37:04 +01:00
Matej U
5cf3bee336 Translated using Weblate (Slovenian)
Currently translated at 77.3% (246 of 318 strings)
2018-02-24 23:37:04 +01:00
Maciej Gamrat
060fe835c7 Translated using Weblate (Polish)
Currently translated at 100.0% (318 of 318 strings)
2018-02-24 23:37:02 +01:00
Toldi Balázs
2688ea8f59 Translated using Weblate (Hungarian)
Currently translated at 44.6% (142 of 318 strings)
2018-02-24 23:37:01 +01:00
Arun Negi
8eb61cf752 Translated using Weblate (Hindi)
Currently translated at 99.6% (317 of 318 strings)
2018-02-24 23:36:56 +01:00
Tobias Groza
6628901d46 Translated using Weblate (German)
Currently translated at 94.6% (301 of 318 strings)
2018-02-24 23:36:52 +01:00
Christian Schabesberger
5a31882be3 Merge branch 'dev' of github.com:teamnewpipe/NewPipe into dev 2018-02-24 22:57:34 +01:00
Christian Schabesberger
a42da09d6c make NewPipe compatible with latest Extractor refactorings 2018-02-24 22:57:25 +01:00
nieko-nera
658cf5c873 Translated using Weblate (Lithuanian)
Currently translated at 100.0% (318 of 318 strings)
2018-02-24 19:38:45 +01:00
Coffeemaker
b8c752b740 Translated using Weblate (Polish)
Currently translated at 100.0% (318 of 318 strings)
2018-02-24 18:51:39 +01:00
Maciej Gamrat
9151ae7081 Translated using Weblate (Polish)
Currently translated at 100.0% (318 of 318 strings)
2018-02-24 18:51:28 +01:00
anonymous
a1a894f722 Translated using Weblate (Polish)
Currently translated at 100.0% (318 of 318 strings)
2018-02-24 18:50:22 +01:00
Maciej Gamrat
3352ee3151 Translated using Weblate (Polish)
Currently translated at 100.0% (318 of 318 strings)
2018-02-24 18:49:38 +01:00
Maciej Gamrat
da3533a430 Translated using Weblate (Polish)
Currently translated at 100.0% (318 of 318 strings)
2018-02-24 18:48:41 +01:00
anonymous
0bb7f9becf Translated using Weblate (Polish)
Currently translated at 83.0% (264 of 318 strings)
2018-02-24 18:02:21 +01:00
Maciej Gamrat
40c64ee2d8 Translated using Weblate (Polish)
Currently translated at 83.0% (264 of 318 strings)
2018-02-24 18:01:21 +01:00
r2308145
66651f7111 Translated using Weblate (Czech)
Currently translated at 100.0% (318 of 318 strings)
2018-02-24 13:43:02 +01:00
Freddy Morán Jr
c7d0bd5dec Translated using Weblate (Spanish)
Currently translated at 100.0% (318 of 318 strings)
2018-02-24 03:40:58 +01:00
anonymous
9ce0a9d49d Translated using Weblate (Hungarian)
Currently translated at 30.5% (97 of 318 strings)
2018-02-23 22:54:03 +01:00
Toldi Balázs
2070b353c2 Translated using Weblate (Hungarian)
Currently translated at 30.1% (96 of 318 strings)
2018-02-23 22:52:47 +01:00
anonymous
1d91f3b91b Translated using Weblate (Hungarian)
Currently translated at 29.5% (94 of 318 strings)
2018-02-23 22:52:04 +01:00
Toldi Balázs
8b0aebfddb Translated using Weblate (Hungarian)
Currently translated at 29.2% (93 of 318 strings)
2018-02-23 22:51:13 +01:00
anonymous
467905d7b0 Translated using Weblate (Hungarian)
Currently translated at 29.2% (93 of 318 strings)
2018-02-23 22:50:48 +01:00
Toldi Balázs
cc81921bcb Translated using Weblate (Hungarian)
Currently translated at 28.9% (92 of 318 strings)
2018-02-23 22:50:36 +01:00
anonymous
8600c04ff3 Translated using Weblate (Hungarian)
Currently translated at 28.6% (91 of 318 strings)
2018-02-23 22:50:00 +01:00
Toldi Balázs
3f31445f12 Translated using Weblate (Hungarian)
Currently translated at 27.3% (87 of 318 strings)
2018-02-23 22:49:15 +01:00
anonymous
8a33371f37 Translated using Weblate (Hungarian)
Currently translated at 26.7% (85 of 318 strings)
2018-02-23 22:48:01 +01:00
Toldi Balázs
1164bd7183 Translated using Weblate (Hungarian)
Currently translated at 25.7% (82 of 318 strings)
2018-02-23 22:40:53 +01:00
anonymous
589fcd09c0 Translated using Weblate (Hungarian)
Currently translated at 25.4% (81 of 318 strings)
2018-02-23 22:40:37 +01:00
Weblate
c5d49016d4 Merge remote-tracking branch 'origin/dev' into dev 2018-02-23 18:48:55 +01:00
Freddy Morán Jr
8886b12151 Translated using Weblate (Spanish)
Currently translated at 99.0% (315 of 318 strings)
2018-02-23 18:48:54 +01:00
nieko-nera
336ffd7cf0 Translated using Weblate (Lithuanian)
Currently translated at 100.0% (318 of 318 strings)
2018-02-23 18:48:50 +01:00
Christian Schabesberger
3088778a9f Merge pull request #1136 from wb9688/okhttp-uil
Use OkHttp with UIL
2018-02-23 18:06:13 +01:00
E T
4c1de83b24 Translated using Weblate (Turkish)
Currently translated at 100.0% (318 of 318 strings)
2018-02-23 11:43:24 +01:00
Emanuele Petriglia
ee2fbfc2d1 Translated using Weblate (Italian)
Currently translated at 100.0% (318 of 318 strings)
2018-02-23 09:46:40 +01:00
Heimen Stoffels
dff7fe722b Translated using Weblate (Dutch)
Currently translated at 100.0% (318 of 318 strings)
2018-02-22 22:48:45 +01:00
Weblate
eb6dac2e9f Merge remote-tracking branch 'origin/dev' into dev 2018-02-22 22:41:15 +01:00
Oleh Ilnytskyi
255760de16 Translated using Weblate (Ukrainian)
Currently translated at 69.8% (220 of 315 strings)
2018-02-22 22:41:09 +01:00
wb9688
a2373b817a Use OkHttp with UIL 2018-02-22 13:25:56 +01:00
Christian Schabesberger
7d4c45c4c0 Merge tag 'v0.11.6-beta'
v0.11.6-beta
2018-02-21 11:38:48 +01:00
217 changed files with 8421 additions and 2274 deletions

View File

@@ -11,6 +11,7 @@ Do not report crashes in the GitHub issue tracker. NewPipe has an automated cras
* 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.

View File

@@ -5,7 +5,7 @@ android:
components:
# The BuildTools version used by NewPipe
- tools
- build-tools-27.0.1
- build-tools-27.0.3
# The SDK version used to compile NewPipe
- android-27

View File

@@ -59,18 +59,17 @@ NewPipe does not use any Google framework libraries, or the YouTube API. It only
* Search/Watch Playlists
* Watch as queues Playlists
* Queuing videos
* Local playlists
* Subtitles
* Multi-service support (eg. SoundCloud in NewPipe Beta)
### Coming Features
* Multiservice support (eg. SoundCloud)
* Bookmarks
* Subtitles support
* livestream support
* Livestream support
* Cast to UPnP and Cast
* Show comments
* ... and many more
### Multiservice support
Although NewPipe only supports YouTube at the moment, it's designed to support many more streaming services. The plan is, that NewPipe will get such support by the version 2.0.
## Contribution
Whether you have ideas, translations, design changes, code cleaning, or real heavy code changes, help is always welcome.
The more is done the better it gets!
@@ -78,19 +77,24 @@ 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 or BountySource. 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 donate via Bitcoin, Bountysource or Liberapay. For further information about 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><samp>16A9J59ahMRqkLSZjhYj33n9j3fMztFxnh</samp></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" alz="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>
<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><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>
</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>
</tr>
</table>
## License

View File

@@ -2,14 +2,14 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion '27.0.1'
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "org.schabi.newpipe"
minSdkVersion 15
targetSdkVersion 27
versionCode 48
versionName "0.12.0"
versionCode 60
versionName "0.13.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
@@ -26,13 +26,6 @@ android {
debuggable true
applicationIdSuffix ".debug"
}
beta {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
applicationIdSuffix ".beta"
}
}
lintOptions {
@@ -48,14 +41,21 @@ android {
}
ext {
supportLibVersion = '27.0.2'
supportLibVersion = '27.1.0'
exoPlayerLibVersion = '2.7.1'
roomDbLibVersion = '1.0.0'
leakCanaryLibVersion = '1.5.4'
okHttpLibVersion = '1.5.0'
icepickLibVersion = '3.2.0'
stethoLibVersion = '1.5.0'
}
dependencies {
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2') {
exclude module: 'support-annotations'
}
implementation 'com.github.TeamNewPipe:NewPipeExtractor:7716b1437815'
implementation 'com.github.TeamNewPipe:NewPipeExtractor:a6b6235644474'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:1.10.19'
@@ -72,28 +72,28 @@ dependencies {
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:3.0.1'
implementation 'com.google.android.exoplayer:exoplayer:2.6.0'
implementation 'com.nononsenseapps:filepicker:4.2.1'
implementation "com.google.android.exoplayer:exoplayer:$exoPlayerLibVersion"
implementation "com.google.android.exoplayer:extension-mediasession:$exoPlayerLibVersion"
debugImplementation 'com.facebook.stetho:stetho:1.5.0'
debugImplementation 'com.facebook.stetho:stetho-urlconnection:1.5.0'
debugImplementation 'com.android.support:multidex:1.0.2'
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.7'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'com.jakewharton.rxbinding2:rxbinding:2.0.0'
implementation 'io.reactivex.rxjava2:rxjava:2.1.10'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
implementation 'com.jakewharton.rxbinding2:rxbinding:2.1.1'
implementation 'android.arch.persistence.room:runtime:1.0.0'
implementation 'android.arch.persistence.room:rxjava2:1.0.0'
annotationProcessor 'android.arch.persistence.room:compiler:1.0.0'
implementation "android.arch.persistence.room:runtime:$roomDbLibVersion"
implementation "android.arch.persistence.room:rxjava2:$roomDbLibVersion"
annotationProcessor "android.arch.persistence.room:compiler:$roomDbLibVersion"
implementation 'frankiesardo:icepick:3.2.0'
annotationProcessor 'frankiesardo:icepick-processor:3.2.0'
implementation "frankiesardo:icepick:$icepickLibVersion"
annotationProcessor "frankiesardo:icepick-processor:$icepickLibVersion"
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4'
betaImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryLibVersion"
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryLibVersion"
implementation 'com.squareup.okhttp3:okhttp:3.9.1'
debugImplementation 'com.facebook.stetho:stetho-okhttp3:1.5.0'
debugImplementation "com.facebook.stetho:stetho-okhttp3:$okHttpLibVersion"
}

View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
android:label="NewPipe Beta"
tools:replace="android:label">
</application>
</manifest>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -28,6 +28,12 @@
</intent-filter>
</activity>
<receiver android:name="android.support.v4.media.session.MediaButtonReceiver" >
<intent-filter>
<action android:name="android.intent.action.MEDIA_BUTTON" />
</intent-filter>
</receiver>
<activity
android:name=".player.old.PlayVideoActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
@@ -70,6 +76,9 @@
android:name=".history.HistoryActivity"
android:label="@string/title_activity_history"/>
<service android:name=".subscription.services.SubscriptionsImportService"/>
<service android:name=".subscription.services.SubscriptionsExportService"/>
<activity
android:name=".PanicResponderActivity"
android:launchMode="singleInstance"
@@ -117,7 +126,7 @@
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/>
android:resource="@xml/nnf_provider_paths"/>
</provider>
<activity

View File

@@ -89,7 +89,6 @@ public class App extends Application {
SettingsActivity.initSettings(this);
NewPipe.init(getDownloader());
NewPipeDatabase.init(this);
StateSaver.init(this);
initNotificationChannel();
@@ -168,6 +167,7 @@ public class App extends Application {
return new ImageLoaderConfiguration.Builder(this)
.memoryCache(new LRULimitedMemoryCache(memoryCacheSizeMb * 1024 * 1024))
.diskCacheSize(diskCacheSizeMb * 1024 * 1024)
.imageDownloader(new ImageDownloader(getApplicationContext()))
.build();
}

View File

@@ -1,18 +1,14 @@
package org.schabi.newpipe;
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Bundle;
import android.support.annotation.AttrRes;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer;
import com.squareup.leakcanary.RefWatcher;
import icepick.Icepick;
@@ -87,33 +83,13 @@ public abstract class BaseFragment extends Fragment {
}
/*//////////////////////////////////////////////////////////////////////////
// DisplayImageOptions default configurations
// Utils
//////////////////////////////////////////////////////////////////////////*/
public static final DisplayImageOptions BASE_OPTIONS =
new DisplayImageOptions.Builder().cacheInMemory(true).build();
public static final DisplayImageOptions DISPLAY_AVATAR_OPTIONS =
new DisplayImageOptions.Builder()
.cloneFrom(BASE_OPTIONS)
.showImageOnLoading(R.drawable.buddy)
.showImageForEmptyUri(R.drawable.buddy)
.showImageOnFail(R.drawable.buddy)
.build();
public static final DisplayImageOptions DISPLAY_THUMBNAIL_OPTIONS =
new DisplayImageOptions.Builder()
.cloneFrom(BASE_OPTIONS)
.displayer(new FadeInBitmapDisplayer(250))
.showImageForEmptyUri(R.drawable.dummy_thumbnail)
.showImageOnFail(R.drawable.dummy_thumbnail)
.build();
public static final DisplayImageOptions DISPLAY_BANNER_OPTIONS =
new DisplayImageOptions.Builder()
.cloneFrom(BASE_OPTIONS)
.showImageOnLoading(R.drawable.channel_banner)
.showImageForEmptyUri(R.drawable.channel_banner)
.showImageOnFail(R.drawable.channel_banner)
.build();
public void setTitle(String title) {
if (DEBUG) Log.d(TAG, "setTitle() called with: title = [" + title + "]");
if (activity != null && activity.getSupportActionBar() != null) {
activity.getSupportActionBar().setTitle(title);
}
}
}

View File

@@ -6,6 +6,7 @@ import android.text.TextUtils;
import org.schabi.newpipe.extractor.exceptions.ReCaptchaException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@@ -98,6 +99,18 @@ public class Downloader implements org.schabi.newpipe.extractor.Downloader {
*/
@Override
public String download(String siteUrl, Map<String, String> customProperties) throws IOException, ReCaptchaException {
return getBody(siteUrl, customProperties).string();
}
public InputStream stream(String siteUrl) throws IOException {
try {
return getBody(siteUrl, Collections.emptyMap()).byteStream();
} catch (ReCaptchaException e) {
throw new IOException(e.getMessage(), e.getCause());
}
}
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);
@@ -123,7 +136,7 @@ public class Downloader implements org.schabi.newpipe.extractor.Downloader {
return null;
}
return body.string();
return body;
}
/**

View File

@@ -0,0 +1,46 @@
package org.schabi.newpipe;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.preference.PreferenceManager;
import com.nostra13.universalimageloader.core.download.BaseImageDownloader;
import org.schabi.newpipe.extractor.NewPipe;
import java.io.IOException;
import java.io.InputStream;
public class ImageDownloader extends BaseImageDownloader {
private final Resources resources;
private final SharedPreferences preferences;
private final String downloadThumbnailKey;
public ImageDownloader(Context context) {
super(context);
this.resources = context.getResources();
this.preferences = PreferenceManager.getDefaultSharedPreferences(context);
this.downloadThumbnailKey = context.getString(R.string.download_thumbnail_key);
}
private boolean isDownloadingThumbnail() {
return preferences.getBoolean(downloadThumbnailKey, true);
}
@SuppressLint("ResourceType")
@Override
public InputStream getStream(String imageUri, Object extra) throws IOException {
if (isDownloadingThumbnail()) {
return super.getStream(imageUri, extra);
} else {
return resources.openRawResource(R.drawable.dummy_thumbnail_dark);
}
}
protected InputStream getStreamFromNetwork(String imageUri, Object extra) throws IOException {
final Downloader downloader = (Downloader) NewPipe.getDownloader();
return downloader.stream(imageUri);
}
}

View File

@@ -44,7 +44,6 @@ import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;
import android.widget.Toast;
import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.StreamingService;
@@ -94,44 +93,48 @@ public class MainActivity extends AppCompatActivity {
drawer = findViewById(R.id.drawer_layout);
drawerItems = findViewById(R.id.navigation);
//drawerItems.setItemIconTintList(null); // Set null to use the original icon
for(StreamingService s : NewPipe.getServices()) {
String title =
s.getServiceInfo().getName() +
(ServiceHelper.isBeta(s) ? " (beta)" : "");
MenuItem item = drawerItems.getMenu()
.add(R.id.menu_services_group, s.getServiceId(), 0, title);
item.setIcon(ServiceHelper.getIcon(s.getServiceId()));
}
drawerItems.getMenu().getItem(ServiceHelper.getSelectedServiceId(this)).setChecked(true);
if (!BuildConfig.BUILD_TYPE.equals("release")) {
toggle = new ActionBarDrawerToggle(this, drawer, toolbar, R.string.drawer_open, R.string.drawer_close);
toggle.syncState();
drawer.addDrawerListener(toggle);
drawer.addDrawerListener(new DrawerLayout.SimpleDrawerListener() {
private int lastService;
toggle = new ActionBarDrawerToggle(this, drawer, toolbar, R.string.drawer_open, R.string.drawer_close);
toggle.syncState();
drawer.addDrawerListener(toggle);
drawer.addDrawerListener(new DrawerLayout.SimpleDrawerListener() {
private int lastService;
@Override
public void onDrawerOpened(View drawerView) {
lastService = ServiceHelper.getSelectedServiceId(MainActivity.this);
@Override
public void onDrawerOpened(View drawerView) {
lastService = ServiceHelper.getSelectedServiceId(MainActivity.this);
}
@Override
public void onDrawerClosed(View drawerView) {
if (lastService != ServiceHelper.getSelectedServiceId(MainActivity.this)) {
new Handler(Looper.getMainLooper()).post(MainActivity.this::recreate);
}
}
});
@Override
public void onDrawerClosed(View drawerView) {
if (lastService != ServiceHelper.getSelectedServiceId(MainActivity.this)) {
new Handler(Looper.getMainLooper()).post(MainActivity.this::recreate);
}
}
});
drawerItems.setNavigationItemSelectedListener(this::changeService);
drawerItems.setNavigationItemSelectedListener(this::changeService);
setupDrawerFooter();
setupDrawerHeader();
} else {
drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
}
setupDrawerFooter();
setupDrawerHeader();
}
private boolean changeService(MenuItem item) {
if (item.getGroupId() == R.id.menu_services_group) {
drawerItems.getMenu().getItem(ServiceHelper.getSelectedServiceId(this)).setChecked(false);
ServiceHelper.setSelectedServiceId(this, item.getTitle().toString());
ServiceHelper.setSelectedServiceId(this, item.getItemId());
drawerItems.getMenu().getItem(ServiceHelper.getSelectedServiceId(this)).setChecked(true);
headerServiceView.setText("gurken");
} else {
return false;
}
@@ -310,9 +313,6 @@ public class MainActivity extends AppCompatActivity {
case R.id.action_about:
NavigationHelper.openAbout(this);
return true;
case R.id.action_history:
NavigationHelper.openHistory(this);
return true;
default:
return super.onOptionsItemSelected(item);
}

View File

@@ -11,31 +11,32 @@ import static org.schabi.newpipe.database.Migrations.MIGRATION_11_12;
public final class NewPipeDatabase {
private static AppDatabase databaseInstance;
private static volatile AppDatabase databaseInstance;
private NewPipeDatabase() {
//no instance
}
public static void init(Context context) {
databaseInstance = Room
.databaseBuilder(context, AppDatabase.class, DATABASE_NAME)
private static AppDatabase getDatabase(Context context) {
return Room
.databaseBuilder(context.getApplicationContext(), AppDatabase.class, DATABASE_NAME)
.addMigrations(MIGRATION_11_12)
.fallbackToDestructiveMigration()
.build();
}
@NonNull
@Deprecated
public static AppDatabase getInstance() {
if (databaseInstance == null) throw new RuntimeException("Database not initialized");
public static AppDatabase getInstance(@NonNull Context context) {
AppDatabase result = databaseInstance;
if (result == null) {
synchronized (NewPipeDatabase.class) {
result = databaseInstance;
if (result == null) {
databaseInstance = (result = getDatabase(context));
}
}
}
return databaseInstance;
}
@NonNull
public static AppDatabase getInstance(Context context) {
if (databaseInstance == null) init(context);
return databaseInstance;
return result;
}
}

View File

@@ -71,14 +71,14 @@ public class StreamEntity implements Serializable {
@Ignore
public StreamEntity(final StreamInfoItem item) {
this(item.service_id, item.name, item.url, item.stream_type, item.thumbnail_url,
item.uploader_name, item.duration);
this(item.getServiceId(), item.getName(), item.getUrl(), item.getStreamType(), item.getThumbnailUrl(),
item.getUploaderName(), item.getDuration());
}
@Ignore
public StreamEntity(final StreamInfo info) {
this(info.service_id, info.name, info.url, info.stream_type, info.thumbnail_url,
info.uploader_name, info.duration);
this(info.getServiceId(), info.getName(), info.getUrl(), info.getStreamType(), info.getThumbnailUrl(),
info.getUploaderName(), info.getDuration());
}
@Ignore

View File

@@ -1,7 +1,10 @@
package org.schabi.newpipe.database.subscription;
import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Insert;
import android.arch.persistence.room.OnConflictStrategy;
import android.arch.persistence.room.Query;
import android.arch.persistence.room.Transaction;
import org.schabi.newpipe.database.BasicDAO;
@@ -11,24 +14,56 @@ import io.reactivex.Flowable;
import static org.schabi.newpipe.database.subscription.SubscriptionEntity.SUBSCRIPTION_SERVICE_ID;
import static org.schabi.newpipe.database.subscription.SubscriptionEntity.SUBSCRIPTION_TABLE;
import static org.schabi.newpipe.database.subscription.SubscriptionEntity.SUBSCRIPTION_UID;
import static org.schabi.newpipe.database.subscription.SubscriptionEntity.SUBSCRIPTION_URL;
@Dao
public interface SubscriptionDAO extends BasicDAO<SubscriptionEntity> {
public abstract class SubscriptionDAO implements BasicDAO<SubscriptionEntity> {
@Override
@Query("SELECT * FROM " + SUBSCRIPTION_TABLE)
Flowable<List<SubscriptionEntity>> getAll();
public abstract Flowable<List<SubscriptionEntity>> getAll();
@Override
@Query("DELETE FROM " + SUBSCRIPTION_TABLE)
int deleteAll();
public abstract int deleteAll();
@Override
@Query("SELECT * FROM " + SUBSCRIPTION_TABLE + " WHERE " + SUBSCRIPTION_SERVICE_ID + " = :serviceId")
Flowable<List<SubscriptionEntity>> listByService(int serviceId);
public abstract Flowable<List<SubscriptionEntity>> listByService(int serviceId);
@Query("SELECT * FROM " + SUBSCRIPTION_TABLE + " WHERE " +
SUBSCRIPTION_URL + " LIKE :url AND " +
SUBSCRIPTION_SERVICE_ID + " = :serviceId")
Flowable<List<SubscriptionEntity>> getSubscription(int serviceId, String url);
public abstract Flowable<List<SubscriptionEntity>> getSubscription(int serviceId, String url);
@Query("SELECT " + SUBSCRIPTION_UID + " FROM " + SUBSCRIPTION_TABLE + " WHERE " +
SUBSCRIPTION_URL + " LIKE :url AND " +
SUBSCRIPTION_SERVICE_ID + " = :serviceId")
abstract Long getSubscriptionIdInternal(int serviceId, String url);
@Insert(onConflict = OnConflictStrategy.IGNORE)
abstract Long insertInternal(final SubscriptionEntity entities);
@Transaction
public List<SubscriptionEntity> upsertAll(List<SubscriptionEntity> entities) {
for (SubscriptionEntity entity : entities) {
Long uid = insertInternal(entity);
if (uid != -1) {
entity.setUid(uid);
continue;
}
uid = getSubscriptionIdInternal(entity.getServiceId(), entity.getUrl());
entity.setUid(uid);
if (uid == -1) {
throw new IllegalStateException("Invalid subscription id (-1)");
}
update(entity);
}
return entities;
}
}

View File

@@ -5,7 +5,9 @@ import android.arch.persistence.room.Entity;
import android.arch.persistence.room.Ignore;
import android.arch.persistence.room.Index;
import android.arch.persistence.room.PrimaryKey;
import android.support.annotation.NonNull;
import org.schabi.newpipe.extractor.channel.ChannelInfo;
import org.schabi.newpipe.extractor.channel.ChannelInfoItem;
import org.schabi.newpipe.util.Constants;
@@ -17,6 +19,7 @@ import static org.schabi.newpipe.database.subscription.SubscriptionEntity.SUBSCR
indices = {@Index(value = {SUBSCRIPTION_SERVICE_ID, SUBSCRIPTION_URL}, unique = true)})
public class SubscriptionEntity {
final static String SUBSCRIPTION_UID = "uid";
final static String SUBSCRIPTION_TABLE = "subscriptions";
final static String SUBSCRIPTION_SERVICE_ID = "service_id";
final static String SUBSCRIPTION_URL = "url";
@@ -116,9 +119,18 @@ public class SubscriptionEntity {
@Ignore
public ChannelInfoItem toChannelInfoItem() {
ChannelInfoItem item = new ChannelInfoItem(getServiceId(), getUrl(), getName());
item.thumbnail_url = getAvatarUrl();
item.subscriber_count = getSubscriberCount();
item.description = getDescription();
item.setThumbnailUrl(getAvatarUrl());
item.setSubscriberCount(getSubscriberCount());
item.setDescription(getDescription());
return item;
}
@Ignore
public static SubscriptionEntity from(@NonNull ChannelInfo info) {
SubscriptionEntity result = new SubscriptionEntity();
result.setServiceId(info.getServiceId());
result.setUrl(info.getUrl());
result.setData(info.getName(), info.getAvatarUrl(), info.getDescription(), info.getSubscriberCount());
return result;
}
}

View File

@@ -205,7 +205,7 @@ public class DownloadDialog extends DialogFragment implements RadioGroup.OnCheck
if (DEBUG) Log.d(TAG, "onCheckedChanged() called with: group = [" + group + "], checkedId = [" + checkedId + "]");
switch (checkedId) {
case R.id.audio_button:
setupAudioSpinner(currentInfo.audio_streams, streamsSpinner);
setupAudioSpinner(currentInfo.getAudioStreams(), streamsSpinner);
break;
case R.id.video_button:
setupVideoSpinner(sortedStreamVideosList, streamsSpinner);

View File

@@ -246,13 +246,6 @@ public abstract class BaseStateFragment<I> extends BaseFragment implements ViewC
// Utils
//////////////////////////////////////////////////////////////////////////*/
public void setTitle(String title) {
if (DEBUG) Log.d(TAG, "setTitle() called with: title = [" + title + "]");
if (activity != null && activity.getSupportActionBar() != null) {
activity.getSupportActionBar().setTitle(title);
}
}
protected void openUrlInBrowser(String url) {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(Intent.createChooser(intent, activity.getString(R.string.share_dialog_title)));

View File

@@ -106,7 +106,7 @@ public class MainFragment extends BaseFragment implements TabLayout.OnTabSelecte
super.onCreateOptionsMenu(menu, inflater);
if (DEBUG) Log.d(TAG, "onCreateOptionsMenu() called with: menu = [" + menu + "], inflater = [" + inflater + "]");
inflater.inflate(R.menu.main_fragment_menu, menu);
SubMenu kioskMenu = menu.addSubMenu(getString(R.string.kiosk));
SubMenu kioskMenu = menu.addSubMenu(Menu.NONE, Menu.NONE, 200, getString(R.string.kiosk));
try {
createKioskMenu(kioskMenu, inflater);
} catch (Exception e) {

View File

@@ -43,6 +43,7 @@ import android.widget.Toast;
import com.nirhart.parallaxscroll.views.ParallaxScrollView;
import com.nostra13.universalimageloader.core.assist.FailReason;
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener;
import com.nostra13.universalimageloader.core.listener.SimpleImageLoadingListener;
import org.schabi.newpipe.R;
@@ -56,6 +57,7 @@ import org.schabi.newpipe.extractor.services.youtube.YoutubeStreamExtractor;
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.StreamType;
import org.schabi.newpipe.extractor.stream.VideoStream;
import org.schabi.newpipe.fragments.BackPressable;
import org.schabi.newpipe.fragments.BaseStateFragment;
@@ -72,6 +74,7 @@ import org.schabi.newpipe.report.ErrorActivity;
import org.schabi.newpipe.report.UserAction;
import org.schabi.newpipe.util.Constants;
import org.schabi.newpipe.util.ExtractorHelper;
import org.schabi.newpipe.util.ImageDisplayConstants;
import org.schabi.newpipe.util.InfoCache;
import org.schabi.newpipe.util.ListHelper;
import org.schabi.newpipe.util.Localization;
@@ -90,8 +93,6 @@ import io.reactivex.Single;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.reactivex.functions.Function;
import io.reactivex.schedulers.Schedulers;
import static org.schabi.newpipe.util.AnimationUtils.animateView;
@@ -136,6 +137,7 @@ public class VideoDetailFragment
/*//////////////////////////////////////////////////////////////////////////
// Views
//////////////////////////////////////////////////////////////////////////*/
private Menu menu;
private Spinner spinnerToolbar;
@@ -157,6 +159,7 @@ public class VideoDetailFragment
private TextView detailControlsAddToPlaylist;
private TextView detailControlsDownload;
private TextView appendControlsDetail;
private TextView detailDurationView;
private LinearLayout videoDescriptionRootLayout;
private TextView videoUploadDateView;
@@ -321,7 +324,7 @@ public class VideoDetailFragment
if (serializable instanceof StreamInfo) {
//noinspection unchecked
currentInfo = (StreamInfo) serializable;
InfoCache.getInstance().putInfo(currentInfo);
InfoCache.getInstance().putInfo(serviceId, url, currentInfo);
}
serializable = savedState.getSerializable(STACK_KEY);
@@ -382,7 +385,8 @@ public class VideoDetailFragment
}
break;
case R.id.detail_thumbnail_root_layout:
if (currentInfo.video_streams.isEmpty() && currentInfo.video_only_streams.isEmpty()) {
if (currentInfo.getVideoStreams().isEmpty()
&& currentInfo.getVideoOnlyStreams().isEmpty()) {
openBackgroundPlayer(false);
} else {
openVideoPlayer();
@@ -458,7 +462,6 @@ public class VideoDetailFragment
@Override
protected void initViews(View rootView, Bundle savedInstanceState) {
super.initViews(rootView, savedInstanceState);
spinnerToolbar = activity.findViewById(R.id.toolbar).findViewById(R.id.toolbar_spinner);
parallaxScrollRootView = rootView.findViewById(R.id.detail_main_content);
@@ -479,6 +482,7 @@ public class VideoDetailFragment
detailControlsAddToPlaylist = rootView.findViewById(R.id.detail_controls_playlist_append);
detailControlsDownload = rootView.findViewById(R.id.detail_controls_download);
appendControlsDetail = rootView.findViewById(R.id.touch_append_detail);
detailDurationView = rootView.findViewById(R.id.detail_duration_view);
videoDescriptionRootLayout = rootView.findViewById(R.id.detail_description_root_layout);
videoUploadDateView = rootView.findViewById(R.id.detail_upload_date_view);
@@ -579,30 +583,25 @@ public class VideoDetailFragment
};
}
private void initThumbnailViews(StreamInfo info) {
private void initThumbnailViews(@NonNull StreamInfo info) {
thumbnailImageView.setImageResource(R.drawable.dummy_thumbnail_dark);
if (!TextUtils.isEmpty(info.getThumbnailUrl())) {
imageLoader.displayImage(
info.getThumbnailUrl(),
thumbnailImageView,
DISPLAY_THUMBNAIL_OPTIONS, new SimpleImageLoadingListener() {
final String infoServiceName = NewPipe.getNameOfService(info.getServiceId());
final ImageLoadingListener onFailListener = new SimpleImageLoadingListener() {
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
ErrorActivity.reportError(
activity,
failReason.getCause(),
null,
activity.findViewById(android.R.id.content),
ErrorActivity.ErrorInfo.make(UserAction.LOAD_IMAGE,
NewPipe.getNameOfService(currentInfo.getServiceId()),
imageUri,
R.string.could_not_load_thumbnails));
showSnackBarError(failReason.getCause(), UserAction.LOAD_IMAGE,
infoServiceName, imageUri, R.string.could_not_load_thumbnails);
}
});
};
imageLoader.displayImage(info.getThumbnailUrl(), thumbnailImageView,
ImageDisplayConstants.DISPLAY_THUMBNAIL_OPTIONS, onFailListener);
}
if (!TextUtils.isEmpty(info.getUploaderAvatarUrl())) {
imageLoader.displayImage(info.getUploaderAvatarUrl(), uploaderThumb, DISPLAY_AVATAR_OPTIONS);
imageLoader.displayImage(info.getUploaderAvatarUrl(), uploaderThumb,
ImageDisplayConstants.DISPLAY_AVATAR_OPTIONS);
}
}
@@ -617,7 +616,8 @@ public class VideoDetailFragment
relatedStreamRootLayout.setVisibility(View.VISIBLE);
} else nextStreamTitle.setVisibility(View.GONE);
if (info.related_streams != null && !info.related_streams.isEmpty() && showRelatedStreams) {
if (info.getRelatedStreams() != null
&& !info.getRelatedStreams().isEmpty() && showRelatedStreams) {
//long first = System.nanoTime(), each;
int to = info.getRelatedStreams().size() >= INITIAL_RELATED_VIDEOS
? INITIAL_RELATED_VIDEOS
@@ -682,7 +682,7 @@ public class VideoDetailFragment
switch (id) {
case R.id.menu_item_share: {
if(currentInfo != null) {
shareUrl(currentInfo.name, url);
shareUrl(currentInfo.getName(), url);
} else {
shareUrl(url, url);
}
@@ -1006,9 +1006,6 @@ public class VideoDetailFragment
int height = isPortrait
? (int) (metrics.widthPixels / (16.0f / 9.0f))
: (int) (metrics.heightPixels / 2f);
thumbnailImageView.setScaleType(isPortrait
? ImageView.ScaleType.CENTER_CROP
: ImageView.ScaleType.FIT_CENTER);
thumbnailImageView.setLayoutParams(
new FrameLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, height));
thumbnailImageView.setMinimumHeight(height);
@@ -1094,6 +1091,7 @@ public class VideoDetailFragment
animateView(contentRootLayoutHiding, false, 200);
animateView(spinnerToolbar, false, 200);
animateView(thumbnailPlayButton, false, 50);
animateView(detailDurationView, false, 100);
videoTitleTextView.setText(name != null ? name : "");
videoTitleTextView.setMaxLines(1);
@@ -1164,6 +1162,18 @@ public class VideoDetailFragment
thumbsDisabledTextView.setVisibility(View.GONE);
}
if (info.getDuration() > 0) {
detailDurationView.setText(Localization.getDurationString(info.getDuration()));
detailDurationView.setBackgroundColor(ContextCompat.getColor(activity, R.color.duration_background_color));
animateView(detailDurationView, true, 100);
} else if (info.getStreamType() == StreamType.LIVE_STREAM) {
detailDurationView.setText(R.string.duration_live);
detailDurationView.setBackgroundColor(ContextCompat.getColor(activity, R.color.live_duration_background_color));
animateView(detailDurationView, true, 100);
} else {
detailDurationView.setVisibility(View.GONE);
}
videoTitleRoot.setClickable(true);
videoTitleToggleArrow.setVisibility(View.VISIBLE);
videoTitleToggleArrow.setImageResource(R.drawable.arrow_down);
@@ -1192,11 +1202,21 @@ public class VideoDetailFragment
0);
}
if (info.video_streams.isEmpty() && info.video_only_streams.isEmpty()) {
detailControlsBackground.setVisibility(View.GONE);
detailControlsPopup.setVisibility(View.GONE);
spinnerToolbar.setVisibility(View.GONE);
thumbnailPlayButton.setImageResource(R.drawable.ic_headset_white_24dp);
switch (info.getStreamType()) {
case LIVE_STREAM:
case AUDIO_LIVE_STREAM:
detailControlsDownload.setVisibility(View.GONE);
spinnerToolbar.setVisibility(View.GONE);
break;
default:
if (!info.getVideoStreams().isEmpty()
|| !info.getVideoOnlyStreams().isEmpty()) break;
detailControlsBackground.setVisibility(View.GONE);
detailControlsPopup.setVisibility(View.GONE);
spinnerToolbar.setVisibility(View.GONE);
thumbnailPlayButton.setImageResource(R.drawable.ic_headset_white_24dp);
break;
}
if (autoPlayEnabled) {
@@ -1216,8 +1236,6 @@ public class VideoDetailFragment
if (exception instanceof YoutubeStreamExtractor.GemaException) {
onBlockedByGemaError();
} else if (exception instanceof YoutubeStreamExtractor.LiveStreamException) {
showError(getString(R.string.live_streams_not_supported), false);
} else if (exception instanceof ContentNotAvailableException) {
showError(getString(R.string.content_not_available), false);
} else {

View File

@@ -141,8 +141,7 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implem
@Override
public void selected(StreamInfoItem selectedItem) {
onItemSelected(selectedItem);
NavigationHelper.openVideoDetailFragment(
useAsFrontPage?getParentFragment().getFragmentManager():getFragmentManager(),
NavigationHelper.openVideoDetailFragment(useAsFrontPage ? getParentFragment().getFragmentManager() : getFragmentManager(),
selectedItem.getServiceId(), selectedItem.getUrl(), selectedItem.getName());
}
@@ -156,8 +155,7 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implem
@Override
public void selected(ChannelInfoItem selectedItem) {
onItemSelected(selectedItem);
NavigationHelper.openChannelFragment(
useAsFrontPage?getParentFragment().getFragmentManager():getFragmentManager(),
NavigationHelper.openChannelFragment(useAsFrontPage ? getParentFragment().getFragmentManager() : getFragmentManager(),
selectedItem.getServiceId(), selectedItem.getUrl(), selectedItem.getName());
}
});
@@ -166,8 +164,7 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implem
@Override
public void selected(PlaylistInfoItem selectedItem) {
onItemSelected(selectedItem);
NavigationHelper.openPlaylistFragment(
useAsFrontPage?getParentFragment().getFragmentManager():getFragmentManager(),
NavigationHelper.openPlaylistFragment(useAsFrontPage ? getParentFragment().getFragmentManager() : getFragmentManager(),
selectedItem.getServiceId(), selectedItem.getUrl(), selectedItem.getName());
}
});
@@ -230,7 +227,7 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implem
ActionBar supportActionBar = activity.getSupportActionBar();
if (supportActionBar != null) {
supportActionBar.setDisplayShowTitleEnabled(true);
if(useAsFrontPage) {
if (useAsFrontPage) {
supportActionBar.setDisplayHomeAsUpEnabled(false);
} else {
supportActionBar.setDisplayHomeAsUpEnabled(true);
@@ -277,9 +274,8 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implem
@Override
public void showListFooter(final boolean show) {
itemsList.post(new Runnable() {
@Override
public void run() {
itemsList.post(() -> {
if (infoListAdapter != null && itemsList != null) {
infoListAdapter.showFooter(show);
}
});

View File

@@ -19,7 +19,8 @@ import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
public abstract class BaseListInfoFragment<I extends ListInfo> extends BaseListFragment<I, ListExtractor.NextItemsResult> {
public abstract class BaseListInfoFragment<I extends ListInfo>
extends BaseListFragment<I, ListExtractor.InfoItemsPage> {
@State
protected int serviceId = Constants.NO_SERVICE_ID;
@@ -29,7 +30,7 @@ public abstract class BaseListInfoFragment<I extends ListInfo> extends BaseListF
protected String url;
protected I currentInfo;
protected String currentNextItemsUrl;
protected String currentNextPageUrl;
protected Disposable currentWorker;
@Override
@@ -73,7 +74,7 @@ public abstract class BaseListInfoFragment<I extends ListInfo> extends BaseListF
public void writeTo(Queue<Object> objectsToSave) {
super.writeTo(objectsToSave);
objectsToSave.add(currentInfo);
objectsToSave.add(currentNextItemsUrl);
objectsToSave.add(currentNextPageUrl);
}
@Override
@@ -81,7 +82,7 @@ public abstract class BaseListInfoFragment<I extends ListInfo> extends BaseListF
public void readFrom(@NonNull Queue<Object> savedObjects) throws Exception {
super.readFrom(savedObjects);
currentInfo = (I) savedObjects.poll();
currentNextItemsUrl = (String) savedObjects.poll();
currentNextPageUrl = (String) savedObjects.poll();
}
/*//////////////////////////////////////////////////////////////////////////
@@ -116,7 +117,7 @@ public abstract class BaseListInfoFragment<I extends ListInfo> extends BaseListF
.subscribe((@NonNull I result) -> {
isLoading.set(false);
currentInfo = result;
currentNextItemsUrl = result.next_streams_url;
currentNextPageUrl = result.getNextPageUrl();
handleResult(result);
}, (@NonNull Throwable throwable) -> onError(throwable));
}
@@ -125,7 +126,7 @@ public abstract class BaseListInfoFragment<I extends ListInfo> extends BaseListF
* Implement the logic to load more items<br/>
* You can use the default implementations from {@link org.schabi.newpipe.util.ExtractorHelper}
*/
protected abstract Single<ListExtractor.NextItemsResult> loadMoreItemsLogic();
protected abstract Single<ListExtractor.InfoItemsPage> loadMoreItemsLogic();
protected void loadMoreItems() {
isLoading.set(true);
@@ -134,9 +135,9 @@ public abstract class BaseListInfoFragment<I extends ListInfo> extends BaseListF
currentWorker = loadMoreItemsLogic()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe((@io.reactivex.annotations.NonNull ListExtractor.NextItemsResult nextItemsResult) -> {
.subscribe((@io.reactivex.annotations.NonNull ListExtractor.InfoItemsPage InfoItemsPage) -> {
isLoading.set(false);
handleNextItems(nextItemsResult);
handleNextItems(InfoItemsPage);
}, (@io.reactivex.annotations.NonNull Throwable throwable) -> {
isLoading.set(false);
onError(throwable);
@@ -144,17 +145,17 @@ public abstract class BaseListInfoFragment<I extends ListInfo> extends BaseListF
}
@Override
public void handleNextItems(ListExtractor.NextItemsResult result) {
public void handleNextItems(ListExtractor.InfoItemsPage result) {
super.handleNextItems(result);
currentNextItemsUrl = result.nextItemsUrl;
infoListAdapter.addInfoItemList(result.nextItemsList);
currentNextPageUrl = result.getNextPageUrl();
infoListAdapter.addInfoItemList(result.getItems());
showListFooter(hasMoreItems());
}
@Override
protected boolean hasMoreItems() {
return !TextUtils.isEmpty(currentNextItemsUrl);
return !TextUtils.isEmpty(currentNextPageUrl);
}
/*//////////////////////////////////////////////////////////////////////////
@@ -170,8 +171,8 @@ public abstract class BaseListInfoFragment<I extends ListInfo> extends BaseListF
setTitle(name);
if (infoListAdapter.getItemsList().size() == 0) {
if (result.related_streams.size() > 0) {
infoListAdapter.addInfoItemList(result.related_streams);
if (result.getRelatedItems().size() > 0) {
infoListAdapter.addInfoItemList(result.getRelatedItems());
showListFooter(hasMoreItems());
} else {
infoListAdapter.clearStreamItemList();

View File

@@ -27,23 +27,28 @@ import com.jakewharton.rxbinding2.view.RxView;
import org.schabi.newpipe.R;
import org.schabi.newpipe.database.subscription.SubscriptionEntity;
import org.schabi.newpipe.extractor.InfoItem;
import org.schabi.newpipe.extractor.ListExtractor;
import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.channel.ChannelInfo;
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.extractor.stream.Stream;
import org.schabi.newpipe.extractor.stream.StreamInfo;
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import org.schabi.newpipe.fragments.list.BaseListInfoFragment;
import org.schabi.newpipe.fragments.subscription.SubscriptionService;
import org.schabi.newpipe.info_list.InfoItemDialog;
import org.schabi.newpipe.playlist.ChannelPlayQueue;
import org.schabi.newpipe.playlist.PlayQueue;
import org.schabi.newpipe.playlist.SinglePlayQueue;
import org.schabi.newpipe.report.UserAction;
import org.schabi.newpipe.subscription.SubscriptionService;
import org.schabi.newpipe.util.AnimationUtils;
import org.schabi.newpipe.util.ExtractorHelper;
import org.schabi.newpipe.util.ImageDisplayConstants;
import org.schabi.newpipe.util.Localization;
import org.schabi.newpipe.util.NavigationHelper;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
@@ -108,11 +113,11 @@ public class ChannelFragment extends BaseListInfoFragment<ChannelInfo> {
@Override
public void onAttach(Context context) {
super.onAttach(context);
subscriptionService = SubscriptionService.getInstance();
subscriptionService = SubscriptionService.getInstance(activity);
}
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_channel, container, false);
}
@@ -388,8 +393,8 @@ public class ChannelFragment extends BaseListInfoFragment<ChannelInfo> {
//////////////////////////////////////////////////////////////////////////*/
@Override
protected Single<ListExtractor.NextItemsResult> loadMoreItemsLogic() {
return ExtractorHelper.getMoreChannelItems(serviceId, url, currentNextItemsUrl);
protected Single<ListExtractor.InfoItemsPage> loadMoreItemsLogic() {
return ExtractorHelper.getMoreChannelItems(serviceId, url, currentNextPageUrl);
}
@Override
@@ -415,8 +420,10 @@ public class ChannelFragment extends BaseListInfoFragment<ChannelInfo> {
super.handleResult(result);
headerRootLayout.setVisibility(View.VISIBLE);
imageLoader.displayImage(result.banner_url, headerChannelBanner, DISPLAY_BANNER_OPTIONS);
imageLoader.displayImage(result.avatar_url, headerAvatarView, DISPLAY_AVATAR_OPTIONS);
imageLoader.displayImage(result.getBannerUrl(), headerChannelBanner,
ImageDisplayConstants.DISPLAY_BANNER_OPTIONS);
imageLoader.displayImage(result.getAvatarUrl(), headerAvatarView,
ImageDisplayConstants.DISPLAY_AVATAR_OPTIONS);
if (result.getSubscriberCount() != -1) {
headerSubscribersTextView.setText(Localization.localizeSubscribersCount(activity, result.getSubscriberCount()));
@@ -427,8 +434,8 @@ public class ChannelFragment extends BaseListInfoFragment<ChannelInfo> {
playlistCtrl.setVisibility(View.VISIBLE);
if (!result.errors.isEmpty()) {
showSnackBarError(result.errors, UserAction.REQUESTED_CHANNEL, NewPipe.getNameOfService(result.getServiceId()), result.getUrl(), 0);
if (!result.getErrors().isEmpty()) {
showSnackBarError(result.getErrors(), UserAction.REQUESTED_CHANNEL, NewPipe.getNameOfService(result.getServiceId()), result.getUrl(), 0);
}
if (disposables != null) disposables.clear();
@@ -436,24 +443,12 @@ public class ChannelFragment extends BaseListInfoFragment<ChannelInfo> {
updateSubscription(result);
monitorSubscription(result);
headerPlayAllButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
NavigationHelper.playOnMainPlayer(activity, getPlayQueue());
}
});
headerPopupButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
NavigationHelper.playOnPopupPlayer(activity, getPlayQueue());
}
});
headerBackgroundButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
NavigationHelper.playOnBackgroundPlayer(activity, getPlayQueue());
}
});
headerPlayAllButton.setOnClickListener(
view -> NavigationHelper.playOnMainPlayer(activity, getPlayQueue()));
headerPopupButton.setOnClickListener(
view -> NavigationHelper.playOnPopupPlayer(activity, getPlayQueue()));
headerBackgroundButton.setOnClickListener(
view -> NavigationHelper.playOnBackgroundPlayer(activity, getPlayQueue()));
}
private PlayQueue getPlayQueue() {
@@ -461,17 +456,23 @@ public class ChannelFragment extends BaseListInfoFragment<ChannelInfo> {
}
private PlayQueue getPlayQueue(final int index) {
final List<StreamInfoItem> streamItems = new ArrayList<>();
for(InfoItem i : infoListAdapter.getItemsList()) {
if(i instanceof StreamInfoItem) {
streamItems.add((StreamInfoItem) i);
}
}
return new ChannelPlayQueue(
currentInfo.getServiceId(),
currentInfo.getUrl(),
currentInfo.getNextStreamsUrl(),
infoListAdapter.getItemsList(),
currentInfo.getNextPageUrl(),
streamItems,
index
);
}
@Override
public void handleNextItems(ListExtractor.NextItemsResult result) {
public void handleNextItems(ListExtractor.InfoItemsPage result) {
super.handleNextItems(result);
if (!result.getErrors().isEmpty()) {

View File

@@ -21,8 +21,8 @@ import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.channel.ChannelInfo;
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.fragments.list.BaseListFragment;
import org.schabi.newpipe.fragments.subscription.SubscriptionService;
import org.schabi.newpipe.report.UserAction;
import org.schabi.newpipe.subscription.SubscriptionService;
import java.util.Collections;
import java.util.HashSet;
@@ -64,7 +64,7 @@ public class FeedFragment extends BaseListFragment<List<SubscriptionEntity>, Voi
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
subscriptionService = SubscriptionService.getInstance();
subscriptionService = SubscriptionService.getInstance(activity);
FEED_LOAD_COUNT = howManyItemsToLoad();
}
@@ -297,12 +297,12 @@ public class FeedFragment extends BaseListFragment<List<SubscriptionEntity>, Voi
// Called only when response is non-empty
@Override
public void onSuccess(final ChannelInfo channelInfo) {
if (infoListAdapter == null || channelInfo.getRelatedStreams().isEmpty()) {
if (infoListAdapter == null || channelInfo.getRelatedItems().isEmpty()) {
onDone();
return;
}
final InfoItem item = channelInfo.getRelatedStreams().get(0);
final InfoItem item = channelInfo.getRelatedItems().get(0);
// Keep requesting new items if the current one already exists
boolean itemExists = doesItemExist(infoListAdapter.getItemsList(), item);
if (!itemExists) {
@@ -411,7 +411,7 @@ public class FeedFragment extends BaseListFragment<List<SubscriptionEntity>, Voi
private boolean doesItemExist(final List<InfoItem> items, final InfoItem item) {
for (final InfoItem existingItem : items) {
if (existingItem.info_type == item.info_type &&
if (existingItem.getInfoType() == item.getInfoType() &&
existingItem.getServiceId() == item.getServiceId() &&
existingItem.getName().equals(item.getName()) &&
existingItem.getUrl().equals(item.getUrl())) return true;

View File

@@ -141,12 +141,12 @@ public class KioskFragment extends BaseListInfoFragment<KioskInfo> {
}
@Override
public Single<ListExtractor.NextItemsResult> loadMoreItemsLogic() {
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, currentNextItemsUrl, contentCountry);
return ExtractorHelper.getMoreKioskItems(serviceId, url, currentNextPageUrl, contentCountry);
}
/*//////////////////////////////////////////////////////////////////////////
@@ -168,13 +168,13 @@ public class KioskFragment extends BaseListInfoFragment<KioskInfo> {
if (!result.getErrors().isEmpty()) {
showSnackBarError(result.getErrors(),
UserAction.REQUESTED_PLAYLIST,
UserAction.REQUESTED_KIOSK,
NewPipe.getNameOfService(result.getServiceId()), result.getUrl(), 0);
}
}
@Override
public void handleNextItems(ListExtractor.NextItemsResult result) {
public void handleNextItems(ListExtractor.InfoItemsPage result) {
super.handleNextItems(result);
if (!result.getErrors().isEmpty()) {

View File

@@ -22,10 +22,12 @@ import org.reactivestreams.Subscription;
import org.schabi.newpipe.NewPipeDatabase;
import org.schabi.newpipe.R;
import org.schabi.newpipe.database.playlist.model.PlaylistRemoteEntity;
import org.schabi.newpipe.extractor.InfoItem;
import org.schabi.newpipe.extractor.ListExtractor;
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.StreamInfo;
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import org.schabi.newpipe.fragments.list.BaseListInfoFragment;
import org.schabi.newpipe.fragments.local.RemotePlaylistManager;
@@ -35,9 +37,11 @@ import org.schabi.newpipe.playlist.PlaylistPlayQueue;
import org.schabi.newpipe.playlist.SinglePlayQueue;
import org.schabi.newpipe.report.UserAction;
import org.schabi.newpipe.util.ExtractorHelper;
import org.schabi.newpipe.util.ImageDisplayConstants;
import org.schabi.newpipe.util.NavigationHelper;
import org.schabi.newpipe.util.ThemeHelper;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -206,8 +210,8 @@ public class PlaylistFragment extends BaseListInfoFragment<PlaylistInfo> {
//////////////////////////////////////////////////////////////////////////*/
@Override
protected Single<ListExtractor.NextItemsResult> loadMoreItemsLogic() {
return ExtractorHelper.getMorePlaylistItems(serviceId, url, currentNextItemsUrl);
protected Single<ListExtractor.InfoItemsPage> loadMoreItemsLogic() {
return ExtractorHelper.getMorePlaylistItems(serviceId, url, currentNextPageUrl);
}
@Override
@@ -268,8 +272,10 @@ public class PlaylistFragment extends BaseListInfoFragment<PlaylistInfo> {
playlistCtrl.setVisibility(View.VISIBLE);
imageLoader.displayImage(result.getUploaderAvatarUrl(), headerUploaderAvatar, DISPLAY_AVATAR_OPTIONS);
headerStreamCount.setText(getResources().getQuantityString(R.plurals.videos, (int) result.stream_count, (int) result.stream_count));
imageLoader.displayImage(result.getUploaderAvatarUrl(), headerUploaderAvatar,
ImageDisplayConstants.DISPLAY_AVATAR_OPTIONS);
headerStreamCount.setText(getResources().getQuantityString(R.plurals.videos,
(int) result.getStreamCount(), (int) result.getStreamCount()));
if (!result.getErrors().isEmpty()) {
showSnackBarError(result.getErrors(), UserAction.REQUESTED_PLAYLIST, NewPipe.getNameOfService(result.getServiceId()), result.getUrl(), 0);
@@ -297,17 +303,23 @@ public class PlaylistFragment extends BaseListInfoFragment<PlaylistInfo> {
}
private PlayQueue getPlayQueue(final int index) {
final List<StreamInfoItem> infoItems = new ArrayList<>();
for(InfoItem i : infoListAdapter.getItemsList()) {
if(i instanceof StreamInfoItem) {
infoItems.add((StreamInfoItem) i);
}
}
return new PlaylistPlayQueue(
currentInfo.getServiceId(),
currentInfo.getUrl(),
currentInfo.getNextStreamsUrl(),
infoListAdapter.getItemsList(),
currentInfo.getNextPageUrl(),
infoItems,
index
);
}
@Override
public void handleNextItems(ListExtractor.NextItemsResult result) {
public void handleNextItems(ListExtractor.InfoItemsPage result) {
super.handleNextItems(result);
if (!result.getErrors().isEmpty()) {

View File

@@ -71,7 +71,9 @@ import io.reactivex.subjects.PublishSubject;
import static org.schabi.newpipe.util.AnimationUtils.animateView;
public class SearchFragment extends BaseListFragment<SearchResult, ListExtractor.NextItemsResult> implements BackPressable {
public class SearchFragment
extends BaseListFragment<SearchResult, ListExtractor.InfoItemsPage>
implements BackPressable {
/*//////////////////////////////////////////////////////////////////////////
// Search
@@ -527,23 +529,26 @@ public class SearchFragment extends BaseListFragment<SearchResult, ListExtractor
}
private void showDeleteSuggestionDialog(final SuggestionItem item) {
final Disposable onDelete = historyRecordManager.deleteSearchHistory(item.query)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(
howManyDeleted -> suggestionPublisher
.onNext(searchEditText.getText().toString()),
throwable -> showSnackBarError(throwable,
UserAction.SOMETHING_ELSE, "none",
"Deleting item failed", R.string.general_error)
);
if (activity == null || historyRecordManager == null || suggestionPublisher == null ||
searchEditText == null || disposables == null) return;
final String query = item.query;
new AlertDialog.Builder(activity)
.setTitle(item.query)
.setTitle(query)
.setMessage(R.string.delete_item_search_history)
.setCancelable(true)
.setNegativeButton(R.string.cancel, null)
.setPositiveButton(R.string.delete, (dialog, which) -> disposables.add(onDelete))
.setPositiveButton(R.string.delete, (dialog, which) -> {
final Disposable onDelete = historyRecordManager.deleteSearchHistory(query)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(
howManyDeleted -> suggestionPublisher
.onNext(searchEditText.getText().toString()),
throwable -> showSnackBarError(throwable,
UserAction.SOMETHING_ELSE, "none",
"Deleting item failed", R.string.general_error)
);
disposables.add(onDelete);
})
.show();
}
@@ -701,19 +706,8 @@ public class SearchFragment extends BaseListFragment<SearchResult, ListExtractor
searchDisposable = ExtractorHelper.searchFor(serviceId, searchQuery, currentPage, contentCountry, filter)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<SearchResult>() {
@Override
public void accept(@NonNull SearchResult result) throws Exception {
isLoading.set(false);
handleResult(result);
}
}, new Consumer<Throwable>() {
@Override
public void accept(@NonNull Throwable throwable) throws Exception {
isLoading.set(false);
onError(throwable);
}
});
.doOnEvent((searchResult, throwable) -> isLoading.set(false))
.subscribe(this::handleResult, this::onError);
}
@Override
@@ -725,19 +719,8 @@ public class SearchFragment extends BaseListFragment<SearchResult, ListExtractor
searchDisposable = ExtractorHelper.getMoreSearchItems(serviceId, searchQuery, currentNextPage, contentCountry, filter)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ListExtractor.NextItemsResult>() {
@Override
public void accept(@NonNull ListExtractor.NextItemsResult result) throws Exception {
isLoading.set(false);
handleNextItems(result);
}
}, new Consumer<Throwable>() {
@Override
public void accept(@NonNull Throwable throwable) throws Exception {
isLoading.set(false);
onError(throwable);
}
});
.doOnEvent((nextItemsResult, throwable) -> isLoading.set(false))
.subscribe(this::handleNextItems, this::onError);
}
@Override
@@ -778,12 +761,7 @@ public class SearchFragment extends BaseListFragment<SearchResult, ListExtractor
public void handleSuggestions(@NonNull final List<SuggestionItem> suggestions) {
if (DEBUG) Log.d(TAG, "handleSuggestions() called with: suggestions = [" + suggestions + "]");
suggestionsRecyclerView.smoothScrollToPosition(0);
suggestionsRecyclerView.post(new Runnable() {
@Override
public void run() {
suggestionListAdapter.setItems(suggestions);
}
});
suggestionsRecyclerView.post(() -> suggestionListAdapter.setItems(suggestions));
if (errorPanelRoot.getVisibility() == View.VISIBLE) {
hideLoading();
@@ -841,10 +819,10 @@ public class SearchFragment extends BaseListFragment<SearchResult, ListExtractor
}
@Override
public void handleNextItems(ListExtractor.NextItemsResult result) {
public void handleNextItems(ListExtractor.InfoItemsPage result) {
showListFooter(false);
currentPage = Integer.parseInt(result.getNextItemsUrl());
infoListAdapter.addInfoItemList(result.getNextItemsList());
currentPage = Integer.parseInt(result.getNextPageUrl());
infoListAdapter.addInfoItemList(result.getItems());
if (!result.getErrors().isEmpty()) {
showSnackBarError(result.getErrors(), UserAction.SEARCHED, NewPipe.getNameOfService(serviceId)

View File

@@ -1,12 +1,10 @@
package org.schabi.newpipe.fragments.local;
import android.content.Context;
import android.graphics.Bitmap;
import android.widget.ImageView;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.process.BitmapProcessor;
import org.schabi.newpipe.database.LocalItem;
import org.schabi.newpipe.util.OnClickGesture;

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