Commit graph

2941 commits

Author SHA1 Message Date
TobiGr
2b5fc80b0b Clarify that only StramInfoItems are accepted by the builder 2022-02-21 21:50:30 +01:00
TobiGr
05af350375 Move StreamDialogEntry.openChannelFragment to NavigationHelper 2022-02-20 20:26:27 +01:00
TobiGr
58abf4b834 Move Classes related to InfoItemDIalog into own package 2022-02-20 20:17:04 +01:00
TobiGr
a97ea9af70 Fix rebase 2022-02-20 20:17:04 +01:00
TobiGr
40103c07d2 Apply feedback
Return this in InfoIrtemDialog.Builder methoods.
Move null checks for InfoIrtemDialog.Builder into constructor.
Fix and add some more docs.
2022-02-20 20:17:04 +01:00
TobiGr
c0ab407cf6 Use identical method names for creating the InfoItemDialog in Fragments 2022-02-20 20:17:04 +01:00
TobiGr
926e00d467 Use ErrorActivity to notifiy about errors occourred while loading channel details 2022-02-20 20:17:04 +01:00
TobiGr
df28deb880 Use Context instead of Activity
Improve docs
2022-02-20 20:17:04 +01:00
TobiGr
f9ad08d977 Add default entries automatically 2022-02-20 20:17:04 +01:00
TobiGr
597192ce99 Extract entries into beginning and end category 2022-02-20 20:17:04 +01:00
TobiGr
9f3031bc3a Refactor generating InfoItemDialog's
This commit refactors the way `InfoItemDialog`s are generated. This is necessary because the old way used  the `StreamDialogEntry` enum for most of the dialogs' content generation process. This required static variables and methods to store the entries which are used for the dialog to be build (See e.g.`enabledEntries` and methods like `generateCommands()`). In other words, `StreamDialogEntry` wasn't an enumeration anymore.

To address this issue, a `Builder` is introduced for the `InfoItemDialog`'s genration. The builder also comes with some default entries and and a specific order. Both can be used, but are not enforced. 

A second problem that introduced a structure which was atypical for an enumeration was the usage of non-final attributes within `StreamDialogEntry` instances. These were needed, because the default actions needed to overriden in some cases.

To address this problem, the `StreamDialogEntry` enumeration was renamed to `StreamDialogDefaultEntry` and a new `StreamDialogEntry` class is used instead.
2022-02-20 20:17:04 +01:00
Stypox
68abbfc19c Merge pull request #7659 from litetex/load-enough-initial-data
Load enough initial items (into BaseListFragment and descendants)
2022-02-19 15:43:13 +01:00
TobiGr
4d72d590e4 Merge branch 'master' into dev 2022-02-19 10:56:19 +01:00
Stypox
c974190a1d Fix fast seek overlay arc not correctly centered
This happened in fullscreen player: while play-pause, brightness, volume, ... buttons were correctly centered in the app UI, the fast seek overlay was centered in the system UI, causing a mismatch between the two that looked ugly
2022-02-18 22:34:55 +01:00
litetex
afe11d4b0f Fixed scrolling not working when rotating device 2022-02-17 20:59:41 +01:00
litetex
ee5140e0a1 Removed useless code
https://github.com/TeamNewPipe/NewPipe/pull/7659#discussion_r793752985
2022-02-17 20:59:40 +01:00
litetex
9630cde091 Code improvements 2022-02-17 20:59:39 +01:00
litetex
ea84f69406 Fixed listener not re-registering after e.g. a new search is started 2022-02-17 20:59:38 +01:00
litetex
4413d617bf Reverted to loading behavior of #7638 and improved it
The previous/reverted behavior caused unwanted data transmission:
* Removed loading via handleResults/loadMoreItems-callback because the RecyclerView is apparently not immediately updated in the UI when the data is set which causes one load of data to much.
2022-02-17 20:59:38 +01:00
litetex
48f47b27c7 Tried to repair #4475 and #3368
* Always recreate the footer so that it's not possible to attach the same instance twice
* Removed support for creating a custom footer as it's never used
* Supply the header with an supplier
  * This might not fix the problem completely as we currently can only create the header once inside Channel, Playlist and RelatedItems-Fragment - allowing creation of multiple headers might be done in the future if the issues still arise
* Other minor fixes
2022-02-17 20:59:36 +01:00
litetex
8bb2c89378 Code improvements
Removed - partial - stupid code.
2022-02-17 20:59:35 +01:00
litetex
e34fe5d524 Removed InfoListAdapter from checkstyle-suppressions
because if you modify something in the code the suppressions-file no longer matches
2022-02-17 20:59:34 +01:00
litetex
2aa75303d2 Improved InfoListAdapter
* Removed unused code
* Cleaned it up
* Made code more readable
2022-02-17 20:59:33 +01:00
litetex
b19bc31d05 Load enough initial data into BaseListFragment 2022-02-17 20:59:33 +01:00
Robin
8b64316823 Merge pull request #7679 from TacoTheDank/reportSenderKotlin
Update ACRA library
2022-02-14 15:35:00 +01:00
Tobi
fc95eeb1b5 Merge pull request #7860 from litetex/fix-settings-search-language
Use the correct app language when searching in the settings
2022-02-11 21:20:08 +01:00
litetex
816546e69c Use the correct app language when searching in the settings 2022-02-11 20:58:44 +01:00
TiA4f8R
b6731c2187 Set workaround for playback position reset when switching to main player with content thumbnail
The workaround set before was not applied when switching to main player with content thumbnail from popup or background player. This commit fixes this by applying the workaround when switching to main player with content thumbnail from popup or background player.
2022-02-11 19:32:13 +01:00
litetex
3ce8875b39 Merge pull request #7704 from Stypox/fix-stream-menu-crash
Fix crash when long-pressing stream while player is starting
2022-02-09 19:53:09 +01:00
TacoTheDank
f77adbceae Update ACRA library 2022-02-02 13:12:29 -05:00
TiA4f8R
fda5eb6182 Add JavaDoc for PlayerDataSource.PLAYLIST_STUCK_TARGET_DURATION_COEFFICIENT 2022-01-30 20:42:02 +01:00
TiA4f8R
a8c06bb435 Apply suggested changes and remove the CustomHlsPlaylistTracker class 2022-01-30 20:42:02 +01:00
TiA4f8R
79ea722908 Suppress SonarLint NullPointerException warnings in CustomHlsPlaylistTracker
They seem to be wrong, by looking at the class work and at the return of CustomHlsPlaylistTracker's methods.
2022-01-30 20:42:02 +01:00
TiA4f8R
a03872cb51 Use a custom HlsPlaylistTracker, based on DefaultHlsPlaylistTracker to allow more stucking on HLS livestreams
ExoPlayer's default behavior is to use a multiplication of target segment by a coefficient (3,5).
This coefficient (and this behavior) cannot be customized without using a custom HlsPlaylistTracker right now.

New behavior is to wait 15 seconds before throwing a PlaylistStuckException.
This should improve a lot HLS live streaming on (very) low-latency livestreams with buffering issues, especially on YouTube with their HLS manifests.
2022-01-30 20:42:01 +01:00
TiA4f8R
76fdba9c9d Catch properly BehindLiveWindowExceptions
Instead of trying to reload the play queue manager and then throwing an error, BehindLiveWindowExceptions now make the app seek to the default playback position, like recommended by ExoPlayer.
The buffering state is shown in this case.

Error handling of other exceptions is not changed.
2022-01-30 20:42:01 +01:00
litetex
4bfcf47a81 Merge pull request #7586 from litetex/add-preference-search
Made preferences searchable
2022-01-30 17:08:04 +01:00
litetex
7077184903 Merge pull request #4833 from vkay94/youtube-rewind-forward
YouTube's Fast Forward/Rewind behavior
2022-01-30 17:07:15 +01:00
Stypox
a9f6c8d726 Do not show enqueue button if play queue not ready 2022-01-27 17:11:16 +01:00
Stypox
d5d4614df1 Merge pull request #7538 from ktprograms/fix-queue-channel-details-not-in-db
Load uploaderUrl when showing Channel Details from Play Queue
2022-01-26 09:58:32 +01:00
litetex
e76909f344 Code cleanup
Co-authored-by: Stypox <stypox@pm.me>
2022-01-25 20:47:53 +01:00
litetex
3e23aa0071 Fixed "Changing the seeks duration does not update the displayed seconds" 2022-01-25 20:44:49 +01:00
Stypox
6295d88145 Fix NPE and add some @Nullables
Fix NullPointerException in PlayerHolder.getQueueSize() and add `@Nullable` here and there so that the linter reports risks of NPEs
2022-01-25 17:37:20 +01:00
ktprograms
08cb92b40d Load uploaderUrl when showing Channel Details from Play Queue
This checks if the uploaderUrl is in the database, if not it gets the
uploaderUrl and puts it in the database. This is similar to the fetching
of uploaderUrl when it doesn't exist done in #6919.

Also use createNotification when error occurs in getStreamInfo.
2022-01-25 11:00:34 +08:00
TiA4f8R
e83d964fca Fix first item played in playlists when switching player type or resolution
The issue was caused by an ExoPlayer change, which when setting a media source, resets the current playback position and the current window index by default.

Also set player recovery in more places to fix playback position not propely set in some cases after a player type switch.
2022-01-24 21:40:16 +01:00
litetex
8ab45acf82 Use view binding inside `PreferenceViewHolder` 2022-01-24 21:08:52 +01:00
litetex
a42886516b Use ViewBinding 2022-01-24 21:08:52 +01:00
litetex
36524475b8 Fixed imports 2022-01-24 21:08:51 +01:00
litetex
5453617c81 Removed breadcrumbs customization 2022-01-24 21:08:51 +01:00
litetex
ef4bb60bea Code improvements
* Renamed methods so that they are more understandable
* Removed ``SearchIndexItem``
2022-01-24 21:08:50 +01:00
litetex
07d8adf7e6 Improved doc 2022-01-24 21:08:50 +01:00