Commit graph

432 commits

Author SHA1 Message Date
Stypox
65651e0302 Some refactorings after review comments 2022-07-13 23:33:18 +02:00
Stypox
b3201b20c7 Solve some Sonarlint warnings 2022-07-13 23:33:16 +02:00
Stypox
5ba14c4b7c Refactor player: separate UIs and more 2022-07-13 23:25:26 +02:00
litetex
4a4ca3c18e Clean up pre-Lollipop checks 2022-07-13 19:02:24 +02:00
Stypox
b6d746d1c9 Merge pull request #8545 from carmebar/hide-future-videos
Add option to hide future videos in feed
2022-07-13 11:07:38 +02:00
litetex
eff828aeea Fix compile errors 2022-07-04 23:19:41 +02:00
Stypox
0581ad0075 Actually fix wrong view count 2022-07-01 16:07:19 +02:00
Carlos Melero
4e77c9f721 Add option to hide future videos in feed 2022-06-24 18:03:48 +02:00
AudricV
f7d2975ad1 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
c06115fc85 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
d02b988138 Use AppCompatResources. 2022-05-16 12:27:44 +05:30
litetex
300349ade2 Use better way to get services 2022-05-09 20:58:10 +02:00
litetex
388fa300ed Remove not required use of supplier
from code review
2022-05-07 15:08:38 +02:00
litetex
89d4d1d777 Icons for import/export 2022-05-07 15:08:36 +02:00
litetex
8f0e71e6fb Used service icons for import 2022-05-07 15:08:36 +02:00
litetex
e8763e7017 Moved import/export options to menu 2022-05-07 15:08:34 +02:00
Stypox
70bf99810b Readd spaces 2022-05-05 18:04:33 +02:00
LingYinTianMeng
68a2350290 Update LocalPlaylistFragment.java 2022-05-03 09:37:35 +08:00
LingYinTianMeng
0fe7cf5d13 Merge branch 'TeamNewPipe:dev' into dev 2022-05-03 09:26:32 +08:00
LingYinTianMeng
89a98c9f23 Update LocalPlaylistFragment.java 2022-05-03 09:21:43 +08:00
LingYinTianMeng
be4ddf6db6 fix issue #7563 2022-04-17 22:23:03 +08:00
litetex
284b44414b Merged `DrawableResolver into ThemeHelper` 2022-04-16 21:21:57 +02:00
litetex
e6f59612b0 Use better Kotlin syntax
From the PR review
2022-04-16 21:21:54 +02:00
litetex
7723a51c9c Reworked switching to semitones
Using an expandable Tab-like component instead of a combobox
2022-04-16 21:21:51 +02:00
GGAutomaton
922a145c06 Use newInstance in PlaylistDialog 2022-04-04 13:50:27 +08:00
Stypox
6ead95b5d2 Merge branch 'dev' into pr2335 2022-03-19 22:29:10 +01:00
Stypox
ac91f1541a 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
22bdcde527 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
8cc890d799 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
141ad361b0 Annotate some NonNulls, some lint cleaning 2022-03-18 13:15:44 -04:00
Stypox
cfc673d5a4 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
112b7dde65 Update ktlint to 0.44.0 2022-02-26 16:08:10 -05:00
litetex
e6b480fdbc Merge pull request #7570 from TeamNewPipe/improvement/infoItemDialogBuilder
Refactor generating InfoItemDialog's
2022-02-26 16:18:39 +01:00
Stypox
2a4add2571 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
58abf4b834 Move Classes related to InfoItemDIalog into own package 2022-02-20 20:17:04 +01:00
TobiGr
40103c07d2 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
c0ab407cf6 Use identical method names for creating the InfoItemDialog in Fragments 2022-02-20 20:17:04 +01:00
TobiGr
df28deb880 Use Context instead of Activity
Improve docs
2022-02-20 20:17:04 +01:00
TobiGr
f9ad08d977 Add default entries automatically 2022-02-20 20:17:04 +01:00
TobiGr
597192ce99 Extract entries into beginning and end category 2022-02-20 20:17:04 +01:00
TobiGr
9f3031bc3a 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
f3f443ea85 Solve Java warning "Raw use of parameterized class" 2022-02-19 17:30:38 +01:00
TobiGr
c75babedb8 Merge branch 'dev' into feature/notifications 2022-02-19 12:34:44 +01:00
Stypox
a9f6c8d726 Do not show enqueue button if play queue not ready 2022-01-27 17:11:16 +01:00
Stypox
73182bf375 Merge branch 'dev' into pr2335 2022-01-24 10:25:07 +01:00
Stypox
53832bc37f Add more checking frequencies, use DurationListPreference 2022-01-24 10:12:25 +01:00
mhmdanas
f87a5ecead Fix false warning 2022-01-18 07:40:59 +03:00
Stypox
daaf28ddd4 Show error notification when new streams notifications failed 2021-12-31 20:04:56 +01:00
Stypox
c70713a925 Merge branch 'dev' into pr2335 2021-12-31 19:20:18 +01:00
Stypox
9a44446a40 Don't show any channel notification thumbnail if it could not be loaded 2021-12-31 18:38:35 +01:00