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

Compare commits

...

809 Commits

Author SHA1 Message Date
Christian Schabesberger
748f70ba87 fix subscriber count 2019-09-18 15:31:06 +02:00
TobiGr
ec4757d6de Move on to 0.17.3 2019-09-12 22:52:40 +02:00
TobiGr
6447af8541 Update extractor version to fix live streams 2019-09-12 22:43:07 +02:00
Christian Schabesberger
209c1f8bc2 merge master back into dev 2019-09-12 13:22:24 +02:00
Tobias Groza
6a37dfc35f Merge pull request #2488 from 2secslater/patch-1
Add all (HTTP(S)) Invidious instances
2019-09-12 09:29:25 +02:00
Tobias Groza
5e101a4d32 Merge branch 'dev' into patch-1 2019-09-12 09:23:30 +02:00
Christian Schabesberger
c29ea4693d Merge pull request #2617 from TeamNewPipe/hotfix_stream_fmt
add fixed extractor and move on to version 0.17.2
2019-09-11 22:36:17 +02:00
Christian Schabesberger
7d0df7aa80 add fixed extractor and move on to version 0.17.2 2019-09-11 22:30:41 +02:00
Tobias Groza
1275d9a185 Merge pull request #2592 from kapodamy/android-pie-workarrounds
Fix performance problem in android pie
2019-09-09 20:08:41 +02:00
Tobias Groza
75f2ced937 Merge branch 'dev' into android-pie-workarrounds 2019-09-09 18:59:59 +02:00
Tobias Groza
cd2ac25ff6 Merge pull request #2533 from jimbo1qaz/remove-dead-code
Remove commented-out code in VideoDetailFragment
2019-09-09 18:43:47 +02:00
Tobias Groza
cbf9ec0901 Merge branch 'dev' into remove-dead-code 2019-09-04 22:59:18 +02:00
Tobias Groza
ede18ded40 Merge pull request #2591 from kapodamy/allow-pick-hidden-folders
show hidden directories in the file picker
2019-09-04 22:56:05 +02:00
kapodamy
a446313119 add warning after toggle the SAF option 2019-09-01 18:53:12 -03:00
kapodamy
1a643126de Changes for Android 9 (Pie)
* validate the stored file before start the mission
* add warning on StoredFileHelper.java
* simplify the communication between MissionAdapter and DownloadManagerService.java since shares the same looper
* simplify setVisible() "start/pause all downloads" buttons logic
2019-09-01 18:37:06 -03:00
kapodamy
6fa72e4a52 add @NotNull 2019-09-01 18:07:14 -03:00
kapodamy
7f127ba52a show hidden directories in the file picker 2019-09-01 17:35:42 -03:00
Tobias Groza
85d1888ba7 Merge pull request #2550 from TeamNewPipe/clear_playback_states
Clear playback states
2019-08-28 21:07:26 +02:00
TobiGr
2a15f5fb51 Make export_data and import_data settings keys untranslatable 2019-08-22 21:51:59 +02:00
TobiGr
7cd5af5e72 Add option in history settings to delete playback positions 2019-08-22 21:49:33 +02:00
TobiGr
cbdfb15117 Merge remote-tracking branch 'newpipe/master' into dev 2019-08-22 21:46:42 +02:00
Christian Schabesberger
7ba71e3b37 use newerextractor 2019-08-22 11:39:32 +02:00
Christian Schabesberger
670a95a01d Merge pull request #2530 from TeamNewPipe/release_v0.17.1
Release v0.17.1
2019-08-22 11:21:06 +02:00
Tobias Groza
acea26717c Fix another %s in translation 2019-08-21 14:35:39 +02:00
TobiGr
e6bcb4628a Fix Portuguese minimize_on_exit_summary
Fix #2522
2019-08-21 14:35:39 +02:00
TobiGr
c4f08d541d Add changelog for 0.17.1 (760) 2019-08-21 14:35:39 +02:00
TobiGr
58546751dd Merge remote-tracking branch 'Weblate/dev' into dev 2019-08-21 14:35:31 +02:00
Hosted Weblate
5470c9a002 Merge branch 'origin/dev' into Weblate. 2019-08-19 20:23:29 +02:00
Xiang Xu
8885b45259 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (471 of 471 strings)
2019-08-19 20:23:28 +02:00
Westminboy
85632b24fc Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (471 of 471 strings)
2019-08-19 20:23:27 +02:00
Yaron Shahrabani
96802c7b5c Translated using Weblate (Hebrew)
Currently translated at 100.0% (471 of 471 strings)
2019-08-19 20:23:27 +02:00
ssantos
e5207f8b42 Translated using Weblate (Portuguese)
Currently translated at 100.0% (471 of 471 strings)
2019-08-19 20:23:25 +02:00
naofum
9d573e1b1d Translated using Weblate (Japanese)
Currently translated at 100.0% (471 of 471 strings)
2019-08-19 20:23:24 +02:00
Yaron Shahrabani
dd276aabc1 Translated using Weblate (English)
Currently translated at 100.0% (471 of 471 strings)
2019-08-19 20:23:22 +02:00
Eduardo Caron
e4d0635ae1 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (471 of 471 strings)
2019-08-19 20:23:21 +02:00
TobiGr
60f534d7a1 Merge remote-tracking branch 'Weblate/dev' into dev 2019-08-18 11:30:04 +02:00
jimbo1qaz
942e042933 remove dead code 2019-08-17 23:21:06 -07:00
Allan Nordhøy
223ddaa9bf Translated using Weblate (Norwegian Bokmål)
Currently translated at 96.8% (456 of 471 strings)
2019-08-18 07:09:54 +02:00
Westminboy
1d6c722c28 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.8% (470 of 471 strings)
2019-08-18 07:09:53 +02:00
Florian
9c9dd6c7bf Translated using Weblate (French)
Currently translated at 98.3% (463 of 471 strings)
2019-08-18 07:09:51 +02:00
zmni
7ff48a6d84 Translated using Weblate (Indonesian)
Currently translated at 99.2% (467 of 471 strings)
2019-08-18 07:09:50 +02:00
thami simo
645e16fd90 Translated using Weblate (Arabic)
Currently translated at 99.6% (469 of 471 strings)
2019-08-18 07:09:49 +02:00
Trần Lê Nhật Huy
1bb58a10e2 Translated using Weblate (Vietnamese)
Currently translated at 99.6% (469 of 471 strings)
2019-08-18 07:09:47 +02:00
ΜŜβ
118788436e Translated using Weblate (Punjabi)
Currently translated at 99.6% (469 of 471 strings)
2019-08-18 07:09:45 +02:00
Marc Riera
0b0f7919a2 Translated using Weblate (Catalan)
Currently translated at 95.8% (451 of 471 strings)
2019-08-18 07:09:12 +02:00
uievawkejf
c8e23fb6ce Translated using Weblate (Ukrainian)
Currently translated at 99.4% (468 of 471 strings)
2019-08-18 07:09:11 +02:00
Osoitz
bc10717f61 Translated using Weblate (Basque)
Currently translated at 99.4% (468 of 471 strings)
2019-08-18 07:09:10 +02:00
Westminboy
e621dd3b28 Translated using Weblate (English)
Currently translated at 100.0% (471 of 471 strings)
2019-08-18 07:09:08 +02:00
Tobias Groza
20208be556 Translated using Weblate (German)
Currently translated at 99.4% (468 of 471 strings)
2019-08-18 07:09:06 +02:00
Kowith Singkornkeeree
9074733aab Translated using Weblate (Thai)
Currently translated at 54.8% (258 of 471 strings)
2019-08-18 07:09:06 +02:00
Westminboy
ae0ee61e7d Translated using Weblate (English)
Currently translated at 100.0% (471 of 471 strings)
2019-08-18 07:09:03 +02:00
Allan Nordhøy
ac797196f5 Translated using Weblate (English)
Currently translated at 100.0% (471 of 471 strings)
2019-08-18 07:09:03 +02:00
Christian Schabesberger
30aa64e9c6 Merge branch 'dev' of github.com:teamnewpipe/newpipe into dev 2019-08-18 01:01:43 +02:00
Christian Schabesberger
b992add77b move on to version 0.17.1 2019-08-18 01:00:54 +02:00
TobiGr
88ebd963f7 Merge remote-tracking branch 'Weblate/dev' into dev 2019-08-18 00:51:52 +02:00
Christian Schabesberger
96baa2978d Merge pull request #2521 from kapodamy/saf-workarround
Downloads: add switch for saf/legacy file picker
2019-08-18 00:42:59 +02:00
Christian Schabesberger
c01609b858 Merge branch 'dev' into saf-workarround 2019-08-18 00:40:43 +02:00
Christian Schabesberger
c89f0e5547 Merge pull request #2527 from Stypox/recaptcha-with-url
Fix ReCaptchaActivity
2019-08-18 00:39:30 +02:00
kapodamy
10dfcbf0b9 add manual switch in download setting fragment
switch for:
* Java I/O Api
* Storage Access Framework
2019-08-17 13:38:33 -03:00
Stypox
43446d56c5 Load the url from the exception in the ReCaptchaActivity
Sometimes YouTube introduces recaptchas only on some pages. By loading the url inside the ReCaptchaException into ReCaptchaActivity's webview, the page that originally caused the problem is shown. The user can then solve the page-specific recaptcha.
2019-08-17 09:33:51 +02:00
Stypox
e66f2ab36b Fix ReCaptchaActivity layout crash due to hidden EditText
Closes #2484
2019-08-17 09:33:20 +02:00
Stypox
63def07a0e Add url to recaptcha exceptions, after update in extractor 2019-08-17 09:25:49 +02:00
kapodamy
1ba7710af8 Merge remote-tracking branch 'origin/saf-workarround' into saf-workarround 2019-08-15 21:49:21 -03:00
kapodamy
8f13a7ec97 check if the if the content provider is disabled (the app itself) 2019-08-15 21:48:07 -03:00
Christian Schabesberger
93dff5cf7a Merge branch 'dev' into saf-workarround 2019-08-15 14:37:19 +02:00
Christian Schabesberger
6a0450b9f6 Merge pull request #2516 from rogersachan/patch-1
Add GitHub sponsors button to feature liberapay
2019-08-15 14:36:58 +02:00
nautilusx
fffeadd8ea Translated using Weblate (German)
Currently translated at 100.0% (471 of 471 strings)
2019-08-15 09:51:19 +02:00
Hosted Weblate
b697e058d9 Merge branch 'origin/dev' into Weblate. 2019-08-15 06:23:56 +02:00
thami simo
14db8b1283 Translated using Weblate (Arabic)
Currently translated at 100.0% (451 of 451 strings)
2019-08-15 06:23:54 +02:00
Kowith Singkornkeeree
45ad8621cf Translated using Weblate (Thai)
Currently translated at 59.4% (268 of 451 strings)
2019-08-15 06:23:54 +02:00
kapodamy
dee3a18ea8 misc changes
* restore permission request popup previously removed in #2486
* use legacy file picker in cases where saf file picker is not available
* fix missing file check logic in prepareSelectedDownload method (DownloadDialog.java)
2019-08-15 01:09:36 -03:00
kapodamy
950cf714d9 use legacy file picker in those cases where saf is not available 2019-08-14 22:15:42 -03:00
kapodamy
652184506b check for Storage Access Framework features
* creating files though saf
* picking folder though saf
2019-08-14 21:54:26 -03:00
Andrew
89f2cd6ec0 Merge branch 'dev' into patch-1 2019-08-14 17:39:57 +01:00
Roger
6457cac797 Merge branch 'dev' into patch-1 2019-08-14 11:42:46 -04:00
Christian Schabesberger
f66c2ba171 Merge pull request #2518 from Stypox/playlist-play-from-here
Customize "start here" actions in playlist item views
2019-08-14 15:01:37 +02:00
Christian Schabesberger
6133c97f45 Merge branch 'dev' into playlist-play-from-here 2019-08-14 14:53:06 +02:00
Christian Schabesberger
0dc71ce37a Merge pull request #2517 from Stypox/list-slowdown-fix
List slowdown fix
2019-08-14 14:51:18 +02:00
Stypox
c96a05a8f9 Customize "start here" actions in playlist item views
Now those actions start playing the whole playlist from the chosen stream, instead of playing only the chosen stream.
2019-08-14 14:17:05 +02:00
Stypox
c190dc4792 Fix annotation warnings in modified files 2019-08-14 13:11:44 +02:00
Stypox
ebf91d27c7 Clean up code for addItems() on ItemListAdapters. 2019-08-14 13:11:16 +02:00
Stypox
63301ee771 Remove "Trollolo" logs
They were probably left behind by accident after a debugging session.
2019-08-14 12:57:04 +02:00
Stypox
7da827a06a Fix annotation warnings 2019-08-14 12:55:17 +02:00
Stypox
00fc5217f5 Fix potential disposable leak in PlaylistAppendDialog 2019-08-14 12:54:17 +02:00
Stypox
04e725bb50 Fix some inspection warnings in modified files 2019-08-14 11:49:37 +02:00
Stypox
e6617ff8e8 Fix slowdowns in stream list views
Now the playback state of a stream is loaded only when needed (i.e. when the stream is visible), just as it is done with thumbnails.
Removed `StateObjectsListAdapter.java`, which used to load the state of every stream at list instantiation, generating slowdowns and freezes.
2019-08-14 11:42:39 +02:00
Roger
1b0a958436 Create FUNDING.yml 2019-08-13 22:10:04 -04:00
TobiGr
5053d470f6 Do not save playback position when watch history is disabled 2019-08-13 14:39:57 +02:00
TobiGr
8de5c53485 Fix typo in HistorySettinsFragment
Rename viewsHistroyClearKey to viewsHistoryClearKey
2019-08-13 14:25:47 +02:00
TobiGr
ec3ae7c7b8 Clean up string resources 2019-08-12 17:35:36 +02:00
TobiGr
c46af7d194 Merge branch 'weblate' into dev 2019-08-12 17:25:10 +02:00
Kowith Singkornkeeree
5254e85840 Added translation using Weblate (Thai) 2019-08-12 15:02:32 +02:00
Tobias Groza
5883f6e763 Merge pull request #2487 from kapodamy/buttons-hiding-fix-on-screen-off
fixup for #2149 (missing buttons)
2019-08-12 14:16:03 +02:00
Tobias Groza
c02383d7d9 Merge branch 'dev' into buttons-hiding-fix-on-screen-off 2019-08-12 13:57:02 +02:00
Christian Schabesberger
f98e5cc22d Merge pull request #2502 from Stypox/fix-player-resume
Fix player resume
2019-08-12 10:47:21 +02:00
Christian Schabesberger
9fbb61a744 make fastlane description better suted for fdroid 2019-08-11 23:18:56 +02:00
Stypox
5191907af0 Fix player resume 2019-08-11 22:10:05 +02:00
kapodamy
35a69b4b1d update download_menu.xml
use "ifRoom" and "always" in cases where is possible
2019-08-10 15:56:59 -03:00
Andrew
f947856a61 Revert last commit 2019-08-08 01:13:34 +00:00
Andrew
c4967532e4 Use commit from extractor pr 2019-08-08 01:07:51 +00:00
Andrew
7dc560e1f2 Merge branch 'dev' into patch-1 2019-08-08 00:29:16 +00:00
Andrew
ab03198ba6 Add debugging domain for main instance 2019-08-08 00:22:40 +00:00
yausername
a64f520644 fix item addition to list 2019-08-07 22:27:58 +05:30
yausername
5aced46345 remove controls animation/flicker 2019-08-07 22:27:58 +05:30
TobiGr
3cd485069d Fix playback position not being deleted on clearing watch history 2019-08-07 14:34:49 +02:00
Christian Schabesberger
fabb07bb28 fix import settings not working 2019-08-04 17:27:56 +02:00
kapodamy
2328ea6d07 dont hardcode the buttons 2019-08-03 12:44:55 -03:00
kapodamy
0375194e7d fix start/pause buttons disappear when screen goes off
* fix start/pause buttons disappear, issued by RecyclerView re-draw
* show start/pause buttons in pair to avoid confusions
2019-08-03 12:28:58 -03:00
kapodamy
5a6a6bcc78 clean-up: remove unused method 2019-08-03 12:28:58 -03:00
TobiGr
c8f475bba1 Add changelog for 0.17.0 2019-08-03 00:35:45 +02:00
TobiGr
31f3757880 Move on to version 0.17.0 (750) 2019-08-03 00:35:45 +02:00
Igor Nedoboy
a60a9bb144 Translated using Weblate (Russian)
Currently translated at 100.0% (451 of 451 strings)
2019-08-02 23:07:42 +02:00
Tobias Groza
21a90bb7ee Merge pull request #2486 from kapodamy/32k-issue-fix
Fix slow download speed
2019-08-02 22:23:34 +02:00
Andrew
6a8e38476f Add all (HTTP(S)) Invidious instances
Public Invidious instances from https://github.com/omarroth/invidious/wiki/invidious-instances have been added to the AndroidManifest.xml to allow opening of the public Invidious (not just `invidio.us`) links in NewPipe.
2019-08-02 18:26:13 +00:00
kapodamy
2f66913813 drop unused popup storage permission request 2019-08-02 01:07:37 -03:00
kapodamy
d9b042d9e3 socket leak fix
* fix socket leak in "DownloadRunnable"
* in "DownloadInitializer" close the HTTP body after doing range-request checks
* in "DownloadRunnableFallback" fix typo in comment
* in "DownloadDialog" fix regression, using one thread for audios instead of subtitles
2019-08-01 22:41:09 -03:00
Marc Riera
ef9044d933 Translated using Weblate (Catalan)
Currently translated at 98.4% (444 of 451 strings)
2019-08-01 19:47:13 +02:00
Bas Conrads
12c9dbf1bf Translated using Weblate (Esperanto)
Currently translated at 18.6% (84 of 451 strings)
2019-08-01 19:47:12 +02:00
Nenad
8cc8aa8693 Translated using Weblate (Serbian)
Currently translated at 50.1% (226 of 451 strings)
2019-08-01 19:47:09 +02:00
TobiGr
e529b16956 Merge branch 'weblate' into release_v0.17.0 2019-08-01 01:44:25 +02:00
TobiGr
ffe8d4b689 Update extractor version to fix video duration parsing failure 2019-07-31 18:35:46 +02:00
Tobias Groza
4e5a20ec45 Merge pull request #2368 from Stypox/menu-consistency
Make long-press menu consistent across views
2019-07-31 13:37:49 +02:00
Stypox
7c9ef58acd Fix crash when closing a not-yet-loaded popup. 2019-07-25 12:32:56 +02:00
Stypox
d076fe72cd Optimize imports in edited files 2019-07-25 11:47:38 +02:00
Stypox
25fbbfaf94 Rename action to defaultAction in StreamDialogEntry
To improve readability
2019-07-25 01:07:51 +02:00
Stypox
9df27f43de Ensure default actions cannot be overwritten permanently in StreamDialogEntry 2019-07-25 00:53:13 +02:00
Stypox
759e9846ad Remove ugly if-else-cascade in
Common actions and labels are now in a unique enum: StreamDialogEntry
If an action is not common to every long-press menu (e.g. delete) a custom action has to be provided using e.g. delete.setAction(...)
2019-07-25 00:44:12 +02:00
Stypox
3aeba7ca8a Merge branch 'dev' into menu-consistency 2019-07-24 17:21:45 +02:00
hatsunearu
2a44a091c8 Translated using Weblate (Korean)
Currently translated at 100.0% (451 of 451 strings)
2019-07-23 03:18:37 +02:00
JS Ahn
4c92aebc3c Translated using Weblate (Korean)
Currently translated at 100.0% (451 of 451 strings)
2019-07-23 03:16:54 +02:00
JS Ahn
d4ecd0dfab Translated using Weblate (Korean)
Currently translated at 100.0% (451 of 451 strings)
2019-07-23 03:15:50 +02:00
bluepencil
3f790d01fa Translated using Weblate (Korean)
Currently translated at 100.0% (451 of 451 strings)
2019-07-23 03:15:49 +02:00
Christian Schabesberger
e7b068ed8e Merge pull request #2203 from yausername/defaultTrending
added default kiosk
2019-07-22 23:31:14 +02:00
Christian Schabesberger
bd485937c4 Merge branch 'dev' into defaultTrending 2019-07-22 22:39:47 +02:00
Stypox
8edc332a4e Fix showing popup options with audio-only streams 2019-07-22 11:58:01 +02:00
Stypox
bb5028364b Complete merge after #2288: add resumePlayback to player calls.
`resumePlayback`'s value is `false` when the video is enqueued, `true` otherwise.
Also make the use of getContext() and getActivity() more consistant.
2019-07-22 10:28:53 +02:00
Stypox
ef070a4e0e Merge branch 'dev' into menu-consistency 2019-07-22 09:10:25 +02:00
Christian Schabesberger
6787d0224c Merge pull request #2453 from m0n1ker/issue-2240
Update play queue metadata
2019-07-21 16:14:02 +02:00
Christian Schabesberger
8a43e24095 Merge branch 'dev' into issue-2240 2019-07-21 16:07:32 +02:00
Christian Schabesberger
f879f549e4 Merge pull request #2440 from kapodamy/dl-bux-fix
fix downloads stuck at 99.9%
2019-07-21 16:04:52 +02:00
Christian Schabesberger
db55484163 Merge branch 'dev' into dl-bux-fix 2019-07-21 15:38:39 +02:00
Christian Schabesberger
4d8f66f28e Merge pull request #2444 from moneytoo/rotate
Handle (auto)rotation changes during activity lifecycle
2019-07-21 15:37:55 +02:00
Christian Schabesberger
7a44061fa3 Merge branch 'dev' into rotate 2019-07-21 15:12:41 +02:00
Christian Schabesberger
5d4bb42e39 Merge branch 'dev' into dl-bux-fix 2019-07-21 15:10:57 +02:00
Christian Schabesberger
3a6c22da5c update to latest dev extractor 2019-07-21 15:08:17 +02:00
Stypox
064f0e414a Merge branch 'dev' into menu-consistency 2019-07-21 11:11:06 +02:00
Mostafa Ahangarha
77db3cb6fa Translated using Weblate (Persian)
Currently translated at 70.7% (319 of 451 strings)
2019-07-18 18:05:12 +02:00
bluepencil
b83a1fd102 Translated using Weblate (Korean)
Currently translated at 100.0% (451 of 451 strings)
2019-07-16 08:03:42 +02:00
Igor Nedoboy
99c519c065 Translated using Weblate (Russian)
Currently translated at 100.0% (451 of 451 strings)
2019-07-13 21:00:45 +02:00
Allan Nordhøy
632e52b38d Translated using Weblate (Norwegian Bokmål)
Currently translated at 97.6% (440 of 451 strings)
2019-07-11 21:01:06 +02:00
Syver Stensholt
1b66ffac6c Translated using Weblate (Norwegian Bokmål)
Currently translated at 97.6% (440 of 451 strings)
2019-07-11 21:01:04 +02:00
Alan Nelson
ee9052ad3d Add title to additional metadata object 2019-07-11 00:48:28 -05:00
John Doe
550c74da77 Translated using Weblate (Croatian)
Currently translated at 100.0% (451 of 451 strings)
2019-07-10 13:01:11 +02:00
Alan Nelson
ccdd450283 Add current and total track numbers to metadata 2019-07-09 22:37:03 -05:00
Alan Nelson
224a607bc3 Fix Bluetooth AVRCP duration metadata 2019-07-09 22:34:18 -05:00
random r
8fcd23663c Translated using Weblate (Italian)
Currently translated at 100.0% (451 of 451 strings)
2019-07-09 11:00:59 +02:00
Tobias Groza
ad79a71fbd Merge pull request #2423 from Redirion/patch-2
Silence CheckForNewAppVersionTask
2019-07-07 21:08:01 +02:00
Tobias Groza
d862a59349 Merge branch 'dev' into patch-2 2019-07-07 20:39:26 +02:00
D D
2d6362dddb Translated using Weblate (Bulgarian)
Currently translated at 85.4% (385 of 451 strings)
2019-07-06 21:01:14 +02:00
Flo - Fan
ee3ec3a4ea Translated using Weblate (French)
Currently translated at 100.0% (451 of 451 strings)
2019-07-05 17:01:08 +02:00
THANOS SIOURDAKIS
daecfd97c2 Translated using Weblate (Greek)
Currently translated at 100.0% (451 of 451 strings)
2019-07-05 17:01:07 +02:00
Khaleel Jageer
200a81d536 Translated using Weblate (Tamil)
Currently translated at 33.7% (152 of 451 strings)
2019-07-05 17:01:07 +02:00
Marcel Dopita
8059ac89d3 Handle (auto)rotation changes during activity lifecycle
Fixes #1156
2019-07-04 07:30:01 +02:00
kapodamy
60f5f07dd6 commit (3 changes)
* re-write download segmenting logic (issue #).
* clean-up download threads handling.
* fix race-condition if "pause" option in download context menu was selected, in the transition from "pending" to "finished" state.
2019-07-02 21:07:21 -03:00
Osoitz
372d5ce413 Translated using Weblate (Basque)
Currently translated at 100.0% (451 of 451 strings)
2019-07-02 12:01:06 +02:00
Mehmetali
6f97819ca7 Translated using Weblate (Turkish)
Currently translated at 100.0% (451 of 451 strings)
2019-07-02 12:01:03 +02:00
JoC
2b2ee56712 Translated using Weblate (Spanish)
Currently translated at 100.0% (451 of 451 strings)
2019-06-28 10:01:02 +02:00
thami simo
3715326034 Translated using Weblate (Arabic)
Currently translated at 100.0% (451 of 451 strings)
2019-06-28 10:01:00 +02:00
Cenk YILDIZLI
6cbb8b1753 Translated using Weblate (Turkish)
Currently translated at 99.1% (447 of 451 strings)
2019-06-28 10:00:57 +02:00
Christian Schabesberger
806896ea05 Merge pull request #2295 from sherlockbeard/removeextra
removed the gema strings.
2019-06-27 14:29:42 +02:00
Redirion
fc8746e077 Update CheckForNewAppVersionTask.java 2019-06-26 18:37:04 +02:00
Christian Schabesberger
e11df5bb49 Merge branch 'dev' into removeextra 2019-06-26 15:42:47 +02:00
Redirion
37a9e98ebc Update CheckForNewAppVersionTask.java 2019-06-25 13:53:23 +02:00
Redirion
80b4975188 Update CheckForNewAppVersionTask.java 2019-06-25 13:47:16 +02:00
Redirion
c4ef40f4dc Removed tabs 2019-06-25 13:41:08 +02:00
Redirion
6a4bb6e3e1 Update CheckForNewAppVersionTask.java 2019-06-25 13:39:47 +02:00
Redirion
05ef926a7f Update CheckForNewAppVersionTask.java 2019-06-25 13:31:26 +02:00
Redirion
0007451735 Update CheckForNewAppVersionTask.java 2019-06-25 13:22:40 +02:00
Redirion
e599de038a Silence CheckForNewAppVersionTask
Closes #2421
2019-06-25 11:49:59 +02:00
Tobias Groza
61472a995f Merge pull request #2288 from nv95/playback_state_list
Playback positions in lists
2019-06-23 19:44:13 +02:00
Vasily
2a41802f36 Merge branch 'dev' into playback_state_list 2019-06-23 20:23:29 +03:00
gkhnblt
1d1cee17c3 Translated using Weblate (Turkish)
Currently translated at 98.0% (442 of 451 strings)
2019-06-23 19:00:19 +02:00
Michael Moroni
e99266f9d8 Translated using Weblate (Italian)
Currently translated at 100.0% (451 of 451 strings)
2019-06-21 14:00:36 +02:00
Eduardo Caron
1f2cd064f7 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (451 of 451 strings)
2019-06-21 14:00:35 +02:00
minsk21
9c2cf9eef7 Translated using Weblate (Belarusian)
Currently translated at 73.4% (331 of 451 strings)
2019-06-18 21:02:47 +02:00
Tobias Groza
38b0b79644 Merge pull request #2149 from kapodamy/ps-branch
Downloader fixes
2019-06-17 22:53:11 +02:00
JoC
5252834075 Translated using Weblate (Spanish)
Currently translated at 100.0% (451 of 451 strings)
2019-06-15 19:53:20 +02:00
kapodamy
162df5eb6c Merge branch 'dev' into ps-branch 2019-06-14 12:55:49 -03:00
kapodamy
ac5e2e0532 bugs fixes
* fix storage warning dialogs created on invalid contexts
* implement mkdirs in StoredDirectoryHelper
2019-06-14 12:19:50 -03:00
Stypox
f0ba6afbdf Merge branch 'dev' into menu-consistency 2019-06-14 09:40:40 +02:00
Hosted Weblate
04a5f43472 Merge branch 'origin/dev' into Weblate. 2019-06-13 14:30:35 +02:00
Allan Nordhøy
a15ef4b7ce Translated using Weblate (Norwegian Bokmål)
Currently translated at 94.9% (428 of 451 strings)
2019-06-13 14:30:34 +02:00
Jeff Huang
f1f9147433 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (451 of 451 strings)
2019-06-13 14:30:33 +02:00
Nathan Follens
3c0d7de377 Translated using Weblate (Flemish)
Currently translated at 100.0% (451 of 451 strings)
2019-06-13 14:30:31 +02:00
Arnaud Jacquemin
2a57d74f1a Translated using Weblate (French)
Currently translated at 100.0% (451 of 451 strings)
2019-06-13 14:30:29 +02:00
Florian
79717859b3 Translated using Weblate (French)
Currently translated at 100.0% (451 of 451 strings)
2019-06-13 14:30:28 +02:00
Prashant Shahi
be423939ed Translated using Weblate (Nepali)
Currently translated at 6.0% (27 of 451 strings)
2019-06-13 14:30:27 +02:00
Nathan Follens
086cceb271 Translated using Weblate (Dutch)
Currently translated at 100.0% (451 of 451 strings)
2019-06-13 14:30:21 +02:00
zmni
a14033afb7 Translated using Weblate (Indonesian)
Currently translated at 99.8% (450 of 451 strings)
2019-06-13 14:30:20 +02:00
Rex_sa
cc89a342ed Translated using Weblate (Arabic)
Currently translated at 100.0% (451 of 451 strings)
2019-06-13 14:30:18 +02:00
ButterflyOfFire
25c3669564 Translated using Weblate (Arabic)
Currently translated at 100.0% (451 of 451 strings)
2019-06-13 14:30:17 +02:00
Michael Moroni
21eff0b2ec Translated using Weblate (Italian)
Currently translated at 98.2% (443 of 451 strings)
2019-06-13 14:30:16 +02:00
pjammo
472fd72c82 Translated using Weblate (Italian)
Currently translated at 98.2% (443 of 451 strings)
2019-06-13 14:30:15 +02:00
WaldiS
429a9a42d3 Translated using Weblate (Polish)
Currently translated at 100.0% (451 of 451 strings)
2019-06-13 14:30:13 +02:00
Yaron Shahrabani
90c525e99a Translated using Weblate (Hebrew)
Currently translated at 100.0% (451 of 451 strings)
2019-06-13 14:30:12 +02:00
Stjepan
196117998a Translated using Weblate (Croatian)
Currently translated at 99.3% (448 of 451 strings)
2019-06-13 14:30:10 +02:00
ssantos
630cbc77a8 Translated using Weblate (Portuguese)
Currently translated at 100.0% (451 of 451 strings)
2019-06-13 14:30:09 +02:00
Marc Riera
b6e4afe321 Translated using Weblate (Catalan)
Currently translated at 97.1% (438 of 451 strings)
2019-06-13 14:30:06 +02:00
naofum
59085ff8c8 Translated using Weblate (Japanese)
Currently translated at 100.0% (451 of 451 strings)
2019-06-13 14:30:04 +02:00
AB
a4274c6301 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (451 of 451 strings)
2019-06-13 14:30:02 +02:00
THANOS SIOURDAKIS
b4ef44b343 Translated using Weblate (Greek)
Currently translated at 100.0% (451 of 451 strings)
2019-06-13 14:30:01 +02:00
postsorino
08bc97582b Translated using Weblate (Greek)
Currently translated at 100.0% (451 of 451 strings)
2019-06-13 14:30:00 +02:00
gabriellluz
3952c88510 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (451 of 451 strings)
2019-06-13 14:29:59 +02:00
Lucas Ayala
b1f27b9da7 Translated using Weblate (Spanish)
Currently translated at 100.0% (451 of 451 strings)
2019-06-13 14:29:55 +02:00
Tobias Groza
171b258d5c Merge pull request #2394 from Redirion/patch-1
Fixed selected subtitle track name not being shown
2019-06-12 22:50:34 +02:00
Redirion
af971b6a19 Fixed selected subtitle stream not being shown
closes #2393
this ammends my obviously incomplete fix in PR #2311.

This is just an UI issue. Subtitle track selection works, it just shows "No Captions" unfortunately.
2019-06-12 14:44:36 +02:00
Karel S
7ca026393b Translated using Weblate (Czech)
Currently translated at 100.0% (451 of 451 strings)
2019-06-12 10:52:28 +02:00
Vojtěch Šamla
f8784ae3c7 Translated using Weblate (Czech)
Currently translated at 100.0% (451 of 451 strings)
2019-06-12 10:52:27 +02:00
ssantos
3ddc3acf4c Translated using Weblate (German)
Currently translated at 100.0% (451 of 451 strings)
2019-06-06 08:57:12 +02:00
nautilusx
ff430f5e33 Translated using Weblate (German)
Currently translated at 100.0% (451 of 451 strings)
2019-06-06 08:57:12 +02:00
Prashant Shahi
daf2890161 Added translation using Weblate (Nepali) 2019-06-05 17:16:25 +02:00
Igor Nedoboy
4ca639323d Translated using Weblate (Russian)
Currently translated at 100.0% (451 of 451 strings)
2019-06-05 00:59:48 +02:00
Igor Nedoboy
a92bf155a3 Translated using Weblate (Russian)
Currently translated at 100.0% (451 of 451 strings)
2019-06-05 00:48:25 +02:00
Igor Nedoboy
d153772eb2 Translated using Weblate (Russian)
Currently translated at 100.0% (451 of 451 strings)
2019-06-05 00:37:18 +02:00
kapodamy
cdc8fe86ce amend rebase
resolve inconsistency in string.xml files
2019-06-04 15:45:28 -03:00
Hosted Weblate
4844037ce9 Merge branch 'origin/dev' into Weblate. 2019-06-04 13:40:03 +02:00
Jeff Huang
691c1e1a37 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (443 of 443 strings)
2019-06-04 13:40:03 +02:00
Jazz
bd55b91a86 Translated using Weblate (French)
Currently translated at 99.8% (442 of 443 strings)
2019-06-04 13:40:02 +02:00
Eduardo Serra
8842f53696 Translated using Weblate (Spanish)
Currently translated at 100.0% (443 of 443 strings)
2019-06-04 13:40:02 +02:00
ButterflyOfFire
ffed9f6116 Translated using Weblate (Arabic)
Currently translated at 100.0% (443 of 443 strings)
2019-06-04 13:40:01 +02:00
pjammo
50e8f45601 Translated using Weblate (Italian)
Currently translated at 100.0% (443 of 443 strings)
2019-06-04 13:40:00 +02:00
WaldiS
8cbfe9e6cf Translated using Weblate (Polish)
Currently translated at 100.0% (443 of 443 strings)
2019-06-04 13:40:00 +02:00
Karel S
99ad3dc292 Translated using Weblate (Czech)
Currently translated at 99.8% (442 of 443 strings)
2019-06-04 13:40:00 +02:00
monolifed
6908355d38 Translated using Weblate (Turkish)
Currently translated at 100.0% (443 of 443 strings)
2019-06-04 13:39:56 +02:00
kapodamy
7b948f83c3 Space reserving tweaks for huge video resolutions
* improve space reserving, allows write better 4K/8K video data
* do not use cache dirs in the muxers, Android can force close NewPipe if the device is running out of storage. Is a aggressive cache cleaning >:/
* (for devs) webm & mkv are the same thing
* calculate the final file size inside of the mission, instead getting from the UI
* simplify ps algorithms constructors
* [missing old commit message] simplify the loading of pending downloads
2019-06-03 18:26:26 -03:00
kapodamy
34b2b96158 Simplify the storage APIs use
* use Java I/O (classic way) on older android versions
* use Storage Access Framework on newer android versions (Android Lollipop or later)
* both changes have the external SD Card write permission
* add option to ask the save path on each download
* warn the user if the save paths are not defined, this only happens on the first NewPipe run (Android Lollipop or later)
2019-06-03 18:26:24 -03:00
kapodamy
d1573a0a6e misc changes
* implement socket timeout error
* use 128k buffer size for copy
* use NewPipe HTTP user agent in the downloads
* automatically recover downloads with network errors that are queued
2019-06-03 18:25:43 -03:00
kapodamy
16d6bda85d Webm muxer fixes and strings.xml changes
* replace "In queue" to "Pending" in the downloads header to avoid confusions (all languages)
* use 29bits Clusters size to support huge video resolutions (fixes #2291) (WebmWriter.java)
* add missing changes to WebmMuxer.java (i forget select the audio track)
2019-06-03 18:24:49 -03:00
kapodamy
4b3eb2ece5 Forget the download save path if the storage API is changed 2019-06-03 18:19:20 -03:00
kapodamy
1089de6321 Add confirm dialog before clear the finished download list 2019-06-03 18:19:18 -03:00
kapodamy
d00dc798f4 more SAF implementation
* full support for Directory API (Android Lollipop or later)
* best effort to handle any kind errors (missing file, revoked permissions, etc) and recover the download
* implemented directory choosing
* fix download database version upgrading
* misc. cleanup
* do not release permission on the old save path (if the user change the download directory) under SAF api
2019-06-03 18:18:20 -03:00
kapodamy
f6b32823ba Implement Storage Access Framework
* re-work finished mission database
* re-work DownloadMission and bump it Serializable version
* keep the classic Java IO API
* SAF Tree API support on Android Lollipop or higher
* add wrapper for SAF stream opening
* implement Closeable in SharpStream to replace the dispose() method

* do required changes for this API:
** remove any file creation logic from DownloadInitializer
** make PostProcessing Serializable and reduce the number of iterations
** update all strings.xml files
** storage helpers: StoredDirectoryHelper & StoredFileHelper
** best effort to handle any kind of SAF errors/exceptions
2019-06-03 18:16:41 -03:00
kapodamy
9e34fee58c New MP4 muxer + Queue changes + Storage fixes
Main changes:
* correctly check the available space (CircularFile.java)
* misc cleanup (CircularFile.java)
* use the "Error Reporter" for non-http errors
* rewrite network state checking and add better support for API 21 (Lollipop) or higher
* implement "metered networks"
* add buttons in "Downloads" activity to start/pause all pending downloads, ignoring the queue flag or if the network is "metered"
* add workaround for VPN connections and/or network switching. Example: switching WiFi to 3G
* rewrite DataReader ¡Webm muxer is now 57% more faster!
* rewrite CircularFile, use file buffers instead of memory buffers. Less troubles in low-end devices
* fix missing offset for KaxCluster (WebMWriter.java), manifested as no thumbnails on file explorers

Download queue:
* remember queue status, unless the user pause the download (un-queue)
* semi-automatic downloads, between networks. Effective if the user create a new download or the downloads activity is starts
* allow enqueue failed downloads
* new option, queue limit, enabled by default. Used to allow one or multiple downloads at same time

Miscellaneous:
* fix crash while selecting details/error menu (mistake on MissionFragment.java)
* misc serialize changes (DownloadMission.java)
* minor UI tweaks
* allow overwrite paused downloads
* fix wrong icons for grid/list button in downloads
* add share option
* implement #2006
* correct misspelled word in strings.xml (es) (cmn)
* fix MissionAdapter crash during device shutdown

New Mp4Muxer + required changes:
* new mp4 muxer (from dash only) with this, muxing on Android 7 is possible now!!!
* re-work in SharpStream
* drop mp4 dash muxer
* misc changes: add warning in SecondaryStreamHelper.java,
* strip m4a DASH files to normal m4a format (youtube only)

Fix storage issues:
* warn to the user if is choosing a "read only" download directory (for external SD Cards), useless is rooted :)
* "write proof" allow post-processing resuming only if the device ran out of space
* implement "insufficient storage" error for downloads
2019-06-03 18:09:43 -03:00
Tobias Groza
1684a2110c Update Extractor 2019-06-03 22:06:58 +02:00
Tobias Groza
5e00e34552 Merge remote-tracking branch 'Weblate/dev' into dev 2019-06-03 22:04:36 +02:00
Yaron Shahrabani
ce204eba62 Translated using Weblate (Hebrew)
Currently translated at 100.0% (443 of 443 strings)
2019-06-02 12:48:16 +02:00
Yaron Shahrabani
c7cb652322 Translated using Weblate (Hebrew)
Currently translated at 99.8% (442 of 443 strings)
2019-06-02 12:44:09 +02:00
Yaron Shahrabani
f8ccc3128e Translated using Weblate (Hebrew)
Currently translated at 99.8% (442 of 443 strings)
2019-06-02 12:44:08 +02:00
bob mar
4a8baaef45 Translated using Weblate (Hebrew)
Currently translated at 99.8% (442 of 443 strings)
2019-06-02 12:44:08 +02:00
artik banana
a9f3939c83 Translated using Weblate (Hebrew)
Currently translated at 99.8% (442 of 443 strings)
2019-06-02 12:27:18 +02:00
Joseph Kim
d8cb950248 Translated using Weblate (Korean)
Currently translated at 100.0% (443 of 443 strings)
2019-06-02 12:27:07 +02:00
AB
aefc51db4b Translated using Weblate (Ukrainian)
Currently translated at 100.0% (443 of 443 strings)
2019-06-02 12:27:00 +02:00
artik banana
fb18ea7ff8 Translated using Weblate (Hebrew)
Currently translated at 99.8% (442 of 443 strings)
2019-06-02 12:26:58 +02:00
bob mar
407c61e212 Translated using Weblate (Hebrew)
Currently translated at 99.8% (442 of 443 strings)
2019-06-02 12:26:58 +02:00
ssantos
d8e6ad48ca Translated using Weblate (Portuguese)
Currently translated at 100.0% (443 of 443 strings)
2019-06-02 02:18:34 +02:00
yunna
bd42f4188f Translated using Weblate (Japanese)
Currently translated at 99.8% (442 of 443 strings)
2019-06-02 02:18:34 +02:00
yunna
f766f383ea Translated using Weblate (English)
Currently translated at 100.0% (443 of 443 strings)
2019-06-02 02:18:28 +02:00
ssantos
1a9922d790 Translated using Weblate (German)
Currently translated at 100.0% (443 of 443 strings)
2019-06-02 02:18:24 +02:00
Tobias Groza
6213623431 Merge pull request #2235 from TeamNewPipe/readme-services
Add supported services section to readme
2019-06-02 02:03:14 +02:00
Tobias Groza
2809ee7a3e Merge branch 'dev' into readme-services 2019-06-02 02:02:44 +02:00
Tobias Groza
281cae7a18 Merge branch 'master' into dev 2019-05-31 23:46:28 +02:00
Tobias Groza
1670751c94 Merge pull request #2312 from TeamNewPipe/release_v0.16.2
Release v0.16.2
2019-05-31 23:30:39 +02:00
mohammadmdp
e1ead9d2ef Translated using Weblate (Persian)
Currently translated at 58.9% (261 of 443 strings)
2019-05-31 11:24:47 +02:00
Karel S
359a9a96d6 Translated using Weblate (Czech)
Currently translated at 99.8% (442 of 443 strings)
2019-05-31 11:24:44 +02:00
Stypox
b6cfb8a3dc Remove dupliacte direct_on_background string
start_here_on_background has the same meaning

start_here_on_main is now unused, but I left it there so that if it ever becomes useful again, it is ready to be used.
2019-05-30 15:30:13 +02:00
Stypox
6f028ecb19 Remove unused imports from modified files 2019-05-29 20:45:05 +02:00
Stypox
8695466690 Make subscription long-press menu consistant in local sub list
Inverted unsubscribe with share, since share has always been put after content-specific actions.
2019-05-29 20:39:17 +02:00
Stypox
bdb1be9967 Remove useless overrides of showStreamDialog
They were exactly the same as the base class function
2019-05-29 20:25:44 +02:00
Cipisek Rumcajsu
9395df4cc3 Translated using Weblate (Czech)
Currently translated at 90.3% (400 of 443 strings)
2019-05-29 18:08:08 +02:00
Karel S
93edb333d4 Translated using Weblate (Czech)
Currently translated at 90.3% (400 of 443 strings)
2019-05-29 18:08:08 +02:00
Stypox
30eeef46c2 Removed unused showStreamDialog from VideoDetailFragment
VideoDetailFragment already borrows a consistant menu from the stream list it holds.
2019-05-29 16:25:23 +02:00
Stypox
8b584f3922 Make long-press menu consistent across views: fix #2354
Also made the code that creates the menus consistent across files.
2019-05-29 16:22:01 +02:00
Tobias Groza
0c354c4fdb Remove old strings
Remove strings which have been deleted from the English strings file during development, but were translated via Weblate, which failed to pull and push our upstream repo.
2019-05-27 00:11:37 +02:00
Tobias Groza
bd7413119a Merge branch 'weblate' into release_v0.16.2
Update translations
2019-05-26 22:58:53 +02:00
Davide Palma
f26915aab6 Translated using Weblate (Italian)
Currently translated at 99.8% (442 of 443 strings)
2019-05-25 04:49:13 +02:00
Tobias Groza
f6068dc69d Translated using Weblate (German)
Currently translated at 100.0% (443 of 443 strings)
2019-05-25 04:49:11 +02:00
Marc Riera
bd2c65cd94 Translated using Weblate (Catalan)
Currently translated at 96.8% (429 of 443 strings)
2019-05-15 11:49:29 +02:00
Tobias Groza
4777910644 Update changelog for 0.16.2 2019-05-14 23:17:04 +02:00
Tobias Groza
66b26e52ce Update extractor version 2019-05-14 23:16:43 +02:00
Tolstovka
a758267d72 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (443 of 443 strings)
2019-05-13 10:53:20 +02:00
Tolstovka
72eae64698 Translated using Weblate (Russian)
Currently translated at 100.0% (443 of 443 strings)
2019-05-13 10:53:18 +02:00
84436
d63c18f7f0 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (443 of 443 strings)
2019-05-10 10:19:35 +02:00
Eduardo Caron
b05e3ca8d8 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (443 of 443 strings)
2019-05-10 10:17:50 +02:00
gabriellluz
0a88100b67 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (443 of 443 strings)
2019-05-08 16:49:07 +02:00
sherlockbeard
43b859f778 Merge branch 'dev' into removeextra 2019-05-07 13:59:32 +05:30
sherlockbeard
d1bd7f695f Update strings.xml 2019-05-07 13:57:31 +05:30
Vasiliy
312e1378d3 Fix tablet ui 2019-05-06 19:16:39 +03:00
abvgeej
55d6825f63 Translated using Weblate (Russian)
Currently translated at 99.5% (441 of 443 strings)
2019-05-06 14:48:53 +02:00
Jonathan Tavares
e4f9af7076 Translated using Weblate (Portuguese (Brazil))
Currently translated at 98.6% (437 of 443 strings)
2019-05-06 14:48:49 +02:00
Tobias Groza
ff52fe4884 Add changelog for NewPipe 0.16.2 2019-05-03 07:58:46 +02:00
Snow K1ng
0ab29b7c1f Translated using Weblate (Romanian)
Currently translated at 75.8% (336 of 443 strings)
2019-04-29 13:48:19 +02:00
yunna
d742ed7b65 Translated using Weblate (Japanese)
Currently translated at 100.0% (443 of 443 strings)
2019-04-29 13:46:50 +02:00
Jesper Hertel
a684e380b7 Translated using Weblate (Danish)
Currently translated at 98.9% (438 of 443 strings)
2019-04-29 13:45:08 +02:00
AB
c90feaf3db Translated using Weblate (Ukrainian)
Currently translated at 100.0% (443 of 443 strings)
2019-04-28 21:49:00 +02:00
Chandra Mohan Jha
460610f672 Translated using Weblate (Hindi)
Currently translated at 77.2% (342 of 443 strings)
2019-04-28 21:49:00 +02:00
Jesper Hertel
46511533aa Translated using Weblate (Danish)
Currently translated at 88.7% (393 of 443 strings)
2019-04-28 21:48:59 +02:00
Tobias Groza
40efed6580 Update version code and name to NewPipe 0.16.2 2019-04-28 03:34:47 +02:00
Tobias Groza
78b1c1eb4a Merge remote-tracking branch 'TeamNewPipe/master' into dev 2019-04-28 03:34:38 +02:00
Tobias Groza
5a59a3dd50 Merge pull request #2311 from Redirion/FixSubs
Readd CustomTrackSelector
2019-04-28 02:29:20 +02:00
Robin
0763280196 Readd CustomTrackSelector 2019-04-28 01:45:19 +02:00
Vasiliy
93f2518159 Animate states changed 2019-04-27 22:27:08 +03:00
Vasiliy
273f731dd5 Refactor adapter 2019-04-27 21:23:52 +03:00
Vasiliy
c7cd9e86ac Option to disable states indicators 2019-04-27 19:04:13 +03:00
Vasiliy
41fb6f5464 Update states in lists 2019-04-27 18:12:00 +03:00
Vasiliy
03b1a8bd41 Merge branch 'dev' into playback_state_list 2019-04-27 17:37:43 +03:00
Chandra Mohan Jha
e7d0685ebc Translated using Weblate (Hindi)
Currently translated at 74.5% (330 of 443 strings)
2019-04-27 09:58:33 +02:00
sXp
aadbfe1eed Translated using Weblate (Hindi)
Currently translated at 74.5% (330 of 443 strings)
2019-04-27 09:58:31 +02:00
Chandra Mohan Jha
4a54fbb872 Translated using Weblate (Hindi)
Currently translated at 74.5% (330 of 443 strings)
2019-04-27 09:58:09 +02:00
sXp
8b1836d699 Translated using Weblate (Hindi)
Currently translated at 74.5% (330 of 443 strings)
2019-04-27 09:58:08 +02:00
Chandra Mohan Jha
c47d4fd35a Translated using Weblate (Hindi)
Currently translated at 74.5% (330 of 443 strings)
2019-04-27 09:58:08 +02:00
pjammo
a58af1275c Translated using Weblate (Italian)
Currently translated at 99.5% (441 of 443 strings)
2019-04-26 19:48:45 +02:00
Marc Riera
1d63b39553 Translated using Weblate (Catalan)
Currently translated at 91.6% (406 of 443 strings)
2019-04-26 19:48:44 +02:00
Jesper Hertel
c300d52b29 Translated using Weblate (Danish)
Currently translated at 87.1% (386 of 443 strings)
2019-04-25 14:48:56 +02:00
Sören Strecke
5314e275bc Translated using Weblate (German)
Currently translated at 100.0% (443 of 443 strings)
2019-04-24 11:37:07 +02:00
yunna
08f8b9770a Translated using Weblate (Japanese)
Currently translated at 100.0% (443 of 443 strings)
2019-04-23 22:48:54 +02:00
YONGLE
a9c64b2fec Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (443 of 443 strings)
2019-04-23 22:48:50 +02:00
sherlock
1edfa78a05 removed the gena strings. 2019-04-17 16:45:40 +05:30
Kristjan Räts
1df8af35d4 Translated using Weblate (Estonian)
Currently translated at 100.0% (443 of 443 strings)
2019-04-16 21:05:04 +02:00
Vasiliy
f47c5e53b1 Merge branch 'playback_resume_v2' into playback_state_list 2019-04-15 22:19:54 +03:00
Vasiliy
a48cbc6971 Show streams states for local lists 2019-04-15 22:18:24 +03:00
Vasiliy
73be8cf074 Base implementation of showing playback positions in lists 2019-04-15 21:37:36 +03:00
Vasiliy
002a1412cb Fix scrolling details 2019-04-15 21:22:31 +03:00
Tobias Groza
049cd2d236 Merge pull request #1969 from nv95/close_button
Show close button when playing completed
2019-04-14 11:47:33 +02:00
Tobias Groza
e99714eba6 Merge remote-tracking branch 'TeamNewPipe/dev' into close_button 2019-04-13 18:18:17 +02:00
Vasiliy
4e1423d224 Implement playback state management 2019-04-13 13:34:36 +03:00
Lambda Monad
4751075e87 Translated using Weblate (Indonesian)
Currently translated at 99.3% (440 of 443 strings)
2019-04-12 21:04:47 +02:00
Tobias Groza
416e0fb609 Merge pull request #2271 from Stypox/dev
Add "share at current time" button to the main video player
2019-04-11 19:18:52 +02:00
minsk21
f96a371464 Translated using Weblate (Belarusian)
Currently translated at 74.5% (330 of 443 strings)
2019-04-10 04:04:47 +02:00
___
e423192265 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (443 of 443 strings)
2019-04-09 03:16:34 +02:00
minsk21
e9444e058c Translated using Weblate (Belarusian)
Currently translated at 74.3% (329 of 443 strings)
2019-04-09 03:16:28 +02:00
Yaron Shahrabani
037632fbf0 Translated using Weblate (Hebrew)
Currently translated at 100.0% (443 of 443 strings)
2019-04-07 15:59:53 +02:00
Yoav
6cdea85a49 Translated using Weblate (Hebrew)
Currently translated at 100.0% (443 of 443 strings)
2019-04-07 15:59:49 +02:00
Yaron Shahrabani
f86d755890 Translated using Weblate (Hebrew)
Currently translated at 100.0% (443 of 443 strings)
2019-04-07 15:59:49 +02:00
Stypox
98cc97251a Merge branch 'dev' into dev 2019-04-07 08:18:39 +02:00
Tobias Groza
562f414e3e Merge pull request #2237 from epitron/dev
Fixed English translations for Play/Enqueue commands
2019-04-06 23:32:05 +02:00
Tobias Groza
1afc301432 Merge branch 'dev' into dev 2019-04-06 23:23:15 +02:00
Yaron Shahrabani
115b44585b Translated using Weblate (Hebrew)
Currently translated at 100.0% (443 of 443 strings)
2019-04-06 21:10:05 +02:00
artik banana
3ff47623d5 Translated using Weblate (Hebrew)
Currently translated at 100.0% (443 of 443 strings)
2019-04-06 21:10:03 +02:00
Yaron Shahrabani
943e03f9d8 Translated using Weblate (Hebrew)
Currently translated at 100.0% (443 of 443 strings)
2019-04-06 21:10:03 +02:00
AB
f7a534a0d0 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (443 of 443 strings)
2019-04-06 20:59:53 +02:00
Yaron Shahrabani
72e30d8e40 Translated using Weblate (Hebrew)
Currently translated at 100.0% (443 of 443 strings)
2019-04-06 20:59:50 +02:00
Yehuda Levy
eb265300fc Translated using Weblate (Hebrew)
Currently translated at 100.0% (443 of 443 strings)
2019-04-06 20:59:48 +02:00
artik banana
704b8f61dd Translated using Weblate (Hebrew)
Currently translated at 100.0% (443 of 443 strings)
2019-04-06 20:59:47 +02:00
Stypox
40957c445f Implemented share button in MainVideoPlayer
Android Studio also decided to change the indentation of some lines
2019-04-06 20:27:13 +02:00
Stypox
8eead9fda2 Add share button to main player layout
Placed under "more options"
2019-04-06 20:21:32 +02:00
Stypox
aadc8168be Remove share utilities from BaseStateFragment
Replaced by ShareUtils
2019-04-06 20:17:04 +02:00
Stypox
cb33f04bfc Add ShareUtils class to share videos or open urls in browser. 2019-04-06 20:11:23 +02:00
Florian
82cb71bf3f Translated using Weblate (French)
Currently translated at 99.8% (442 of 443 strings)
2019-04-06 09:53:58 +02:00
Stjepan
c37b88a239 Translated using Weblate (Croatian)
Currently translated at 99.3% (440 of 443 strings)
2019-04-06 09:53:57 +02:00
___
de59bf695d Translated using Weblate (Ukrainian)
Currently translated at 99.8% (442 of 443 strings)
2019-04-06 09:53:55 +02:00
Tobias Groza
592627b013 Merge pull request #2247 from yausername/preferredTabState
preferred tab based on selected state, fixes #2238
2019-04-04 16:16:51 +02:00
Tobias Groza
9ed1fb2588 Merge branch 'dev' into preferredTabState 2019-04-04 15:22:57 +02:00
Tobias Groza
8232a92653 Translated using Weblate (Romanian)
Currently translated at 75.6% (335 of 443 strings)
2019-04-03 17:04:43 +02:00
Tobias Groza
09eeaa92d1 Merge pull request #2207 from yausername/timestampClickFix
seek on clicking timestamp links in comments
2019-04-03 16:04:31 +02:00
Igor Nedoboy
1e4b1a2c70 Translated using Weblate (Russian)
Currently translated at 100.0% (443 of 443 strings)
2019-03-31 22:58:10 +02:00
Marco Ieni
0a1e7a7c86 Translated using Weblate (Italian)
Currently translated at 99.3% (440 of 443 strings)
2019-03-31 22:16:38 +02:00
nautilusx
e5f3b2bf6e Translated using Weblate (German)
Currently translated at 100.0% (443 of 443 strings)
2019-03-31 22:16:37 +02:00
Florian
29183c10ff Translated using Weblate (French)
Currently translated at 99.1% (439 of 443 strings)
2019-03-31 22:16:37 +02:00
Stjepan
46b8bdace7 Translated using Weblate (Croatian)
Currently translated at 99.3% (440 of 443 strings)
2019-03-31 22:16:36 +02:00
Igor Nedoboy
9b6924ec9f Translated using Weblate (Russian)
Currently translated at 100.0% (443 of 443 strings)
2019-03-31 22:16:19 +02:00
Stjepan
c69de107e5 Translated using Weblate (Croatian)
Currently translated at 68.8% (305 of 443 strings)
2019-03-29 00:36:30 +01:00
Igor Nedoboy
c4d451e420 Translated using Weblate (Russian)
Currently translated at 100.0% (443 of 443 strings)
2019-03-29 00:36:25 +01:00
sherlockbeard
be6bce5771 Translated using Weblate (Hindi)
Currently translated at 74.3% (329 of 443 strings)
2019-03-27 21:04:26 +01:00
TobiGr
9bcccc87e6 Update README
Add supported services section
Move comment support
2019-03-26 23:36:12 +01:00
Tobias Groza
bf845be727 Merge branch 'dev' into timestampClickFix 2019-03-26 23:20:55 +01:00
Ahanaf Taskin Ar-Rafee
e92a5414d1 Translated using Weblate (Bengali (Bangladesh))
Currently translated at 30.5% (135 of 443 strings)
2019-03-25 06:38:50 +01:00
yausername
657125f43c save selected tab sate in stream detail fragment, fixes #2238 2019-03-24 06:31:28 +05:30
Christian Schabesberger
e98f68e93b Merge pull request #2242 from yausername/fixMissingAuthorName
fix empty author endpoint
2019-03-23 23:43:05 +01:00
Florian
bef84e9eec Translated using Weblate (French)
Currently translated at 97.3% (431 of 443 strings)
2019-03-23 20:38:52 +01:00
Le Poisson Libre
6a5f2402c7 Translated using Weblate (French)
Currently translated at 97.3% (431 of 443 strings)
2019-03-23 20:38:49 +01:00
yausername
d6cc6ba144 fix empty author endpoint 2019-03-23 00:22:59 +05:30
yausername
07f8dcb3ca use ellipsis character 2019-03-22 05:56:56 +05:30
yausername
a026143a84 linkify optimizations 2019-03-22 04:57:33 +05:30
Andrea Gelmini
73a5b6738d Translated using Weblate (Italian)
Currently translated at 99.1% (439 of 443 strings)
2019-03-21 18:03:59 +01:00
epitron
3e2b12ae4a Fixed English translations for Play/Enqueue commands 2019-03-21 11:24:52 -04:00
naofum
8073364b7a Translated using Weblate (Japanese)
Currently translated at 100.0% (443 of 443 strings)
2019-03-20 03:14:37 +01:00
Osoitz
b141d96e7c Translated using Weblate (Basque)
Currently translated at 100.0% (443 of 443 strings)
2019-03-20 03:14:36 +01:00
Serdar Sağlam
a86e8b98fe Translated using Weblate (Turkish)
Currently translated at 100.0% (443 of 443 strings)
2019-03-20 03:14:34 +01:00
WaldiS
a7d77716f3 Translated using Weblate (Polish)
Currently translated at 100.0% (443 of 443 strings)
2019-03-18 09:39:23 +01:00
Igor Nedoboy
b017e439b1 Translated using Weblate (Russian)
Currently translated at 100.0% (443 of 443 strings)
2019-03-17 21:06:17 +01:00
ssantos
a7156f665a Translated using Weblate (Portuguese)
Currently translated at 100.0% (443 of 443 strings)
2019-03-16 12:54:18 +01:00
WaldiS
44e34d084e Translated using Weblate (Polish)
Currently translated at 99.8% (442 of 443 strings)
2019-03-16 12:54:18 +01:00
C. Rüdinger
065820ffa4 Translated using Weblate (German)
Currently translated at 100.0% (443 of 443 strings)
2019-03-16 12:54:17 +01:00
Jeff Huang
26991928ae Translated using Weblate (Chinese (Traditional))
Currently translated at 99.8% (442 of 443 strings)
2019-03-16 12:54:16 +01:00
ssantos
f4fa68c390 Translated using Weblate (German)
Currently translated at 100.0% (443 of 443 strings)
2019-03-16 12:54:09 +01:00
Gontzal Manuel Pujana Onaindia
8b86f9ea6d Translated using Weblate (Basque)
Currently translated at 100.0% (443 of 443 strings)
2019-03-14 19:00:35 +01:00
Christian Schabesberger
48f966e7db add changelog for 730 2019-03-14 09:24:02 +01:00
Christian Schabesberger
d8746dc592 hotfix decrypt function and move on to version v0.16.1 2019-03-14 09:20:37 +01:00
Ritvik Saraf
6421d3017e seek on clicking timestamp links in comments 2019-03-13 07:01:24 +05:30
Tobias Groza
f9e771f8f7 Merge pull request #2198 from Redirion/directOnBackground
Directplay on Background
2019-03-12 13:42:43 +01:00
Tobias Groza
09456ce421 Merge branch 'dev' into directOnBackground 2019-03-12 13:36:14 +01:00
dextro67
716f7e722b Translated using Weblate (Hindi)
Currently translated at 73.6% (326 of 443 strings)
2019-03-12 04:03:54 +01:00
Der_Floh
ffa4b1483f Translated using Weblate (German)
Currently translated at 100.0% (443 of 443 strings)
2019-03-12 04:03:53 +01:00
Ritvik Saraf
76f7165462 Merge remote-tracking branch 'upstream/dev' into defaultTrending 2019-03-12 06:17:21 +05:30
Ritvik Saraf
fdf0d8e9c8 fixed memory leak 2019-03-12 06:07:56 +05:30
Christian Schabesberger
6651aa924f Merge pull request #2184 from Redirion/exoplayerupdate
Update ExoPlayer to 2.9.6
2019-03-11 20:43:28 +01:00
Ritvik Saraf
369fd95e2b skip tests, fix later 2019-03-11 06:27:18 +05:30
Ritvik Saraf
e242adec66 updated extractor 2019-03-11 03:16:17 +05:30
Ritvik Saraf
58e562f7d4 added default kiosk 2019-03-11 03:08:30 +05:30
Olexandr Nesterenko
70238fd773 Translated using Weblate (Ukrainian)
Currently translated at 98.4% (436 of 443 strings)
2019-03-10 20:09:04 +01:00
WaldiS
fc4e007cc4 Translated using Weblate (Polish)
Currently translated at 100.0% (443 of 443 strings)
2019-03-10 20:09:00 +01:00
Nathan Follens
b7667ce97a Translated using Weblate (Flemish)
Currently translated at 100.0% (443 of 443 strings)
2019-03-10 20:08:59 +01:00
ssantos
1315da0da7 Translated using Weblate (German)
Currently translated at 100.0% (443 of 443 strings)
2019-03-10 20:08:57 +01:00
84436
c4d8eae547 Translated using Weblate (Vietnamese)
Currently translated at 99.3% (440 of 443 strings)
2019-03-09 17:04:15 +01:00
Pj Pj
b01fc1be62 Translated using Weblate (Telugu)
Currently translated at 28.7% (127 of 443 strings)
2019-03-09 17:04:13 +01:00
marciozomb13
c46e3cf5cb Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.5% (441 of 443 strings)
2019-03-09 17:04:12 +01:00
WaldiS
1a6b915112 Translated using Weblate (Polish)
Currently translated at 100.0% (443 of 443 strings)
2019-03-09 17:04:11 +01:00
Terry Louwers
2f38943488 Translated using Weblate (Dutch)
Currently translated at 100.0% (443 of 443 strings)
2019-03-09 17:04:09 +01:00
Marco Szeto
06711dc6c3 Translated using Weblate (Chinese (Hong Kong))
Currently translated at 31.8% (141 of 443 strings)
2019-03-09 17:04:08 +01:00
Robin
cc7e342ab7 Merge remote-tracking branch 'upstream/dev' into directOnBackground 2019-03-08 23:02:47 +01:00
Robin
5b64743987 Directplay on Background 2019-03-08 22:52:17 +01:00
Robin
a84ad031d9 Merge remote-tracking branch 'upstream/dev' into exoplayerupdate 2019-03-07 16:06:02 +01:00
Tobias Groza
c4c2fe2a9c Merge pull request #1963 from Klearchos-K/dev
Issue #1951 - Search shared text
2019-03-07 15:50:51 +01:00
Tobias Groza
8ccaef454c Merge branch 'dev' into dev 2019-03-07 15:20:42 +01:00
Marian Hanzel
27579dff37 Translated using Weblate (Slovak)
Currently translated at 88.3% (391 of 443 strings)
2019-03-06 22:13:04 +01:00
Nikola Perović
389d08c233 Translated using Weblate (Serbian)
Currently translated at 47.4% (210 of 443 strings)
2019-03-06 22:12:59 +01:00
Michalis Nikolaidis
5412a087fe Translated using Weblate (Greek)
Currently translated at 100.0% (443 of 443 strings)
2019-03-06 22:12:59 +01:00
Konstantinos Giannopoulos
dd0f3ac651 Translated using Weblate (Greek)
Currently translated at 100.0% (443 of 443 strings)
2019-03-06 22:12:58 +01:00
YONGLE
4d4d776e4d Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (443 of 443 strings)
2019-03-06 22:12:51 +01:00
Robin
7877b107c1 Merge branch 'exoplayerupdate' of https://github.com/Redirion/NewPipe into exoplayerupdate 2019-03-06 09:38:17 +01:00
Robin
a2aa0aa9a8 Fix for wrong case after language normalization 2019-03-06 09:37:55 +01:00
Redirion
b3475d30c0 Merge branch 'dev' into exoplayerupdate 2019-03-05 21:44:27 +01:00
Tobias Groza
6484c8d636 Merge pull request #2183 from Redirion/Cleanup
delete unused files
2019-03-05 21:38:19 +01:00
Tobias Groza
587cf554f2 Merge branch 'dev' into Cleanup 2019-03-05 21:30:48 +01:00
Tobias Groza
1d4e4eb6b3 Merge pull request #2178 from Redirion/patch-1
Cache duration String to improve performance of background player
2019-03-05 21:06:22 +01:00
Tobias Groza
31c4ed7d0e Update app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java
Co-Authored-By: Redirion <redirion@web.de>
2019-03-05 20:57:05 +01:00
Robin
7f246b2d3d Removed unused import 2019-03-05 19:54:37 +01:00
Robin
7d68cff700 NOTE for legacy version: Removed Lint markers and completely dropped Jelly Bean workarounds 2019-03-05 19:48:39 +01:00
Robin
4d80bdcc9f Update ExoPlayer to 2.9.6, including httook dependency and deprecations 2019-03-05 18:05:44 +01:00
Robin
8b4a94e5aa delete unused files 2019-03-05 18:01:11 +01:00
Redirion
111ad14ad3 Merge branch 'dev' into patch-1 2019-03-05 17:57:52 +01:00
Tobias Groza
aec3f19d23 Merge pull request #2179 from Redirion/patch-2
Improve performance of getTimeString
2019-03-04 19:16:43 +01:00
Redirion
d8b80f961a Improved performance of getTimeString
This pull requests complements pull request  #2178 by reducing general computational time for the method getTimeString.

On my local machine (Desktop PC with Java) my tests with a sample size of 10000 calls to the method with param 86400001 showed a performance improvement of about 50%.

See sample code below to reproduce:

    private static final StringBuilder stringBuilder = new StringBuilder();
    private static final Formatter stringFormatter = new Formatter(stringBuilder, Locale.getDefault());
    
    public static String getTimeString(int milliSeconds) {
        int seconds = (milliSeconds % 60000) / 1000;
        int minutes = (milliSeconds % 3600000) / 60000;
        int hours = (milliSeconds % 86400000) / 3600000;
        int days = (milliSeconds % (86400000 * 7)) / 86400000;

        stringBuilder.setLength(0);
        return days > 0 ? stringFormatter.format("%d:%02d:%02d:%02d", days, hours, minutes, seconds).toString()
                : hours > 0 ? stringFormatter.format("%d:%02d:%02d", hours, minutes, seconds).toString()
                : stringFormatter.format("%02d:%02d", minutes, seconds).toString();
    }
    
    public static String getTimeStringL(int milliSeconds) {
        long seconds = (milliSeconds % 60000L) / 1000L;
        long minutes = (milliSeconds % 3600000L) / 60000L;
        long hours = (milliSeconds % 86400000L) / 3600000L;
        long days = (milliSeconds % (86400000L * 7L)) / 86400000L;

        stringBuilder.setLength(0);
        return days > 0 ? stringFormatter.format("%d:%02d:%02d:%02d", days, hours, minutes, seconds).toString()
                : hours > 0 ? stringFormatter.format("%d:%02d:%02d", hours, minutes, seconds).toString()
                : stringFormatter.format("%02d:%02d", minutes, seconds).toString();
    }
    
	public static void main(String[] args) throws Exception {
		final int SAMPLE_SIZE = 25000;
		long[] results = new long[SAMPLE_SIZE];
		for(int i = 0; i < SAMPLE_SIZE; i++) {
			long now = System.nanoTime();
			getTimeString(86400001);
			results[i] = System.nanoTime() - now;
		}
		long sum = 0;
		for(int i = 0; i < SAMPLE_SIZE; i++) {
			sum += results[i];
		}
		System.out.println("Average execution time: " + (sum/SAMPLE_SIZE));
		results = new long[SAMPLE_SIZE];
		for(int i = 0; i < SAMPLE_SIZE; i++) {
			long now = System.nanoTime();
			getTimeStringL(86400001);
			results[i] = System.nanoTime() - now;
		}
		sum = 0;
		for(int i = 0; i < SAMPLE_SIZE; i++) {
			sum += results[i];
		}
		System.out.println("Average execution time: " + (sum/SAMPLE_SIZE));
2019-03-04 15:45:59 +01:00
rimasx
891bb7fa40 Translated using Weblate (Estonian)
Currently translated at 100.0% (443 of 443 strings)
2019-03-04 11:58:31 +01:00
Rex_sa
0e3af45466 Translated using Weblate (Arabic)
Currently translated at 100.0% (443 of 443 strings)
2019-03-04 11:58:24 +01:00
Redirion
6aebbc3109 Cache duration String to improve performance
In VideoPlayer the Duration String is cached effectively by setting it to the playbackSeekBar. As the playbackSeekBar doesn't exist in BackgroundPlayer, using two addition variables will reduce performance impact of notification updates by almost 50% and thus perform similar to VideoPlayer.

This addresses issue #2170
2019-03-04 10:24:08 +01:00
Christian Schabesberger
15eb7f3186 Merge pull request #2023 from dotvirus/enqueue-playlist
Add playlist to queue when long clicking on 'Background'
2019-03-03 20:59:15 +01:00
Christian Schabesberger
fb4cd98014 Merge branch 'dev' into enqueue-playlist 2019-03-03 20:53:17 +01:00
Christian Schabesberger
eb692dea59 Merge pull request #2168 from yausername/commentSizeAndLinks
make links in comments clickable, increase text size
2019-03-03 20:52:11 +01:00
Christian Schabesberger
d8039fb542 Merge branch 'dev' into enqueue-playlist 2019-03-03 20:50:00 +01:00
Christian Schabesberger
5e06d19d77 Merge branch 'dev' into commentSizeAndLinks 2019-03-03 20:46:03 +01:00
Christian Schabesberger
963f390336 Merge pull request #2176 from yausername/fixScrollOnBlank
fixed scroll w/ comments and related streams disabled
2019-03-03 20:41:07 +01:00
Ritvik Saraf
2309e15261 fixed scroll w/ comments and related streams disabled 2019-03-03 18:20:15 +05:30
Ritvik Saraf
8491035b2f updated extractor 2019-03-03 04:34:50 +05:30
Ritvik Saraf
4d4107aefc Merge remote-tracking branch 'upstream/dev' into commentSizeAndLinks 2019-03-03 04:32:19 +05:30
Ritvik Saraf
67d2b9131e handling timestamp links in comments 2019-03-02 05:12:06 +05:30
Christian Schabesberger
da8644168c Merge branch 'master' into dev 2019-03-01 09:53:43 +01:00
Ritvik Saraf
c0004e988a make links in comments clickable, increase text size 2019-03-01 13:28:32 +05:30
Javi
b9187445e0 Translated using Weblate (Spanish)
Currently translated at 100.0% (443 of 443 strings)
2019-02-27 22:28:31 +01:00
Christian Schabesberger
554ebf7ab9 Merge pull request #2161 from Redirion/patch-1
Fixed CheckForNewAppVersionTask being executed when it shouldn't
2019-02-27 22:14:53 +01:00
Redirion
3e54cd7284 Update CheckForNewAppVersionTask.java 2019-02-26 19:33:01 +01:00
Redirion
a7afc23a9a Fixed Asynctask being executed when it shouldn't
#1 check if cancel was called in onPrepare
#2 if we currently don't have a Connection, don't show crash report dialogue to user
2019-02-26 19:23:54 +01:00
abvgeej
fa3a047519 Translated using Weblate (Russian)
Currently translated at 100.0% (443 of 443 strings)
2019-02-25 23:18:20 +01:00
Christian Schabesberger
f24fab0fa2 fix brake when selecting a mediaccc channel form subscription page 2019-02-25 12:24:48 +01:00
Christian Schabesberger
261620fd13 Merge branch 'master' into release_v0.16.0 2019-02-24 23:06:06 +01:00
Christian Schabesberger
9af6effad9 move on to version 0.16.0 2019-02-24 22:52:07 +01:00
Christian Schabesberger
92602916dd merge weblate 2019-02-24 22:51:08 +01:00
Christian Schabesberger
f4d215664e Merge pull request #2117 from nv95/patch1_ui
Small ux improve
2019-02-24 22:34:12 +01:00
Christian Schabesberger
84894a557a Merge branch 'dev' into patch1_ui 2019-02-24 22:27:06 +01:00
Christian Schabesberger
ffad6e4c61 Merge pull request #2148 from yausername/commentsAndRelatedUx
added top padding for comments and related videos
2019-02-24 22:26:46 +01:00
Christian Schabesberger
93b266e6be Merge branch 'dev' into commentsAndRelatedUx 2019-02-24 22:19:47 +01:00
Christian Schabesberger
f92ea28581 Merge pull request #2151 from nv95/fix_leak
Fix AudioManager memory leak
2019-02-24 22:19:27 +01:00
Christian Schabesberger
85213e4b6c Merge branch 'dev' into patch1_ui 2019-02-24 22:18:06 +01:00
Christian Schabesberger
4e46119e18 Merge branch 'dev' into commentsAndRelatedUx 2019-02-24 22:17:24 +01:00
Christian Schabesberger
fdc6e9f1c3 Merge branch 'dev' into fix_leak 2019-02-24 22:12:46 +01:00
Christian Schabesberger
cb20f1e212 Merge pull request #2153 from TeamNewPipe/fix_url
fix invalid channel url for commends
2019-02-24 22:10:40 +01:00
Christian Schabesberger
e3fccd7125 fix invalid channel url for commends 2019-02-24 22:10:16 +01:00
Vasiliy
15142c1ec3 Fix AudioManager memory leak 2019-02-24 10:51:30 +02:00
Nathan Follens
6c7b90e1c3 Translated using Weblate (Flemish)
Currently translated at 100.0% (443 of 443 strings)
2019-02-24 06:18:27 +01:00
Nathan Follens
d8e57144f7 Translated using Weblate (Dutch)
Currently translated at 100.0% (443 of 443 strings)
2019-02-24 06:18:27 +01:00
Ritvik Saraf
49fe8a427a added top padding for comments and related videos 2019-02-24 02:21:11 +05:30
Vasiliy
4587428d13 Merge branch 'dev' into close_button 2019-02-23 13:19:09 +02:00
Vasiliy
5318e77035 Merge branch 'dev' into patch1_ui 2019-02-23 13:18:14 +02:00
Christian Schabesberger
e69c45a246 Merge pull request #1650 from yausername/dev
comments support
2019-02-21 15:50:21 +01:00
Ritvik Saraf
3f87a6d714 Merge remote-tracking branch 'origin/dev' into dev 2019-02-20 05:29:34 +05:30
Ritvik Saraf
841124b1f3 updated extractor, fixed settings padding 2019-02-20 05:24:33 +05:30
Hosted Weblate
257a878ef4 Merge branch 'origin/dev' into Weblate. 2019-02-19 19:18:29 +01:00
84436
07d3f82912 Translated using Weblate (Vietnamese)
Currently translated at 99.3% (440 of 443 strings)
2019-02-19 19:18:26 +01:00
Ali Demirtas
7d3eb4f5a6 Translated using Weblate (Turkish)
Currently translated at 100.0% (443 of 443 strings)
2019-02-19 19:18:12 +01:00
srkrishna
0efcc55373 Translated using Weblate (Tamil)
Currently translated at 34.5% (153 of 443 strings)
2019-02-19 19:18:12 +01:00
Christian Schabesberger
eafceb8a6c Merge branch 'dev' into dev 2019-02-19 17:35:49 +01:00
Christian Schabesberger
5ac8318e71 Merge pull request #2136 from TeamNewPipe/db_doc
add database doc in dia
2019-02-19 16:06:11 +01:00
Christian Schabesberger
7981f9dc91 add database doc in dia 2019-02-19 16:03:10 +01:00
Christian Schabesberger
a9bf04cbc6 Merge pull request #2135 from TeamNewPipe/firetv
add support for search in amazon firetv
2019-02-19 15:00:22 +01:00
Christian Schabesberger
4b5591d884 move firetv utils into utils package 2019-02-19 14:57:49 +01:00
Christian Schabesberger
c08197f025 Merge branch 'dev' into feature/amazonfiretv-search-support 2019-02-19 14:54:48 +01:00
Christian Schabesberger
5d22eabfa3 Merge pull request #2092 from connectety/updated-urls
support for youtube-nocookie.com
2019-02-19 14:30:56 +01:00
Christian Schabesberger
c3a38e384a Merge branch 'dev' into updated-urls 2019-02-19 14:30:34 +01:00
Christian Schabesberger
0d3dd94559 Merge pull request #2120 from Redirion/patch-1
Fix delayed ducking of Audio
2019-02-19 14:30:11 +01:00
Christian Schabesberger
9cdaa37519 Merge branch 'dev' into patch-1 2019-02-19 14:29:34 +01:00
Christian Schabesberger
202a319d69 Merge pull request #2129 from TeamNewPipe/remove-old-player
Remove old player from the manifest
2019-02-19 14:29:02 +01:00
Christian Schabesberger
198384b2ed Merge branch 'dev' into remove-old-player 2019-02-19 14:28:53 +01:00
Christian Schabesberger
9d8b070f1e Merge pull request #2133 from kapodamy/popup-player-fixup
Fix random Popup player crash
2019-02-19 14:28:04 +01:00
dimqua
28ba2d5008 Translated using Weblate (Russian)
Currently translated at 100.0% (443 of 443 strings)
2019-02-19 14:07:27 +01:00
Arthur
37ddd63d27 Translated using Weblate (Russian)
Currently translated at 100.0% (443 of 443 strings)
2019-02-19 14:07:26 +01:00
dimqua
d7f8b8c1e0 Translated using Weblate (Russian)
Currently translated at 97.5% (432 of 443 strings)
2019-02-18 13:28:20 +01:00
Arthur
9e70c5bbea Translated using Weblate (Russian)
Currently translated at 97.5% (432 of 443 strings)
2019-02-18 13:28:19 +01:00
kapodamy
4dd572063e fix crash while switching from popup to fullscreen player, or closing the popup player. 2019-02-17 16:59:35 -03:00
TobiGr
db9cf95648 Remove old player from the manifest
See https://github.com/TeamNewPipe/NewPipe/pull/1884 for more info
2019-02-17 09:52:05 +01:00
Ritvik Saraf
df6bae4712 merged upstream/dev 2019-02-16 02:06:18 +05:30
Ritvik Saraf
56cb8209b8 refactored comments capability 2019-02-16 01:23:26 +05:30
WaldiS
aba9c2e113 Translated using Weblate (Polish)
Currently translated at 100.0% (443 of 443 strings)
2019-02-15 17:24:20 +01:00
Ali Demirtas
3d25008739 Translated using Weblate (Turkish)
Currently translated at 97.5% (432 of 443 strings)
2019-02-14 10:11:03 +01:00
Redirion
9437f057d0 Fix delayed ducking of Audio
Scenario: listening to a video on NewPipe over Bluetooth and a Notification Sound causes audio focus event AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK.

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

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

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

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

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

Also let me know if this section should be relocated within the README. I figured it would be best to keep it up top, so people see it right away, and then don't make a new Issue.
2019-01-21 02:35:39 +00:00
Christian Schabesberger
c6bd42843b Merge pull request #2040 from TeamNewPipe/fix_livestream
Fix livestream
2019-01-20 14:24:53 +01:00
Christian Schabesberger
43e4fbfcd0 fix livestream issue, and move on to v0.15.1 2019-01-20 14:23:41 +01:00
Igor Nedoboy
ac8430cbba Translated using Weblate (Russian)
Currently translated at 100.0% (383 of 383 strings)
2019-01-20 00:22:24 +01:00
Ritvik Saraf
86d619be30 merged upstream/dev 2019-01-19 15:48:05 +05:30
Ritvik Saraf
fec7672598 updated extractor for url decryption fix 2019-01-19 15:26:31 +05:30
Roberto Palenga
44d2744a8c Translated using Weblate (Italian)
Currently translated at 100.0% (383 of 383 strings)
2019-01-19 01:20:51 +01:00
philSism
22bfbe96c8 Translated using Weblate (Greek)
Currently translated at 100.0% (383 of 383 strings)
2019-01-19 01:20:51 +01:00
dotvirus
c0aca723da Update PlaylistFragment.java 2019-01-18 23:58:24 +01:00
dotvirus
28e5ee51ec Add playlist to queue when long click on 'Background' 2019-01-18 23:16:02 +01:00
Edwar Tikhonov
6c5c42c2b5 Translated using Weblate (Russian)
Currently translated at 100.0% (383 of 383 strings)
2019-01-15 19:20:55 +01:00
naofum
b1653b359e Translated using Weblate (Japanese)
Currently translated at 84.3% (323 of 383 strings)
2019-01-15 19:20:52 +01:00
DeadMetaler
11098afab5 Translated using Weblate (Belarusian)
Currently translated at 86.7% (332 of 383 strings)
2019-01-13 00:19:37 +01:00
AppSoft4
a64051e0f1 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (383 of 383 strings)
2019-01-12 21:06:58 +01:00
Nathan Follens
db8ac4a9ae Translated using Weblate (Flemish)
Currently translated at 100.0% (383 of 383 strings)
2019-01-12 21:06:57 +01:00
Nathan Follens
890474a635 Translated using Weblate (Dutch)
Currently translated at 100.0% (383 of 383 strings)
2019-01-12 21:06:54 +01:00
zmni
a39b10eee9 Translated using Weblate (Indonesian)
Currently translated at 100.0% (383 of 383 strings)
2019-01-08 19:07:15 +01:00
srkrishna
97b933a990 Translated using Weblate (Tamil)
Currently translated at 40.5% (155 of 383 strings)
2019-01-07 15:06:58 +01:00
Sérgio Marques
4926e90514 Translated using Weblate (Portuguese)
Currently translated at 100.0% (383 of 383 strings)
2019-01-07 15:06:58 +01:00
zmni
6dca975844 Translated using Weblate (Indonesian)
Currently translated at 100.0% (383 of 383 strings)
2019-01-04 12:07:00 +01:00
zelos-h
e31743770a Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (383 of 383 strings)
2019-01-04 12:06:59 +01:00
Markel @wakutiteo
d8aab62d75 Translated using Weblate (Spanish)
Currently translated at 90.9% (348 of 383 strings)
2019-01-03 00:48:39 +01:00
Jeff Huang
f90603a18f Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (383 of 383 strings)
2019-01-03 00:48:38 +01:00
Marc Riera
5fce9facbe Translated using Weblate (Catalan)
Currently translated at 99.7% (382 of 383 strings)
2019-01-03 00:48:37 +01:00
zelos-h
32b48d5cdb Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (383 of 383 strings)
2019-01-03 00:48:36 +01:00
Jeff Huang
3e4f0d682b Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (383 of 383 strings)
2019-01-03 00:48:35 +01:00
Yaron Shahrabani
98449ddfe0 Translated using Weblate (Hebrew)
Currently translated at 88.5% (339 of 383 strings)
2019-01-01 10:09:41 +01:00
WaldiS
26040d4e9f Translated using Weblate (Polish)
Currently translated at 100.0% (383 of 383 strings)
2018-12-30 19:03:39 +01:00
Vasily
7ab10aeb80 Remove search history items using swipe 2018-12-29 20:55:24 +02:00
Vasily
9316962e47 Clear history option menu item 2018-12-29 20:55:10 +02:00
srkrishna
83cea5e1ee Translated using Weblate (Tamil)
Currently translated at 39.7% (152 of 383 strings)
2018-12-29 00:09:42 +01:00
postsorino
3e73a5dbd3 Translated using Weblate (Greek)
Currently translated at 99.5% (381 of 383 strings)
2018-12-29 00:09:41 +01:00
Tobias Groza
dd424a4cb3 Translated using Weblate (Greek)
Currently translated at 99.5% (381 of 383 strings)
2018-12-29 00:09:38 +01:00
Éfrit
0c79f5cce3 Translated using Weblate (French)
Currently translated at 100.0% (383 of 383 strings)
2018-12-29 00:09:37 +01:00
krtkush
794c3703e5 Merge branch '1520_app_update_notif' of https://github.com/krtkush/NewPipe into 1520_app_update_notif 2018-12-28 18:09:05 +05:30
krtkush
b674006fcc Conflict resolution. 2018-12-28 18:07:54 +05:30
Vasily
505c528194 Show close button when playing completed 2018-12-27 16:51:48 +02:00
Ritvik Saraf
559c397b2f more NPE fix 2018-12-25 20:17:56 +05:30
Ritvik Saraf
646698f1ed fixed NPE in soundcloud 2018-12-25 19:59:03 +05:30
Ritvik Saraf
c9b938ae55 readded animations 2018-12-25 15:36:15 +05:30
Klearchos-K
e4409e8ea4 Update RouterActivity.java
Add dunction handleText() for #1951 issue
2018-12-24 20:11:21 +02:00
Ritvik Saraf
990c220fa0 updated extractor 2018-12-23 09:44:42 +05:30
Yehuda Levy
38641d4edf Translated using Weblate (Hebrew)
Currently translated at 88.5% (339 of 383 strings)
2018-12-23 02:09:26 +01:00
srkrishna
450072bd23 Translated using Weblate (Tamil)
Currently translated at 39.4% (151 of 383 strings)
2018-12-21 22:09:14 +01:00
srkrishna
25eb93fae0 Translated using Weblate (Tamil)
Currently translated at 37.1% (142 of 383 strings)
2018-12-20 14:09:13 +01:00
Ben De Meester
bcf6f60571 Translated using Weblate (Flemish)
Currently translated at 85.4% (327 of 383 strings)
2018-12-20 14:09:11 +01:00
Ben De Meester
2076b8f1d7 Translated using Weblate (Dutch)
Currently translated at 100.0% (383 of 383 strings)
2018-12-20 14:09:10 +01:00
Ritvik Saraf
f19cfb75e6 merged upstream/dev 2018-12-20 08:51:44 +05:30
Ritvik Saraf
ceaacc771d removed jerky animations 2018-12-19 10:58:59 +05:30
Ritvik Saraf
48067e3285 up next text alignment 2018-12-17 10:03:04 +05:30
sXp
003855a94c Translated using Weblate (Hindi)
Currently translated at 85.4% (327 of 383 strings)
2018-12-15 19:03:36 +01:00
srkrishna
e7a26b436d Translated using Weblate (Tamil)
Currently translated at 32.9% (126 of 383 strings)
2018-12-10 19:42:55 +01:00
AB
ab94bc18dc Translated using Weblate (Ukrainian)
Currently translated at 100.0% (383 of 383 strings)
2018-12-10 13:08:54 +01:00
Eduardo Caron
36e91ea155 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (383 of 383 strings)
2018-12-10 13:08:53 +01:00
Kartikey Kushwaha
67499bdc65 Merge branch 'dev' into 1520_app_update_notif 2018-12-09 18:43:20 +05:30
Ritvik Saraf
222c8fdb62 tablet ui support for comments 2018-12-09 03:21:55 +05:30
srkrishna
9d648bad51 Translated using Weblate (Tamil)
Currently translated at 30.3% (116 of 383 strings)
2018-12-08 22:08:52 +01:00
Ritvik Saraf
1a62b9a161 removed dislike button, added comment published time 2018-12-08 20:32:28 +05:30
Echelon Arpa
33021e8fe0 Translated using Weblate (Turkish)
Currently translated at 100.0% (383 of 383 strings)
2018-12-07 21:09:01 +01:00
Emin Tufan Çetin
5a2ae4c3e3 Translated using Weblate (Turkish)
Currently translated at 100.0% (383 of 383 strings)
2018-12-07 21:09:01 +01:00
srkrishna
9eaef84cc8 Translated using Weblate (Tamil)
Currently translated at 29.8% (114 of 383 strings)
2018-12-07 21:09:00 +01:00
Rintaro matsuo
fcc4d655f5 Translated using Weblate (Japanese)
Currently translated at 81.5% (312 of 383 strings)
2018-12-07 21:08:59 +01:00
ScratchBuild
8d0ac4f5f0 Translated using Weblate (Japanese)
Currently translated at 81.5% (312 of 383 strings)
2018-12-07 21:08:58 +01:00
Tobias Groza
d56cf003f8 Translated using Weblate (German)
Currently translated at 100.0% (383 of 383 strings)
2018-12-07 21:08:58 +01:00
Kristjan Räts
34d0c0b1ba Translated using Weblate (Estonian)
Currently translated at 100.0% (383 of 383 strings)
2018-12-07 21:08:56 +01:00
Vojtěch Šamla
9bbbffbe7a Translated using Weblate (Czech)
Currently translated at 100.0% (383 of 383 strings)
2018-12-07 21:08:55 +01:00
Ritvik Saraf
ccb9bceecc removed unused imports 2018-12-07 08:42:05 +05:30
Ritvik Saraf
c1a67ff1f8 minor scrolling fix and ellipsize fix 2018-12-07 06:45:33 +05:30
Kartikey Kushwaha
bfda8dcc02 Merge branch 'dev' into 1520_app_update_notif 2018-12-05 13:04:24 +05:30
Ritvik Saraf
ff90f257cc removed useless log statement 2018-12-04 23:37:02 +05:30
Ritvik Saraf
9b84046865 merged upstream/dev 2018-12-04 23:19:57 +05:30
Tobias Groza
f62bfeac08 Merge branch 'dev' into 1520_app_update_notif 2018-12-03 16:33:46 +01:00
srkrishna
49a58dcab1 Translated using Weblate (Tamil)
Currently translated at 29.0% (111 of 383 strings)
2018-12-02 16:08:42 +01:00
notramo
e2acbeddc2 Translated using Weblate (Hungarian)
Currently translated at 84.9% (325 of 383 strings)
2018-12-02 16:08:41 +01:00
Kristjan Räts
449b17d830 Translated using Weblate (Estonian)
Currently translated at 86.4% (331 of 383 strings)
2018-12-02 16:08:39 +01:00
Kartikey Kushwaha
7ed460ce02 Merge branch 'dev' into 1520_app_update_notif 2018-12-02 18:07:08 +05:30
mahmut özcan
edcb692f78 Translated using Weblate (Turkish)
Currently translated at 97.1% (372 of 383 strings)
2018-11-29 22:08:34 +01:00
ask6155
f33586f062 Translated using Weblate (Hindi)
Currently translated at 81.5% (312 of 383 strings)
2018-11-29 22:08:30 +01:00
Olexandr Nesterenko
d61bf26e17 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (383 of 383 strings)
2018-11-28 15:17:37 +01:00
AB
2e662b5745 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (383 of 383 strings)
2018-11-28 15:17:36 +01:00
Helios
9714fa369b Translated using Weblate (Tamil)
Currently translated at 28.7% (110 of 383 strings)
2018-11-28 15:17:34 +01:00
Markel @wakutiteo
0e8acba08e Translated using Weblate (Spanish)
Currently translated at 88.3% (338 of 383 strings)
2018-11-28 15:17:28 +01:00
Sérgio Marques
a18e588e55 Translated using Weblate (Portuguese)
Currently translated at 100.0% (383 of 383 strings)
2018-11-28 15:17:27 +01:00
ask6155
bf55e3c0cc Translated using Weblate (Hindi)
Currently translated at 79.6% (305 of 383 strings)
2018-11-28 15:17:20 +01:00
ButterflyOfFire
486d114e64 Translated using Weblate (Arabic)
Currently translated at 85.9% (329 of 383 strings)
2018-11-28 15:17:19 +01:00
Prabjot Singh
ac5c060a98 Translated using Weblate (Hindi)
Currently translated at 79.6% (305 of 383 strings)
2018-11-28 15:17:18 +01:00
ask6155
86a9d197cb Translated using Weblate (Hindi)
Currently translated at 79.6% (305 of 383 strings)
2018-11-28 15:17:17 +01:00
MadderRagax
70aac81900 Translated using Weblate (Swedish)
Currently translated at 98.4% (377 of 383 strings)
2018-11-26 14:42:04 +01:00
Eduardo Caron
28e78d98f6 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (383 of 383 strings)
2018-11-26 14:42:02 +01:00
Mostafa Ahangarha
fabc5ae032 Translated using Weblate (Persian)
Currently translated at 62.4% (239 of 383 strings)
2018-11-26 14:42:01 +01:00
ditokp
e40882455d Translated using Weblate (Indonesian)
Currently translated at 99.7% (382 of 383 strings)
2018-11-26 14:41:54 +01:00
Whod
f1483e8c8e Translated using Weblate (Bulgarian)
Currently translated at 100.0% (383 of 383 strings)
2018-11-26 14:41:51 +01:00
Viktar Vauchkevich
bd40e2c3ff Translated using Weblate (Belarusian)
Currently translated at 86.7% (332 of 383 strings)
2018-11-26 14:41:49 +01:00
Gontzal Manuel Pujana Onaindia
9479498713 Translated using Weblate (Basque)
Currently translated at 100.0% (383 of 383 strings)
2018-11-26 14:41:49 +01:00
ssantos
6bd8523ec2 Translated using Weblate (Portuguese)
Currently translated at 100.0% (383 of 383 strings)
2018-11-26 14:41:46 +01:00
krtkush
c864b15c34 Test code revert. 2018-11-26 01:18:33 +05:30
krtkush
069654c5f9 vector -> png 2018-11-26 01:18:02 +05:30
anoy
5ac17ee6b8 added support for invidio.us links 2018-11-23 19:18:34 +01:00
krtkush
26e22f97ee Conflict resolution 2018-11-23 01:41:47 +05:30
krtkush
ad5535af81 Code refactoring, PR changes. 2018-11-19 23:27:13 +05:30
Yaron Shahrabani
cdcfb4ffce Translated using Weblate (Hebrew)
Currently translated at 78.9% (302 of 383 strings)
2018-11-18 21:40:36 +01:00
b1a6b64a90
5403ac8893 Translated using Weblate (French)
Currently translated at 99.5% (381 of 383 strings)
2018-11-18 21:40:35 +01:00
Igor Nedoboy
9b26457781 Translated using Weblate (Russian)
Currently translated at 100.0% (383 of 383 strings)
2018-11-18 21:40:33 +01:00
krtkush
939cc56951 Pull request changes v2. 2018-11-18 19:18:16 +05:30
krtkush
23309e6fdf Pull request changes. 2018-11-18 19:15:50 +05:30
MadderRagax
3f60c961d9 Translated using Weblate (Swedish)
Currently translated at 97.9% (375 of 383 strings)
2018-11-18 13:43:46 +01:00
Ariel Shulman
9e7f07e196 Translated using Weblate (Hebrew)
Currently translated at 78.9% (302 of 383 strings)
2018-11-18 13:43:45 +01:00
ssantos
eda4439ee8 Translated using Weblate (German)
Currently translated at 100.0% (383 of 383 strings)
2018-11-18 13:43:43 +01:00
b1a6b64a90
ad02558ade Translated using Weblate (French)
Currently translated at 99.5% (381 of 383 strings)
2018-11-18 13:43:38 +01:00
WaldiS
0d1901cfe5 Translated using Weblate (Polish)
Currently translated at 100.0% (383 of 383 strings)
2018-11-17 14:08:01 +01:00
Emanuele Petriglia
ce493d1ae2 Translated using Weblate (Italian)
Currently translated at 100.0% (383 of 383 strings)
2018-11-17 14:07:59 +01:00
wellinkstein
09312ecd1d Translated using Weblate (French)
Currently translated at 98.2% (376 of 383 strings)
2018-11-17 14:07:58 +01:00
ezjerry liao
2f274d5f52 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (383 of 383 strings)
2018-11-17 14:07:56 +01:00
Marc Riera
6dbf226365 Translated using Weblate (Catalan)
Currently translated at 99.5% (381 of 383 strings)
2018-11-17 14:07:54 +01:00
Viktar Vauchkevich
6401b5f54d Translated using Weblate (Belarusian)
Currently translated at 85.1% (326 of 383 strings)
2018-11-17 14:07:50 +01:00
beriain
ac2dd81d39 Translated using Weblate (Basque)
Currently translated at 85.1% (326 of 383 strings)
2018-11-17 14:07:50 +01:00
AB
44b2e62eef Translated using Weblate (Ukrainian)
Currently translated at 84.9% (325 of 383 strings)
2018-11-13 20:43:45 +01:00
Igor Nedoboy
7d5d4df761 Translated using Weblate (Russian)
Currently translated at 100.0% (383 of 383 strings)
2018-11-13 20:43:41 +01:00
Mostafa Ahangarha
da7716db60 Translated using Weblate (Persian)
Currently translated at 35.0% (134 of 383 strings)
2018-11-13 20:43:39 +01:00
postsorino
862c5d342b Translated using Weblate (Greek)
Currently translated at 84.6% (324 of 383 strings)
2018-11-13 20:43:34 +01:00
Igor Nedoboy
6167d5dbfc Translated using Weblate (English)
Currently translated at 100.0% (383 of 383 strings)
2018-11-13 20:43:32 +01:00
ssantos
f9341bea79 Translated using Weblate (Portuguese)
Currently translated at 100.0% (383 of 383 strings)
2018-11-12 10:08:44 +01:00
Igor Nedoboy
3a608bb582 Translated using Weblate (Russian)
Currently translated at 100.0% (383 of 383 strings)
2018-11-11 00:47:04 +01:00
Igor Nedoboy
c926482b3c Translated using Weblate (Russian)
Currently translated at 100.0% (383 of 383 strings)
2018-11-10 23:38:19 +01:00
Igor Nedoboy
9562972c42 Translated using Weblate (Russian)
Currently translated at 100.0% (383 of 383 strings)
2018-11-10 23:02:17 +01:00
Андрій
dd56a5d869 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (383 of 383 strings)
2018-11-08 17:07:53 +01:00
rimasx
8ae45240b2 Translated using Weblate (Estonian)
Currently translated at 99.7% (382 of 383 strings)
2018-11-06 15:02:39 +01:00
WaldiS
6d845af7f1 Translated using Weblate (Polish)
Currently translated at 100.0% (383 of 383 strings)
2018-11-02 08:23:47 +01:00
Piotr Kaczmarek
733ebb8caf Translated using Weblate (Polish)
Currently translated at 100.0% (383 of 383 strings)
2018-11-02 08:23:47 +01:00
Max Mathys
695a194467 Translated using Weblate (Finnish)
Currently translated at 100.0% (383 of 383 strings)
2018-11-02 08:23:46 +01:00
simo
8a56257ade Translated using Weblate (Arabic)
Currently translated at 100.0% (383 of 383 strings)
2018-11-02 08:23:45 +01:00
Dual Natan
4d5dc0d39c Translated using Weblate (Macedonian)
Currently translated at 100.0% (383 of 383 strings)
2018-10-29 19:23:30 +01:00
Eduardo Caron
8589ee14ff Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (383 of 383 strings)
2018-10-25 17:26:00 +02:00
Stjepan
1727387c9c Translated using Weblate (Croatian)
Currently translated at 86.9% (333 of 383 strings)
2018-10-25 17:25:58 +02:00
ezjerry liao
e1146e4655 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (383 of 383 strings)
2018-10-25 17:25:54 +02:00
krtkush
c29b0645bd Merge branch '1520_app_update_notif' of https://github.com/krtkush/NewPipe into 1520_app_update_notif 2018-10-22 23:12:51 +05:30
krtkush
96dac0f979 Code review suggested changes. 2018-10-22 23:12:25 +05:30
Tobias Groza
fda9b59129 Code review changes.
Co-Authored-By: krtkush <kartikey92@gmail.com>
2018-10-22 23:08:46 +05:30
Ritvik Saraf
fa5896ee5b fixed screen rotation for viewpager 2018-10-19 18:44:03 +05:30
Kartikey Kushwaha
3c6d27b504 Delete R.java 2018-10-18 23:04:07 +05:30
Kartikey Kushwaha
6ef25eb861 Delete Manifest.java 2018-10-18 23:03:21 +05:30
Kartikey Kushwaha
ec28e972bb Delete BuildConfig.java 2018-10-18 23:02:59 +05:30
Kartikey Kushwaha
d1a9033525 Delete R.java 2018-10-18 23:02:38 +05:30
Kartikey Kushwaha
2d5bc3ada8 Delete Manifest.java 2018-10-18 23:02:30 +05:30
Kartikey Kushwaha
506ffb9885 Delete BuildConfig.java 2018-10-18 23:02:19 +05:30
krtkush
8ef702fa07 Removed updates options from settings in case of non github apk. 2018-10-18 22:59:33 +05:30
Ritvik Saraf
9fc38b5bb8 improved fling behavior, added tab indicator dots, added next video in related videos 2018-10-17 00:23:02 +05:30
krtkush
54ac5e8940 Merge branch '1520_app_update_notif' of https://github.com/krtkush/NewPipe into 1520_app_update_notif 2018-10-14 19:16:59 +05:30
krtkush
e2341363d4 Added check for SHA1 key. 2018-10-14 19:16:28 +05:30
Christian Schabesberger
f1aa3d8c90 Merge branch 'dev' into 1520_app_update_notif 2018-10-06 18:04:39 +02:00
Ritvik Saraf
cf3e53eb71 update notify on dataset change 2018-10-02 21:30:11 +05:30
Ritvik Saraf
b8865e925d added content setting to disable comments 2018-10-02 20:56:14 +05:30
Ritvik Saraf
2e9a860aaa added viewpager. changed from parallaxscrollview to coordinate layout 2018-10-02 20:39:16 +05:30
Ritvik Saraf
e4bef056e6 merged upstream/dev 2018-09-29 15:46:47 +05:30
Ritvik Saraf
803b8eab28 updated extractor version 2018-09-28 05:04:36 +05:30
Ritvik Saraf
08bbfc50ee updated extractor 2018-09-27 23:27:52 +05:30
Ritvik Saraf
4e6722f201 updated extractor and downloader 2018-09-27 04:20:57 +05:30
Ritvik Saraf
a29e2116a7 handling error while loading comments 2018-09-27 00:53:36 +05:30
Ritvik Saraf
515be677a9 no comments 2018-09-24 14:53:43 +05:30
Ritvik Saraf
d694c5f511 smoother transition to comments fragment 2018-09-23 19:45:26 +05:30
Ritvik Saraf
66c753f3a3 changed comments fragment loading animation 2018-09-23 15:22:45 +05:30
Ritvik Saraf
7047b62442 added comments fragment 2018-09-23 07:02:19 +05:30
Ritvik Saraf
5cc73555cd updated extractor version 2018-09-19 05:41:01 +05:30
Ritvik Saraf
219922cd82 added commentsInfo in streamInfo 2018-09-19 05:13:55 +05:30
Kartikey Kushwaha
7124d9bca5 Removed flvor checks. Added update settings under main settings. 2018-09-15 20:51:17 +05:30
Ritvik Saraf
08127e5806 added basic/crappy comments support 2018-09-15 17:15:44 +05:30
Kartikey Kushwaha
6417bd91ef Pull request changes v1. 2018-09-15 14:08:32 +05:30
Kartikey Kushwaha
cde5f7d12e Merge branch 'dev' of https://github.com/krtkush/NewPipe into 1520_app_update_notif 2018-09-15 13:30:09 +05:30
Kartikey Kushwaha
395c9587b6 Conflict resolution. 2018-09-15 13:22:13 +05:30
Kartikey Kushwaha
17197ad670 Pull request changes begins here. 2018-09-15 12:51:39 +05:30
Kartikey Kushwaha
910c10f554 Removed debug code 2018-08-17 01:46:33 +05:30
Kartikey Kushwaha
04e974b326 Bug fix. 2018-08-17 01:11:51 +05:30
Kartikey Kushwaha
e7abeb5ad9 Added version code check. 2018-08-17 00:53:42 +05:30
Kartikey Kushwaha
2a18eacf62 More refactoring. 2018-08-12 20:57:30 +05:30
Kartikey Kushwaha
af42e32ae6 Code refactored and added comments. 2018-08-12 18:34:20 +05:30
Kartikey Kushwaha
12b93d6637 Added new icon for update notification. 2018-08-12 17:18:46 +05:30
Kartikey Kushwaha
930c971035 Added version check in the pop-up player 2018-08-12 16:41:21 +05:30
Kartikey Kushwaha
06f20c66f8 Moved the new version check to the application class. 2018-08-12 16:35:53 +05:30
Kartikey Kushwaha
7c875a8541 Merge branch 'dev' of https://github.com/krtkush/NewPipe into 1520_app_update_notif 2018-08-12 15:19:15 +05:30
Kartikey Kushwaha
f85e19c75d Added notification channel and code to show notification. 2018-08-12 15:01:50 +05:30
Kartikey Kushwaha
5e2aa51627 Moved the asynctask to its own class. 2018-08-11 19:36:23 +05:30
Kartikey Kushwaha
75a44fb30a Added HTTPS request to get version data. Added APK flaor for github and fdroid. 2018-08-11 19:13:52 +05:30
330 changed files with 19584 additions and 11333 deletions

1
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1 @@
liberapay: TeamNewPipe

File diff suppressed because one or more lines are too long

View File

@@ -8,18 +8,20 @@ android {
applicationId "org.schabi.newpipe"
minSdkVersion 19
targetSdkVersion 28
versionCode 70
versionName "0.15.0"
versionCode 780
versionName "0.17.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
multiDexEnabled true
debuggable true
@@ -33,6 +35,7 @@ android {
// but continue the build even when errors are found:
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
@@ -41,10 +44,10 @@ android {
ext {
supportLibVersion = '28.0.0'
exoPlayerLibVersion = '2.8.4' //2.9.0
exoPlayerLibVersion = '2.9.6'
roomDbLibVersion = '1.1.1'
leakCanaryLibVersion = '1.5.4' //1.6.1
okHttpLibVersion = '3.11.0'
okHttpLibVersion = '3.12.1'
icepickLibVersion = '3.2.0'
stethoLibVersion = '1.5.0'
}
@@ -54,8 +57,7 @@ dependencies {
exclude module: 'support-annotations'
})
implementation 'com.github.TeamNewPipe:NewPipeExtractor:99915e4527c0'
implementation 'com.github.teamnewpipe:NewPipeExtractor:6d504e08836b0b'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.23.0'

View File

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

View File

@@ -35,12 +35,6 @@
</intent-filter>
</receiver>
<activity
android:name=".player.old.PlayVideoActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="@style/OldVideoPlayerTheme"
tools:ignore="UnusedAttribute"/>
<service
android:name=".player.BackgroundPlayer"
android:exported="false">
@@ -119,7 +113,6 @@
<activity
android:name=".ReCaptchaActivity"
android:label="@string/reCaptchaActivity"/>
<activity android:name=".download.ExtSDDownloadFailedActivity" />
<provider
android:name="android.support.v4.content.FileProvider"
@@ -184,6 +177,19 @@
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="http"/>
<data android:scheme="https"/>
<data android:host="www.youtube-nocookie.com"/>
<data android:pathPrefix="/embed/"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH"/>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="vnd.youtube"/>
<data android:scheme="vnd.youtube.launch"/>
</intent-filter>
@@ -210,6 +216,42 @@
<data android:pathPrefix="/user/"/>
</intent-filter>
<!-- Invidious filter -->
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH"/>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="http"/>
<data android:scheme="https"/>
<data android:host="invidio.us"/>
<data android:host="dev.invidio.us"/>
<data android:host="www.invidio.us"/>
<data android:host="invidious.snopyta.org"/>
<data android:host="de.invidious.snopyta.org"/>
<data android:host="fi.invidious.snopyta.org"/>
<data android:host="vid.wxzm.sx"/>
<data android:host="invidious.kabi.tk"/>
<data android:host="invidiou.sh"/>
<data android:host="www.invidiou.sh"/>
<data android:host="no.invidiou.sh"/>
<data android:host="invidious.enkirton.net"/>
<data android:host="tube.poal.co"/>
<data android:host="invidious.13ad.de"/>
<data android:host="yt.elukerio.org"/>
<!-- video prefix -->
<data android:pathPrefix="/embed/"/>
<data android:pathPrefix="/watch"/>
<!-- channel prefix -->
<data android:pathPrefix="/channel/"/>
<data android:pathPrefix="/user/"/>
<!-- playlist prefix -->
<data android:pathPrefix="/playlist"/>
</intent-filter>
<!-- Soundcloud filter -->
<intent-filter>
<action android:name="android.intent.action.VIEW"/>

View File

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

View File

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

View File

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

View File

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

View File

@@ -37,15 +37,24 @@ import android.webkit.WebViewClient;
*/
public class ReCaptchaActivity extends AppCompatActivity {
public static final int RECAPTCHA_REQUEST = 10;
public static final String RECAPTCHA_URL_EXTRA = "recaptcha_url_extra";
public static final String TAG = ReCaptchaActivity.class.toString();
public static final String YT_URL = "https://www.youtube.com";
private String url;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_recaptcha);
url = getIntent().getStringExtra(RECAPTCHA_URL_EXTRA);
if (url == null || url.isEmpty()) {
url = YT_URL;
}
// Set return to Cancel by default
setResult(RESULT_CANCELED);
@@ -73,15 +82,12 @@ public class ReCaptchaActivity extends AppCompatActivity {
myWebView.clearHistory();
android.webkit.CookieManager cookieManager = CookieManager.getInstance();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
cookieManager.removeAllCookies(new ValueCallback<Boolean>() {
@Override
public void onReceiveValue(Boolean aBoolean) {}
});
cookieManager.removeAllCookies(aBoolean -> {});
} else {
cookieManager.removeAllCookie();
}
myWebView.loadUrl(YT_URL);
myWebView.loadUrl(url);
}
private class ReCaptchaWebViewClient extends WebViewClient {

View File

@@ -36,12 +36,12 @@ import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.extractor.playlist.PlaylistInfo;
import org.schabi.newpipe.extractor.stream.StreamInfo;
import org.schabi.newpipe.extractor.stream.VideoStream;
import org.schabi.newpipe.player.helper.PlayerHelper;
import org.schabi.newpipe.player.playqueue.ChannelPlayQueue;
import org.schabi.newpipe.player.playqueue.PlayQueue;
import org.schabi.newpipe.player.playqueue.PlaylistPlayQueue;
import org.schabi.newpipe.player.playqueue.SinglePlayQueue;
import org.schabi.newpipe.report.UserAction;
import org.schabi.newpipe.util.Constants;
import org.schabi.newpipe.util.ExtractorHelper;
import org.schabi.newpipe.util.ListHelper;
import org.schabi.newpipe.util.NavigationHelper;
@@ -74,17 +74,23 @@ import static org.schabi.newpipe.util.ThemeHelper.resolveResourceIdFromAttr;
*/
public class RouterActivity extends AppCompatActivity {
@State protected int currentServiceId = -1;
@State
protected int currentServiceId = -1;
private StreamingService currentService;
@State protected LinkType currentLinkType;
@State protected int selectedRadioPosition = -1;
@State
protected LinkType currentLinkType;
@State
protected int selectedRadioPosition = -1;
protected int selectedPreviously = -1;
protected String currentUrl;
protected boolean internalRoute = false;
protected final CompositeDisposable disposables = new CompositeDisposable();
private boolean selectionIsDownload = false;
public static final String internalRouteKey = "internalRoute";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -94,11 +100,13 @@ public class RouterActivity extends AppCompatActivity {
currentUrl = getUrl(getIntent());
if (TextUtils.isEmpty(currentUrl)) {
Toast.makeText(this, R.string.invalid_url_toast, Toast.LENGTH_LONG).show();
handleText();
finish();
}
}
internalRoute = getIntent().getBooleanExtra(internalRouteKey, false);
setTheme(ThemeHelper.isLightThemeSelected(this)
? R.style.RouterActivityThemeLight : R.style.RouterActivityThemeDark);
}
@@ -112,7 +120,7 @@ public class RouterActivity extends AppCompatActivity {
@Override
protected void onStart() {
super.onStart();
handleUrl(currentUrl);
}
@@ -252,7 +260,7 @@ public class RouterActivity extends AppCompatActivity {
.setNegativeButton(R.string.just_once, dialogButtonsClickListener)
.setPositiveButton(R.string.always, dialogButtonsClickListener)
.setOnDismissListener((dialog) -> {
if(!selectionIsDownload) finish();
if (!selectionIsDownload) finish();
})
.create();
@@ -353,6 +361,15 @@ public class RouterActivity extends AppCompatActivity {
positiveButton.setEnabled(state);
}
private void handleText() {
String searchString = getIntent().getStringExtra(Intent.EXTRA_TEXT);
int serviceId = getIntent().getIntExtra(Constants.KEY_SERVICE_ID, 0);
Intent intent = new Intent(getThemeWrapperContext(), MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
NavigationHelper.openSearch(getThemeWrapperContext(), serviceId, searchString);
}
private void handleChoice(final String selectedChoiceKey) {
final List<String> validChoicesList = Arrays.asList(getResources().getStringArray(R.array.preferred_open_action_values_list));
if (validChoicesList.contains(selectedChoiceKey)) {
@@ -383,8 +400,10 @@ public class RouterActivity extends AppCompatActivity {
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(intent -> {
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
if (!internalRoute) {
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
}
startActivity(intent);
finish();
@@ -431,8 +450,8 @@ public class RouterActivity extends AppCompatActivity {
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
for (int i: grantResults){
if (i == PackageManager.PERMISSION_DENIED){
for (int i : grantResults) {
if (i == PackageManager.PERMISSION_DENIED) {
finish();
return;
}
@@ -444,7 +463,8 @@ public class RouterActivity extends AppCompatActivity {
private static class AdapterChoiceItem {
final String description, key;
@DrawableRes final int icon;
@DrawableRes
final int icon;
AdapterChoiceItem(String key, String description, int icon) {
this.description = description;
@@ -542,7 +562,8 @@ public class RouterActivity extends AppCompatActivity {
final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
boolean isExtVideoEnabled = preferences.getBoolean(getString(R.string.use_external_video_player_key), false);
boolean isExtAudioEnabled = preferences.getBoolean(getString(R.string.use_external_audio_player_key), false);;
boolean isExtAudioEnabled = preferences.getBoolean(getString(R.string.use_external_audio_player_key), false);
;
PlayQueue playQueue;
String playerChoice = choice.playerChoice;
@@ -558,7 +579,7 @@ public class RouterActivity extends AppCompatActivity {
playQueue = new SinglePlayQueue((StreamInfo) info);
if (playerChoice.equals(videoPlayerKey)) {
NavigationHelper.playOnMainPlayer(this, playQueue);
NavigationHelper.playOnMainPlayer(this, playQueue, true);
} else if (playerChoice.equals(backgroundPlayerKey)) {
NavigationHelper.enqueueOnBackgroundPlayer(this, playQueue, true);
} else if (playerChoice.equals(popupPlayerKey)) {
@@ -571,11 +592,11 @@ public class RouterActivity extends AppCompatActivity {
playQueue = info instanceof ChannelInfo ? new ChannelPlayQueue((ChannelInfo) info) : new PlaylistPlayQueue((PlaylistInfo) info);
if (playerChoice.equals(videoPlayerKey)) {
NavigationHelper.playOnMainPlayer(this, playQueue);
NavigationHelper.playOnMainPlayer(this, playQueue, true);
} else if (playerChoice.equals(backgroundPlayerKey)) {
NavigationHelper.playOnBackgroundPlayer(this, playQueue);
NavigationHelper.playOnBackgroundPlayer(this, playQueue, true);
} else if (playerChoice.equals(popupPlayerKey)) {
NavigationHelper.playOnPopupPlayer(this, playQueue);
NavigationHelper.playOnPopupPlayer(this, playQueue, true);
}
}
};

View File

@@ -3,15 +3,24 @@ package org.schabi.newpipe.database;
import android.arch.persistence.db.SupportSQLiteDatabase;
import android.arch.persistence.room.migration.Migration;
import android.support.annotation.NonNull;
import android.util.Log;
import org.schabi.newpipe.BuildConfig;
public class Migrations {
public static final int DB_VER_11_0 = 1;
public static final int DB_VER_12_0 = 2;
public static final boolean DEBUG = !BuildConfig.BUILD_TYPE.equals("release");
private static final String TAG = Migrations.class.getName();
public static final Migration MIGRATION_11_12 = new Migration(DB_VER_11_0, DB_VER_12_0) {
@Override
public void migrate(@NonNull SupportSQLiteDatabase database) {
if(DEBUG) {
Log.d(TAG, "Start migrating database");
}
/*
* Unfortunately these queries must be hardcoded due to the possibility of
* schema and names changing at a later date, thus invalidating the older migration
@@ -56,6 +65,10 @@ public class Migrations {
"ORDER BY creation_date DESC");
database.execSQL("DROP TABLE IF EXISTS watch_history");
if(DEBUG) {
Log.d(TAG, "Stop migrating database");
}
}
};
}

View File

@@ -50,6 +50,11 @@ public abstract class StreamHistoryDAO implements HistoryDAO<StreamHistoryEntity
" ORDER BY " + STREAM_ACCESS_DATE + " DESC")
public abstract Flowable<List<StreamHistoryEntry>> getHistory();
@Query("SELECT * FROM " + STREAM_HISTORY_TABLE + " WHERE " + JOIN_STREAM_ID +
" = :streamId ORDER BY " + STREAM_ACCESS_DATE + " DESC LIMIT 1")
@Nullable
public abstract StreamHistoryEntity getLatestEntry(final long streamId);
@Query("DELETE FROM " + STREAM_HISTORY_TABLE + " WHERE " + JOIN_STREAM_ID + " = :streamId")
public abstract int deleteStreamHistory(final long streamId);

View File

@@ -4,6 +4,9 @@ package org.schabi.newpipe.database.stream.model;
import android.arch.persistence.room.ColumnInfo;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.ForeignKey;
import android.support.annotation.Nullable;
import java.util.concurrent.TimeUnit;
import static android.arch.persistence.room.ForeignKey.CASCADE;
import static org.schabi.newpipe.database.stream.model.StreamStateEntity.JOIN_STREAM_ID;
@@ -22,6 +25,12 @@ public class StreamStateEntity {
final public static String JOIN_STREAM_ID = "stream_id";
final public static String STREAM_PROGRESS_TIME = "progress_time";
/** Playback state will not be saved, if playback time less than this threshold */
private static final int PLAYBACK_SAVE_THRESHOLD_START_SECONDS = 5;
/** Playback state will not be saved, if time left less than this threshold */
private static final int PLAYBACK_SAVE_THRESHOLD_END_SECONDS = 10;
@ColumnInfo(name = JOIN_STREAM_ID)
private long streamUid;
@@ -48,4 +57,18 @@ public class StreamStateEntity {
public void setProgressTime(long progressTime) {
this.progressTime = progressTime;
}
public boolean isValid(int durationInSeconds) {
final int seconds = (int) TimeUnit.MILLISECONDS.toSeconds(progressTime);
return seconds > PLAYBACK_SAVE_THRESHOLD_START_SECONDS
&& seconds < durationInSeconds - PLAYBACK_SAVE_THRESHOLD_END_SECONDS;
}
@Override
public boolean equals(@Nullable Object obj) {
if (obj instanceof StreamStateEntity) {
return ((StreamStateEntity) obj).streamUid == streamUid
&& ((StreamStateEntity) obj).progressTime == progressTime;
} else return false;
}
}

View File

@@ -47,7 +47,7 @@ public class DownloadActivity extends AppCompatActivity {
@Override
public void onGlobalLayout() {
updateFragments();
getWindow().getDecorView().getViewTreeObserver().removeGlobalOnLayoutListener(this);
getWindow().getDecorView().getViewTreeObserver().removeOnGlobalLayoutListener(this);
}
});
}
@@ -55,12 +55,13 @@ public class DownloadActivity extends AppCompatActivity {
private void updateFragments() {
MissionsFragment fragment = new MissionsFragment();
getFragmentManager().beginTransaction()
getSupportFragmentManager().beginTransaction()
.replace(R.id.frame, fragment, MISSIONS_FRAGMENT_TAG)
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE)
.commit();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
MenuInflater inflater = getMenuInflater();
@@ -86,9 +87,4 @@ public class DownloadActivity extends AppCompatActivity {
return super.onOptionsItemSelected(item);
}
}
@Override
public void onRestoreInstanceState(Bundle inState){
super.onRestoreInstanceState(inState);
}
}

View File

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

View File

@@ -180,7 +180,7 @@ public abstract class BaseStateFragment<I> extends BaseFragment implements ViewC
}
if (exception instanceof ReCaptchaException) {
onReCaptchaException();
onReCaptchaException((ReCaptchaException) exception);
return true;
} else if (exception instanceof IOException) {
showError(getString(R.string.network_error), true);
@@ -190,11 +190,13 @@ public abstract class BaseStateFragment<I> extends BaseFragment implements ViewC
return false;
}
public void onReCaptchaException() {
public void onReCaptchaException(ReCaptchaException exception) {
if (DEBUG) Log.d(TAG, "onReCaptchaException() called");
Toast.makeText(activity, R.string.recaptcha_request_toast, Toast.LENGTH_LONG).show();
// Starting ReCaptcha Challenge Activity
startActivityForResult(new Intent(activity, ReCaptchaActivity.class), ReCaptchaActivity.RECAPTCHA_REQUEST);
Intent intent = new Intent(activity, ReCaptchaActivity.class);
intent.putExtra(ReCaptchaActivity.RECAPTCHA_URL_EXTRA, exception.getUrl());
startActivityForResult(intent, ReCaptchaActivity.RECAPTCHA_REQUEST);
showError(getString(R.string.recaptcha_request_toast), false);
}
@@ -230,21 +232,4 @@ public abstract class BaseStateFragment<I> extends BaseFragment implements ViewC
ErrorActivity.reportError(getContext(), exception, MainActivity.class, rootView,
ErrorActivity.ErrorInfo.make(userAction, serviceName, request, errorId));
}
/*//////////////////////////////////////////////////////////////////////////
// Utils
//////////////////////////////////////////////////////////////////////////*/
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)));
}
protected void shareUrl(String subject, String url) {
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, subject);
intent.putExtra(Intent.EXTRA_TEXT, url);
startActivity(Intent.createChooser(intent, getString(R.string.share_dialog_title)));
}
}

View File

@@ -0,0 +1,17 @@
package org.schabi.newpipe.fragments;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import org.schabi.newpipe.BaseFragment;
import org.schabi.newpipe.R;
public class EmptyFragment extends BaseFragment {
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_empty, container, false);
}
}

View File

@@ -50,6 +50,8 @@ public class MainFragment extends BaseFragment implements TabLayout.OnTabSelecte
super.onCreate(savedInstanceState);
setHasOptionsMenu(true);
destroyOldFragments();
tabsManager = TabsManager.getManager(activity);
tabsManager.setSavedTabsListener(() -> {
if (DEBUG) {
@@ -63,6 +65,17 @@ public class MainFragment extends BaseFragment implements TabLayout.OnTabSelecte
});
}
private void destroyOldFragments() {
for (Fragment fragment : getChildFragmentManager().getFragments()) {
if (fragment != null) {
getChildFragmentManager()
.beginTransaction()
.remove(fragment)
.commitNowAllowingStateLoss();
}
}
}
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_main, container, false);
@@ -98,6 +111,8 @@ public class MainFragment extends BaseFragment implements TabLayout.OnTabSelecte
public void onDestroy() {
super.onDestroy();
tabsManager.unsetSavedTabsListener();
pagerAdapter = null;
viewPager.setAdapter(pagerAdapter);
}
/*//////////////////////////////////////////////////////////////////////////
@@ -177,6 +192,7 @@ public class MainFragment extends BaseFragment implements TabLayout.OnTabSelecte
}
private class SelectedTabsPagerAdapter extends FragmentPagerAdapter {
private SelectedTabsPagerAdapter(FragmentManager fragmentManager) {
super(fragmentManager);
}

View File

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

View File

@@ -2,7 +2,6 @@ package org.schabi.newpipe.fragments.list;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.content.res.Resources;
@@ -22,20 +21,20 @@ import android.view.View;
import org.schabi.newpipe.R;
import org.schabi.newpipe.extractor.InfoItem;
import org.schabi.newpipe.extractor.channel.ChannelInfoItem;
import org.schabi.newpipe.extractor.comments.CommentsInfoItem;
import org.schabi.newpipe.extractor.playlist.PlaylistInfoItem;
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import org.schabi.newpipe.extractor.stream.StreamType;
import org.schabi.newpipe.fragments.BaseStateFragment;
import org.schabi.newpipe.fragments.OnScrollBelowItemsListener;
import org.schabi.newpipe.info_list.InfoItemDialog;
import org.schabi.newpipe.info_list.InfoListAdapter;
import org.schabi.newpipe.local.dialog.PlaylistAppendDialog;
import org.schabi.newpipe.player.playqueue.SinglePlayQueue;
import org.schabi.newpipe.report.ErrorActivity;
import org.schabi.newpipe.util.NavigationHelper;
import org.schabi.newpipe.util.OnClickGesture;
import org.schabi.newpipe.util.StateSaver;
import org.schabi.newpipe.util.StreamDialogEntry;
import java.util.Collections;
import java.util.List;
import java.util.Queue;
@@ -63,6 +62,11 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implem
infoListAdapter = new InfoListAdapter(activity);
}
@Override
public void onDetach() {
super.onDetach();
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -220,6 +224,13 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implem
}
});
infoListAdapter.setOnCommentsSelectedListener(new OnClickGesture<CommentsInfoItem>() {
@Override
public void selected(CommentsInfoItem selectedItem) {
onItemSelected(selectedItem);
}
});
itemsList.clearOnScrollListeners();
itemsList.addOnScrollListener(new OnScrollBelowItemsListener() {
@Override
@@ -241,41 +252,32 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implem
}
}
protected void showStreamDialog(final StreamInfoItem item) {
final Context context = getContext();
final Activity activity = getActivity();
if (context == null || context.getResources() == null || getActivity() == null) return;
if (context == null || context.getResources() == null || activity == null) return;
final String[] commands = new String[]{
context.getResources().getString(R.string.enqueue_on_background),
context.getResources().getString(R.string.enqueue_on_popup),
context.getResources().getString(R.string.append_playlist),
context.getResources().getString(R.string.share)
};
if (item.getStreamType() == StreamType.AUDIO_STREAM) {
StreamDialogEntry.setEnabledEntries(
StreamDialogEntry.enqueue_on_background,
StreamDialogEntry.start_here_on_background,
StreamDialogEntry.append_playlist,
StreamDialogEntry.share);
} else {
StreamDialogEntry.setEnabledEntries(
StreamDialogEntry.enqueue_on_background,
StreamDialogEntry.enqueue_on_popup,
StreamDialogEntry.start_here_on_background,
StreamDialogEntry.start_here_on_popup,
StreamDialogEntry.append_playlist,
StreamDialogEntry.share);
}
final DialogInterface.OnClickListener actions = (dialogInterface, i) -> {
switch (i) {
case 0:
NavigationHelper.enqueueOnBackgroundPlayer(context, new SinglePlayQueue(item));
break;
case 1:
NavigationHelper.enqueueOnPopupPlayer(activity, new SinglePlayQueue(item));
break;
case 2:
if (getFragmentManager() != null) {
PlaylistAppendDialog.fromStreamInfoItems(Collections.singletonList(item))
.show(getFragmentManager(), TAG);
}
break;
case 3:
shareUrl(item.getName(), item.getUrl());
break;
default:
break;
}
};
new InfoItemDialog(getActivity(), item, commands, actions).show();
new InfoItemDialog(activity, item, StreamDialogEntry.getCommands(context), (dialog, which) ->
StreamDialogEntry.clickOn(which, this, item)).show();
}
/*//////////////////////////////////////////////////////////////////////////

View File

@@ -1,8 +1,6 @@
package org.schabi.newpipe.fragments.list.channel;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
@@ -34,21 +32,18 @@ import org.schabi.newpipe.extractor.channel.ChannelInfo;
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import org.schabi.newpipe.fragments.list.BaseListInfoFragment;
import org.schabi.newpipe.info_list.InfoItemDialog;
import org.schabi.newpipe.local.dialog.PlaylistAppendDialog;
import org.schabi.newpipe.local.subscription.SubscriptionService;
import org.schabi.newpipe.player.playqueue.ChannelPlayQueue;
import org.schabi.newpipe.player.playqueue.PlayQueue;
import org.schabi.newpipe.player.playqueue.SinglePlayQueue;
import org.schabi.newpipe.report.UserAction;
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 org.schabi.newpipe.util.ShareUtils;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.TimeUnit;
@@ -149,56 +144,6 @@ public class ChannelFragment extends BaseListInfoFragment<ChannelInfo> {
return headerRootLayout;
}
@Override
protected void showStreamDialog(final StreamInfoItem item) {
final Activity activity = getActivity();
final Context context = getContext();
if (context == null || context.getResources() == null || getActivity() == null) return;
final String[] commands = new String[]{
context.getResources().getString(R.string.enqueue_on_background),
context.getResources().getString(R.string.enqueue_on_popup),
context.getResources().getString(R.string.start_here_on_main),
context.getResources().getString(R.string.start_here_on_background),
context.getResources().getString(R.string.start_here_on_popup),
context.getResources().getString(R.string.append_playlist),
context.getResources().getString(R.string.share)
};
final DialogInterface.OnClickListener actions = (DialogInterface dialogInterface, int i) -> {
final int index = Math.max(infoListAdapter.getItemsList().indexOf(item), 0);
switch (i) {
case 0:
NavigationHelper.enqueueOnBackgroundPlayer(context, new SinglePlayQueue(item));
break;
case 1:
NavigationHelper.enqueueOnPopupPlayer(activity, new SinglePlayQueue(item));
break;
case 2:
NavigationHelper.playOnMainPlayer(context, getPlayQueue(index));
break;
case 3:
NavigationHelper.playOnBackgroundPlayer(context, getPlayQueue(index));
break;
case 4:
NavigationHelper.playOnPopupPlayer(activity, getPlayQueue(index));
break;
case 5:
if (getFragmentManager() != null) {
PlaylistAppendDialog.fromStreamInfoItems(Collections.singletonList(item))
.show(getFragmentManager(), TAG);
}
break;
case 6:
shareUrl(item.getName(), item.getUrl());
break;
default:
break;
}
};
new InfoItemDialog(getActivity(), item, commands, actions).show();
}
/*//////////////////////////////////////////////////////////////////////////
// Menu
//////////////////////////////////////////////////////////////////////////*/
@@ -233,10 +178,10 @@ public class ChannelFragment extends BaseListInfoFragment<ChannelInfo> {
openRssFeed();
break;
case R.id.menu_item_openInBrowser:
openUrlInBrowser(url);
ShareUtils.openUrlInBrowser(this.getContext(), currentInfo.getOriginalUrl());
break;
case R.id.menu_item_share:
shareUrl(name, url);
ShareUtils.shareUrl(this.getContext(), name, currentInfo.getOriginalUrl());
break;
default:
return super.onOptionsItemSelected(item);
@@ -439,11 +384,11 @@ public class ChannelFragment extends BaseListInfoFragment<ChannelInfo> {
monitorSubscription(result);
headerPlayAllButton.setOnClickListener(
view -> NavigationHelper.playOnMainPlayer(activity, getPlayQueue()));
view -> NavigationHelper.playOnMainPlayer(activity, getPlayQueue(), false));
headerPopupButton.setOnClickListener(
view -> NavigationHelper.playOnPopupPlayer(activity, getPlayQueue()));
view -> NavigationHelper.playOnPopupPlayer(activity, getPlayQueue(), false));
headerBackgroundButton.setOnClickListener(
view -> NavigationHelper.playOnBackgroundPlayer(activity, getPlayQueue()));
view -> NavigationHelper.playOnBackgroundPlayer(activity, getPlayQueue(), false));
}
private PlayQueue getPlayQueue() {

View File

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

View File

@@ -1,7 +1,6 @@
package org.schabi.newpipe.fragments.list.kiosk;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
@@ -155,9 +154,7 @@ public class KioskFragment extends BaseListInfoFragment<KioskInfo> {
super.handleResult(result);
name = kioskTranslatedName;
if(!useAsFrontPage) {
setTitle(kioskTranslatedName);
}
setTitle(kioskTranslatedName);
if (!result.getErrors().isEmpty()) {
showSnackBarError(result.getErrors(),

View File

@@ -2,10 +2,10 @@ package org.schabi.newpipe.fragments.list.playlist;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.util.Log;
@@ -29,17 +29,19 @@ import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.extractor.playlist.PlaylistInfo;
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import org.schabi.newpipe.extractor.stream.StreamType;
import org.schabi.newpipe.fragments.list.BaseListInfoFragment;
import org.schabi.newpipe.info_list.InfoItemDialog;
import org.schabi.newpipe.local.playlist.RemotePlaylistManager;
import org.schabi.newpipe.player.playqueue.PlayQueue;
import org.schabi.newpipe.player.playqueue.PlaylistPlayQueue;
import org.schabi.newpipe.player.playqueue.SinglePlayQueue;
import org.schabi.newpipe.report.ErrorActivity;
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.ShareUtils;
import org.schabi.newpipe.util.StreamDialogEntry;
import org.schabi.newpipe.util.ThemeHelper;
import java.util.ArrayList;
@@ -134,48 +136,40 @@ public class PlaylistFragment extends BaseListInfoFragment<PlaylistInfo> {
infoListAdapter.useMiniItemVariants(true);
}
private PlayQueue getPlayQueueStartingAt(StreamInfoItem infoItem) {
return getPlayQueue(Math.max(infoListAdapter.getItemsList().indexOf(infoItem), 0));
}
@Override
protected void showStreamDialog(final StreamInfoItem item) {
protected void showStreamDialog(StreamInfoItem item) {
final Context context = getContext();
final Activity activity = getActivity();
if (context == null || context.getResources() == null || getActivity() == null) return;
if (context == null || context.getResources() == null || activity == null) return;
final String[] commands = new String[]{
context.getResources().getString(R.string.enqueue_on_background),
context.getResources().getString(R.string.enqueue_on_popup),
context.getResources().getString(R.string.start_here_on_main),
context.getResources().getString(R.string.start_here_on_background),
context.getResources().getString(R.string.start_here_on_popup),
context.getResources().getString(R.string.share)
};
if (item.getStreamType() == StreamType.AUDIO_STREAM) {
StreamDialogEntry.setEnabledEntries(
StreamDialogEntry.enqueue_on_background,
StreamDialogEntry.start_here_on_background,
StreamDialogEntry.append_playlist,
StreamDialogEntry.share);
} else {
StreamDialogEntry.setEnabledEntries(
StreamDialogEntry.enqueue_on_background,
StreamDialogEntry.enqueue_on_popup,
StreamDialogEntry.start_here_on_background,
StreamDialogEntry.start_here_on_popup,
StreamDialogEntry.append_playlist,
StreamDialogEntry.share);
final DialogInterface.OnClickListener actions = (dialogInterface, i) -> {
final int index = Math.max(infoListAdapter.getItemsList().indexOf(item), 0);
switch (i) {
case 0:
NavigationHelper.enqueueOnBackgroundPlayer(context, new SinglePlayQueue(item));
break;
case 1:
NavigationHelper.enqueueOnPopupPlayer(activity, new SinglePlayQueue(item));
break;
case 2:
NavigationHelper.playOnMainPlayer(context, getPlayQueue(index));
break;
case 3:
NavigationHelper.playOnBackgroundPlayer(context, getPlayQueue(index));
break;
case 4:
NavigationHelper.playOnPopupPlayer(activity, getPlayQueue(index));
break;
case 5:
shareUrl(item.getName(), item.getUrl());
break;
default:
break;
}
};
StreamDialogEntry.start_here_on_popup.setCustomAction(
(fragment, infoItem) -> NavigationHelper.playOnPopupPlayer(context, getPlayQueueStartingAt(infoItem), true));
}
new InfoItemDialog(getActivity(), item, commands, actions).show();
StreamDialogEntry.start_here_on_background.setCustomAction(
(fragment, infoItem) -> NavigationHelper.playOnBackgroundPlayer(context, getPlayQueueStartingAt(infoItem), true));
new InfoItemDialog(activity, item, StreamDialogEntry.getCommands(context), (dialog, which) ->
StreamDialogEntry.clickOn(which, this, item)).show();
}
@Override
@@ -230,10 +224,10 @@ public class PlaylistFragment extends BaseListInfoFragment<PlaylistInfo> {
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_item_openInBrowser:
openUrlInBrowser(url);
ShareUtils.openUrlInBrowser(this.getContext(), url);
break;
case R.id.menu_item_share:
shareUrl(name, url);
ShareUtils.shareUrl(this.getContext(), name, url);
break;
case R.id.menu_item_bookmark:
onBookmarkClicked();
@@ -300,11 +294,21 @@ public class PlaylistFragment extends BaseListInfoFragment<PlaylistInfo> {
.subscribe(getPlaylistBookmarkSubscriber());
headerPlayAllButton.setOnClickListener(view ->
NavigationHelper.playOnMainPlayer(activity, getPlayQueue()));
NavigationHelper.playOnMainPlayer(activity, getPlayQueue(), false));
headerPopupButton.setOnClickListener(view ->
NavigationHelper.playOnPopupPlayer(activity, getPlayQueue()));
NavigationHelper.playOnPopupPlayer(activity, getPlayQueue(), false));
headerBackgroundButton.setOnClickListener(view ->
NavigationHelper.playOnBackgroundPlayer(activity, getPlayQueue()));
NavigationHelper.playOnBackgroundPlayer(activity, getPlayQueue(), false));
headerPopupButton.setOnLongClickListener(view -> {
NavigationHelper.enqueueOnPopupPlayer(activity, getPlayQueue(), true);
return true;
});
headerBackgroundButton.setOnLongClickListener(view -> {
NavigationHelper.enqueueOnBackgroundPlayer(activity, getPlayQueue(), true);
return true;
});
}
private PlayQueue getPlayQueue() {

View File

@@ -12,6 +12,7 @@ import android.support.v7.app.ActionBar;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.TooltipCompat;
import android.support.v7.widget.helper.ItemTouchHelper;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
@@ -39,15 +40,15 @@ import org.schabi.newpipe.extractor.StreamingService;
import org.schabi.newpipe.extractor.exceptions.ParsingException;
import org.schabi.newpipe.extractor.search.SearchExtractor;
import org.schabi.newpipe.extractor.search.SearchInfo;
import org.schabi.newpipe.util.FireTvUtils;
import org.schabi.newpipe.fragments.BackPressable;
import org.schabi.newpipe.fragments.list.BaseListFragment;
import org.schabi.newpipe.local.history.HistoryRecordManager;
import org.schabi.newpipe.report.ErrorActivity;
import org.schabi.newpipe.report.UserAction;
import org.schabi.newpipe.util.Constants;
import org.schabi.newpipe.util.AnimationUtils;
import org.schabi.newpipe.util.Constants;
import org.schabi.newpipe.util.ExtractorHelper;
import org.schabi.newpipe.util.LayoutManagerSmoothScroller;
import org.schabi.newpipe.util.NavigationHelper;
import org.schabi.newpipe.util.ServiceHelper;
@@ -72,8 +73,8 @@ import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
import io.reactivex.subjects.PublishSubject;
import static android.support.v7.widget.helper.ItemTouchHelper.Callback.makeMovementFlags;
import static java.util.Arrays.asList;
import static org.schabi.newpipe.util.AnimationUtils.animateView;
public class SearchFragment
@@ -104,8 +105,13 @@ public class SearchFragment
// this three represet the current search query
@State
protected String searchString;
/**
* No content filter should add like contentfilter = all
* be aware of this when implementing an extractor.
*/
@State
protected String[] contentFilter;
protected String[] contentFilter = new String[0];
@State
protected String sortFilter;
@@ -292,7 +298,23 @@ public class SearchFragment
suggestionsPanel = rootView.findViewById(R.id.suggestions_panel);
suggestionsRecyclerView = rootView.findViewById(R.id.suggestions_list);
suggestionsRecyclerView.setAdapter(suggestionListAdapter);
suggestionsRecyclerView.setLayoutManager(new LayoutManagerSmoothScroller(activity));
new ItemTouchHelper(new ItemTouchHelper.Callback() {
@Override
public int getMovementFlags(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder) {
return getSuggestionMovementFlags(recyclerView, viewHolder);
}
@Override
public boolean onMove(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder,
@NonNull RecyclerView.ViewHolder viewHolder1) {
return false;
}
@Override
public void onSwiped(@NonNull RecyclerView.ViewHolder viewHolder, int i) {
onSuggestionItemSwiped(viewHolder, i);
}
}).attachToRecyclerView(suggestionsRecyclerView);
searchToolbarContainer = activity.findViewById(R.id.toolbar_search_container);
searchEditText = searchToolbarContainer.findViewById(R.id.toolbar_search_edit_text);
@@ -335,7 +357,7 @@ public class SearchFragment
|| (searchEditText != null && !TextUtils.isEmpty(searchEditText.getText()))) {
search(!TextUtils.isEmpty(searchString)
? searchString
: searchEditText.getText().toString(), new String[0], "");
: searchEditText.getText().toString(), this.contentFilter, "");
} else {
if (searchEditText != null) {
searchEditText.setText("");
@@ -449,6 +471,9 @@ public class SearchFragment
if (isSuggestionsEnabled && errorPanelRoot.getVisibility() != View.VISIBLE) {
showSuggestionsPanel();
}
if(FireTvUtils.isFireTv()){
showKeyboardSearch();
}
});
searchEditText.setOnFocusChangeListener((View v, boolean hasFocus) -> {
@@ -499,7 +524,9 @@ public class SearchFragment
if (DEBUG) {
Log.d(TAG, "onEditorAction() called with: v = [" + v + "], actionId = [" + actionId + "], event = [" + event + "]");
}
if (event != null
if(actionId == EditorInfo.IME_ACTION_PREVIOUS){
hideKeyboardSearch();
} else if (event != null
&& (event.getKeyCode() == KeyEvent.KEYCODE_ENTER
|| event.getAction() == EditorInfo.IME_ACTION_SEARCH)) {
search(searchEditText.getText().toString(), new String[0], "");
@@ -541,7 +568,7 @@ public class SearchFragment
if (searchEditText.requestFocus()) {
InputMethodManager imm = (InputMethodManager) activity.getSystemService(
Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(searchEditText, InputMethodManager.SHOW_IMPLICIT);
imm.showSoftInput(searchEditText, InputMethodManager.SHOW_FORCED);
}
}
@@ -551,8 +578,7 @@ public class SearchFragment
InputMethodManager imm = (InputMethodManager) activity.getSystemService(
Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(searchEditText.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS);
imm.hideSoftInputFromWindow(searchEditText.getWindowToken(), InputMethodManager.RESULT_UNCHANGED_SHOWN);
searchEditText.clearFocus();
}
@@ -736,6 +762,7 @@ public class SearchFragment
@Override
protected void loadMoreItems() {
if(nextPageUrl == null || nextPageUrl.isEmpty()) return;
isLoading.set(true);
showListFooter(true);
if (searchDisposable != null) searchDisposable.dispose();
@@ -890,4 +917,28 @@ public class SearchFragment
return true;
}
/*//////////////////////////////////////////////////////////////////////////
// Suggestion item touch helper
//////////////////////////////////////////////////////////////////////////*/
public int getSuggestionMovementFlags(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder) {
final int position = viewHolder.getAdapterPosition();
final SuggestionItem item = suggestionListAdapter.getItem(position);
return item.fromHistory ? makeMovementFlags(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT) : 0;
}
public void onSuggestionItemSwiped(@NonNull RecyclerView.ViewHolder viewHolder, int i) {
final int position = viewHolder.getAdapterPosition();
final String query = suggestionListAdapter.getItem(position).query;
final Disposable onDelete = historyRecordManager.deleteSearchHistory(query)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(
howManyDeleted -> suggestionPublisher
.onNext(searchEditText.getText().toString()),
throwable -> showSnackBarError(throwable,
UserAction.DELETE_FROM_HISTORY, "none",
"Deleting item failed", R.string.general_error));
disposables.add(onDelete);
}
}

View File

@@ -75,7 +75,7 @@ public class SuggestionListAdapter extends RecyclerView.Adapter<SuggestionListAd
});
}
private SuggestionItem getItem(int position) {
SuggestionItem getItem(int position) {
return items.get(position);
}

View File

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

View File

@@ -2,7 +2,6 @@ package org.schabi.newpipe.info_list;
import android.content.Context;
import android.support.annotation.NonNull;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
@@ -10,15 +9,19 @@ import com.nostra13.universalimageloader.core.ImageLoader;
import org.schabi.newpipe.extractor.InfoItem;
import org.schabi.newpipe.extractor.channel.ChannelInfoItem;
import org.schabi.newpipe.extractor.comments.CommentsInfoItem;
import org.schabi.newpipe.extractor.playlist.PlaylistInfoItem;
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import org.schabi.newpipe.info_list.holder.ChannelInfoItemHolder;
import org.schabi.newpipe.info_list.holder.ChannelMiniInfoItemHolder;
import org.schabi.newpipe.info_list.holder.CommentsInfoItemHolder;
import org.schabi.newpipe.info_list.holder.CommentsMiniInfoItemHolder;
import org.schabi.newpipe.info_list.holder.InfoItemHolder;
import org.schabi.newpipe.info_list.holder.PlaylistInfoItemHolder;
import org.schabi.newpipe.info_list.holder.PlaylistMiniInfoItemHolder;
import org.schabi.newpipe.info_list.holder.StreamInfoItemHolder;
import org.schabi.newpipe.info_list.holder.StreamMiniInfoItemHolder;
import org.schabi.newpipe.local.history.HistoryRecordManager;
import org.schabi.newpipe.util.OnClickGesture;
/*
@@ -50,18 +53,20 @@ public class InfoItemBuilder {
private OnClickGesture<StreamInfoItem> onStreamSelectedListener;
private OnClickGesture<ChannelInfoItem> onChannelSelectedListener;
private OnClickGesture<PlaylistInfoItem> onPlaylistSelectedListener;
private OnClickGesture<CommentsInfoItem> onCommentsSelectedListener;
public InfoItemBuilder(Context context) {
this.context = context;
}
public View buildView(@NonNull ViewGroup parent, @NonNull final InfoItem infoItem) {
return buildView(parent, infoItem, false);
public View buildView(@NonNull ViewGroup parent, @NonNull final InfoItem infoItem, final HistoryRecordManager historyRecordManager) {
return buildView(parent, infoItem, historyRecordManager, false);
}
public View buildView(@NonNull ViewGroup parent, @NonNull final InfoItem infoItem, boolean useMiniVariant) {
public View buildView(@NonNull ViewGroup parent, @NonNull final InfoItem infoItem,
final HistoryRecordManager historyRecordManager, boolean useMiniVariant) {
InfoItemHolder holder = holderFromInfoType(parent, infoItem.getInfoType(), useMiniVariant);
holder.updateFromItem(infoItem);
holder.updateFromItem(infoItem, historyRecordManager);
return holder.itemView;
}
@@ -73,8 +78,9 @@ public class InfoItemBuilder {
return useMiniVariant ? new ChannelMiniInfoItemHolder(this, parent) : new ChannelInfoItemHolder(this, parent);
case PLAYLIST:
return useMiniVariant ? new PlaylistMiniInfoItemHolder(this, parent) : new PlaylistInfoItemHolder(this, parent);
case COMMENT:
return useMiniVariant ? new CommentsMiniInfoItemHolder(this, parent) : new CommentsInfoItemHolder(this, parent);
default:
Log.e(TAG, "Trollolo");
throw new RuntimeException("InfoType not expected = " + infoType.name());
}
}
@@ -111,4 +117,12 @@ public class InfoItemBuilder {
this.onPlaylistSelectedListener = listener;
}
public OnClickGesture<CommentsInfoItem> getOnCommentsSelectedListener() {
return onCommentsSelectedListener;
}
public void setOnCommentsSelectedListener(OnClickGesture<CommentsInfoItem> onCommentsSelectedListener) {
this.onCommentsSelectedListener = onCommentsSelectedListener;
}
}

View File

@@ -1,19 +1,25 @@
package org.schabi.newpipe.info_list;
import android.app.Activity;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import org.schabi.newpipe.database.stream.model.StreamStateEntity;
import org.schabi.newpipe.extractor.InfoItem;
import org.schabi.newpipe.extractor.channel.ChannelInfoItem;
import org.schabi.newpipe.extractor.comments.CommentsInfoItem;
import org.schabi.newpipe.extractor.playlist.PlaylistInfoItem;
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import org.schabi.newpipe.info_list.holder.ChannelGridInfoItemHolder;
import org.schabi.newpipe.info_list.holder.ChannelInfoItemHolder;
import org.schabi.newpipe.info_list.holder.ChannelMiniInfoItemHolder;
import org.schabi.newpipe.info_list.holder.ChannelGridInfoItemHolder;
import org.schabi.newpipe.info_list.holder.CommentsInfoItemHolder;
import org.schabi.newpipe.info_list.holder.CommentsMiniInfoItemHolder;
import org.schabi.newpipe.info_list.holder.InfoItemHolder;
import org.schabi.newpipe.info_list.holder.PlaylistGridInfoItemHolder;
import org.schabi.newpipe.info_list.holder.PlaylistInfoItemHolder;
@@ -21,6 +27,7 @@ import org.schabi.newpipe.info_list.holder.PlaylistMiniInfoItemHolder;
import org.schabi.newpipe.info_list.holder.StreamGridInfoItemHolder;
import org.schabi.newpipe.info_list.holder.StreamInfoItemHolder;
import org.schabi.newpipe.info_list.holder.StreamMiniInfoItemHolder;
import org.schabi.newpipe.local.history.HistoryRecordManager;
import org.schabi.newpipe.util.FallbackViewHolder;
import org.schabi.newpipe.util.OnClickGesture;
@@ -63,9 +70,13 @@ public class InfoListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
private static final int MINI_PLAYLIST_HOLDER_TYPE = 0x300;
private static final int PLAYLIST_HOLDER_TYPE = 0x301;
private static final int GRID_PLAYLIST_HOLDER_TYPE = 0x302;
private static final int MINI_COMMENT_HOLDER_TYPE = 0x400;
private static final int COMMENT_HOLDER_TYPE = 0x401;
private final InfoItemBuilder infoItemBuilder;
private final ArrayList<InfoItem> infoItemList;
private final HistoryRecordManager recordManager;
private boolean useMiniVariant = false;
private boolean useGridVariant = false;
private boolean showFooter = false;
@@ -81,8 +92,9 @@ public class InfoListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
}
}
public InfoListAdapter(Activity a) {
infoItemBuilder = new InfoItemBuilder(a);
public InfoListAdapter(Context context) {
this.recordManager = new HistoryRecordManager(context);
infoItemBuilder = new InfoItemBuilder(context);
infoItemList = new ArrayList<>();
}
@@ -98,6 +110,10 @@ public class InfoListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
infoItemBuilder.setOnPlaylistSelectedListener(listener);
}
public void setOnCommentsSelectedListener(OnClickGesture<CommentsInfoItem> listener) {
infoItemBuilder.setOnCommentsSelectedListener(listener);
}
public void useMiniItemVariants(boolean useMiniVariant) {
this.useMiniVariant = useMiniVariant;
}
@@ -106,50 +122,53 @@ public class InfoListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
this.useGridVariant = useGridVariant;
}
public void addInfoItemList(List<InfoItem> data) {
if (data != null) {
if (DEBUG) {
Log.d(TAG, "addInfoItemList() before > infoItemList.size() = " + infoItemList.size() + ", data.size() = " + data.size());
}
public void addInfoItemList(@Nullable final List<InfoItem> data) {
if (data == null) {
return;
}
if (DEBUG) Log.d(TAG, "addInfoItemList() before > infoItemList.size() = " +
infoItemList.size() + ", data.size() = " + data.size());
int offsetStart = sizeConsideringHeaderOffset();
infoItemList.addAll(data);
int offsetStart = sizeConsideringHeaderOffset();
infoItemList.addAll(data);
if (DEBUG) {
Log.d(TAG, "addInfoItemList() after > offsetStart = " + offsetStart + ", infoItemList.size() = " + infoItemList.size() + ", header = " + header + ", footer = " + footer + ", showFooter = " + showFooter);
}
if (DEBUG) Log.d(TAG, "addInfoItemList() after > offsetStart = " + offsetStart +
", infoItemList.size() = " + infoItemList.size() +
", header = " + header + ", footer = " + footer +
", showFooter = " + showFooter);
notifyItemRangeInserted(offsetStart, data.size());
notifyItemRangeInserted(offsetStart, data.size());
if (footer != null && showFooter) {
int footerNow = sizeConsideringHeaderOffset();
notifyItemMoved(offsetStart, footerNow);
if (footer != null && showFooter) {
int footerNow = sizeConsideringHeaderOffset();
notifyItemMoved(offsetStart, footerNow);
if (DEBUG) Log.d(TAG, "addInfoItemList() footer from " + offsetStart + " to " + footerNow);
}
if (DEBUG) Log.d(TAG, "addInfoItemList() footer from " + offsetStart +
" to " + footerNow);
}
}
public void addInfoItem(InfoItem data) {
if (data != null) {
if (DEBUG) {
Log.d(TAG, "addInfoItem() before > infoItemList.size() = " + infoItemList.size() + ", thread = " + Thread.currentThread());
}
public void addInfoItem(@Nullable InfoItem data) {
if (data == null) {
return;
}
if (DEBUG) Log.d(TAG, "addInfoItem() before > infoItemList.size() = " +
infoItemList.size() + ", thread = " + Thread.currentThread());
int positionInserted = sizeConsideringHeaderOffset();
infoItemList.add(data);
int positionInserted = sizeConsideringHeaderOffset();
infoItemList.add(data);
if (DEBUG) {
Log.d(TAG, "addInfoItem() after > position = " + positionInserted + ", infoItemList.size() = " + infoItemList.size() + ", header = " + header + ", footer = " + footer + ", showFooter = " + showFooter);
}
notifyItemInserted(positionInserted);
if (DEBUG) Log.d(TAG, "addInfoItem() after > position = " + positionInserted +
", infoItemList.size() = " + infoItemList.size() +
", header = " + header + ", footer = " + footer +
", showFooter = " + showFooter);
notifyItemInserted(positionInserted);
if (footer != null && showFooter) {
int footerNow = sizeConsideringHeaderOffset();
notifyItemMoved(positionInserted, footerNow);
if (footer != null && showFooter) {
int footerNow = sizeConsideringHeaderOffset();
notifyItemMoved(positionInserted, footerNow);
if (DEBUG) Log.d(TAG, "addInfoItem() footer from " + positionInserted + " to " + footerNow);
}
if (DEBUG) Log.d(TAG, "addInfoItem() footer from " + positionInserted +
" to " + footerNow);
}
}
@@ -223,15 +242,18 @@ public class InfoListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
return useGridVariant ? GRID_CHANNEL_HOLDER_TYPE : useMiniVariant ? MINI_CHANNEL_HOLDER_TYPE : CHANNEL_HOLDER_TYPE;
case PLAYLIST:
return useGridVariant ? GRID_PLAYLIST_HOLDER_TYPE : useMiniVariant ? MINI_PLAYLIST_HOLDER_TYPE : PLAYLIST_HOLDER_TYPE;
case COMMENT:
return useMiniVariant ? MINI_COMMENT_HOLDER_TYPE : COMMENT_HOLDER_TYPE;
default:
Log.e(TAG, "Trollolo");
return -1;
}
}
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int type) {
if (DEBUG) Log.d(TAG, "onCreateViewHolder() called with: parent = [" + parent + "], type = [" + type + "]");
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int type) {
if (DEBUG)
Log.d(TAG, "onCreateViewHolder() called with: parent = [" + parent + "], type = [" + type + "]");
switch (type) {
case HEADER_TYPE:
return new HFHolder(header);
@@ -255,20 +277,23 @@ public class InfoListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
return new PlaylistInfoItemHolder(infoItemBuilder, parent);
case GRID_PLAYLIST_HOLDER_TYPE:
return new PlaylistGridInfoItemHolder(infoItemBuilder, parent);
case MINI_COMMENT_HOLDER_TYPE:
return new CommentsMiniInfoItemHolder(infoItemBuilder, parent);
case COMMENT_HOLDER_TYPE:
return new CommentsInfoItemHolder(infoItemBuilder, parent);
default:
Log.e(TAG, "Trollolo");
return new FallbackViewHolder(new View(parent.getContext()));
}
}
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
if (DEBUG) Log.d(TAG, "onBindViewHolder() called with: holder = [" + holder.getClass().getSimpleName() + "], position = [" + position + "]");
if (holder instanceof InfoItemHolder) {
// If header isn't null, offset the items by -1
if (header != null) position--;
((InfoItemHolder) holder).updateFromItem(infoItemList.get(position));
((InfoItemHolder) holder).updateFromItem(infoItemList.get(position), recordManager);
} else if (holder instanceof HFHolder && position == 0 && header != null) {
((HFHolder) holder).view = header;
} else if (holder instanceof HFHolder && position == sizeConsideringHeaderOffset() && footer != null && showFooter) {
@@ -276,6 +301,21 @@ public class InfoListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
}
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position, @NonNull List<Object> payloads) {
if (!payloads.isEmpty() && holder instanceof InfoItemHolder) {
for (Object payload : payloads) {
if (payload instanceof StreamStateEntity) {
((InfoItemHolder) holder).updateState(infoItemList.get(header == null ? position : position - 1), recordManager);
} else if (payload instanceof Boolean) {
((InfoItemHolder) holder).updateState(infoItemList.get(header == null ? position : position - 1), recordManager);
}
}
} else {
onBindViewHolder(holder, position);
}
}
public GridLayoutManager.SpanSizeLookup getSpanSizeLookup(final int spanCount) {
return new GridLayoutManager.SpanSizeLookup() {
@Override

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