Commit Graph

159 Commits

Author SHA1 Message Date
AudricV 73855cacb7
Use StreamTypeUtil where possible and add isAudio and isVideo to this utility class 2022-06-17 22:01:26 +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
TacoTheDank cf213affa2 Annotate some NonNulls, some lint cleaning 2022-03-18 13:15:44 -04:00
Stypox 162a838afc
Deduplicate code for fetching stream info when sparse
Fixes #7941
2022-03-03 16:54:40 +01:00
litetex 37517c7dd1
Merge pull request #7570 from TeamNewPipe/improvement/infoItemDialogBuilder
Refactor generating InfoItemDialog's
2022-02-26 16:18:39 +01:00
TacoTheDank 1a000fecd5 Replace CircleImageView with ShapeableImageView 2022-02-23 15:11:25 -05:00
TobiGr d3bc184971 Clarify that only StramInfoItems are accepted by the builder 2022-02-21 21:50:30 +01:00
TobiGr ee477b25e5 Move StreamDialogEntry.openChannelFragment to NavigationHelper 2022-02-20 20:26:27 +01:00
TobiGr 277f21d5b2 Move Classes related to InfoItemDIalog into own package 2022-02-20 20:17:04 +01:00
TobiGr a7d5d9a1d6 Fix rebase 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 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
litetex 9c2cdd2513 Removed useless code
https://github.com/TeamNewPipe/NewPipe/pull/7659#discussion_r793752985
2022-02-17 20:59:40 +01:00
litetex 01683aa816 Code improvements 2022-02-17 20:59:39 +01:00
litetex d3cd3d62b4 Tried to repair #4475 and #3368
* Always recreate the footer so that it's not possible to attach the same instance twice
* Removed support for creating a custom footer as it's never used
* Supply the header with an supplier
  * This might not fix the problem completely as we currently can only create the header once inside Channel, Playlist and RelatedItems-Fragment - allowing creation of multiple headers might be done in the future if the issues still arise
* Other minor fixes
2022-02-17 20:59:36 +01:00
litetex cd8c7ec3c0 Removed InfoListAdapter from checkstyle-suppressions
because if you modify something in the code the suppressions-file no longer matches
2022-02-17 20:59:34 +01:00
litetex 2c51a7970d Improved InfoListAdapter
* Removed unused code
* Cleaned it up
* Made code more readable
2022-02-17 20:59:33 +01:00
David Kramer 07015973d2 Added ability to see pinned comment 2021-12-24 11:29:34 -06:00
Stypox 81f740d409
Replace ErrorActivity with ErrorUtil 2021-12-04 10:36:36 +01:00
TacoTheDank b61d44aaa6 Update Groupie to 2.9.0 2021-09-22 19:08:03 -04:00
Stypox fcef783bbb
Replace UniversalImageLoader with Picasso 2021-08-24 10:56:25 +02:00
litetex f9ab23bb4a Removed useless fiedl 2021-08-06 22:08:42 +02:00
litetex 9f8b2264a2 Use better pattern for matching timestamp in text and some reworks
Also extracted overhead code into ``TimestampExtractor``
2021-08-06 22:08:29 +02:00
litetex 1d61bb58f5
Set loglevel to error
Co-authored-by: Stypox <stypox@pm.me>
2021-08-05 20:26:17 +02:00
litetex 51c60e5261 Catch errors while processing timestamp-links
Otherwise the complete app crashes, which is bad
2021-08-04 22:35:41 +02:00
Kalle Struik bfac73b992 Make heart visible in android studio and move logic to the right file. 2021-07-27 22:34:59 +02:00
Kalle Struik 74173317de Change heart color to be red, add else clause for non hearted comments, and apply some code style suggestions. 2021-07-23 19:43:25 +02:00
Kalle Struik 3874e16187 Added support for showing when a comment has received a heart from the creator of a video. 2021-07-23 17:30:47 +02:00
Tobi be676ad93c
Merge pull request #3371 from mauriciocolli/feed-hide-played-items
Add ability to hide played items in a feed
2021-06-18 09:18:48 +02:00
TiA4f8R d6decc05d7
Move some classes to a new subpackage and adress requested changes
Rename URLHandler and KoreUtil classes to InternalUrlsHandler and KoreUtils.
Move InternalUrlsHandler, KoreUtils, TextLinkfier, ShareUtils classes to external_communication subpackage.
Remove unused param showPreviewText in shareText method of ShareUtils class.
Add initial work to be able to display an image preview of the content shared (not for downloads).
Use a better regular expression to parse timestamps in plain text descriptions.
2021-06-11 12:12:02 +02:00
Stypox 0113ad5e14
Correctly save stream progress at the end of a video 2021-06-09 15:53:51 +02:00
litetex 1306a777fc Using Localization.shortCount() and old likeCount 2021-06-03 14:40:00 +02:00
TobiGr e5457e5029 [Bandcamp] Add Radio stream segments
Display channel / creator / artist name when given
2021-04-11 23:14:23 +02:00
TacoTheDank e75d0de135 Migrate rest of AlertDialogs to AppCompat 2021-04-04 10:26:38 -04:00
wangear 73cfa5499d
Fix overlapping fonts and crash on tapping anywhere on video after long-pressing 'Popup' button (#5813)
* Overlapping fonts #5096
issue : #5096

* Overlapping fonts #5096
issue : #5096
changed :
- If additional textView is overlapped, only title view shows.

* Overlapping fonts #5096
issue : #5096
changed :
- Remove treeObserve and hiding logic.
- RelativeLayout -> ConstraintLayout.
- layout size fixed -> wrap_content.
- if text size is bigger, layout height bigger too.

* Overlapping fonts #5096
issue : #5096
changed :
- remove unusable variable

* Crash on tapping anywhere on video after long-pressing 'Popup' button #5804
issue : #5804
changed :
- checked null
- fixed NullPointerException.
2021-03-31 10:10:14 +02:00
Stypox 463dd8ea74
Completely remove return activity, now outdated 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
TiA4f8R 79e98db3bd
Apply the requested changes and little improvements
Apply the requested changes, use ShareUtils.shareText to share an stream in the play queue and optimize imports for Java files, using Android Studio functionality.

Apply the requested changes and do little improvements
Apply the requested changes, use ShareUtils.shareText to share an stream in the play queue and optimize imports for Java files, using Android Studio functionality.
2021-01-16 13:23:42 +01:00
Isira Seneviratne 920e560b4b Convert AnimationUtils functions to extension functions. 2021-01-16 14:49:37 +05:30
vkay94 37aa41afae Add stream segments to player 2021-01-14 21:58:19 +01:00
TobiGr 36aea35a92 [media.ccc.de] Add live stream kiosk 2020-12-27 13:26:49 +01:00
Tobias Groza 4700f35739
Merge pull request #4921 from Isira-Seneviratne/Call_offsetDateTime_instead_of_date
Call DateWrapper's offsetDateTime() instead of date().
2020-11-20 15:58:22 +01:00
Isira Seneviratne eb1cddd85a Call DateWrapper's offsetDateTime() instead of date(). 2020-11-19 18:37:07 +05:30
TacoTheDank 0274cd6beb Lint: Inner class may be static 2020-11-18 18:02:33 -05:00
Aditya Srivastava 87ae26ede3 Disabled commenter image view on LoadThumbnail set to false 2020-09-29 21:17:39 +05:30
TacoTheDank ba6c7de35a
Use AndroidX preference 2020-09-06 12:52:42 +02:00