Commit graph

602 commits

Author SHA1 Message Date
Thiago F. G. Albuquerque
e2b376ec99 [#11930] Making CheckStyle happy 2025-02-18 20:59:13 -03:00
Thiago F. G. Albuquerque
6c778e453e [#11930] Share as YouTube temporary playlist
Initial commit.
2025-02-14 21:14:42 -03:00
Stypox
7e4cf82b9d Add comments to explain why openAndTruncateStream() 2024-11-27 16:34:50 +01:00
Stypox
c80c378398 Fix downloading/exporting when overwriting file would not truncate 2024-11-24 18:36:54 +01:00
Stypox
5866c578b3 Only throttle YouTube feed loading 2024-11-24 16:22:19 +01:00
Stypox
25a047045c Throttle loading subscriptions feed to avoid YouTube rate limits 2024-11-24 14:06:53 +01:00
Cody T.-H. Chiu
3ee32c7d64 Remove history dialog override so clicking "Start playing in the background" would only enqueue the current item instead of the full history which is usually massive 2024-11-12 18:24:23 +13:00
TwoAi
6642461151 Add null-safe SharedPreferences.getStringSafe
Null-safe alternative to SharedPreferences.getString that guarantees the return value is non-null when defValue is non-null.
2024-10-27 20:38:28 +01:00
Jacob Hawkins
452261e599 Added not null check for thumbnail URL before performing comparison 2024-10-27 17:38:57 +11:00
litetex
2c2904d59c Replaced `Icepick with Bridge and Android-State`
* IcePick fails on Java 21 (default in Android Studio 2024.2)
* Bridge is the most modern alternative that is currently available. It is backed by ``Android-State`` and can be configured with various frameworks
* In the long term this should be replaced with something better
2024-10-23 21:28:07 +02:00
Stypox
916bcb99ce Merge pull request #10918 from Stypox/non-transitive-r
Migrate to non-transitive R classes
2024-05-08 10:35:08 +02:00
Stypox
7cbd0843d7 Merge pull request #10952 from bg172/release-0.27.0
Add an intuitive prefix for the duration of lists in the UI
2024-04-11 09:27:54 +02:00
Stypox
d9b116bf00 Fix NPE when avatarUrl is empty 2024-04-09 20:18:21 +02:00
bg1722
118c426438 add an intuitive prefix for the duration of lists on UI, and avoid using the new prefix for single videos 2024-04-06 07:58:05 +02: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
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
69a8fc12f7 Migrate to non-transitive R classes 2024-03-29 00:17:13 +01:00
TacoTheDank
7d6dec1379 Update miscellaneous libraries 2023-12-23 11:47:57 +01:00
TacoTheDank
b749eb52e9 Utilize BundleCompat and IntentCompat methods 2023-12-23 11:38:40 +01:00
TacoTheDank
9008d52fdd Fix AndroidX Work deprecation 2023-12-23 11:36:33 +01:00
Stypox
a30605d425 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
AudricV
01f52ec880 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
3359bf20bf Fix inconsistency when LocalPlaylist is used as MainFragment tab 2023-10-02 02:56:30 +02:00
Yingwei Zheng
63558cf206 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
95ef82a2a4 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
Stypox
7828cd233d 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
4164bf36f6 Implement better image selection strategy 2023-09-22 10:14:44 +02:00
Stypox
a6a7c2271a Add image quality preference 2023-09-22 10:14:43 +02:00
Stypox
46109ff3b9 Support obtaining multiple images from the extractor 2023-09-22 09:57:33 +02:00
TobiGr
af715dd7ee Remove useless override 2023-09-20 15:42:09 +02:00
TacoTheDank
2d5d209d6c Replace MathUtils.clamp with Kotlin coerceIn 2023-09-19 16:32:37 -04:00
TobiGr
4bbcfdc3e5 Fix three memory leaks
Add documentation to BaseFragment.initViews(View, Bundle) and BaseFragment.initListeners()
2023-09-19 00:13:16 +02:00
TobiGr
60a97b0486 Apply review
Co-Authored-By:  Audric V <74829229+AudricV@users.noreply.github.com>
2023-09-18 23:22:32 +02:00
TobiGr
b134d75549 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
TobiGr
43054e6d67 Extract actual feed loading code into separate method
Increase readability
2023-09-18 23:22:32 +02:00
Stypox
43097e4486 Update NewPipeExtractor and adapt imports 2023-09-18 23:22:32 +02:00
Stypox
5325226b33 Fix loading feed when a channel tab is empty 2023-09-18 23:22:32 +02:00
Stypox
9a70693152 Show snackbar with feed loading errors 2023-09-18 23:22:32 +02:00
ThetaDev
36b11db357 feat: filter fetched channel tabs 2023-09-18 23:22:32 +02:00
Stypox
aa4ec2f39e 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
Isira Seneviratne
66f6b4c9eb Set channel icon for stream notifications 2023-07-19 05:52:59 +05:30
TobiGr
bdfd7a7674 Replace null check with use of NotificationManagerCompat.from 2023-07-17 01:28:55 +02:00
Isira Seneviratne
ed4937743b Show number of new streams in the collapsed summary notification. 2023-07-17 01:28:55 +02:00
Isira Seneviratne
96430f5232 Create individual stream notifications for convenience on Android 7.0 and later. 2023-07-17 01:28:55 +02:00
Koitharu
6bf0f78c41 Fix crash after feed update 2023-07-14 11:41:52 +03:00