Commit Graph

184 Commits

Author SHA1 Message Date
Isira Seneviratne 097d32b684 Migrate to non-transitive R classes. 2024-03-25 15:12:30 +01:00
TacoTheDank 4a7fda95ae
Update miscellaneous libraries 2023-12-23 11:47:57 +01:00
TacoTheDank 00566ed4d4
Fix AndroidX Work deprecation 2023-12-23 11:36:33 +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
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
Stypox 0a8f28b1c6
Add image quality preference 2023-09-22 10:14:43 +02:00
TacoTheDank b1faed586d Replace MathUtils.clamp with Kotlin coerceIn 2023-09-19 16:32:37 -04: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 6ab8716e69
Extract actual feed loading code into separate method
Increase readability
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
ThetaDev 28d952a643
feat: filter fetched channel tabs 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
Isira Seneviratne cb00c57009 Set channel icon for stream notifications 2023-07-19 05:52:59 +05:30
TobiGr eeec6fd002 Replace null check with use of NotificationManagerCompat.from 2023-07-17 01:28:55 +02:00
Isira Seneviratne 795bc82c7f Show number of new streams in the collapsed summary notification. 2023-07-17 01:28:55 +02:00
Isira Seneviratne 7742c40ac0 Create individual stream notifications for convenience on Android 7.0 and later. 2023-07-17 01:28:55 +02:00
Koitharu 01b46edf1a
Fix crash after feed update 2023-07-14 11:41:52 +03:00
TacoTheDank c1f0a945c0 Clean up AlertDialogs 2023-07-11 21:54:10 -04:00
Isira Seneviratne acebabd028 Use AndroidX's PendingIntentCompat class. 2023-04-13 10:53:46 +05:30
Jared Fantaye 1dd0930b83 Fixed some small issues 2023-02-28 17:30:17 +01:00
Jared Fantaye bc29f40d69 Implemented the suggested changes 2023-02-09 21:18:21 +01:00
Jared Fantaye cd8d57040c Implemented the feature using multiple checkboxes 2023-02-04 18:48:27 +01:00
Jared Fantaye 9c82441c19 Implemented the feature and fixed some small issues 2023-02-01 23:10:31 +01:00
Jared Fantaye d2d324f2dd First draft of the new feature 2023-01-30 22:37:24 +01:00
TobiGr e9fcad4787 Fix SonarLint 2023-01-16 23:20:50 +01:00
TobiGr 640d4b0280 Fix more NPEs after OnSharedPreferenceChangeListener changes 2023-01-16 23:05:29 +01:00
Mahendran 7924bb5b6b Thumbnails used in NewPipe are small (list/grid) mode. This PR facilitates full width thumbnails and dubbed as card mode. 2023-01-15 22:32:03 +05:30
Isira Seneviratne 3dc1adb69e Add helper methods for adding PendingIntent mutability. 2022-11-07 17:12:22 +05:30
Stypox 9524c6245d
Merge pull request #8747 from Isira-Seneviratne/Range_limit
Use range-limiting methods in more places.
2022-10-28 10:34:04 +02:00
Stypox 489f052ef9
Fix feed menu tooltips (silly copy-paste error) 2022-09-19 11:21:42 +02:00
Stypox 051c572e7f
Show correct tooltips for actions in feed 2022-09-13 15:26:04 +02:00
Stypox 52dbfdee00 Keep strong references to Picasso notification icon loading targets
Before the Target would sometimes be garbage collected before being called with the loaded channel icon, since Picasso holds weak references to targets. This meant that sometimes a new streams notification  would not be shown, because the lambda that should have shown it had already been garbage collected.
2022-08-25 16:41:51 +02:00
Isira Seneviratne e136a6f915 Use range-limiting methods in more places. 2022-08-08 07:10:16 +05:30
Isira Seneviratne 311d392386 Use Application instead of Context in FeedViewModel. 2022-07-31 08:37:16 +05:30
Stypox 404c13d4c1 Improve FeedViewModel factory 2022-07-31 08:30:17 +05:30
Isira Seneviratne 5c68c8ece8 Update Lifecycle to 2.5.1. 2022-07-31 08:30:17 +05:30
Stypox e8669d4ab5
Deduplicate SQL queries to get feed streams 2022-07-18 23:39:57 +02:00
Carlos Melero f22417e7e7 Add option to hide future videos in feed 2022-06-24 18:03:48 +02:00
AudricV 210834fbe9
Add support of other delivery methods than progressive HTTP (in the player only)
Detailed changes:

- External players:

  - Add a message instruction about stream selection;
  - Add a message when there is no stream available for external players;
  - Return now HLS, DASH and SmoothStreaming URL contents, in addition to progressive HTTP ones.

- Player:

  - Support DASH, HLS and SmoothStreaming streams for videos, whether they are content URLs or the manifests themselves, in addition to progressive HTTP ones;
  - Use a custom HttpDataSource to play YouTube contents, based of ExoPlayer's default one, which allows better spoofing of official clients (custom user-agent and headers (depending of the client used), use of range and rn (set dynamically by the DataSource) parameters);
  - Fetch YouTube progressive contents as DASH streams, like official clients, support fully playback of livestreams which have ended recently and OTF streams;
  - Use ExoPlayer's default retries count for contents on non-fatal errors (instead of Integer.MAX_VALUE for non-live contents and 5 for live contents).

- Download dialog:

  - Add message about support of progressive HTTP streams only for downloading;
  - Remove several duplicated code and update relevant usages;
  - Support downloading of contents with an unknown media format.

- ListHelper:

  - Catch NumberFormatException when trying to compare two video streams between them.

- Tests:

  - Update ListHelperTest and StreamItemAdapterTest to fix breaking changes in the extractor.

- Other places:

  - Fixes deprecation of changes made in the extractor;
  - Improve some code related to the files changed.

- Issues fixed and/or improved with the changes:

  - Seeking of PeerTube HLS streams (the duration shown was the one from the stream duration and not the one parsed, incomplete because HLS streams are fragmented MP4s with multiple sidx boxes, for which seeking is not supported by ExoPlayer) (the app now uses the HLS manifest returned for each quality, in the master playlist (not fetched and computed by the extractor));
  - Crash when loading PeerTube streams with a separated audio;
  - Lack of some streams on some YouTube videos (OTF streams);
  - Loading times of YouTube streams, after a quality change or a playback start;
  - View count of YouTube ended livestreams interpreted as watching count (this type of streams is not interpreted anymore as livestreams);
  - Watchable time of YouTube ended livestreams;
  - Playback of SoundCloud HLS-only tracks (which cannot be downloaded anymore because the workaround which was used is being removed by SoundCloud, so it has been removed from the extractor).
2022-06-17 22:00:22 +02:00
litetex 1dc146322c Merged ``DrawableResolver`` into ``ThemeHelper`` 2022-04-16 21:21:57 +02:00
litetex 44dada9e60 Use better Kotlin syntax
From the PR review
2022-04-16 21:21:54 +02:00
litetex 4b06536582 Reworked switching to semitones
Using an expandable Tab-like component instead of a combobox
2022-04-16 21:21:51 +02:00
Stypox 6e8c9f92cb
Merge branch 'dev' into pr2335 2022-03-19 22:29:10 +01:00
Stypox 3d9d25df52
Remove backoff criteria: it never kicked in
It never kicked in since we are never returning a retry() Result, but always either success() or failure() (see createWork() function). Also, there is already a default (exponential backoff starting from 30 seconds), so no need to override it.
2022-03-19 21:55:00 +01:00
TacoTheDank cf213affa2 Annotate some NonNulls, some lint cleaning 2022-03-18 13:15:44 -04:00
TacoTheDank 678edb1846 Update ktlint to 0.44.0 2022-02-26 16:08:10 -05:00
Stypox 5fea12d8eb
Small code improvements
Removed some non-translatable strings and just hardcoded them in the code, like it's being done for other string separators. This also deduplicates some code by using Localization.
Used some Kotlin feature to reduce code.
2022-02-26 10:40:24 +01:00
TobiGr 277f21d5b2 Move Classes related to InfoItemDIalog into own package 2022-02-20 20:17:04 +01:00
TobiGr 646d8f431c Use identical method names for creating the InfoItemDialog in Fragments 2022-02-20 20:17:04 +01:00