Commit Graph

153 Commits

Author SHA1 Message Date
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 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
TobiGr 962fe9c36d Use Context instead of Activity
Improve docs
2022-02-20 20:17:04 +01:00
TobiGr 50e2385e82 Add default entries automatically 2022-02-20 20:17:04 +01:00
TobiGr 1cd3ef5dba Extract entries into beginning and end category 2022-02-20 20:17:04 +01:00
TobiGr 80157fc1be 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
TobiGr ff8e44e4f3 Merge branch 'dev' into feature/notifications 2022-02-19 12:34:44 +01:00
Stypox 71c5aaa11e
Do not show enqueue button if play queue not ready 2022-01-27 17:11:16 +01:00
Stypox d5cfcb28fc
Merge branch 'dev' into pr2335 2022-01-24 10:25:07 +01:00
Stypox 40ea51e622
Add more checking frequencies, use DurationListPreference 2022-01-24 10:12:25 +01:00
mhmdanas 402990dd9d Fix false warning 2022-01-18 07:40:59 +03:00
Stypox ccbc3af964
Show error notification when new streams notifications failed 2021-12-31 20:04:56 +01:00
Stypox cd95ec4e12
Merge branch 'dev' into pr2335 2021-12-31 19:20:18 +01:00
Stypox fcd2d63df4
Don't show any channel notification thumbnail if it could not be loaded 2021-12-31 18:38:35 +01:00
Stypox 01f3ed0e5e
Fix loading icon in streams notifications 2021-12-12 20:18:16 +01:00
TobiGr 19fd7bc37e Reduce power consumption
Only schedule the chek for new streams if the user enaled the check. Cancel the worker when the user disables the notifications.
2021-12-10 23:52:37 +01:00
TobiGr 3ade2bb6ec Merge remote-tracking branch 'origin/dev' into notifications 2021-12-07 17:29:37 +01:00
TacoTheDank 75db002369 Update ktlint to 0.43.2 2021-12-04 21:22:29 -05:00
TobiGr fd1155928e Fix deciding which streams are new 2021-11-30 23:31:44 +01:00
TobiGr a8fe2d7e83 Fix "unsage use" warnings 2021-11-28 17:09:20 +01:00
Stypox 6cd25d7e55
Merge pull request #7412 from litetex/code-cleanup
Some code cleanup(s)
2021-11-23 08:59:34 +01:00
TobiGr 8ce996e065 Only check for new streams of subscriptions with enabled notifications automatically 2021-11-21 22:53:10 +01:00
TobiGr 892a1df280 Merge remote-tracking branch 'origin/dev' into notifications-1 2021-11-21 22:15:09 +01:00
litetex 7638d229c0 Fixed typo 2021-11-15 20:24:40 +01:00
TacoTheDank a641c5bb58 Update Groupie to 2.9.0 2021-11-15 20:24:39 +01:00
litetex 1e0c9f46ad Improved highlighting in FeedFragment
Now keeps the ``selectableItemBackground`` when highligthing an item.
2021-11-15 20:22:23 +01:00
litetex 4eb02f584e Fixed default visibility of "new feed items" button
Fixed/Avoid NPEs
2021-11-15 20:22:22 +01:00
litetex 700c1b4b25 Removed unnecessary layout
Moved the feed button up a bit
2021-11-15 20:22:21 +01:00
litetex 4b4337e078 Used more understandable kotlin methods 2021-11-15 20:22:20 +01:00
litetex 38ce800685 Fixed feed when animations are off
Introduced a check if corresponding animations on the devices are enabled
2021-11-15 20:22:20 +01:00
litetex 2310e8c1d6 Made ``hideNewItemsLoaded`` more null safe 2021-11-15 20:22:19 +01:00
litetex 1b2b3a4f88 Make new feed items bold 2021-11-15 20:22:18 +01:00
litetex 02789122a0 Implemented UI highlighting and "new feed items"-notification
Fixed format
2021-11-15 20:22:17 +01:00