Commit Graph

7533 Commits

Author SHA1 Message Date
evermind-zz a536311d56
name the regions according to the comments (#6854)
if a region is named android studio will show its name in the structure view.
2021-08-10 22:38:23 +00:00
litetex 5f3b8bea52 Fixed format 2021-08-06 22:12:49 +02:00
litetex 0e4c8ea8af Added tests for the ``TimestampExtractor`` 2021-08-06 22:09:03 +02:00
litetex f9ab23bb4a Removed useless fiedl 2021-08-06 22:08:42 +02:00
litetex 9f8b2264a2 Use better pattern for matching timestamp in text and some reworks
Also extracted overhead code into ``TimestampExtractor``
2021-08-06 22:08:29 +02:00
litetex 1d61bb58f5
Set loglevel to error
Co-authored-by: Stypox <stypox@pm.me>
2021-08-05 20:26:17 +02:00
Stypox a3440cc8ef
Merge pull request #6814 from Stypox/channel-grid-span-count
Fix channel item span count for SubscriptionFragment
2021-08-05 14:25:39 +02:00
litetex 51c60e5261 Catch errors while processing timestamp-links
Otherwise the complete app crashes, which is bad
2021-08-04 22:35:41 +02:00
Stypox f8caed139a
Use custom cancel string everywhere
to fix missing somali translation for android.R.string.cancel
2021-08-04 18:58:35 +02:00
Stypox a2297fb5b8
Fix play queue theme 2021-08-04 18:41:23 +02:00
K0RR 26c39381a8
Optimize assets. (#6827)
Lossless compression.
2021-08-04 11:54:32 +00:00
Stypox 32dffb577c
Provide mime type to file picker to gray out unselectable files 2021-08-01 13:52:32 +02:00
Stypox a9623f8e6a
Merge pull request #6550 from Douile/fix/clickthrough-feed-refresh
Disable feed click events while refresh overlay is shown
2021-08-01 13:11:24 +02:00
Isira Seneviratne d32450255c Use NotificationChannelCompat. 2021-08-01 14:59:30 +05:30
Robin 896aec5295
Merge pull request #6719 from TacoTheDank/core-lifecycle-bump
Update some AndroidX libraries
2021-08-01 11:24:33 +02:00
Stypox d42a534fc3
Merge pull request #6741 from KalleStruik/comment-hearts
Show hearts in comments
2021-08-01 11:12:58 +02:00
Stypox 551e8df8b8
Merge pull request #6773 from nschulzke/mark-as-played
Add ability to mark an item as played
2021-08-01 10:30:36 +02:00
Nathan Schulzke dc0a28b93d Upsert the complete info if we fetch it for marking as watched 2021-07-31 09:50:41 -06:00
Stypox 644396149b
Fix channel item span count for SubscriptionFragment 2021-07-31 11:02:57 +02:00
Nathan Schulzke 0e12cdea7c Save the fetched duration to the database so that it can render the view correctly. 2021-07-29 20:59:23 -06:00
Tobi cd713db029
Merge pull request #6778 from Stypox/invalid-storage-npe
Fix NullPointerException when checking if storage exists
2021-07-28 16:54:57 +02:00
Nathan Schulzke bdd16e06e0 Add comments describing the purpose of the markAsWatched method 2021-07-28 08:25:39 -06:00
Nathan Schulzke 4c632810ec Fetch the stream info via a network request if no duration is found when attempting to mark as watched. 2021-07-27 15:21:56 -06:00
Nathan Schulzke f451bdbfa4 Do not add Mark as Watched to a live stream. 2021-07-27 15:21:56 -06:00
Kalle Struik bfac73b992 Make heart visible in android studio and move logic to the right file. 2021-07-27 22:34:59 +02:00
Nathan Schulzke 2b41f710a8 Change played to watched 2021-07-27 13:26:51 -06:00
Stypox 5924edb289
Merge pull request #6782 from TacoTheDank/fix-fill-parent
Fix deprecated fill_parent attributes
2021-07-27 19:45:51 +02:00
Stypox 5ceec31adf
Merge pull request #6720 from TacoTheDank/alertdialog-edittext
Consolidate edittext alert dialogs into one common layout
2021-07-27 19:42:51 +02:00
TacoTheDank e2791cdf0f Fix deprecated fill_parent attributes 2021-07-27 13:38:59 -04:00
TacoTheDank 50f3b08c59 Consolidate edittext alert dialogs into one layout 2021-07-27 13:31:58 -04:00
Stypox 2aebf6ceaf
Add log when existsAsFile() is called on an invalid StoredFileHelper 2021-07-27 17:56:41 +02:00
Stypox 7ceea2cd8d
Merge pull request #6771 from litetex/fix-ToolbarSearchInputTheme
Fixed the ToolbarSearchTheme
2021-07-27 11:49:55 +02:00
Stypox 0cb801179c
Merge pull request #6733 from Douile/fix/recaptcha-webview-background-activity
Prevent recaptcha webview from keeping youtube loaded in background
2021-07-27 11:41:17 +02:00
Stypox 1822d21676
Fix NullPointerException when checking if storage exists 2021-07-27 11:36:14 +02:00
Nathan Schulzke 7fd2ebc252 Add ability to mark an item as played 2021-07-26 20:51:41 -06:00
litetex f709ac16f8 Fixed the toolbarSearchTheme
The toolbarSearchTheme was accidently broken with https://github.com/TeamNewPipe/NewPipe/pull/6456, see https://github.com/TeamNewPipe/NewPipe/pull/6456#issuecomment-885920235 for details.
This commit restores the old behavior
2021-07-26 21:05:12 +02:00
Kalle Struik 74173317de Change heart color to be red, add else clause for non hearted comments, and apply some code style suggestions. 2021-07-23 19:43:25 +02:00
Kalle Struik 3874e16187 Added support for showing when a comment has received a heart from the creator of a video. 2021-07-23 17:30:47 +02:00
Tobi 39722a5563
Merge pull request #6721 from Stypox/pending-mission-crash
Delete pending missions with invalid storage
2021-07-22 16:22:58 +02:00
Tom 52c136439e
Use loadUrl instead of loadData
Co-authored-by: Stypox <stypox@pm.me>
2021-07-22 10:47:47 +00:00
Douile cd86ed3877
Prevent recaptcha webview from keeping youtube loaded in background
After the cookies are extracted from the recaptcha webview make it load an empty
page to prevent youtube being loaded unecessarily in the background.
2021-07-22 02:41:01 +01:00
TacoTheDank 1d85661ab9 Update some AndroidX libraries 2021-07-21 19:31:41 -04:00
Stypox 736cefed5a
Add tests for play queue items' equals() 2021-07-21 18:22:17 +02:00
Stypox fa8630ddae
Use url comparison between queue items when disabling preloading
From #4562: Disable player stream preloading only if the current stream is going to be replaced for sure (see this). equals() was implemented for PlayQueueItems, so that (only) the url is compared when checking them.
2021-07-21 18:09:18 +02:00
Stypox 4a2bd7bd7b
Remove equals() method from PlayQueueItem 2021-07-21 18:09:18 +02:00
Stypox a9e21a35ea
Delete pending missions with invalid storage 2021-07-21 10:52:04 +02:00
Tobi 63fdc100d6
Merge pull request #6705 from Stypox/big-text-info-items
Fix grid span count calculation
2021-07-19 22:45:48 +02:00
Tobi 9e2ece78dd
Merge pull request #6701 from Stypox/dismiss-download-dialog
Dismiss download dialog correctly
2021-07-19 21:47:12 +02:00
Tobi cebcaf4d6a
Merge pull request #6706 from litetex/fix-format-of-some-kotlin-files
Fix format of some kotlin files
2021-07-19 21:20:00 +02:00
Stypox 4a242e43a7
Merge pull request #6689 from Isira-Seneviratne/Use_WindowInsetsCompat_getInsets
Use WindowInsetsCompat's getInsets() method.
2021-07-19 21:19:06 +02:00
litetex f02c6be10d Fix format of some kotlin files
so that it doesn't annoy people that are building this repo ;)
2021-07-19 20:59:29 +02:00
Stypox 5ba3ef0a25
Fix grid span count calculation; remove duplicate methods 2021-07-19 20:47:50 +02:00
Isira Seneviratne 9458b9f37d Use PackageInfoCompat.getSignatures(). 2021-07-19 19:48:24 +05:30
Stypox ca282f2be8
Merge pull request #6675 from Isira-Seneviratne/Use_Kotlin_methods
Use Kotlin methods in LicenseFragment.
2021-07-19 13:19:02 +02:00
Stypox 46e7da4e21
Merge pull request #6688 from litetex/fix-some-build-warnings
Fix some build warnings
2021-07-19 11:52:24 +02:00
Isira Seneviratne 1721817fdb Use WindowInsetsCompat's getInsets() method. 2021-07-19 15:17:44 +05:30
Stypox d57bfde604
Merge pull request #6434 from litetex/playerSeekbarPreview
Player seekbar thumbnail preview
2021-07-19 11:42:10 +02:00
Stypox 8f559965f6
Call DownloadDialog dismiss() in the correct way 2021-07-19 10:59:45 +02:00
Stypox 35e005caaa
Improve method order in DownloadDialog and add separator comments 2021-07-18 14:23:38 +02:00
Stypox 6c25ce56a3
Merge pull request #6456 from TeamNewPipe/feature/switch-theme
Apply theme to switches
2021-07-18 13:12:47 +02:00
Stypox baa12c7069
Merge pull request #6536 from TacoTheDank/moar-onactivityresult
More onActivityResult deprecation fixes
2021-07-18 10:24:00 +02:00
Isira Seneviratne e2b044d2ee Use Kotlin methods in LicenseFragment. 2021-07-18 07:47:12 +05:30
litetex 621af8d812 Removed unused import (rebasing/merge problem) 2021-07-17 16:52:24 +02:00
litetex efd038a536 Increased padding of preview thumbnail 2021-07-17 16:43:04 +02:00
litetex 0b2629e910 Moved time to the top 2021-07-17 16:43:03 +02:00
litetex a9b5ef3bd3 Set minWidth to 10dp so that the popup player works (mostly) correctly 2021-07-17 16:43:03 +02:00
litetex 2a24532e1d Fine tuned padding
Moved seekbar preview up a bit, so the finger is not obstructing the view
2021-07-17 16:43:02 +02:00
litetex 88c4195260 Enlarged currentDisplaySeek-text on large-handed player 2021-07-17 16:43:01 +02:00
litetex c5f2eb1dd8 Enlarged currentDisplaySeek a bit 2021-07-17 16:43:01 +02:00
litetex 384d964827 Added seekbarThumbnailPreview 2021-07-17 16:43:00 +02:00
litetex 2e2dbaf77f Added seekbar-preview to the player layout 2021-07-17 16:41:54 +02:00
litetex 43133df2ad Added settings for seekbar-preview-thumbnail 2021-07-17 16:41:53 +02:00
Stypox eef568b24c
Merge pull request #5531 from XiangRongLin/tests
Add instrumented tests for LocalPlaylistManager.createPlaylist
2021-07-17 13:21:20 +02:00
litetex 36c198fc33
One textview is enough for disabled comments
Ref: https://github.com/TeamNewPipe/NewPipe/pull/6483#discussion_r654793920
2021-07-17 13:14:50 +02:00
litetex 81107df53f
Added comments disabled functionallity 2021-07-17 13:10:44 +02:00
Stypox a932bc2503
Merge pull request #6637 from Isira-Seneviratne/Use_GestureDetectorCompat
Use GestureDetectorCompat.
2021-07-17 12:58:43 +02:00
litetex f4e2eca256 Simplified code and adjusted the style so that it's similar to FeedFragment 2021-07-16 21:21:10 +02:00
litetex 08d5dfa49c Removed updateRelativeTimeViews when the activity is paused
We don't need to call ``updateRelativeTimeViews`` when the activity is paused, because the user likely won't  notice it.
Despite that onResume already calls ``updateRelativeTimeViews`` so there is no need to do that twice.
2021-07-16 21:04:32 +02:00
Tobi dfa941a9e7
Merge pull request #6503 from evermind-zz/fixes-for-upstream
Prevent error msg: 'Unrecoverable player error occurred' while playin…
2021-07-14 09:53:30 +02:00
Tobi 1584028995
Merge pull request #6531 from XiangRongLin/immediat_pref_commit
Remove option to immediately commit pref changes on import
2021-07-14 09:48:58 +02:00
Tobi 14dab85ff0
Merge pull request #6566 from evermind-zz/various-fixes-for-upstream
Convert PlayerHolder to Singleton; cleanup in VideoDetailFragment; Player/MainPlayer do not call onDestroy() directly
2021-07-14 09:46:04 +02:00
XiangRongLin 2aa5f68b7b Add comment explaining usage Schedulers.trampoline in detail 2021-07-12 18:31:37 +02:00
XiangRongLin 56ea526cce Add instrumented tests for LocalPlaylistManager.createPlaylist 2021-07-12 18:31:37 +02:00
Tobi 96f5cd9f17
Merge pull request #6463 from Stypox/metadata-tags
Improved metadata layout, better tags accessibility
2021-07-12 16:18:11 +02:00
Tobi 64efb89cce
Merge pull request #6616 from litetex/fix-minimized-player-thumbnail
Made the thumbnail in the minimized player visible again
2021-07-12 16:17:12 +02:00
Hosted Weblate 3a83062670
Translated using Weblate (Polish)
Currently translated at 100.0% (672 of 672 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (672 of 672 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (672 of 672 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (672 of 672 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (672 of 672 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (672 of 672 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (672 of 672 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (672 of 672 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (672 of 672 strings)

Translated using Weblate (Polish)

Currently translated at 99.8% (671 of 672 strings)

Translated using Weblate (Polish)

Currently translated at 99.8% (671 of 672 strings)

Translated using Weblate (Bavarian)

Currently translated at 8.7% (59 of 672 strings)

Translated using Weblate (Bavarian)

Currently translated at 1.8% (1 of 53 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (672 of 672 strings)

Translated using Weblate (Ukrainian)

Currently translated at 100.0% (672 of 672 strings)

Co-authored-by: Agnieszka C <aga_04@o2.pl>
Co-authored-by: Bert <robert@it-aicher.de>
Co-authored-by: Evo <weblate@verahawk.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/bar/
Translation: NewPipe/Metadata
2021-07-12 15:47:11 +02:00
Douile 2e053ea25a
Fix crash when refreshing feed 2021-07-11 03:00:32 +01:00
Hosted Weblate fd3d46c813
Translated using Weblate (Polish)
Currently translated at 100.0% (672 of 672 strings)

Translated using Weblate (Somali)

Currently translated at 100.0% (672 of 672 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (672 of 672 strings)

Co-authored-by: Agnieszka C <aga_04@o2.pl>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Nadir Nour <dudethatwascool2@gmail.com>
2021-07-10 17:02:34 +02:00
TobiGr 9ca2691a2c Add close() method to NewPipeDatabase 2021-07-10 14:46:51 +02:00
TobiGr 7c3f5a62c5 Fix crash when refreshing feed after importing database or subscriptions
The database was not closed correctly
2021-07-10 13:09:01 +02:00
Isira Seneviratne 6711dae4e0 Use GestureDetectorCompat. 2021-07-10 15:35:11 +05:30
TobiGr 4ea2d8e7ba Removed translations with incorrect number of arguments for formatting 2021-07-09 10:32:10 +02:00
TobiGr bb386fea16 Remove unused translations of "downloads_storage_ask_summary_kitkat" 2021-07-09 10:25:54 +02:00
Hosted Weblate 82cdb0fdb3
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (672 of 672 strings)

Translated using Weblate (Bavarian)

Currently translated at 6.6% (45 of 672 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (672 of 672 strings)

Added translation using Weblate (Bavarian)

Translated using Weblate (Somali)

Currently translated at 100.0% (672 of 672 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (672 of 672 strings)

Translated using Weblate (German)

Currently translated at 100.0% (672 of 672 strings)

Translated using Weblate (French)

Currently translated at 67.9% (36 of 53 strings)

Translated using Weblate (Polish)

Currently translated at 49.0% (26 of 53 strings)

Translated using Weblate (Ukrainian)

Currently translated at 52.8% (28 of 53 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (672 of 672 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (672 of 672 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (672 of 672 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (672 of 672 strings)

Translated using Weblate (Dutch)

Currently translated at 100.0% (672 of 672 strings)

Translated using Weblate (Ukrainian)

Currently translated at 18.8% (10 of 53 strings)

Co-authored-by: Agnieszka C <aga_04@o2.pl>
Co-authored-by: Bert <robert@it-aicher.de>
Co-authored-by: Evo <weblate@verahawk.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Igor Nedoboy <i.nedoboy@mail.ru>
Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Co-authored-by: Nadir Nour <dudethatwascool2@gmail.com>
Co-authored-by: Terry Louwers <t.louwers@gmail.com>
Co-authored-by: VfBFan <drop0815@posteo.de>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: translator <yasinoc375@advew.com>
Co-authored-by: webweblate <webweblate@riseup.net>
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/fr/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/pl/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/uk/
Translation: NewPipe/Metadata
2021-07-09 10:14:03 +02:00
TobiGr de312eb768 Fix ClassCastException
See https://github.com/TeamNewPipe/NewPipe/issues/6577#issuecomment-876095378

java.lang.ClassCastException: android.widget.ImageButton cannot be cast to androidx.appcompat.widget.AppCompatImageButton
	at org.schabi.newpipe.player.Player.onRepeatModeChanged(Player.java:2263)
	at com.google.android.exoplayer2.ExoPlayerImpl.lambda$setRepeatMode$2(ExoPlayerImpl.java:564)
	at com.google.android.exoplayer2.-$$Lambda$ExoPlayerImpl$rgrcbaqP9Y8LgzdByBnAfUO4ydU.invokeListener(lambda)
	at com.google.android.exoplayer2.BasePlayer$ListenerHolder.invoke(BasePlayer.java:279)
	at com.google.android.exoplayer2.ExoPlayerImpl.invokeAll(ExoPlayerImpl.java:1498)
	at com.google.android.exoplayer2.ExoPlayerImpl.lambda$notifyListeners$6(ExoPlayerImpl.java:1318)
	at com.google.android.exoplayer2.-$$Lambda$ExoPlayerImpl$b59raXxaB-trjwE5bgpZInm1QnU.run(lambda)
	at com.google.android.exoplayer2.ExoPlayerImpl.notifyListeners(ExoPlayerImpl.java:1328)
	at com.google.android.exoplayer2.ExoPlayerImpl.notifyListeners(ExoPlayerImpl.java:1318)
	at com.google.android.exoplayer2.ExoPlayerImpl.setRepeatMode(ExoPlayerImpl.java:564)
	at com.google.android.exoplayer2.SimpleExoPlayer.setRepeatMode(SimpleExoPlayer.java:1636)
	at org.schabi.newpipe.player.Player.setRepeatMode(Player.java:2253)
	at org.schabi.newpipe.player.Player.onRepeatClicked(Player.java:2232)
	at org.schabi.newpipe.player.Player.onBroadcastReceived(Player.java:1123)
	at org.schabi.newpipe.player.Player.access$200(Player.java:190)
	at org.schabi.newpipe.player.Player$3.onReceive(Player.java:1060)
	at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:1185)
	... 7 more
2021-07-08 10:34:32 +02:00
litetex 85e864a01e Made the thumbnail in the minimized player visible again 2021-07-06 21:40:57 +02:00
evermind f78d2a5ed8 Prevent error msg: 'Unrecoverable player error occurred' while playing video during rotation (#6502)
Playing a video in VideoDetailFragment and rotating the screen to landscape (back and forth more often)
can trigger this error message. Especially if rotation for whatever reason takes long or
playing a high resolution (1080p) video.

The underlying logcat error messages:
05-12 16:38:38.251 24920 26037 E Surface : getSlotFromBufferLocked: unknown buffer: 0x923fc810
05-12 16:38:38.251 24920 26037 W ACodec  : [OMX.qcom.video.decoder.avc] can not return buffer 35 to native window

The problem is that that Exoplayer is trying to write to our -- during rotation -- no longer existant
(VideoDetailFragment) SurfaceView.

Solution:
Implementing SurfaceHolder.Callback and using DummySurface we can now handle the lifecycle of the Surface.

How?: In case we are no longer able to write to the Surface eg. through rotation/putting in
background we can set a DummySurface. Although it only works on API >= 23.
Result: we get a little video interruption (audio is still fine) but we won't get the
'Unrecoverable player error occurred' error message.

This implementation is based on and more background information:
 'ExoPlayer stuck in buffering after re-adding the surface view a few time 2703'

 -> exoplayer fix suggestion link
  https://github.com/google/ExoPlayer/issues/2703#issuecomment-300599981
2021-07-06 12:49:56 +02:00
evermind 48c2c156cb convert PlayerHolder to Singleton, handle context within, bugfix ServiceConnection leak
- bugfix: have ServiceConnection created only once!

- select the context within the PlayerHolder to start, stop, bind or unbind the service
  -> we have to make sure the Service is started AND stopped within the same context
  -> so let PlayerHolder be the one to select the context

- remove removeListener() and replace the call with setListener(null)
- Compatibility: use ContextCompat.startForegroundService instead of startService()
2021-07-06 12:31:26 +02:00
evermind 435813355f use viewBinding correctly 2021-07-06 07:56:05 +02:00
evermind e30a552b6c remove duplicated code for toggle Fullscreen 2021-07-06 07:56:00 +02:00