1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-06-24 22:23:19 +00:00
Commit Graph

3835 Commits

Author SHA1 Message Date
Stypox
78cf9aaa7d
Save and restore state in CommentRepliesFragment 2023-12-22 11:48:07 +01:00
Stypox
f9494a294f
Implement CommentRepliesFragment 2023-12-22 11:48:07 +01:00
Stypox
0dd4553700
Load more items even if initial related items are empty 2023-12-22 11:48:07 +01:00
Stypox
4f7b36cd70
Keep source list info in InfoItemBuilder
Also remove some unused code
2023-12-22 11:48:07 +01:00
Stypox
5d350aec87
Move RelatedItemInfo next to fragment using it 2023-12-22 11:48:07 +01:00
Stypox
059db6fb31
Add replies button to comments 2023-12-22 11:48:05 +01:00
Stypox
8f4cd032b7
Remove mini variant and move upload date to top in comments 2023-12-22 11:46:03 +01:00
Stypox
5b999a88f8
Merge pull request #10673 from Stypox/transaction-too-large
Fix transaction too large in channel tab fragments
2023-12-21 22:30:22 +01:00
Stypox
482531836f
Merge pull request #10670 from Stypox/feed-oom
Fix OutOfMemory when fetching feed
2023-12-21 22:29:46 +01:00
Stypox
b3c82f54df
Merge pull request #10671 from Stypox/channel-main-tab-lag
Fix application lagging with many main page tabs
2023-12-21 22:28:59 +01:00
Stypox
495c9850b4
Fix transaction too large for channel tab fragments 2023-12-20 23:57:43 +01:00
Stypox
c0f8d145f8
Fix lag with many channels on main page
Disable loading all tabs at once, since there can be many of them, and use default strategy of only keeping in memory the two tabs adjacent to the current tab.
2023-12-20 22:47:57 +01:00
Stypox
80f33daeeb
Fix OutOfMemory when fetching feed
Reduced memory footprint of FeedUpdateInfo objects. Those objects might stay around for a while and accumulate (up to BUFFER_COUNT_BEFORE_INSERT = 20 at the moment), so in order not to fill up the memory it's better to keep as little data as possible.
Previously ChannelInfo data was stored, causing ReadyChannelTabLinkHandler objects to be also stored uselessly (and those channel tabs contain prefetched JSON data which used ~700KB of memory).
2023-12-20 20:22:45 +01:00
Stypox
b871b5d2dd
Fix crashes due to wrong root fragment manager 2023-12-10 16:06:07 +01:00
Stypox
8d59812827
Fix channel avatar not loading correctly sometimes
The fix just involves removing some really outdated code (6 years ago) added in 33e29be7db (diff-38bd2cf1b92659b499c08e1cf6ac9ef384c7e13381b906f2f98c57cbb758756dR778) (blame: 9318bb5306/app/src/main/java/org/schabi/newpipe/detail/VideoItemDetailActivity.java (L778)).
What that code did was setting the 'buddy' image to the uploader avatar as a placeholder, and then setting the actual image if it existed and after it had loaded.
That code remained there up until now, but now it doesn't make sense anymore, since Picasso already takes care of setting placeholders.
The problem is, starting from #10066 the actual uploader image is set before (not after) those lines of code, making them do the wrong thing, i.e. always overwrite the currently set image.
But then why did the channel avatar image work normally sometimes?
My guess is that since Picasso loads images in the background, when opening a video from scratch setting the placeholder still happened before Picasso finished loading the image.
However when the image is already cached it's loaded much faster and therefore setting the placeholder happens after, effectively hiding the loaded image.
2023-12-10 15:12:38 +01:00
TobiGr
e39ac885de
Update new version check to match new API structure
See TeamNewPipe/web-api#17
2023-12-10 15:12:38 +01:00
TobiGr
e6965622bd
Fix crash with disabled thumbnails when trying to play a stream 2023-12-10 15:12:38 +01:00
Stypox
e784af3e2d
Merge pull request #10446 from AudricV/dl_improve_video_audio_stream_selection
Improve audio stream selection for video-only streams in the downloader
2023-12-07 16:48:57 +01:00
Stypox
ce30108efc
Improve javadoc for getAudioStreamFor 2023-12-07 16:40:32 +01:00
Stypox
7cfd537755
Merge pull request #10494 from TobiGr/fix-new-streams
Fix notifying about old "new" streams
2023-12-07 14:12:54 +01:00
Tobi
b4a0e08d9d
Update app/src/main/java/org/schabi/newpipe/database/feed/dao/FeedDAO.kt
Co-authored-by: Stypox <stypox@pm.me>
2023-11-23 17:12:16 +01:00
Stypox
545f9ae5f3
Merge pull request #10489 from sqproman/missing_quotation_replace_char_crash
Quote filename replacement characters to fix crashes when downloading streams with special characters
2023-11-16 20:19:01 +01:00
Stypox
be4a5a5f3e
Merge pull request #10576 from AudricV/fix-npe-feed-new-items-button
Fix crash when setting the masking of the new feed items button if the context is null
2023-11-16 09:02:24 +01:00
Stypox
3dc593fe88
Merge pull request #10577 from AudricV/fix-npe-play-queue-audio-track-menu
Fix crash when building the play queue audio track menu if the player is null
2023-11-16 09:01:11 +01:00
Stypox
e8ed18f1cf
Merge pull request #10578 from AudricV/try-fix-player-service-foreground-start
Restore player service start handling before player UI separation and fix some issues in this service
2023-11-16 08:59:56 +01:00
AudricV
e5fda35c51
Remove OPUS HLS streams from playable streams
This format is not supported by ExoPlayer when returned as HLS streams, so we
can't play streams using this format and this delivery method.

Also improve the Javadoc of ListHelper.getPlayableStreams.
2023-11-15 23:37:22 +01:00
AudricV
84d50da009
Restore player service start handling before player UI separation
This behavior was present before 0.24.0 and the player UI separation and
avoided crashes for which their exception contained
"Context.startForegroundService() did not then call Service.startForeground()".

Some player nullability checks have been also added, and the player service is
now stopped when it has been started from a media button and there is nothing
to play.
2023-11-15 23:21:20 +01:00
AudricV
2cf7764714
Fix crash when building the play queue audio track menu if the player is null
As the player can be null in some cases, we have to make sure that the player
is not null, by using Optionals on the player itself instead of its methods
returning Optionals.

If the player is null, the play queue audio track menu will now be hidden.
2023-11-15 21:45:56 +01:00
AudricV
9fab0ec94f
Fix crash when setting the masking of the new feed items button if the context is null
As the fragment context can be null in some cases, we have to make sure that
the context is not null before calling
DeviceUtils.hasAnimationsAnimatorDurationEnabled.

If the context is null, the button will now not be hidden automatically.
2023-11-15 19:04:45 +01:00
TobiGr
5265b767cb Fix notifiying about old "new" streams
Add tests for `FeedDAO.unlinkStreamsOlderThan(:offsetDateTime) `
Closes #10237
2023-10-14 18:33:21 +02:00
akko
6d0bb02544 adds quotation to create filename util replacement char 2023-10-13 11:28:09 +07:00
TobiGr
3d5a8af52b Fix inconsistency when LocalPlaylist is used as MainFragment tab 2023-10-02 02:56:30 +02:00
Yingwei Zheng
1cf670dad9 Fix inconsistency between user interaction and database commit order when re-adding videos to the playlist 2023-10-02 02:56:30 +02:00
Siddhesh Naik
e80b6b3057
Add playlist name and video name to playlist sharing content (#10427)
- Currently, only a list of videos separated by newline are added in
  the share content.
- This makes it difficult to identify a specific video in a list of
  Urls.
- Used string resources for the sharing content formats.
- Added a confirmation dialog for users to choose between sharing
  playlist formats.
- Added Playlist name as the header and corresponding video name for
  each video url in following format.

Playlist
- Music1: https://media-url1
- Music2: https://media-url2
- Music3: https://media-url3


Co-authored-by: TobiGr <tobigr@users.noreply.github.com>
2023-09-26 11:11:33 +02:00
AudricV
77bbbc88f8
Use ListHelper to get secondary audio streams for video-only streams
Instead of searching for the first audio stream matching a compatible media
format, this change makes SecondaryStreamHelper.getAudioStreamFor use methods
isLimitingDataUsage, getAudioFormatComparator and getAudioIndexByHighestRank of
ListHelper to get an audio stream which can be muxed into a video-only stream,
if available.

This allows users to download videos with the highest audio quality available
if no resolution limit on mobile data usage has been set.

The order of formats used to search a compatible audio stream has been kept.
2023-09-24 18:23:45 +02:00
AudricV
cdb79ef78a
Make isLimitingDataUsage method of ListHelper package-private and fix some typos in the class 2023-09-24 18:23:44 +02:00
Tobi
1630e309fb
Merge pull request #9987 from Edwardsoen/add_high_resolution_to_default_option
Include a high-resolution option in the default resolution settings.
2023-09-24 17:54:18 +02:00
TobiGr
94c1438913 Use "done" button to close license dialogs.
Rename string res "recaptcha_done_button" to "done".
2023-09-23 13:56:49 +02:00
TobiGr
e206a26a85 Restore license dialog buttons to open the SoftwareComponent's website
Do not keep the active License but the active SoftwareComponent.
2023-09-23 13:49:09 +02:00
TobiGr
242e20316b [AboutFragment / LicenseFragment] Fix license restore after rotation
Do not restore last opened license after a rotation change when the license was closed earlier.

This commit adds onCancelListener and onDismissListener to the AlertDialogs which are used to display the licenses.
2023-09-23 13:49:09 +02:00
Stypox
bdc2aa2b39
Update extractor and remove DeobfuscateException
In ErrorInfo it was treated separately from other ParsingExceptions, including by showing a customized message, which has now been removed.
2023-09-22 10:43:37 +02:00
Stypox
f8b756c8bc
Make question mark localizable 2023-09-22 10:14:45 +02:00
Stypox
027b829c38
Use @DrawableRes in PicassoHelper 2023-09-22 10:14:45 +02:00
Stypox
0085ca6416
Fix loading images from db even if disabled 2023-09-22 10:14:44 +02:00
Stypox
87dca0f7ec
Separate imageListToDbUrl from choosePreferredImage
imageListToDbUrl should be used if the URL is going to be saved to the database, to avoid saving nothing in case at the moment of saving the user preference is to not show images.
2023-09-22 10:14:44 +02:00
Stypox
37af2c87e8
Fix possible NPE in PlayQueueNavigator 2023-09-22 10:14:44 +02:00
Stypox
bf908f0b7d
Add documentation and fix SonarCloud issue 2023-09-22 10:14:44 +02:00
Stypox
8d463b9577
Further improve image resolution strategy
Now using multiple comparison steps instead of magic values
2023-09-22 10:14:44 +02:00
Stypox
4f7d206736
Display all thumbnails in description tab 2023-09-22 10:14:44 +02:00
Stypox
35073c780d
Implement better image selection strategy 2023-09-22 10:14:44 +02:00
Stypox
0a8f28b1c6
Add image quality preference 2023-09-22 10:14:43 +02:00
Stypox
af2375948d
Support obtaining multiple images from the extractor 2023-09-22 09:57:33 +02:00
TobiGr
f2e352832a Create new settings category: Backup and restore
Following settings have been move to the new category:
- import database (from ContenttSettings)
- export database (from ContenttSettings)
- reset settings (from DebugSettings)
2023-09-21 16:01:07 +02:00
Vincent Tanumihardja
d7ef9b1f0c Added strings to strings.xml to allow translation. 2023-09-21 16:01:07 +02:00
Vincent Tanumihardja
a239a26b17 Revert changes made to dev. 2023-09-21 16:01:07 +02:00
Vincent Tanumihardja
81ad50e82a Added delete xml method inside the yes dialogue. 2023-09-21 16:01:07 +02:00
Zhidong Piao
23de9bf93e clear shared preference xmls 2023-09-21 16:01:07 +02:00
Vincent Tanumihardja
5c46412faa Changed alert dialogue. 2023-09-21 16:01:07 +02:00
Vincent Tanumihardja
076e9eee01 Added alert dialogue and restarts the app when resetting settings. 2023-09-21 16:01:07 +02:00
Vincent Tanumihardja
58517d1d27 Added reset button but working as intended for theme. 2023-09-21 16:01:07 +02:00
Vincent Tanumihardja
aa1847189b Added reset button but slightly working as intended. 2023-09-21 16:01:07 +02:00
Vincent Tanumihardja
5d101e7b88 Added reset button but not working as intended. 2023-09-21 16:01:07 +02:00
TobiGr
2a1b506d98 Improved accessibility of player interfaces 2023-09-21 12:20:00 +02:00
Stypox
b798ff5c92
Merge pull request #10435 from TeamNewPipe/imp/codequality
Improve codequality
2023-09-20 21:24:44 +02:00
TobiGr
779ea19222 Fix doc formatting 2023-09-20 19:44:23 +02:00
Isira Seneviratne
a1f2b7f8e8 Switch to Files.createDirectories() 2023-09-20 19:44:23 +02:00
TobiGr
0acc3532c9 Remove useless override 2023-09-20 15:42:09 +02:00
TobiGr
748c2babe9 Add comments and annotations 2023-09-20 15:41:21 +02:00
TacoTheDank
b1faed586d Replace MathUtils.clamp with Kotlin coerceIn 2023-09-19 16:32:37 -04:00
Stypox
725c18eada
Merge pull request #10165 from TeamNewPipe/fix/media-format
Fix downloads of streams with missing MediaFormat
2023-09-19 15:54:12 +02:00
Stypox
992bb5d7be
Simplify retrieveMediaFormatFromContentTypeHeader
Also check for nullity
2023-09-19 15:33:49 +02:00
TobiGr
8f83e39970 Fix three memory leaks
Add documentation to BaseFragment.initViews(View, Bundle) and BaseFragment.initListeners()
2023-09-19 00:13:16 +02:00
TobiGr
64da7a06c0
Fix previous ActionBar title visible for a few miliseconds when opening ChannelFragment 2023-09-18 23:22:32 +02:00
TobiGr
57eaa1bbe1
Apply review
Co-Authored-By:  Audric V <74829229+AudricV@users.noreply.github.com>
2023-09-18 23:22:32 +02:00
TobiGr
109d06b4bb
Deduplicate code to initialize ClickListeners on playlist controls
Add the separate utility class PlayButtonHelper to handle the initialization of the listeners.
The ClickListeners on playlist controls had different behaviours. This commit fixes that.

The commit also refactors the way how the app determines whether it is started for the first time. The previous version was not clean and recent in this PR caused it to fail.
2023-09-18 23:22:32 +02:00
AudricV
f2ee3859ab
Hide the upload date element on the About tab
This empty element should be always hidden for this tab, as there is no upload
date available for channels.
2023-09-18 23:22:32 +02:00
AudricV
89dc44be61
Always show the About tab and support having no description 2023-09-18 23:22:32 +02:00
TobiGr
6ab8716e69
Extract actual feed loading code into separate method
Increase readability
2023-09-18 23:22:32 +02:00
TobiGr
5c7c382323
Add missing @Override annotations to setupMetadata() implementations 2023-09-18 23:22:32 +02:00
Stypox
78b4b9441e
Update NewPipeExtractor and adapt imports 2023-09-18 23:22:32 +02:00
Stypox
1519527356
Fix loading feed when a channel tab is empty 2023-09-18 23:22:32 +02:00
Stypox
6b3a178f2a
Show snackbar with feed loading errors 2023-09-18 23:22:32 +02:00
Stypox
c48e702a50
Improve placeholder channel banner handling
Now the placeholder gets hidden if there is no banner url or the user disabled images, to save space
2023-09-18 23:22:32 +02:00
Stypox
1061bce4f3
Add avatar and bannner URLs to channel About tab 2023-09-18 23:22:32 +02:00
Stypox
013d513450
Add space above channel description (About tab) 2023-09-18 23:22:32 +02:00
ThetaDev
28d952a643
feat: filter fetched channel tabs 2023-09-18 23:22:32 +02:00
ThetaDev
753a92055c
feat: add playlist controls to channel tab 2023-09-18 23:22:32 +02:00
Stypox
371f986773
Fix some code smells 2023-09-18 23:22:32 +02:00
Stypox
a1e8b9be4e
Fix channel tabs in main page setting title themselves 2023-09-18 23:22:32 +02:00
Stypox
c076a0f771
Channels are now an Info
The previous "main" tab is now just a normal tab returned in getTabs().
Various part of the code that used to handle channels as ListInfo now either take the first (playable, i.e. with streams) tab (e.g. the ChannelTabPlayQueue), or take all of them combined (e.g. the feed).
2023-09-18 23:22:32 +02:00
ThetaDev
b5893f3fa3
fix: notification menu option disappears when switching tabs 2023-09-18 23:22:32 +02:00
Stypox
e3614cb932
Move channel header to collapsible app bar 2023-09-18 23:22:32 +02:00
ThetaDev
193c3e5b3d
fix: NPE in ChannelFragment::onSaveInstanceState 2023-09-18 23:22:32 +02:00
ThetaDev
c03c344f49
refactor: rename ChannelInfo to ChannelAbout
fix: localize about tab name
2023-09-18 23:22:32 +02:00
ThetaDev
25e3031830
cleanup: remove empty constructor from ChannelFragment 2023-09-18 23:22:31 +02:00
ThetaDev
39b4ed082c
refactor: common code from ChannelInfo/Description -> BaseInfoFragment 2023-09-18 23:22:31 +02:00
ThetaDev
be548dcb52
fix: channel tab title not being set 2023-09-18 23:22:31 +02:00
ThetaDev
4357a34339
fix: ChannelFragment: save last tab 2023-09-18 23:22:31 +02:00
ThetaDev
2c03ba204e
refactor: adjustments to updated tab extractor API 2023-09-18 23:22:31 +02:00
ThetaDev
2c98d079de
fix: cache channel data 2023-09-18 23:22:31 +02:00