Commit Graph

91 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
litetex 79540a8b9c Fix tests 2022-04-02 15:43:50 +02:00
Mauricio Colli 99d62381b9 Fix download dialog selector layout and add some tests 2022-04-02 15:25:08 +02:00
TobiGr ff8e44e4f3 Merge branch 'dev' into feature/notifications 2022-02-19 12:34:44 +01:00
Stypox 466db83375
Improve HistoryRecordManager tests (#7700)
* Improve HistoryRecordManager tests

* Improve shuffle as requested
2022-01-27 14:43:51 +01:00
Stypox d5cfcb28fc
Merge branch 'dev' into pr2335 2022-01-24 10:25:07 +01:00
litetex 3d3d94655b Fixed imports 2022-01-21 22:19:52 +01:00
litetex a6515d5450 Moved timeout control from the tests to the CI pipeline
How fast a tests is executed on a shared CI pipeline is not predictable as the build might be throttled because other builds are running.
Therefore adding extremely short timeouts inside the tests - where they can't be changed - is a bad idea.
Removed them for now.
2022-01-21 22:15:34 +01:00
XiangRongLin 3c21be8fa5 use constant instead of now 2022-01-20 19:14:47 +01:00
XiangRongLin 4a7cfd1a6c Ensure order of search history entries in tests 2022-01-18 18:36:43 +01:00
XiangRongLin 5b9c28b93b
Replace JUnit asserts with AssertJ in HistoryRecordManagerTest (#7654)
* Replace JUnit asserts with AssertJ in HistoryRecordManagerTest

They provide a wider range of assertions, which allow for more detailed error messages.
Also convert SearchHistoryEntry to kotlin data class for better error messages, since toString() is implemented.

Co-authored-by: Mohammed Anas <triallax@tutanota.com>
2022-01-16 09:10:45 +01:00
Stypox cd95ec4e12
Merge branch 'dev' into pr2335 2021-12-31 19:20:18 +01:00
Stypox 2963cd5c6e
Add HistoryRecordManagerTest 2021-12-12 16:00:16 +01:00
Stypox 7d6688f497
Add DatabaseMocker to mock NewPipeDatabase 2021-12-12 15:59:04 +01:00
litetex 4f8552835e Better naming for a test class that does database migrations 2021-11-02 22:43:23 +01:00
TobiGr 7c6140b331 Remove unused code 2021-10-15 19:57:31 +02:00
TobiGr cea14c9d0d Merge remote-tracking branch 'origin/dev' into notifications-1 2021-10-11 16:37:49 +02:00
Jhon Baron f36fd2f7b2
Simple Codebase Improvement (#7132)
* feat: it was added a string variable to avoid replication one.

* Update LocalPlaylistManagerTest.kt

* Update LocalPlaylistManagerTest.kt

* Update LocalPlaylistManagerTest.kt

Co-authored-by: Jhon Camilo Baron Berdugo <jbaron@mutualser.org>
2021-09-22 09:17:53 +02:00
Koitharu c95aec9da6
Fix database test 2021-09-07 13:30:25 +03:00
ktprograms 967bdf8f08 Remove migration test, add manual testing reminder to Migrations.java 2021-08-17 08:57:03 +08:00
ktprograms 02aa6fcab0 Remove v2 to v3 migration test, add v3 to v4 test 2021-08-16 21:12:54 +08:00
ktprograms 759a078ce0 Add uploader_url column to StreamEntity 2021-08-13 16:44:50 +08:00
litetex f02c6be10d Fix format of some kotlin files
so that it doesn't annoy people that are building this repo ;)
2021-07-19 20:59:29 +02:00
XiangRongLin 2aa5f68b7b Add comment explaining usage Schedulers.trampoline in detail 2021-07-12 18:31:37 +02:00
XiangRongLin 56ea526cce Add instrumented tests for LocalPlaylistManager.createPlaylist 2021-07-12 18:31:37 +02:00
Stypox 0263125e11
Fix tests 2021-03-12 23:21:54 +01:00
Stypox c43bca6007
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 553b80164b
Move all error-related classes into error package 2021-03-07 17:49:28 +01:00
Stypox f0ca916432
Update most dependencies 2020-11-22 14:03:10 +01:00
Isira Seneviratne 340b92e32b Convert ErrorInfo to Kotlin and use the Parcelize annotation. 2020-11-21 12:47:35 +05:30
TacoTheDank a4feb3fc09
Fix some deprecations 2020-09-06 12:52:43 +02:00
wb9688 87228673b4 Use final where possible 2020-08-16 10:25:09 +02:00
Avently d2aaa6f691 Merged the latest changes 2020-07-13 04:17:21 +03:00
wb9688 b0415a5289 Auto-format using Ktlint 2020-05-01 20:13:21 +02:00
wb9688 fda5405e48 Improve code style to be more consistent 2020-04-02 15:57:50 +02:00
Mauricio Colli e6b3107997
Add tests for database migration to version 3 handling null values 2020-03-30 15:50:47 -03:00
Mauricio Colli 6a9a0f1e73
Add tests for migrations in the Room database
Doing this increase the level of reliability of migrations, as we can be
pretty much more confident of avoiding problems with them.
2020-03-14 00:12:54 -03:00
Robin bf2a3ca043 Migrate to AndroidX 2019-10-04 14:59:08 +02:00
Christian Schabesberger b4ef20e785 fix failing tests 2019-01-29 13:38:38 +01:00
Coffeemakr b03723c3fb Code improvements
* Replace unchecked casts with checked casts
 * remove Utility.finViewById
 * Fix return activity checking
 * Create UserAction enum
 * Fix typos
 * Add instrumented test for error info
 * ErrorInfo make fields final
 * Log exception using logger
 * Add inherited annotations
 * Resolve deprecation warnings
 * Remove unused methods from utility
 * Reformat code
 * Remove unused methods from Utility and improve getFileExt
 * Create OnScrollBelowItemsListener
2017-06-28 18:56:05 +02:00
Christian Schabesberger 477f182b43 convert android tests to junit tests 2017-02-16 00:17:43 +01:00
Christian Schabesberger 7186f58374 remove StreamInfoItemSearchCollector 2017-02-12 14:22:39 +01:00
Christian Schabesberger 38c5cb50fb fixed Downloader.getInstance() in unit tests 2016-12-24 17:11:29 +01:00
Christian Schabesberger f575826394 fix unit tests 2016-11-20 19:01:06 +01:00
Christian Schabesberger 379149fe2f update unit tests so it works with current updates 2016-11-18 23:52:17 +01:00
Christian Schabesberger 01875b389d clean up extractor 2016-09-28 17:13:15 +02:00
Christian Schabesberger 43afd5a2b8 clean up downloader thing 2016-09-27 22:59:04 +02:00
Christian Schabesberger caf938f79f add channel extractor tests 2016-09-12 23:44:57 +02:00
Christian Schabesberger 6beb36f92f get channel banner 2016-08-01 01:56:19 +02:00
Christian Schabesberger 1fd6685b3b removed orebot/tor support 2016-07-25 11:59:37 +02:00