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

Compare commits

..

247 Commits

Author SHA1 Message Date
Christian Schabesberger
97ad3c1e6d Merge pull request #1654 from mauriciocolli/misc-fixes
Improve "selected tabs" and misc fixes
2018-09-05 20:52:29 +02:00
Mauricio Colli
612228bb73 Update extractor version
- Handle case where subscribers count is not available
- Fix NPE when a YouTube playlist is empty
- Quick fix for the kiosks in SoundCloud
2018-09-05 07:29:15 -03:00
Mauricio Colli
6e75d41956 Use current volume as the start value in the volume gesture
- Renamed some variables/classes to increase readability
2018-09-04 23:54:17 -03:00
Mauricio Colli
9883a38698 Fix registering of broadcast receiver 2018-09-04 23:54:17 -03:00
Mauricio Colli
07256e2e34 Handle case where subscribers count is not available 2018-09-04 23:54:17 -03:00
Mauricio Colli
43674ae80a Improve tabs UX and saving/loading
- Show icons in the tabs list and dialog chooser
- Add a "restore to defaults" button
- Make removing gesture more user intuitive
2018-09-04 23:54:17 -03:00
Christian Schabesberger
c066ebd76f merge extractor fix for empty subscriptioin count 2018-09-04 14:31:08 +02:00
Christian Schabesberger
6e382c64a4 Reciever not registered 2018-09-04 13:07:39 +02:00
Christian Schabesberger
81e76f260c fix drawer header font color for white theme 2018-09-01 12:33:08 +02:00
Christian Schabesberger
93571961ee merge weblate changes 2018-08-31 14:11:16 +02:00
MadderRagax
cb24347b23 Translated using Weblate (Swedish)
Currently translated at 100.0% (383 of 383 strings)
2018-08-30 23:23:27 +02:00
Vincent Tam
146b7be825 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (383 of 383 strings)
2018-08-29 12:35:17 +02:00
Vincent Tam
50203c5f87 Translated using Weblate (Chinese (Simplified))
Currently translated at 27.4% (105 of 383 strings)
2018-08-29 12:35:16 +02:00
Vincent Tam
b188073fb0 Translated using Weblate (Chinese (Hong Kong))
Currently translated at 36.2% (139 of 383 strings)
2018-08-29 12:35:14 +02:00
Christian Schabesberger
91c60df0e9 move on to v0.14.0 2018-08-28 18:04:45 +02:00
Christian Schabesberger
ad065e9281 Merge pull request #1623 from TeamNewPipe/refactor_and_bugfix
Refactor and bugfix
2018-08-28 16:30:09 +02:00
Christian Schabesberger
b1429366da fixes acording to code review
fixes moreacording to code review

fixed link handling once more
2018-08-28 12:19:07 +02:00
ButterflyOfFire
8bf7af2e74 Translated using Weblate (Arabic)
Currently translated at 100.0% (383 of 383 strings)
2018-08-28 02:34:24 +02:00
Christian Schabesberger
2003f51d49 fix thumbnail not shown in background player 2018-08-27 16:37:21 +02:00
Christian Schabesberger
ce83fd9a10 make dash parser ignore segmented streams 2018-08-27 16:37:21 +02:00
Christian Schabesberger
eacbaa3680 fix exception on nothing found 2018-08-27 16:37:21 +02:00
Christian Schabesberger
98c65fb9b7 add more debug statements to BasePlayer 2018-08-27 16:37:21 +02:00
Christian Schabesberger
44a71d8565 add reset extSD card folder dialog 2018-08-27 16:37:21 +02:00
Christian Schabesberger
badd4d3207 fix linkhandling in description
bla
2018-08-27 16:37:21 +02:00
Christian Schabesberger
0f517b803b fix layout width of currentPlayTime 2018-08-27 16:37:21 +02:00
Christian Schabesberger
c2d11e786f rename Search Query handler 2018-08-27 16:37:21 +02:00
Christian Schabesberger
b0efe49e29 fix cycling search results 2018-08-27 16:37:21 +02:00
Christian Schabesberger
2d029b9f76 fix exception when loading premium videos 2018-08-27 16:37:21 +02:00
Dual Natan
8ad917cff0 Translated using Weblate (Macedonian)
Currently translated at 100.0% (383 of 383 strings)
2018-08-25 15:56:40 +02:00
Mauricio Colli
4e478c65d3 Merge pull request #1604 from TheMatten/player_controls
Gesture controls
2018-08-24 13:36:58 -03:00
TheMatten
a469086915 Add background to fast rewind icon, change android:src to tools:src
-White icon was barely visible on bright backgrounds
-Secondly, drawable is set programmatically anyway and so it's setting in
 XML is good just for a confusion
2018-08-24 13:24:35 -03:00
TheMatten
bf05ff6048 Use animated circular design for gesture control (brightness and volume)
-Previous version used emojis for brightness and volume icons, which may
 be inconsistent across devices and do not fit well with other parts of UI
 (Frankly, previous version was more informative than eye-candy)

-This commit replaces old version with circular progress bar that shows
 current value (before conversion). Gesture mode (volume/brightness) is
 indicated by icon that changes between (4/3) modes according to current
 value

-Text information about current value was removed, because with progress
 bar present it does not add any real value to UI.
2018-08-24 13:24:35 -03:00
Christian Schabesberger
a817d8cbf9 git replace getFragmentManager() with getFM() 2018-08-24 12:30:23 +02:00
Christian Schabesberger
4a19c78fa5 despaget certain parts of the new design 2018-08-24 12:27:02 +02:00
Somethingweirdhere
e8bb7da906 Put listener initialization into onCreate 2018-08-24 12:26:16 +02:00
Somethingweirdhere
523477fc2b Added swiping to remove, which is enabled by long-pressing 2018-08-24 12:26:16 +02:00
Somethingweirdhere
c730426be0 Fixed dragging 2018-08-24 12:26:15 +02:00
Somethingweirdhere
57d6c97203 Fixed revert 2018-08-24 12:26:15 +02:00
Somethingweirdhere
fce17aa1d4 Revert "Revert "Changed the default preferences to show trending.""
This reverts commit b441665
2018-08-24 12:26:15 +02:00
Somethingweirdhere
01abc244b1 Fixed revert 2018-08-24 12:26:15 +02:00
Somethingweirdhere
7bedacf5ad Revert "Revert "Changed the way how kiosks are handled""
This reverts commit b020567
2018-08-24 12:26:15 +02:00
Somethingweirdhere
552a1d0464 Options here again 2018-08-24 12:26:15 +02:00
Somethingweirdhere
8dde25532a Code reviewed 2018-08-24 12:26:15 +02:00
Somethingweirdhere
f29fa939ab Removing by long pressing no longer removes a random tab, but the pressed one. 2018-08-24 12:23:26 +02:00
Somethingweirdhere
614bdb33b4 Added dragging 2018-08-24 12:23:26 +02:00
Somethingweirdhere
71761675cf Fixes problems 1-3 2018-08-24 12:23:26 +02:00
Somethingweirdhere
d9194aa859 Revert "Changed the way how kiosks are handled"
This reverts commit f3da712
2018-08-24 12:23:26 +02:00
Somethingweirdhere
f15081a474 Revert "Changed the default preferences to show trending."
This reverts commit 25481d0
2018-08-24 12:23:26 +02:00
Somethingweirdhere
2f99ff4a0c Changed the default preferences to show trending. 2018-08-24 12:23:26 +02:00
Somethingweirdhere
3a7d26aa46 Changed the way how kiosks are handled 2018-08-24 12:23:26 +02:00
Somethingweirdhere
3f35bc593c Ever more UI tweaks 2018-08-24 12:23:26 +02:00
Somethingweirdhere
e5e708d781 UI tweaks 2018-08-24 12:23:26 +02:00
Somethingweirdhere
d694561980 Added fab and handles, made cards cardier 2018-08-24 12:23:26 +02:00
Somethingweirdhere
8d6d18e875 UI redisign 2018-08-24 12:23:26 +02:00
Somethingweirdhere
072e27ed27 Code cleanup 2018-08-24 12:23:26 +02:00
Somethingweirdhere
6d64215614 + New Tab is now on the bottom
Made dialog more beautiful
2018-08-24 12:17:42 +02:00
Somethingweirdhere
33f5ed5b14 Reduced Font size, fixed bugs that were created when moving the setting 2018-08-24 12:17:42 +02:00
Somethingweirdhere
27f509c8e0 Fixed 2. Use CardView to reprecent each tab. 2018-08-24 12:17:42 +02:00
Somethingweirdhere
890b3e13c9 Fixed 1. Put the tab settings into Aperence settings 2018-08-24 12:16:41 +02:00
Somethingweirdhere
b730cb099f Fixed 4. buggy behavior when adding a new tab. 2018-08-24 12:16:41 +02:00
Somethingweirdhere
fc94f184d2 Reduced lag and increased button size for older devices&users. 2018-08-24 12:16:41 +02:00
Somethingweirdhere
cbf6540889 New selection menu 2018-08-24 12:16:41 +02:00
Somethingweirdhere
40804a7fb3 Navigation drawer has services in a new menu! 2018-08-24 12:16:41 +02:00
Somethingweirdhere
d4101c4f43 Nav drawer now moves behind the status bar and the colors also work correctly. 2018-08-24 12:14:53 +02:00
Somethingweirdhere
409bebd5bc Nav drawer now moves behind the status bar 2018-08-24 12:14:53 +02:00
Somethingweirdhere
8e3ad69adb Videos now also open from the History Tab. 2018-08-24 12:14:53 +02:00
Somethingweirdhere
c8e46d9e21 PopUp now looks better on hell theme 2018-08-24 12:14:53 +02:00
Somethingweirdhere
c56241ffc1 Tab icons now work correctly in bright theme 2018-08-24 12:14:53 +02:00
Somethingweirdhere
be62a2bfc5 Fixed icons and tab titles 2018-08-24 12:14:53 +02:00
Somethingweirdhere
5cb7771484 Fixed bugs&crashes 2018-08-24 12:14:53 +02:00
Somethingweirdhere
6675d3e2cd Set up custom Main Page tabs 2018-08-24 12:14:53 +02:00
Somethingweirdhere
8ecbe4c8ad Created a dialog for the main page content 2018-08-24 12:13:44 +02:00
Somethingweirdhere
edb75c4bab Fixed crash in Subscriptions section 2018-08-24 12:12:08 +02:00
Somethingweirdhere
54b21c716a Added drawer menu 2018-08-24 12:04:35 +02:00
Somethingweirdhere
4704274b87 New Branch 2018-08-24 11:54:59 +02:00
Mauricio Colli
78547aa119 Merge pull request #1597 from mauriciocolli/close-popup-overlay
New way to close the popup player
2018-08-23 23:56:41 -03:00
Mauricio Colli
3887231c73 Fix popup position when draggable area is resized
A common case where this happens is when the soft input is visible.
2018-08-22 23:58:12 -03:00
Mauricio Colli
8a29cfbb7e Remove popup shutdown gesture in favor of the new close overlay 2018-08-22 23:58:12 -03:00
Mauricio Colli
a01d6eaf72 Don't make controls visible when moving popup 2018-08-22 23:58:12 -03:00
Mauricio Colli
69fc571b56 Add overlay to close popup 2018-08-22 23:57:57 -03:00
DPap
4cfd9c322b Translated using Weblate (Greek)
Currently translated at 96.6% (370 of 383 strings)
2018-08-22 22:38:46 +02:00
DPap
d2dce8801b Translated using Weblate (Greek)
Currently translated at 91.9% (352 of 383 strings)
2018-08-21 19:38:17 +02:00
DPap
5b8bb9f678 Translated using Weblate (Greek)
Currently translated at 79.6% (305 of 383 strings)
2018-08-20 16:38:19 +02:00
AB
2076f146cf Translated using Weblate (Ukrainian)
Currently translated at 100.0% (383 of 383 strings)
2018-08-18 22:43:37 +02:00
Haris Subandie Md. Suhaimin
5d4f2b7862 Translated using Weblate (Malay)
Currently translated at 7.8% (30 of 383 strings)
2018-08-15 21:43:39 +02:00
Igor Nedoboy
e3815e40d2 Translated using Weblate (Russian)
Currently translated at 100.0% (383 of 383 strings)
2018-08-15 21:43:35 +02:00
Ivan Dekovets
6dccfb4774 Translated using Weblate (Belarusian)
Currently translated at 100.0% (383 of 383 strings)
2018-08-15 13:57:25 +02:00
Haris Subandie Md. Suhaimin
1ccc1f4c1a Added translation using Weblate (Malay) 2018-08-15 13:57:23 +02:00
Ivan Dekovets
042809620a Translated using Weblate (Belarusian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-15 08:48:29 +02:00
Tobias Groza
cb4c8abd94 Translated using Weblate (Telugu)
Currently translated at 34.2% (131 of 383 strings)
2018-08-15 03:30:48 +02:00
Mauricio Colli
e86302f5b9 Added translation using Weblate (Belarusian) 2018-08-15 03:30:43 +02:00
AB
de080d5811 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (383 of 383 strings)
2018-08-14 16:36:58 +02:00
Ale-Ma
21b7045f93 Translated using Weblate (Italian)
Currently translated at 100.0% (383 of 383 strings)
2018-08-14 16:36:55 +02:00
Telugu Speaker
627301f83d Translated using Weblate (Telugu)
Currently translated at 34.2% (131 of 383 strings)
2018-08-14 03:44:47 +02:00
Mauricio Colli
607ca84fcc Merge pull request #1545 from MadderRagax/dev
Fixing #1543 - Removed incorrect explanations of the M4A and WebM audio formats
2018-08-12 23:53:00 -03:00
oscar
a7f36248d0 Removed incorrect explanations of the M4A and WebM audio formats 2018-08-12 23:46:21 -03:00
Mauricio Colli
d008d15167 Merge pull request #1560 from kapodamy/wifi-check-fix
Additional checks to obtain WiFi status
2018-08-12 23:27:00 -03:00
Mauricio Colli
607dc436bd Merge branch 'dev' into wifi-check-fix 2018-08-12 23:20:21 -03:00
Praveen0899
4384948f6c Translated using Weblate (Telugu)
Currently translated at 33.9% (130 of 383 strings)
2018-08-13 03:35:37 +02:00
rimasx
5e05e9ec93 Translated using Weblate (Estonian)
Currently translated at 99,7% (382 of 383 strings)
2018-08-12 22:08:40 +02:00
Igor Nedoboy
ac1fe66cf9 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-12 22:08:34 +02:00
Dharmendra
86732b6ae4 Translated using Weblate (Hindi)
Currently translated at 91.3% (350 of 383 strings)
2018-08-09 20:45:17 +02:00
AB
0713f55e9c Translated using Weblate (Ukrainian)
Currently translated at 100.0% (383 of 383 strings)
2018-08-09 20:45:08 +02:00
Igor Nedoboy
5c32d73409 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-08 13:38:05 +02:00
Igor Nedoboy
5e13a1735d Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-08 01:54:07 +02:00
Igor Nedoboy
6a1fbb00d9 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-08 00:04:07 +02:00
Nathan Follens
20c3badfac Translated using Weblate (Flemish)
Currently translated at 100,0% (383 of 383 strings)
2018-08-07 23:16:56 +02:00
Igor Nedoboy
7817cfe0c1 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-07 23:16:53 +02:00
Nathan Follens
9ed823b5a5 Translated using Weblate (Flemish)
Currently translated at 100,0% (383 of 383 strings)
2018-08-07 10:46:08 +02:00
Nathan Follens
c6a5dedf0a Translated using Weblate (Dutch)
Currently translated at 100,0% (383 of 383 strings)
2018-08-07 10:45:30 +02:00
Igor Nedoboy
01c9ab36b7 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-07 02:11:09 +02:00
Igor Nedoboy
27f5bdeef1 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-07 01:54:23 +02:00
Igor Nedoboy
723898f87d Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-07 00:24:15 +02:00
Igor Nedoboy
bc05cc1445 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-07 00:09:20 +02:00
Igor Nedoboy
dcf4e43e28 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-06 22:23:11 +02:00
Igor Nedoboy
3868c53908 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-06 21:59:23 +02:00
Igor Nedoboy
a71c693ca3 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-06 17:24:30 +02:00
Igor Nedoboy
691f93f01c Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-06 16:52:59 +02:00
Igor Nedoboy
4cff749186 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-06 14:23:44 +02:00
AB
e1ac1547fd Translated using Weblate (Ukrainian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-06 11:58:58 +02:00
Igor Nedoboy
e53bd505fb Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-06 11:58:55 +02:00
mesnevi
cfa926542e Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-06 11:58:53 +02:00
Igor Nedoboy
79097eca47 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-05 22:52:07 +02:00
Igor Nedoboy
d1741e40e3 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-05 20:20:01 +02:00
Igor Nedoboy
5d0528d195 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-05 15:32:32 +02:00
Igor Nedoboy
a9ea06f753 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-05 13:30:04 +02:00
Igor Nedoboy
62e121c12c Translated using Weblate (Ukrainian)
Currently translated at 99,7% (382 of 383 strings)
2018-08-05 12:41:09 +02:00
Igor Nedoboy
02ef05160f Translated using Weblate (Turkish)
Currently translated at 99,7% (382 of 383 strings)
2018-08-05 12:41:09 +02:00
Igor Nedoboy
6e66c013c0 Translated using Weblate (Swedish)
Currently translated at 99,7% (382 of 383 strings)
2018-08-05 12:41:08 +02:00
Igor Nedoboy
dcb11f01e1 Translated using Weblate (Spanish)
Currently translated at 99,7% (382 of 383 strings)
2018-08-05 12:41:08 +02:00
Igor Nedoboy
8a0e4b577c Translated using Weblate (Slovak)
Currently translated at 93,7% (359 of 383 strings)
2018-08-05 12:41:07 +02:00
Igor Nedoboy
b57f420261 Translated using Weblate (Portuguese (Brazil))
Currently translated at 99,7% (382 of 383 strings)
2018-08-05 12:41:06 +02:00
Igor Nedoboy
7d1790abe3 Translated using Weblate (Polish)
Currently translated at 96,3% (369 of 383 strings)
2018-08-05 12:41:06 +02:00
Igor Nedoboy
1fc494571b Translated using Weblate (Norwegian Bokmål)
Currently translated at 98,6% (378 of 383 strings)
2018-08-05 12:41:05 +02:00
Igor Nedoboy
e6d97bc773 Translated using Weblate (Macedonian)
Currently translated at 96,3% (369 of 383 strings)
2018-08-05 12:41:05 +02:00
Igor Nedoboy
0e53323fb7 Translated using Weblate (Italian)
Currently translated at 98,6% (378 of 383 strings)
2018-08-05 12:41:04 +02:00
Igor Nedoboy
eb4764d2b2 Translated using Weblate (German)
Currently translated at 99,7% (382 of 383 strings)
2018-08-05 12:41:04 +02:00
Igor Nedoboy
298a91adbf Translated using Weblate (French)
Currently translated at 98,1% (376 of 383 strings)
2018-08-05 12:41:03 +02:00
Igor Nedoboy
2cb9912039 Translated using Weblate (Flemish)
Currently translated at 98,6% (378 of 383 strings)
2018-08-05 12:41:03 +02:00
Igor Nedoboy
e52bfe4335 Translated using Weblate (Estonian)
Currently translated at 91,6% (351 of 383 strings)
2018-08-05 12:41:02 +02:00
Igor Nedoboy
761a249e05 Translated using Weblate (Dutch)
Currently translated at 99,7% (382 of 383 strings)
2018-08-05 12:41:02 +02:00
Igor Nedoboy
c42df3a0c2 Translated using Weblate (Czech)
Currently translated at 93,9% (360 of 383 strings)
2018-08-05 12:41:01 +02:00
Igor Nedoboy
3d359b7a98 Translated using Weblate (Chinese (Traditional))
Currently translated at 99,7% (382 of 383 strings)
2018-08-05 12:41:01 +02:00
Igor Nedoboy
deef6417ad Translated using Weblate (Chinese (Simplified))
Currently translated at 97,1% (372 of 383 strings)
2018-08-05 12:41:00 +02:00
Igor Nedoboy
f55a8deb97 Translated using Weblate (Catalan)
Currently translated at 99,7% (382 of 383 strings)
2018-08-05 12:40:58 +02:00
Igor Nedoboy
333506e00b Translated using Weblate (Bulgarian)
Currently translated at 98,4% (377 of 383 strings)
2018-08-05 12:40:58 +02:00
Igor Nedoboy
bbc1642b90 Translated using Weblate (Basque)
Currently translated at 99,7% (382 of 383 strings)
2018-08-05 12:40:57 +02:00
Igor Nedoboy
8209eda27a Translated using Weblate (Arabic)
Currently translated at 99,7% (382 of 383 strings)
2018-08-05 12:40:56 +02:00
Igor Nedoboy
b13f7a599b Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-05 12:40:54 +02:00
Igor Nedoboy
cb0f700be1 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-05 12:16:07 +02:00
Igor Nedoboy
7b6d6b466a Translated using Weblate (English)
Currently translated at 99,7% (382 of 383 strings)
2018-08-05 12:13:00 +02:00
Igor Nedoboy
76f97e5c2e Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-05 12:12:59 +02:00
Igor Nedoboy
4669a1ab57 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-04 23:46:04 +02:00
mesnevi
b1ad0edbe1 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-04 23:46:03 +02:00
Igor Nedoboy
51a695d047 Translated using Weblate (Slovak)
Currently translated at 93.7% (359 of 383 strings)
2018-08-04 20:36:34 +02:00
Igor Nedoboy
396e2d14f3 Translated using Weblate (Polish)
Currently translated at 96.3% (369 of 383 strings)
2018-08-04 20:36:34 +02:00
Igor Nedoboy
245479c339 Translated using Weblate (Norwegian Bokmål)
Currently translated at 99.7% (382 of 383 strings)
2018-08-04 20:36:33 +02:00
Igor Nedoboy
092215f47a Translated using Weblate (Macedonian)
Currently translated at 96.3% (369 of 383 strings)
2018-08-04 20:36:32 +02:00
Igor Nedoboy
fcb46db718 Translated using Weblate (Italian)
Currently translated at 98.6% (378 of 383 strings)
2018-08-04 20:36:32 +02:00
Igor Nedoboy
60c58c8b9c Translated using Weblate (Indonesian)
Currently translated at 93.7% (359 of 383 strings)
2018-08-04 20:36:31 +02:00
Igor Nedoboy
124a2839b5 Translated using Weblate (French)
Currently translated at 98.4% (377 of 383 strings)
2018-08-04 20:36:31 +02:00
Igor Nedoboy
ededfe10ab Translated using Weblate (Flemish)
Currently translated at 98.6% (378 of 383 strings)
2018-08-04 20:36:30 +02:00
Igor Nedoboy
81895c20d6 Translated using Weblate (English)
Currently translated at 99.7% (382 of 383 strings)
2018-08-04 20:36:30 +02:00
Igor Nedoboy
46fabe065c Translated using Weblate (Czech)
Currently translated at 93.9% (360 of 383 strings)
2018-08-04 20:36:29 +02:00
Igor Nedoboy
7ac338756a Translated using Weblate (Chinese (Simplified))
Currently translated at 97.1% (372 of 383 strings)
2018-08-04 20:36:28 +02:00
Igor Nedoboy
640b8edd78 Translated using Weblate (Bulgarian)
Currently translated at 98.6% (378 of 383 strings)
2018-08-04 20:36:28 +02:00
Igor Nedoboy
c5d98752fa Translated using Weblate (Esperanto)
Currently translated at 25.0% (96 of 383 strings)
2018-08-04 20:36:25 +02:00
MadderRagax
a6a5bef447 Update translation via weblate
Translated using Weblate (Swedish)

Currently translated at 100.0% (383 of 383 strings)

Translated using Weblate (Chinese (Mandarin))

Currently translated at 27.4% (105 of 383 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 97.1% (372 of 383 strings)

Translated using Weblate (German)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Arabic)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Basque)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Dutch)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Spanish)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Catalan)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Chinese (Traditional))

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (German)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Turkish)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Ukrainian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Swedish)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (French)

Currently translated at 97,1% (372 of 383 strings)

Translated using Weblate (French)

Currently translated at 97,1% (372 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Arabic)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Basque)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Dutch)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Spanish)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Catalan)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Chinese (Traditional))

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (German)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Ukrainian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Swedish)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Turkish)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Estonian)

Currently translated at 91.6% (351 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)

Translated using Weblate (Russian)

Currently translated at 100,0% (383 of 383 strings)
2018-08-04 17:58:57 +02:00
Igor Nedoboy
042885c155 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-04 16:17:24 +02:00
Igor Nedoboy
cbb9dcf7d0 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-04 14:43:27 +02:00
Igor Nedoboy
9b080800e1 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-04 14:23:07 +02:00
Igor Nedoboy
6effbf50a8 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-04 14:10:52 +02:00
Igor Nedoboy
398f9aa19a Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-04 13:53:37 +02:00
Igor Nedoboy
935d89747f Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-04 13:41:41 +02:00
Igor Nedoboy
21c2fbfd39 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-04 12:54:43 +02:00
Igor Nedoboy
bd337f3aac Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-04 12:30:54 +02:00
Igor Nedoboy
4a673eee81 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-04 12:10:15 +02:00
Igor Nedoboy
cebf349f9a Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-04 11:58:15 +02:00
Igor Nedoboy
3683deb51c Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-04 11:35:35 +02:00
Igor Nedoboy
99ee076db9 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-04 11:13:01 +02:00
Igor Nedoboy
04f759041f Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-04 10:52:31 +02:00
Igor Nedoboy
75f89059e7 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-04 10:51:04 +02:00
Igor Nedoboy
a81f31156d Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-04 02:51:46 +02:00
Igor Nedoboy
f706452e67 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 23:19:08 +02:00
Igor Nedoboy
b0126afbcf Translated using Weblate (Estonian)
Currently translated at 91.6% (351 of 383 strings)
2018-08-03 23:18:13 +02:00
Igor Nedoboy
5b8393ff89 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 21:51:52 +02:00
Igor Nedoboy
d2235da06a Translated using Weblate (Turkish)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 21:49:53 +02:00
Igor Nedoboy
a87f6a0791 Translated using Weblate (Swedish)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 21:46:13 +02:00
Igor Nedoboy
7e7cfb79a4 Translated using Weblate (Ukrainian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 21:45:49 +02:00
Igor Nedoboy
fb43a5265c Translated using Weblate (German)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 21:44:09 +02:00
Igor Nedoboy
439a814133 Translated using Weblate (Chinese (Traditional))
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 21:42:37 +02:00
Igor Nedoboy
d9dfcc04bf Translated using Weblate (Catalan)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 21:42:13 +02:00
Igor Nedoboy
0cfac137b7 Translated using Weblate (Spanish)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 21:41:16 +02:00
Igor Nedoboy
4575ee805a Translated using Weblate (Dutch)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 21:40:02 +02:00
Igor Nedoboy
67f70ce2cc Translated using Weblate (Basque)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 21:39:06 +02:00
Igor Nedoboy
2f641ffb13 Translated using Weblate (Arabic)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 21:38:43 +02:00
Igor Nedoboy
50f92269c2 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 21:37:23 +02:00
Igor Nedoboy
f220f397ae Translated using Weblate (French)
Currently translated at 97,1% (372 of 383 strings)
2018-08-03 19:32:56 +02:00
PiR
cdb4096124 Translated using Weblate (French)
Currently translated at 97,1% (372 of 383 strings)
2018-08-03 19:32:51 +02:00
Igor Nedoboy
01938af65b Translated using Weblate (Swedish)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 19:32:12 +02:00
Igor Nedoboy
47a1fca32f Translated using Weblate (Ukrainian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 19:31:23 +02:00
Igor Nedoboy
321342cf6d Translated using Weblate (Portuguese (Brazil))
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 19:30:30 +02:00
Igor Nedoboy
086e9beb59 Translated using Weblate (Turkish)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 19:29:40 +02:00
Igor Nedoboy
3519d4b219 Translated using Weblate (German)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 19:27:39 +02:00
Igor Nedoboy
9034b9a9ae Translated using Weblate (Chinese (Traditional))
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 19:26:01 +02:00
Igor Nedoboy
90ba8440a0 Translated using Weblate (Catalan)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 19:24:45 +02:00
Igor Nedoboy
4988b37d6f Translated using Weblate (Spanish)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 19:23:04 +02:00
Igor Nedoboy
ad4799ee60 Translated using Weblate (Dutch)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 19:22:17 +02:00
Igor Nedoboy
35229f8ae5 Translated using Weblate (Basque)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 19:19:46 +02:00
Igor Nedoboy
7a011d9e75 Translated using Weblate (Arabic)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 19:18:48 +02:00
Igor Nedoboy
3d86835979 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 14:06:07 +02:00
Igor Nedoboy
4073306538 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 14:04:42 +02:00
Igor Nedoboy
b86aa28d6a Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 14:03:46 +02:00
Igor Nedoboy
d43cee29f2 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 14:03:05 +02:00
Igor Nedoboy
acad468b4a Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 14:02:07 +02:00
Igor Nedoboy
4cbe842cfa Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 14:01:13 +02:00
Igor Nedoboy
d93e227190 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 13:59:48 +02:00
Igor Nedoboy
a9cf424998 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-08-03 13:10:41 +02:00
ssantos
6d8fdf46d5 Translated using Weblate (German)
Currently translated at 100,0% (383 of 383 strings)
2018-08-02 22:53:59 +02:00
Hosted Weblate
781f98ef91 Merge branch 'origin/dev' into Weblate 2018-08-02 12:43:38 +02:00
YeeVonAngg
1313f685da Translated using Weblate (Chinese (Simplified))
Currently translated at 97.1% (372 of 383 strings)
2018-08-02 12:43:38 +02:00
YeeVonAngg
4779a993d3 Translated using Weblate (Chinese (Mandarin))
Currently translated at 27.4% (105 of 383 strings)
2018-08-02 12:43:37 +02:00
MadderRagax
342b2ae5dc Translated using Weblate (Swedish)
Currently translated at 100.0% (383 of 383 strings)
2018-08-02 12:43:28 +02:00
Christian Schabesberger
ce8ae40206 Merge pull request #1573 from cpba/patch-1
Fix typo in v0.13.7 changelog
2018-08-02 10:20:15 +02:00
Maxime Burlandy
d0704f621f Translated using Weblate (French)
Currently translated at 97.1% (372 of 383 strings)
2018-08-02 09:38:18 +02:00
D D
c6da4043ed Translated using Weblate (Bulgarian)
Currently translated at 98.4% (377 of 383 strings)
2018-08-02 08:34:57 +02:00
Carles Pastor Badosa
1aa3761d1a Fix typo in v0.13.7 changelog 2018-08-02 03:22:26 +02:00
Víctor Manuel Tapia Ramírez
ff769caf82 Translated using Weblate (Spanish)
Currently translated at 100,0% (383 of 383 strings)
2018-08-01 03:25:41 +02:00
MadderRagax
be6bc68b56 Translated using Weblate (Swedish)
Currently translated at 100.0% (383 of 383 strings)
2018-08-01 00:47:30 +02:00
Dual Natan
feb3d11f63 Translated using Weblate (Swedish)
Currently translated at 100.0% (383 of 383 strings)
2018-08-01 00:47:18 +02:00
Igor Nedoboy
d2f9b063b2 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-07-30 22:19:48 +02:00
Emin Tufan Çetin
315089c361 Translated using Weblate (Turkish)
Currently translated at 100.0% (383 of 383 strings)
2018-07-30 17:43:06 +02:00
Igor Nedoboy
e95df0dbd5 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-07-30 08:05:57 +02:00
Igor Nedoboy
8fed029ee3 Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-07-30 06:06:16 +02:00
Igor Nedoboy
522daf5aff Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-07-30 05:56:58 +02:00
Igor Nedoboy
e948eebe84 Translated using Weblate (Russian)
Currently translated at 99,4% (381 of 383 strings)
2018-07-30 05:31:23 +02:00
Igor Nedoboy
783d4e7e8a Translated using Weblate (Russian)
Currently translated at 100,0% (383 of 383 strings)
2018-07-30 05:13:13 +02:00
Eduardo Caron
1ce2198621 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (383 of 383 strings)
2018-07-30 02:43:29 +02:00
Freddy Morán Jr
f521def4a5 Translated using Weblate (Spanish)
Currently translated at 99.4% (381 of 383 strings)
2018-07-29 21:43:48 +02:00
Eduardo Caron
75202921a1 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (383 of 383 strings)
2018-07-29 02:12:45 +02:00
kapodamy
4ef8b93344 patch for ListHelper.java
double check for null
2018-07-28 12:07:10 -03:00
Andrey mm
881b191b8d Translated using Weblate (Russian)
Currently translated at 100.0% (383 of 383 strings)
2018-07-26 12:41:57 +02:00
mesnevi
b39e071d1e Translated using Weblate (Russian)
Currently translated at 100.0% (383 of 383 strings)
2018-07-26 12:41:52 +02:00
mesnevi
84cb3a1060 Translated using Weblate (Russian)
Currently translated at 100.0% (383 of 383 strings)
2018-07-25 12:19:47 +02:00
AB
f4ea3980c2 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (383 of 383 strings)
2018-07-25 10:43:30 +02:00
Hosted Weblate
ef73720a5e Merge branch 'origin/dev' into Weblate 2018-07-24 04:51:05 +02:00
Rex_sa
d8cdc57702 Translated using Weblate (Arabic)
Currently translated at 100,0% (383 of 383 strings)
2018-07-24 04:51:02 +02:00
148 changed files with 4668 additions and 1481 deletions

View File

@@ -8,8 +8,8 @@ android {
applicationId "org.schabi.newpipe"
minSdkVersion 15
targetSdkVersion 27
versionCode 66
versionName "0.13.7"
versionCode 67
versionName "0.14.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
@@ -49,12 +49,13 @@ ext {
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:1eff8c5708'
implementation 'com.github.TeamNewPipe:NewPipeExtractor:850670917fce'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.8.9'
@@ -93,6 +94,9 @@ dependencies {
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryLibVersion"
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryLibVersion"
implementation "com.squareup.okhttp3:okhttp:$okHttpLibVersion"
debugImplementation "com.facebook.stetho:stetho-okhttp3:$stethoLibVersion"
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:cardview-v7:27.1.1'
}

View File

@@ -76,10 +76,6 @@
android:name=".about.AboutActivity"
android:label="@string/title_activity_about"/>
<activity
android:name=".history.HistoryActivity"
android:label="@string/title_activity_history"/>
<service android:name=".local.subscription.services.SubscriptionsImportService"/>
<service android:name=".local.subscription.services.SubscriptionsExportService"/>
@@ -122,6 +118,7 @@
<activity
android:name=".ReCaptchaActivity"
android:label="@string/reCaptchaActivity"/>
<activity android:name=".download.ExtSDDownloadFailedActivity" />
<provider
android:name="android.support.v4.content.FileProvider"

View File

@@ -4,6 +4,7 @@ import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
@@ -11,7 +12,10 @@ import android.view.View;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.squareup.leakcanary.RefWatcher;
import org.schabi.newpipe.report.UserAction;
import icepick.Icepick;
import icepick.State;
public abstract class BaseFragment extends Fragment {
protected final String TAG = getClass().getSimpleName() + "@" + Integer.toHexString(hashCode());
@@ -20,6 +24,15 @@ public abstract class BaseFragment extends Fragment {
protected AppCompatActivity activity;
public static final ImageLoader imageLoader = ImageLoader.getInstance();
//These values are used for controlling framgents when they are part of the frontpage
@State
protected boolean useAsFrontPage = false;
protected boolean mIsVisibleToUser = false;
public void useAsFrontPage(boolean value) {
useAsFrontPage = value;
}
/*//////////////////////////////////////////////////////////////////////////
// Fragment's Lifecycle
//////////////////////////////////////////////////////////////////////////*/
@@ -72,6 +85,12 @@ public abstract class BaseFragment extends Fragment {
if (refWatcher != null) refWatcher.watch(this);
}
@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
mIsVisibleToUser = isVisibleToUser;
}
/*//////////////////////////////////////////////////////////////////////////
// Init
//////////////////////////////////////////////////////////////////////////*/
@@ -88,8 +107,15 @@ public abstract class BaseFragment extends Fragment {
public void setTitle(String title) {
if (DEBUG) Log.d(TAG, "setTitle() called with: title = [" + title + "]");
if (activity != null && activity.getSupportActionBar() != null) {
if((!useAsFrontPage || mIsVisibleToUser)
&& (activity != null && activity.getSupportActionBar() != null)) {
activity.getSupportActionBar().setTitle(title);
}
}
protected FragmentManager getFM() {
return getParentFragment() == null
? getFragmentManager()
: getParentFragment().getFragmentManager();
}
}

File diff suppressed because it is too large Load Diff

View File

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

View File

@@ -51,9 +51,6 @@ public abstract class BaseStateFragment<I> extends BaseFragment implements ViewC
protected Button errorButtonRetry;
protected TextView errorTextView;
@State
protected boolean useAsFrontPage = false;
@Override
public void onViewCreated(View rootView, Bundle savedInstanceState) {
super.onViewCreated(rootView, savedInstanceState);
@@ -66,9 +63,6 @@ public abstract class BaseStateFragment<I> extends BaseFragment implements ViewC
wasLoading.set(isLoading.get());
}
public void useAsFrontPage(boolean value) {
useAsFrontPage = value;
}
/*//////////////////////////////////////////////////////////////////////////
// Init
@@ -93,12 +87,7 @@ public abstract class BaseStateFragment<I> extends BaseFragment implements ViewC
RxView.clicks(errorButtonRetry)
.debounce(300, TimeUnit.MILLISECONDS)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<Object>() {
@Override
public void accept(Object o) throws Exception {
onRetryButtonClicked();
}
});
.subscribe(o -> onRetryButtonClicked());
}
protected void onRetryButtonClicked() {

View File

@@ -14,24 +14,16 @@ public class BlankFragment extends BaseFragment {
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
if(activity != null && activity.getSupportActionBar() != null) {
activity.getSupportActionBar()
.setTitle("NewPipe");
}
setTitle("NewPipe");
return inflater.inflate(R.layout.fragment_blank, container, false);
}
@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
if(isVisibleToUser) {
if(activity != null && activity.getSupportActionBar() != null) {
activity.getSupportActionBar()
.setTitle("NewPipe");
}
// leave this inline. Will make it harder for copy cats.
// If you are a Copy cat FUCK YOU.
// I WILL FIND YOU, AND I WILL ...
}
setTitle("NewPipe");
// leave this inline. Will make it harder for copy cats.
// If you are a Copy cat FUCK YOU.
// I WILL FIND YOU, AND I WILL ...
}
}

View File

@@ -1227,10 +1227,10 @@ public class VideoDetailFragment
spinnerToolbar.setVisibility(View.GONE);
break;
default:
if(info.getAudioStreams().isEmpty()) detailControlsBackground.setVisibility(View.GONE);
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);

View File

@@ -156,9 +156,7 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implem
public void selected(ChannelInfoItem selectedItem) {
try {
onItemSelected(selectedItem);
NavigationHelper.openChannelFragment(useAsFrontPage ?
getParentFragment().getFragmentManager()
: getFragmentManager(),
NavigationHelper.openChannelFragment(getFM(),
selectedItem.getServiceId(),
selectedItem.getUrl(),
selectedItem.getName());
@@ -173,10 +171,7 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implem
public void selected(PlaylistInfoItem selectedItem) {
try {
onItemSelected(selectedItem);
NavigationHelper.openPlaylistFragment(
useAsFrontPage
? getParentFragment().getFragmentManager()
: getFragmentManager(),
NavigationHelper.openPlaylistFragment(getFM(),
selectedItem.getServiceId(),
selectedItem.getUrl(),
selectedItem.getName());
@@ -197,9 +192,7 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implem
private void onStreamSelected(StreamInfoItem selectedItem) {
onItemSelected(selectedItem);
NavigationHelper.openVideoDetailFragment(useAsFrontPage
? getParentFragment().getFragmentManager()
: getFragmentManager(),
NavigationHelper.openVideoDetailFragment(getFM(),
selectedItem.getServiceId(), selectedItem.getUrl(), selectedItem.getName());
}

View File

@@ -57,6 +57,7 @@ public class KioskFragment extends BaseListInfoFragment<KioskInfo> {
protected String kioskId = "";
protected String kioskTranslatedName;
/*//////////////////////////////////////////////////////////////////////////
// Views
//////////////////////////////////////////////////////////////////////////*/
@@ -167,7 +168,9 @@ public class KioskFragment extends BaseListInfoFragment<KioskInfo> {
super.handleResult(result);
name = kioskTranslatedName;
setTitle(kioskTranslatedName);
if(!useAsFrontPage) {
setTitle(kioskTranslatedName);
}
if (!result.getErrors().isEmpty()) {
showSnackBarError(result.getErrors(),

View File

@@ -365,7 +365,7 @@ public class SearchFragment
int itemId = 0;
boolean isFirstItem = true;
final Context c = getContext();
for(String filter : service.getSearchQIHFactory().getAvailableContentFilter()) {
for(String filter : service.getSearchQHFactory().getAvailableContentFilter()) {
menuItemToFilterName.put(itemId, filter);
MenuItem item = menu.add(1,
itemId++,
@@ -575,8 +575,7 @@ public class SearchFragment
.onNext(searchEditText.getText().toString()),
throwable -> showSnackBarError(throwable,
UserAction.DELETE_FROM_HISTORY, "none",
"Deleting item failed", R.string.general_error)
);
"Deleting item failed", R.string.general_error));
disposables.add(onDelete);
})
.show();
@@ -837,7 +836,10 @@ public class SearchFragment
@Override
public void handleResult(@NonNull SearchInfo result) {
if (!result.getErrors().isEmpty()) {
final List<Throwable> exceptions = result.getErrors();
if (!exceptions.isEmpty()
&& !(exceptions.size() == 1
&& exceptions.get(0) instanceof SearchExtractor.NothingFoundException)){
showSnackBarError(result.getErrors(), UserAction.SEARCHED,
NewPipe.getNameOfService(serviceId), searchString, 0);
}
@@ -864,6 +866,7 @@ public class SearchFragment
showListFooter(false);
currentPageUrl = result.getNextPageUrl();
infoListAdapter.addInfoItemList(result.getItems());
nextPageUrl = result.getNextPageUrl();
if (!result.getErrors().isEmpty()) {
showSnackBarError(result.getErrors(), UserAction.SEARCHED,

View File

@@ -6,7 +6,6 @@ import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentManager;
import android.support.v7.app.AppCompatActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -20,11 +19,9 @@ import org.schabi.newpipe.database.LocalItem;
import org.schabi.newpipe.database.playlist.PlaylistLocalItem;
import org.schabi.newpipe.database.playlist.PlaylistMetadataEntry;
import org.schabi.newpipe.database.playlist.model.PlaylistRemoteEntity;
import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.local.BaseLocalListFragment;
import org.schabi.newpipe.local.playlist.LocalPlaylistManager;
import org.schabi.newpipe.local.playlist.RemotePlaylistManager;
import org.schabi.newpipe.report.ErrorActivity;
import org.schabi.newpipe.report.UserAction;
import org.schabi.newpipe.util.NavigationHelper;
import org.schabi.newpipe.util.OnClickGesture;
@@ -69,11 +66,10 @@ public final class BookmarkFragment
public View onCreateView(@NonNull LayoutInflater inflater,
@Nullable ViewGroup container,
Bundle savedInstanceState) {
if (activity != null && activity.getSupportActionBar() != null) {
activity.getSupportActionBar().setDisplayShowTitleEnabled(true);
activity.setTitle(R.string.tab_subscriptions);
}
if(!useAsFrontPage) {
setTitle(activity.getString(R.string.tab_bookmarks));
}
return inflater.inflate(R.layout.fragment_bookmarks, container, false);
}
@@ -102,26 +98,20 @@ public final class BookmarkFragment
itemListAdapter.setSelectedListener(new OnClickGesture<LocalItem>() {
@Override
public void selected(LocalItem selectedItem) {
try {
// Requires the parent fragment to find holder for fragment replacement
if (getParentFragment() == null) return;
final FragmentManager fragmentManager = getParentFragment().getFragmentManager();
final FragmentManager fragmentManager = getFM();
if (selectedItem instanceof PlaylistMetadataEntry) {
final PlaylistMetadataEntry entry = ((PlaylistMetadataEntry) selectedItem);
NavigationHelper.openLocalPlaylistFragment(fragmentManager, entry.uid,
entry.name);
if (selectedItem instanceof PlaylistMetadataEntry) {
final PlaylistMetadataEntry entry = ((PlaylistMetadataEntry) selectedItem);
NavigationHelper.openLocalPlaylistFragment(fragmentManager, entry.uid,
entry.name);
} else if (selectedItem instanceof PlaylistRemoteEntity) {
final PlaylistRemoteEntity entry = ((PlaylistRemoteEntity) selectedItem);
NavigationHelper.openPlaylistFragment(
fragmentManager,
entry.getServiceId(),
entry.getUrl(),
entry.getName());
}
} catch (Exception e) {
ErrorActivity.reportUiError((AppCompatActivity) getActivity(), e);
} else if (selectedItem instanceof PlaylistRemoteEntity) {
final PlaylistRemoteEntity entry = ((PlaylistRemoteEntity) selectedItem);
NavigationHelper.openPlaylistFragment(
fragmentManager,
entry.getServiceId(),
entry.getUrl(),
entry.getName());
}
}

View File

@@ -71,6 +71,10 @@ public class FeedFragment extends BaseListFragment<List<SubscriptionEntity>, Voi
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
if(!useAsFrontPage) {
setTitle(activity.getString(R.string.fragment_whats_new));
}
return inflater.inflate(R.layout.fragment_feed, container, false);
}
@@ -105,20 +109,19 @@ public class FeedFragment extends BaseListFragment<List<SubscriptionEntity>, Voi
super.onDestroyView();
}
/*@Override
protected RecyclerView.LayoutManager getListLayoutManager() {
boolean isPortrait = getResources().getDisplayMetrics().heightPixels > getResources().getDisplayMetrics().widthPixels;
return new GridLayoutManager(activity, isPortrait ? 1 : 2);
}*/
@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
if (activity != null && isVisibleToUser) {
setTitle(activity.getString(R.string.fragment_whats_new));
}
}
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);
ActionBar supportActionBar = activity.getSupportActionBar();
if (supportActionBar != null) {
supportActionBar.setTitle(R.string.fragment_whats_new);
}
if(useAsFrontPage) {
supportActionBar.setDisplayShowTitleEnabled(true);
@@ -176,19 +179,9 @@ public class FeedFragment extends BaseListFragment<List<SubscriptionEntity>, Voi
showLoading();
showListFooter(true);
subscriptionObserver = subscriptionService.getSubscription()
.onErrorReturnItem(Collections.<SubscriptionEntity>emptyList())
.onErrorReturnItem(Collections.emptyList())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<List<SubscriptionEntity>>() {
@Override
public void accept(List<SubscriptionEntity> subscriptionEntities) throws Exception {
handleResult(subscriptionEntities);
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
onError(throwable);
}
});
.subscribe(this::handleResult, this::onError);
}
@Override
@@ -239,13 +232,12 @@ public class FeedFragment extends BaseListFragment<List<SubscriptionEntity>, Voi
if (!itemsLoaded.contains(subscriptionEntity.getServiceId() + subscriptionEntity.getUrl())) {
subscriptionService.getChannelInfo(subscriptionEntity)
.observeOn(AndroidSchedulers.mainThread())
.onErrorComplete(new Predicate<Throwable>() {
@Override
public boolean test(@io.reactivex.annotations.NonNull Throwable throwable) throws Exception {
return FeedFragment.super.onError(throwable);
}
})
.subscribe(getChannelInfoObserver(subscriptionEntity.getServiceId(), subscriptionEntity.getUrl()));
.onErrorComplete(
(@io.reactivex.annotations.NonNull Throwable throwable) ->
FeedFragment.super.onError(throwable))
.subscribe(
getChannelInfoObserver(subscriptionEntity.getServiceId(),
subscriptionEntity.getUrl()));
} else {
requestFeed(1);
}
@@ -316,7 +308,10 @@ public class FeedFragment extends BaseListFragment<List<SubscriptionEntity>, Voi
@Override
public void onError(Throwable exception) {
showSnackBarError(exception, UserAction.SUBSCRIPTION, NewPipe.getNameOfService(serviceId), url, 0);
showSnackBarError(exception,
UserAction.SUBSCRIPTION,
NewPipe.getNameOfService(serviceId),
url, 0);
requestFeed(1);
onDone();
}
@@ -361,12 +356,7 @@ public class FeedFragment extends BaseListFragment<List<SubscriptionEntity>, Voi
delayHandler.removeCallbacksAndMessages(null);
// Add a little of a delay when requesting more items because the cache is so fast,
// that the view seems stuck to the user when he scroll to the bottom
delayHandler.postDelayed(new Runnable() {
@Override
public void run() {
requestFeed(FEED_LOAD_COUNT);
}
}, 300);
delayHandler.postDelayed(() -> requestFeed(FEED_LOAD_COUNT), 300);
}
@Override
@@ -423,7 +413,9 @@ public class FeedFragment extends BaseListFragment<List<SubscriptionEntity>, Voi
int heightPixels = getResources().getDisplayMetrics().heightPixels;
int itemHeightPixels = activity.getResources().getDimensionPixelSize(R.dimen.video_item_search_height);
int items = itemHeightPixels > 0 ? heightPixels / itemHeightPixels + OFF_SCREEN_ITEMS_COUNT : MIN_ITEMS_INITIAL_LOAD;
int items = itemHeightPixels > 0
? heightPixels / itemHeightPixels + OFF_SCREEN_ITEMS_COUNT
: MIN_ITEMS_INITIAL_LOAD;
return Math.max(MIN_ITEMS_INITIAL_LOAD, items);
}
@@ -441,8 +433,14 @@ public class FeedFragment extends BaseListFragment<List<SubscriptionEntity>, Voi
protected boolean onError(Throwable exception) {
if (super.onError(exception)) return true;
int errorId = exception instanceof ExtractionException ? R.string.parsing_error : R.string.general_error;
onUnrecoverableError(exception, UserAction.SOMETHING_ELSE, "none", "Requesting feed", errorId);
int errorId = exception instanceof ExtractionException
? R.string.parsing_error
: R.string.general_error;
onUnrecoverableError(exception,
UserAction.SOMETHING_ELSE,
"none",
"Requesting feed",
errorId);
return true;
}
}

View File

@@ -21,6 +21,7 @@ import org.schabi.newpipe.R;
import org.schabi.newpipe.database.LocalItem;
import org.schabi.newpipe.database.stream.StreamStatisticsEntry;
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import org.schabi.newpipe.fragments.list.BaseListFragment;
import org.schabi.newpipe.local.BaseLocalListFragment;
import org.schabi.newpipe.info_list.InfoItemDialog;
import org.schabi.newpipe.player.playqueue.PlayQueue;
@@ -73,7 +74,7 @@ public class StatisticsPlaylistFragment
return results;
case MOST_PLAYED:
Collections.sort(results, (left, right) ->
((Long) right.watchCount).compareTo(left.watchCount));
Long.compare(right.watchCount, left.watchCount));
return results;
default: return null;
}
@@ -96,6 +97,14 @@ public class StatisticsPlaylistFragment
return inflater.inflate(R.layout.fragment_playlist, container, false);
}
@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
if (activity != null && isVisibleToUser) {
setTitle(activity.getString(R.string.title_activity_history));
}
}
///////////////////////////////////////////////////////////////////////////
// Fragment LifeCycle - Views
///////////////////////////////////////////////////////////////////////////
@@ -103,7 +112,9 @@ public class StatisticsPlaylistFragment
@Override
protected void initViews(View rootView, Bundle savedInstanceState) {
super.initViews(rootView, savedInstanceState);
setTitle(getString(R.string.title_last_played));
if(!useAsFrontPage) {
setTitle(getString(R.string.title_last_played));
}
}
@Override
@@ -129,8 +140,10 @@ public class StatisticsPlaylistFragment
public void selected(LocalItem selectedItem) {
if (selectedItem instanceof StreamStatisticsEntry) {
final StreamStatisticsEntry item = (StreamStatisticsEntry) selectedItem;
NavigationHelper.openVideoDetailFragment(getFragmentManager(),
item.serviceId, item.url, item.title);
NavigationHelper.openVideoDetailFragment(getFM(),
item.serviceId,
item.url,
item.title);
}
}
@@ -341,7 +354,7 @@ public class StatisticsPlaylistFragment
final Disposable onDelete = recordManager.deleteStreamHistory(entry.streamId)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(
howManyDelted -> {
howManyDeleted -> {
if(getView() != null) {
Snackbar.make(getView(), R.string.one_item_deleted,
Snackbar.LENGTH_SHORT).show();

View File

@@ -13,6 +13,7 @@ import android.os.Parcelable;
import android.support.annotation.DrawableRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentManager;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
@@ -209,7 +210,8 @@ public class SubscriptionFragment extends BaseStateFragment<List<SubscriptionEnt
}
private void setupImportFromItems(final ViewGroup listHolder) {
final View previousBackupItem = addItemView(getString(R.string.previous_export), ThemeHelper.resolveResourceIdFromAttr(getContext(), R.attr.ic_backup), listHolder);
final View previousBackupItem = addItemView(getString(R.string.previous_export),
ThemeHelper.resolveResourceIdFromAttr(getContext(), R.attr.ic_backup), listHolder);
previousBackupItem.setOnClickListener(item -> onImportPreviousSelected());
final int iconColor = ThemeHelper.isLightThemeSelected(getContext()) ? Color.BLACK : Color.WHITE;
@@ -241,8 +243,8 @@ public class SubscriptionFragment extends BaseStateFragment<List<SubscriptionEnt
}
private void onImportFromServiceSelected(int serviceId) {
if (getParentFragment() == null) return;
NavigationHelper.openSubscriptionsImportFragment(getParentFragment().getFragmentManager(), serviceId);
FragmentManager fragmentManager = getFM();
NavigationHelper.openSubscriptionsImportFragment(fragmentManager, serviceId);
}
private void onImportPreviousSelected() {
@@ -320,21 +322,19 @@ public class SubscriptionFragment extends BaseStateFragment<List<SubscriptionEnt
infoListAdapter.setOnChannelSelectedListener(new OnClickGesture<ChannelInfoItem>() {
@Override
public void selected(ChannelInfoItem selectedItem) {
try {
// Requires the parent fragment to find holder for fragment replacement
NavigationHelper.openChannelFragment(getParentFragment().getFragmentManager(),
selectedItem.getServiceId(),
selectedItem.getUrl(),
selectedItem.getName());
} catch (Exception e) {
ErrorActivity.reportUiError((AppCompatActivity) getActivity(), e);
}
final FragmentManager fragmentManager = getFM();
NavigationHelper.openChannelFragment(fragmentManager,
selectedItem.getServiceId(),
selectedItem.getUrl(),
selectedItem.getName());
}
});
//noinspection ConstantConditions
whatsNewItemListHeader.setOnClickListener(v ->
NavigationHelper.openWhatsNewFragment(getParentFragment().getFragmentManager()));
whatsNewItemListHeader.setOnClickListener(v -> {
FragmentManager fragmentManager = getFM();
NavigationHelper.openWhatsNewFragment(fragmentManager);
});
importExportListHeader.setOnClickListener(v -> importExportOptions.switchState());
}
@@ -405,10 +405,13 @@ public class SubscriptionFragment extends BaseStateFragment<List<SubscriptionEnt
private List<InfoItem> getSubscriptionItems(List<SubscriptionEntity> subscriptions) {
List<InfoItem> items = new ArrayList<>();
for (final SubscriptionEntity subscription : subscriptions) items.add(subscription.toChannelInfoItem());
for (final SubscriptionEntity subscription : subscriptions) {
items.add(subscription.toChannelInfoItem());
}
Collections.sort(items,
(InfoItem o1, InfoItem o2) -> o1.getName().compareToIgnoreCase(o2.getName()));
(InfoItem o1, InfoItem o2) ->
o1.getName().compareToIgnoreCase(o2.getName()));
return items;
}
@@ -437,7 +440,11 @@ public class SubscriptionFragment extends BaseStateFragment<List<SubscriptionEnt
resetFragment();
if (super.onError(exception)) return true;
onUnrecoverableError(exception, UserAction.SOMETHING_ELSE, "none", "Subscriptions", R.string.general_error);
onUnrecoverableError(exception,
UserAction.SOMETHING_ELSE,
"none",
"Subscriptions",
R.string.general_error);
return true;
}
}

View File

@@ -26,6 +26,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.graphics.Bitmap;
import android.os.Build;
import android.os.IBinder;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
@@ -343,6 +344,7 @@ public final class BackgroundPlayer extends Service {
if (!shouldUpdateOnProgress) return;
resetNotification();
if(Build.VERSION.SDK_INT >= 26 /*Oreo*/) updateNotificationThumbnail();
if (bigNotRemoteView != null) {
bigNotRemoteView.setProgressBar(R.id.notificationProgressBar, duration, currentProgress, false);
bigNotRemoteView.setTextViewText(R.id.notificationTime, getTimeString(currentProgress) + " / " + getTimeString(duration));

View File

@@ -51,6 +51,7 @@ import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.assist.FailReason;
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener;
import org.schabi.newpipe.BuildConfig;
import org.schabi.newpipe.Downloader;
import org.schabi.newpipe.R;
import org.schabi.newpipe.extractor.stream.StreamInfo;
@@ -96,7 +97,7 @@ import static com.google.android.exoplayer2.Player.DISCONTINUITY_REASON_SEEK_ADJ
public abstract class BasePlayer implements
Player.EventListener, PlaybackListener, ImageLoadingListener {
public static final boolean DEBUG = true;
public static final boolean DEBUG = !BuildConfig.BUILD_TYPE.equals("release");
@NonNull public static final String TAG = "BasePlayer";
@NonNull final protected Context context;
@@ -172,7 +173,6 @@ public abstract class BasePlayer implements
};
this.intentFilter = new IntentFilter();
setupBroadcastReceiver(intentFilter);
context.registerReceiver(broadcastReceiver, intentFilter);
this.recordManager = new HistoryRecordManager(context);
@@ -209,6 +209,8 @@ public abstract class BasePlayer implements
audioReactor = new AudioReactor(context, simpleExoPlayer);
mediaSessionManager = new MediaSessionManager(context, simpleExoPlayer,
new BasePlayerMediaSession(this));
registerBroadcastReceiver();
}
public void initListeners() {}
@@ -359,11 +361,17 @@ public abstract class BasePlayer implements
}
}
public void unregisterBroadcastReceiver() {
protected void registerBroadcastReceiver() {
// Try to unregister current first
unregisterBroadcastReceiver();
context.registerReceiver(broadcastReceiver, intentFilter);
}
protected void unregisterBroadcastReceiver() {
try {
context.unregisterReceiver(broadcastReceiver);
} catch (final IllegalArgumentException unregisteredException) {
Log.e(TAG, "Broadcast receiver already unregistered.", unregisteredException);
Log.w(TAG, "Broadcast receiver already unregistered (" + unregisteredException.getMessage() + ")");
}
}
@@ -1001,6 +1009,8 @@ public abstract class BasePlayer implements
try {
metadata = (MediaSourceTag) simpleExoPlayer.getCurrentTag();
} catch (IndexOutOfBoundsException | ClassCastException error) {
if(DEBUG) Log.d(TAG, "Could not update metadata: " + error.getMessage());
if(DEBUG) error.printStackTrace();
return;
}
@@ -1087,6 +1097,9 @@ public abstract class BasePlayer implements
return simpleExoPlayer.isCurrentWindowDynamic();
} catch (@NonNull IndexOutOfBoundsException ignored) {
// Why would this even happen =(
// But lets log it anyway. Save is save
if(DEBUG) Log.d(TAG, "Could not update metadata: " + ignored.getMessage());
if(DEBUG) ignored.printStackTrace();
return false;
}
}

View File

@@ -16,6 +16,7 @@ import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.PopupMenu;
@@ -562,6 +563,12 @@ public abstract class ServicePlayerActivity extends AppCompatActivity
if (player != null) {
progressLiveSync.setClickable(!player.isLiveEdge());
}
// this will make shure progressCurrentTime has the same width as progressEndTime
final ViewGroup.LayoutParams endTimeParams = progressEndTime.getLayoutParams();
final ViewGroup.LayoutParams currentTimeParams = progressCurrentTime.getLayoutParams();
currentTimeParams.width = progressEndTime.getWidth();
progressCurrentTime.setLayoutParams(currentTimeParams);
}
@Override

View File

@@ -251,10 +251,6 @@ public class PlayerHelper {
return true;
}
public static int getShutdownFlingVelocity(@NonNull final Context context) {
return 6000;
}
public static int getTossFlingVelocity(@NonNull final Context context) {
return 2500;
}

View File

@@ -6,6 +6,7 @@ import android.util.Log;
import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;
import org.schabi.newpipe.BuildConfig;
import org.schabi.newpipe.player.playqueue.events.AppendEvent;
import org.schabi.newpipe.player.playqueue.events.ErrorEvent;
import org.schabi.newpipe.player.playqueue.events.InitEvent;
@@ -41,7 +42,7 @@ import io.reactivex.subjects.BehaviorSubject;
public abstract class PlayQueue implements Serializable {
private final String TAG = "PlayQueue@" + Integer.toHexString(hashCode());
public static final boolean DEBUG = true;
public static final boolean DEBUG = !BuildConfig.BUILD_TYPE.equals("release");
private ArrayList<PlayQueueItem> backup;
private ArrayList<PlayQueueItem> streams;

View File

@@ -15,7 +15,8 @@ public enum UserAction {
REQUESTED_CHANNEL("requested channel"),
REQUESTED_PLAYLIST("requested playlist"),
REQUESTED_KIOSK("requested kiosk"),
DELETE_FROM_HISTORY("delete from history");
DELETE_FROM_HISTORY("delete from history"),
PLAY_STREAM("Play stream");
private final String message;

View File

@@ -9,6 +9,7 @@ import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.preference.ListPreference;
import android.support.v7.preference.Preference;
import android.util.Log;
@@ -20,15 +21,12 @@ import com.nostra13.universalimageloader.core.ImageLoader;
import org.schabi.newpipe.R;
import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.StreamingService;
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.report.ErrorActivity;
import org.schabi.newpipe.report.UserAction;
import org.schabi.newpipe.util.Constants;
import org.schabi.newpipe.util.FilePickerActivityHelper;
import org.schabi.newpipe.util.KioskTranslator;
import org.schabi.newpipe.util.ZipHelper;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
@@ -42,11 +40,8 @@ import java.util.Date;
import java.util.Locale;
import java.util.Map;
import java.util.zip.ZipFile;
import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;
import static android.content.Context.MODE_PRIVATE;
public class ContentSettingsFragment extends BasePreferenceFragment {
private static final int REQUEST_IMPORT_PATH = 8945;
@@ -98,68 +93,6 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
addPreferencesFromResource(R.xml.content_settings);
final ListPreference mainPageContentPref = (ListPreference) findPreference(getString(R.string.main_page_content_key));
mainPageContentPref.setOnPreferenceChangeListener((Preference preference, Object newValueO) -> {
final String newValue = newValueO.toString();
final String mainPrefOldValue =
defaultPreferences.getString(getString(R.string.main_page_content_key), "blank_page");
final String mainPrefOldSummary = getMainPagePrefSummery(mainPrefOldValue, mainPageContentPref);
if(newValue.equals(getString(R.string.kiosk_page_key))) {
SelectKioskFragment selectKioskFragment = new SelectKioskFragment();
selectKioskFragment.setOnSelectedLisener((String kioskId, int service_id) -> {
defaultPreferences.edit()
.putInt(getString(R.string.main_page_selected_service), service_id).apply();
defaultPreferences.edit()
.putString(getString(R.string.main_page_selectd_kiosk_id), kioskId).apply();
String serviceName = "";
try {
serviceName = NewPipe.getService(service_id).getServiceInfo().getName();
} catch (ExtractionException e) {
onError(e);
}
String kioskName = KioskTranslator.getTranslatedKioskName(kioskId,
getContext());
String summary =
String.format(getString(R.string.service_kiosk_string),
serviceName,
kioskName);
mainPageContentPref.setSummary(summary);
});
selectKioskFragment.setOnCancelListener(() -> {
mainPageContentPref.setSummary(mainPrefOldSummary);
mainPageContentPref.setValue(mainPrefOldValue);
});
selectKioskFragment.show(getFragmentManager(), "select_kiosk");
} else if(newValue.equals(getString(R.string.channel_page_key))) {
SelectChannelFragment selectChannelFragment = new SelectChannelFragment();
selectChannelFragment.setOnSelectedLisener((String url, String name, int service) -> {
defaultPreferences.edit()
.putInt(getString(R.string.main_page_selected_service), service).apply();
defaultPreferences.edit()
.putString(getString(R.string.main_page_selected_channel_url), url).apply();
defaultPreferences.edit()
.putString(getString(R.string.main_page_selected_channel_name), name).apply();
mainPageContentPref.setSummary(name);
});
selectChannelFragment.setOnCancelListener(() -> {
mainPageContentPref.setSummary(mainPrefOldSummary);
mainPageContentPref.setValue(mainPrefOldValue);
});
selectChannelFragment.show(getFragmentManager(), "select_channel");
} else {
mainPageContentPref.setSummary(getMainPageSummeryByKey(newValue));
}
defaultPreferences.edit().putBoolean(Constants.KEY_MAIN_PAGE_CHANGE, true).apply();
return true;
});
Preference importDataPreference = findPreference(getString(R.string.import_data));
importDataPreference.setOnPreferenceClickListener((Preference p) -> {
Intent i = new Intent(getActivity(), FilePickerActivityHelper.class)
@@ -349,66 +282,6 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
}
}
@Override
public void onResume() {
super.onResume();
final String mainPageContentKey = getString(R.string.main_page_content_key);
final Preference mainPagePref = findPreference(getString(R.string.main_page_content_key));
final String bpk = getString(R.string.blank_page_key);
if(defaultPreferences.getString(mainPageContentKey, bpk)
.equals(getString(R.string.channel_page_key))) {
mainPagePref.setSummary(defaultPreferences.getString(getString(R.string.main_page_selected_channel_name), "error"));
} else if(defaultPreferences.getString(mainPageContentKey, bpk)
.equals(getString(R.string.kiosk_page_key))) {
try {
StreamingService service = NewPipe.getService(
defaultPreferences.getInt(
getString(R.string.main_page_selected_service), 0));
String kioskName = KioskTranslator.getTranslatedKioskName(
defaultPreferences.getString(
getString(R.string.main_page_selectd_kiosk_id), "Trending"),
getContext());
String summary =
String.format(getString(R.string.service_kiosk_string),
service.getServiceInfo().getName(),
kioskName);
mainPagePref.setSummary(summary);
} catch (Exception e) {
onError(e);
}
}
}
/*//////////////////////////////////////////////////////////////////////////
// Utils
//////////////////////////////////////////////////////////////////////////*/
private String getMainPagePrefSummery(final String mainPrefOldValue, final ListPreference mainPageContentPref) {
if(mainPrefOldValue.equals(getString(R.string.channel_page_key))) {
return defaultPreferences.getString(getString(R.string.main_page_selected_channel_name), "error");
} else {
return mainPageContentPref.getSummary().toString();
}
}
private int getMainPageSummeryByKey(final String key) {
if(key.equals(getString(R.string.blank_page_key))) {
return R.string.blank_page_summary;
} else if(key.equals(getString(R.string.kiosk_page_key))) {
return R.string.kiosk_page_summary;
} else if(key.equals(getString(R.string.feed_page_key))) {
return R.string.feed_page_summary;
} else if(key.equals(getString(R.string.subscription_page_key))) {
return R.string.subscription_page_summary;
} else if(key.equals(getString(R.string.channel_page_key))) {
return R.string.channel_page_summary;
}
return R.string.blank_page_summary;
}
/*//////////////////////////////////////////////////////////////////////////
// Error
//////////////////////////////////////////////////////////////////////////*/

View File

@@ -71,7 +71,7 @@ public class NewPipeSettings {
}
public static File getVideoDownloadFolder(Context context) {
return getFolder(context, R.string.download_path_key, Environment.DIRECTORY_MOVIES);
return getDir(context, R.string.download_path_key, Environment.DIRECTORY_MOVIES);
}
public static String getVideoDownloadPath(Context context) {
@@ -81,7 +81,7 @@ public class NewPipeSettings {
}
public static File getAudioDownloadFolder(Context context) {
return getFolder(context, R.string.download_path_audio_key, Environment.DIRECTORY_MUSIC);
return getDir(context, R.string.download_path_audio_key, Environment.DIRECTORY_MUSIC);
}
public static String getAudioDownloadPath(Context context) {
@@ -90,21 +90,37 @@ public class NewPipeSettings {
return prefs.getString(key, Environment.DIRECTORY_MUSIC);
}
private static File getFolder(Context context, int keyID, String defaultDirectoryName) {
private static File getDir(Context context, int keyID, String defaultDirectoryName) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
final String key = context.getString(keyID);
String downloadPath = prefs.getString(key, null);
if ((downloadPath != null) && (!downloadPath.isEmpty())) return new File(downloadPath.trim());
final File folder = getFolder(defaultDirectoryName);
final File dir = getDir(defaultDirectoryName);
SharedPreferences.Editor spEditor = prefs.edit();
spEditor.putString(key, new File(folder, "NewPipe").getAbsolutePath());
spEditor.putString(key, getNewPipeChildFolderPathForDir(dir));
spEditor.apply();
return folder;
return dir;
}
@NonNull
private static File getFolder(String defaultDirectoryName) {
private static File getDir(String defaultDirectoryName) {
return new File(Environment.getExternalStorageDirectory(), defaultDirectoryName);
}
public static void resetDownloadFolders(Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
resetDownloadFolder(prefs, context.getString(R.string.download_path_audio_key), Environment.DIRECTORY_MUSIC);
resetDownloadFolder(prefs, context.getString(R.string.download_path_key), Environment.DIRECTORY_MOVIES);
}
private static void resetDownloadFolder(SharedPreferences prefs, String key, String defaultDirectoryName) {
SharedPreferences.Editor spEditor = prefs.edit();
spEditor.putString(key, getNewPipeChildFolderPathForDir(getDir(defaultDirectoryName)));
spEditor.apply();
}
private static String getNewPipeChildFolderPathForDir(File dir) {
return new File(dir, "NewPipe").getAbsolutePath();
}
}

View File

@@ -66,7 +66,7 @@ public class SelectChannelFragment extends DialogFragment {
//////////////////////////////////////////////////////////////////////////*/
public interface OnSelectedLisener {
void onChannelSelected(String url, String name, int service);
void onChannelSelected(int serviceId, String url, String name);
}
OnSelectedLisener onSelectedLisener = null;
public void setOnSelectedLisener(OnSelectedLisener listener) {
@@ -126,7 +126,7 @@ public class SelectChannelFragment extends DialogFragment {
private void clickedItem(int position) {
if(onSelectedLisener != null) {
SubscriptionEntity entry = subscriptions.get(position);
onSelectedLisener.onChannelSelected(entry.getUrl(), entry.getName(), entry.getServiceId());
onSelectedLisener.onChannelSelected(entry.getServiceId(), entry.getUrl(), entry.getName());
}
dismiss();
}

View File

@@ -56,7 +56,7 @@ public class SelectKioskFragment extends DialogFragment {
//////////////////////////////////////////////////////////////////////////*/
public interface OnSelectedLisener {
void onKioskSelected(String kioskId, int service_id);
void onKioskSelected(int serviceId, String kioskId, String kioskName);
}
OnSelectedLisener onSelectedLisener = null;
@@ -101,7 +101,7 @@ public class SelectKioskFragment extends DialogFragment {
private void clickedItem(SelectKioskAdapter.Entry entry) {
if(onSelectedLisener != null) {
onSelectedLisener.onKioskSelected(entry.kioskId, entry.serviceId);
onSelectedLisener.onKioskSelected(entry.serviceId, entry.kioskId, entry.kioskName);
}
dismiss();
}

View File

@@ -77,7 +77,8 @@ public class SettingsActivity extends AppCompatActivity implements BasePreferenc
finish();
} else getSupportFragmentManager().popBackStack();
}
return true;
return super.onOptionsItemSelected(item);
}
@Override

View File

@@ -0,0 +1,94 @@
package org.schabi.newpipe.settings.tabs;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.support.annotation.DrawableRes;
import android.support.annotation.NonNull;
import android.support.v7.widget.AppCompatImageView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import org.schabi.newpipe.R;
import org.schabi.newpipe.util.ThemeHelper;
public class AddTabDialog {
private final AlertDialog dialog;
AddTabDialog(@NonNull final Context context,
@NonNull final ChooseTabListItem[] items,
@NonNull final DialogInterface.OnClickListener actions) {
dialog = new AlertDialog.Builder(context)
.setTitle(context.getString(R.string.tab_choose))
.setAdapter(new DialogListAdapter(context, items), actions)
.create();
}
public void show() {
dialog.show();
}
public static final class ChooseTabListItem {
final int tabId;
final String itemName;
@DrawableRes final int itemIcon;
ChooseTabListItem(Context context, Tab tab) {
this(tab.getTabId(), tab.getTabName(context), tab.getTabIconRes(context));
}
ChooseTabListItem(int tabId, String itemName, @DrawableRes int itemIcon) {
this.tabId = tabId;
this.itemName = itemName;
this.itemIcon = itemIcon;
}
}
private static class DialogListAdapter extends BaseAdapter {
private final LayoutInflater inflater;
private final ChooseTabListItem[] items;
@DrawableRes private final int fallbackIcon;
private DialogListAdapter(Context context, ChooseTabListItem[] items) {
this.inflater = LayoutInflater.from(context);
this.items = items;
this.fallbackIcon = ThemeHelper.resolveResourceIdFromAttr(context, R.attr.ic_hot);
}
@Override
public int getCount() {
return items.length;
}
@Override
public ChooseTabListItem getItem(int position) {
return items[position];
}
@Override
public long getItemId(int position) {
return getItem(position).tabId;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
convertView = inflater.inflate(R.layout.list_choose_tabs_dialog, parent, false);
}
final ChooseTabListItem item = getItem(position);
final AppCompatImageView tabIconView = convertView.findViewById(R.id.tabIcon);
final TextView tabNameView = convertView.findViewById(R.id.tabName);
tabIconView.setImageResource(item.itemIcon > 0 ? item.itemIcon : fallbackIcon);
tabNameView.setText(item.itemName);
return convertView;
}
}
}

File diff suppressed because it is too large Load Diff

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