Commit Graph

424 Commits

Author SHA1 Message Date
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
Isira Seneviratne 21d2ae709f Merge branch 'dev' into Use_AppCompatResources
# Conflicts:
#	app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java
2022-05-16 12:36:00 +05:30
Isira Seneviratne c5e509f069 Use AppCompatResources. 2022-05-16 12:27:44 +05:30
litetex 69f95f4148 Use better way to get services 2022-05-09 20:58:10 +02:00
litetex de4b5a8f0f Remove not required use of supplier
from code review
2022-05-07 15:08:38 +02:00
litetex 7de17ad949 Icons for import/export 2022-05-07 15:08:36 +02:00
litetex 7ab11a8379 Used service icons for import 2022-05-07 15:08:36 +02:00
litetex 1d69bd48be Moved import/export options to menu 2022-05-07 15:08:34 +02:00
Stypox 59d8c570b7
Readd spaces 2022-05-05 18:04:33 +02:00
LingYinTianMeng c2762d3b5e
Update LocalPlaylistFragment.java 2022-05-03 09:37:35 +08:00
LingYinTianMeng 01d996a5c0
Merge branch 'TeamNewPipe:dev' into dev 2022-05-03 09:26:32 +08:00
LingYinTianMeng 50739277c4
Update LocalPlaylistFragment.java 2022-05-03 09:21:43 +08:00
LingYinTianMeng 8ea98b64aa fix issue #7563 2022-04-17 22:23:03 +08: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
GGAutomaton 638f227b51 Use newInstance in PlaylistDialog 2022-04-04 13:50:27 +08: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
litetex 70d9a77e9b
Merge pull request #8073 from Stypox/bump-checkstyle
Update checkstyle to 10.0 and fix various related issues
2022-03-19 14:37:52 +01:00
Stypox 53f8415e9b
Use @SuppressWarnings for checkstyle suppressions & warnings
It's better to use @SuppressWarnings instead of the suppressions file, so that the warning suppression is at the place where it acts.
2022-03-18 23:57:11 +01:00
TacoTheDank cf213affa2 Annotate some NonNulls, some lint cleaning 2022-03-18 13:15:44 -04:00
Stypox 5f16e4ef87
Replace R.string.yes with R.string.ok
Android doesn't use yes/no but ok/cancel usually, so this should be done here, too
2022-03-02 12:21:25 +01:00
TacoTheDank 678edb1846 Update ktlint to 0.44.0 2022-02-26 16:08:10 -05:00
litetex 37517c7dd1
Merge pull request #7570 from TeamNewPipe/improvement/infoItemDialogBuilder
Refactor generating InfoItemDialog's
2022-02-26 16:18:39 +01: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 fd0d76e866 Apply feedback
Return this in InfoIrtemDialog.Builder methoods.
Move null checks for InfoIrtemDialog.Builder into constructor.
Fix and add some more docs.
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
Stypox 62abfa96b8
Solve Java warning "Raw use of parameterized class" 2022-02-19 17:30:38 +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 e68d49e7df
Do not fetch all streams when disabling notifications for a channel 2021-12-31 18:34:02 +01:00
TobiGr 37b8a9375f Small improvements to code quality and readability
Add annotations to methods and parameters.
Replace Jetbrains' @NotNull with Androidx' @NonNull annotatiation.
Make class variables static if possible.
Use constants for some Strings.
Simplify if conditions.
2021-12-21 20:55:41 +01:00
litetex b21d231e3a
Merge pull request #7452 from litetex/show-alert-when-file-manager-not-found
Show an alert-dialog when no appropriate file-manager was found
2021-12-14 20:01:02 +01:00
litetex 4058277b7a
Merge pull request #7482 from TeamNewPipe/unify-error-reporting
Unify error reporting and add error notification
2021-12-14 19:58:41 +01:00
XiangRongLin dd9772cde2
Merge pull request #7491 from Stypox/fix-search-order
Fix order of local search results
2021-12-14 09:07:17 -05: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
Stypox 8a5e2ffa57
Fix order of local search results 2021-12-08 13:59:32 +01:00