Commit graph

3871 commits

Author SHA1 Message Date
Stypox
2a9665c3e5 Fix not saving comment replies state on config change 2024-04-10 10:52:47 +02:00
TobiGr
71f5356ed3 Add comment that empty constructors are needed for IcePick
See d5cc8fe048 and https://github.com/TeamNewPipe/NewPipe/pull/10781#discussion_r1545351144
2024-03-30 16:19:02 +01:00
Stypox
d5cc8fe048 Fix fragments without empty constructor 2024-03-30 15:15:31 +01:00
Stypox
bf770cc684 Undo some unneeded changes to LocalPlaylistManager 2024-03-30 14:46:13 +01:00
Stypox
6657a937e6 Fix warnings and allow moving only up and down even in grid 2024-03-30 14:39:40 +01:00
Stypox
d7861895bc Fix inconsistencies when removing playlist
Remove checkDisplayIndexModified because it was causing more problems than it solved. Now when adding new playlists they won't necessarily appear at the top, but will get sorted alphabetically along with the other playlists with index -1. This will be the case until any playlist is sorted, at which point all indices are assigned and newly added playlists will appear at the top again.
2024-03-30 14:14:31 +01:00
Stypox
d95d953258 Fix PlaylistLocalItemTest 2024-03-29 20:58:07 +01:00
Stypox
29bfbbeacd Also sort playlist duplicates by display index 2024-03-29 20:55:24 +01:00
Stypox
737604faca Fix DatabaseMigrationTest
Complete removal of unneeded index, and remove default value for `remote_playlists.display_index`.
2024-03-29 20:43:55 +01:00
Stypox
77d913295f Apply review 2024-03-29 18:08:37 +01:00
Stypox
564e34b3e7 Merge branch 'dev' into pr8221 2024-03-29 18:08:31 +01:00
bg1722
856f79a9be show OverallDuration in Playlist
earlier only overall amount of videos was shown. Now overall duration is shown there too - as formatted by existing Localization.concatenateStrings() and Localization.getDurationString().

show all videos OverallDuration in local Playlist too

refactor to make implementation in LocalPlaylistFragment and PlaylistFragment more obviously similar

unfortunately could not refactor upto BaseLocalListFragment

revert the changes for online Playlists

because they are paginated and may be infinite i.e. correct count may come only from the service->extractor chain which unfortunately does not give overall duration yet

next try to improve user-experience with online Playlist

just show that duration is longer (">") than the calculated value in case there is more page(s)

even more improve user-experience for online Playlist

by adding the duration of next items as soon as they are made visible

make showing of playlists duration configurable, disabled by default

adjusted duration to be handled as long because it comes as long from extractor

no idea why I handled it as int earlier

Revert "make showing of playlists duration configurable, disabled by default", refactor

This reverts commit bc1ba17a20d3dd1763210f81d7ca67c5f1734a3d.

Fix rebase

Apply review

Rename video -> stream

Remove unused settings keys
2024-03-29 14:11:27 +01:00
Stypox
501ef79e8c Improve new version checks before running 2024-03-29 11:14:30 +01:00
Stypox
c5d1333619 update_app_key default value should be false 2024-03-29 11:08:33 +01:00
Tobi
cdd8a91c07 Ask for consent before starting update checks
NewPipe is contacting its servers without asking for the users' consent. This is categorized as "tracking" by F-Droid (see https://github.com/TeamNewPipe/NewPipe/discussions/10785).

This commit disables checking for udpates by default and adds a dialog asking for the user's consent to automatically check for updates if the app version is eligible for them. After upgrading to a version containing this commit the user is asked directly on the first app start. On fresh installs however, showing it on the first app start contributes to a bad onboarding an welcoming experience. Therefore, the dialog is shown at the second app start.

Co-authored-by: Stypox <stypox@pm.me>
2024-03-28 23:42:00 +01:00
Stypox
606297b4ca Merge pull request #10781 from Profpatsch/BaseDescriptionFragment-assert-member-is-initialized
BaseDescriptionFragment: Assert member is initialized
2024-03-28 22:48:00 +01:00
Stypox
d55e4fc010 Some more slight improvements 2024-03-28 22:46:30 +01:00
Stypox
de3f67a050 Merge pull request #10912 from Stypox/download-fixes
Download fixes
2024-03-28 19:14:20 +01:00
Stypox
95ae77a915 Merge branch 'dev' into pr9236 2024-03-28 18:43:29 +01:00
Stypox
92c3bedf0d Merge pull request #8242 from dtcxzyw/trim-search-string
Trim search string and remove duplicate records from the database
2024-03-28 18:34:59 +01:00
Stypox
8f8943d819 Merge pull request #10909 from Stypox/fix-getAudioTrackType-null
Fix not considering nullability when comparing getAudioTrackType
2024-03-28 13:47:12 +01:00
Stypox
3b957143a2 Merge pull request #10717 from Stypox/cache-key-type
Calculate cache key based on info type instead of item type
2024-03-28 13:34:51 +01:00
Stypox
dbf78ff67f Fix NPE, since dismissing a dialog still calls onViewCreated() 2024-03-28 11:35:21 +01:00
Stypox
8c8c09a4f6 Remove unused DownloadDialog.onDismissListener 2024-03-28 11:21:33 +01:00
Stypox
bdf77d3e44 Fix choosing audio format to mux with video-only download 2024-03-28 11:09:56 +01:00
Stypox
7850de2681 Fix not considering nullability when comparing getAudioTrackType 2024-03-27 16:05:17 +01:00
Tobi
bced1e3494 Merge pull request #10732 from Profpatsch/dont-write-media-format
Don't write defaultFormat setting, use default value
2024-03-25 10:36:35 +01:00
CloudyRowly
109f02830e Added "free memory" check before downloading [Android N / API 24+] (#10505)
Added "free space" check before downloading eliminating bugs related to out-of-memory on Android N / API 24+
2024-03-21 09:18:55 +01:00
Isira Seneviratne
95942294de Use hexToByteArray() extension 2024-03-20 14:00:13 +01:00
Isira Seneviratne
e2d21cbf1f Convert isReleaseApk to lazy value 2024-03-20 14:00:13 +01:00
Isira Seneviratne
919cd00428 Improve app signature check 2024-03-20 14:00:13 +01:00
Ikko Eltociear Ashimine
1dc850b881 Update TextLinkifier.java
minor fix
2024-03-18 14:43:16 +09:00
Profpatsch
8199818c05 BaseDescriptionFragment: Assert member is initialized
`streamInfo` and `channelInfo` have to be initialized, since the only
way to construct the class it to pass them. So we can remove the null
check boilerplate and make some of the accessors `NonNull`.
2024-01-23 14:28:37 +01:00
Profpatsch
7d26e721e9 Don't write defaultFormat setting, use default value
Nowhere else does this (write a setting if it’s not set).

It took me a while to see that this code does not do what it intends,
because `defaultFormat` is already the default value in the first
`context.getString`, so calling `getMediaFormatFromKey` again is the
exact same call (“do you know the definition of insanity…”) and will
return `null` again …

So let’s drop the setting write and just rely on the default values.
2024-01-06 17:24:53 +01:00
Stypox
32d0fda9cc Base cache key on info type instead of item type
It didn't really made sense to consider two cache keys as equal based on the type of items contained within that list.
2023-12-30 23:46:16 +01:00
Stypox
b08fcb25b8 Merge pull request #10712 from Stypox/notification-actions-api-33-2
[Android 13+] Restore support of custom notification actions
2023-12-30 21:55:44 +01:00
Stypox
34241c30e3 Android 33 -> Android 13
Co-authored-by: Tobi <TobiGr@users.noreply.github.com>
2023-12-30 21:55:32 +01:00
Stypox
f26e8444ef Allow play/pausing from notification when buffering
This change is in line with a recent change in how the play/pause button behaves in the player ui: if the buffering indicator is shown, it's still possible to toggle play/pause, to allow e.g. pausing videos before they even start.
This change was needed because on Android 13+ notification actions can't be null, and thus the buffering hourglass action wasn't shown.
2023-12-29 16:18:26 +01:00
Stypox
24eb97d5c1 Do not update notification actions if nothing changed
This should avoid costly updates of the media session.
2023-12-29 16:16:45 +01:00
Stypox
48399948bc Implement notification actions via MediaSessionConnector on Android 13+ 2023-12-29 15:54:15 +01:00
Stypox
23bf10ab04 Extract NotificationActionData from NotificationUtil 2023-12-29 15:54:15 +01:00
Stypox
368b9649d7 Allow each notification slot to contain any possible action 2023-12-29 15:54:15 +01:00
Stypox
ef6bfa24f0 Extract NotificationSlot from NotificationActionsPreference 2023-12-29 12:31:59 +01:00
Stypox
57090022d1 Customize only 2 notification actions on Android 13+ 2023-12-29 12:13:08 +01:00
Stypox
e19b90f9a9 Merge pull request #10091 from TeamNewPipe/feat/playlist_description
Add playlist description to playlist fragment
2023-12-29 10:58:13 +01:00
Stypox
c4a2386c6f Merge branch 'master' into dev 2023-12-29 10:48:37 +01:00
TobiGr
5f6ec79248 Fix NPE when ChannelTabLHFactory not implemented for a service
Fixes #10698
2023-12-26 16:55:52 +01:00
Stypox
5bdf89d7de Improve TextEllipsizer class 2023-12-23 18:04:05 +01:00
TobiGr
6302d8e264 Ellipsize playlist description if it is longer than 5 lines
The description can be expanded / collapsed via a "show more" / "show less" button.
2023-12-23 12:33:52 +01:00
TobiGr
d0b603c94f Add playlist description to PlaylistFragment 2023-12-23 12:13:34 +01:00