Commit graph

149 commits

Author SHA1 Message Date
litetex
c32fd9a20c Changed the code accordingly
+ Removed some unused code
2022-07-15 19:55:19 +02:00
Stypox
bb4a8ebcd8 Refactor creation of DownloadDialog 2022-06-18 17:40:22 +02:00
AudricV
ce58a2df30 Filter streams using Java 8 Stream's API instead of removing streams with list iterators and add a better toast when there is no audio stream for external players
This ensures to not remove streams from the StreamInfo lists themselves, and so to not have to create list copies.

The toast shown in RouterActivity, when there is no audio stream available for external players, is now shown, in the same case, when pressing the background button in VideoDetailFragment.
2022-06-17 22:01:29 +02:00
Stypox
5f2c519700 Code improvements here and there 2022-06-17 22:00:53 +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
TacoTheDank
550063f50f Create stub implementation for OnSeekBarChangeListener 2022-03-17 21:49:04 -04:00
TiA4f8R
7786a18517 Prefer video-only streams to video streams
Prefering video-only streams to video streams for our player will allow us to make seamless transitions on 360 and 720p qualities on YouTube.
External players and the downloader are not affected by this change.
2022-02-20 19:38:40 +01:00
litetex
3ecaf66e1a 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
Stypox
5583f71a8e Replace ErrorActivity with ErrorUtil 2021-12-04 10:36:36 +01:00
litetex
625ffba8b7 Refactoring + deduplicated code 2021-11-28 14:07:45 +01:00
litetex
273e0e7f06 Fixed typos 2021-11-27 23:39:17 +01:00
litetex
9285958b4f Show an alert/dialog when no appropriate file-manager was found 2021-11-27 15:52:54 +01:00
Stypox
14ebb41264 Rename string finish to ok, as its content was "OK" 2021-08-30 16:36:57 +02:00
Stypox
0703dbfeab Use custom cancel string everywhere
to fix missing somali translation for android.R.string.cancel
2021-08-04 18:58:35 +02:00
Stypox
1663da64a2 Call DownloadDialog dismiss() in the correct way 2021-07-19 10:59:45 +02:00
Stypox
95887dfab6 Improve method order in DownloadDialog and add separator comments 2021-07-18 14:23:38 +02:00
TacoTheDank
86df68470e Fix onActivityResult deprecation in DownloadDialog 2021-06-20 14:14:44 -04:00
Stypox
2d92f18471 Reimplement storing backup import/export path
#6319 and #6402 were reverted before adding SAF changes, and have been readded at the end of SAF changes
2021-06-08 10:41:24 +02:00
Stypox
9c6579f871 Remove misplaced comment 2021-06-08 10:40:45 +02:00
Stypox
d920c7c1ea Check if file really exists before asking user to overwrite it 2021-06-08 10:40:45 +02:00
Stypox
c6ad9b8f66 Fix strange behaviour when app loses access to saf download folder 2021-06-08 10:40:45 +02:00
Stypox
3399ed2b30 Pass mime type so that SAF treats file extension correctly 2021-06-08 10:40:45 +02:00
wb9688
995264e5e2 Move Stored(File|Directory)Helper into NewPipe 2021-06-08 10:40:44 +02:00
wb9688
4e133a3599 Support SAF properly 2021-06-08 10:40:44 +02:00
Tobi
efaea39ecc Merge pull request #6118 from sauravrao637/errorHandlingInSubcribe
Error handling in subscribe() in DownloadDialog
2021-05-29 11:30:36 +02:00
Sub Raizada
b49a6310ad Only show 'download has started' toast when a download has started 2021-04-22 02:45:04 +00:00
camo0112
4a496c1962 user can report the error 2021-04-20 16:21:20 +05:30
camo0112
a70d933edf Error handling in subscribe() in DownloadDialog 2021-04-20 13:06:40 +05:30
krlvm
a8de222577 Fix Dark elements in Light Theme 2021-03-27 17:46:05 +03:00
Matskidis Giannis
78b77ced87 Show Toast when download starts
Add toast to inform the user that download started and add the right string in values.
2021-03-20 22:18:01 +01:00
Stypox
22c92f1fb3 Completely remove return activity, now outdated 2021-03-12 23:21:54 +01:00
Stypox
9dc583da87 Optimize imports and solve checkstyle issues 2021-03-12 23:21:53 +01:00
Stypox
0ea6b4928c Add report/solve-recaptcha button in error panel
It will be shown even when nothing could be loaded not due to a network error, and the user can choose to ignore or report it.

Also improve error reporting arguments
Also completely refactor error activity
Also improve some code here and there
2021-03-12 23:21:49 +01:00
Stypox
bb398189d6 Move all error-related classes into error package 2021-03-07 17:49:28 +01:00
Isira Seneviratne
5137c87cb5 Use view binding in DownloadDialog. 2021-01-14 11:16:01 +05:30
Isira Seneviratne
54b45404a0 Use view binding in DownloadActivity. 2020-12-19 04:19:59 +05:30
Stypox
34dd7c0fbf Update most dependencies 2020-11-22 14:03:10 +01:00
Isira Seneviratne
39a008db6e Convert ErrorInfo to Kotlin and use the Parcelize annotation. 2020-11-21 12:47:35 +05:30
TacoTheDank
166cdd50f4 Push conditionals inside branch expressions 2020-10-31 15:57:26 -04:00
TacoTheDank
0e33cc5d73 Fix some deprecations 2020-09-06 12:52:43 +02:00
TacoTheDank
61c10ad427 Use AndroidX preference 2020-09-06 12:52:42 +02:00
vmazoyer
bfb7840f9c Remember last selected media type for downloads. 2020-09-03 19:47:34 +02:00
wb9688
25b56bf5e4 Use final where possible 2020-08-16 10:25:09 +02:00
Avently
5cd7ca5dab AndroidTvUtils -> DeviceUtils 2020-07-21 01:43:49 +03:00
Stypox
d63b091ec0 Fix checkstyle issues
Also replace all tabs with 4 spaces
2020-05-21 15:39:36 +02:00
Stypox
c80aba9a88 Use vector drawables instead of PNGs for material icons
For all manually-created images PNG have been kept.
- rename all icon attrs to have a `ic_` prefix
- always use `_24dp` icons, because there is no real difference, since they are vector drawables
- always use the original name found on material.io for icon drawables, as to not create confusion and possibly duplicates. Icon names can still be different from real drawable names, though I have made some of them compliant to this or maybe more meaningul.
- remove duplicate `getIconByAttr()` in ThemeHelper (use `resolveResourceIdFromAttr()`
- use standard icons for `expand_more` and `expand_less` instead of triangles
- use `play_button_outline` instead of custom PNG as play button in VideoDetailFragment (questionable, as there is no shadow anymore)
2020-05-21 15:39:35 +02:00
bopol
1e4e731a6a Better detection of TV devices
Some devices were not detected as TV even though they are
2020-04-25 12:04:44 +02:00
Alexander--
2cac8a739d Merge remote-tracking branch 'newpipe/dev' into rebase 2020-04-11 08:24:05 +06:59
wb9688
9c8349a8ed Move things back to its original place 2020-04-02 15:57:50 +02:00
wb9688
ac264464ef Improve code style to be more consistent 2020-04-02 15:57:50 +02:00