Commit Graph

167 Commits

Author SHA1 Message Date
Stypox aa84d6fc8f
Add @NonNull annotations 2023-12-22 18:52:42 +01:00
TobiGr b4016c91c1
scroll last comment into view 2023-12-22 11:57:55 +01:00
TobiGr 5f32d001cc
Expand DetailFragment again when exiting the CommentRepliesFragment 2023-12-22 11:57:55 +01:00
Stypox 8c9287d0c8
Revert relying on source ListInfo, use commentsInfoItem.getUrl() instead
This reverts commit bb01da3691ff1d5c3dccd41b7ca1a5deb1b5676f. This commit was not needed
2023-12-22 11:57:55 +01:00
Stypox 3f37e27852
Add some documentation and javadocs
Also further simplify CommentRepliesInfo and RelatedItemsInfo
2023-12-22 11:57:55 +01:00
Stypox ad68f784ae
Extract some utility methods from CommentInfoItemHolder 2023-12-22 11:48:07 +01:00
Isira Seneviratne 7742c40ac0 Create individual stream notifications for convenience on Android 7.0 and later. 2023-07-17 01:28:55 +02:00
TacoTheDank c1f0a945c0 Clean up AlertDialogs 2023-07-11 21:54:10 -04:00
Stypox 600ebdae18
Correctly open urls in browser on Android 11+
- Fix misconfiguration in manifest ('http|https|market' is not valid)
- Split ShareUtils functions taking a boolean parameter into pairs of functions with better names and less runtime checks
- Move all Kore-related functions to KoreUtils
- Remove the toast_no_player string
2023-02-25 09:13:59 +01:00
Stypox b6e6d39985
Fix toast crash on API 33
You shouldn't call getView() on toasts.
Also simplified some duplicate code.
2023-01-12 11:39:25 +01:00
petlyh edff696ecc
Ask for permission when enqueuing in a popup 2023-01-10 14:16:19 +01:00
HybridAU 9db0133a5b
Add play queue button to video details fragment
* Add play queue button to video details fragment

* Use existing ic_list icon

* Still open play queue even when queue is empty

* Change app:srcCompat to android:src
2022-09-14 21:00:44 +08:00
Stypox 8187a3bc04
Move PlayerType into its own class and add documentation
Also replace some `isPlayerOpen` with direct `playerType == null` checks.
2022-07-13 23:33:18 +02:00
Stypox 76ced59b62
Refactor player: separate UIs and more 2022-07-13 23:25:26 +02:00
Stypox 4e87f5aabc
Remove misleading first "Non" from getNonUrlAndNonTorrentStreams 2022-06-18 18:52:32 +02:00
AudricV 036196a487
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
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
Stypox 6e8c9f92cb
Merge branch 'dev' into pr2335 2022-03-19 22:29:10 +01:00
litetex 37517c7dd1
Merge pull request #7570 from TeamNewPipe/improvement/infoItemDialogBuilder
Refactor generating InfoItemDialog's
2022-02-26 16:18:39 +01:00
TobiGr ee477b25e5 Move StreamDialogEntry.openChannelFragment to NavigationHelper 2022-02-20 20:26:27 +01:00
TiA4f8R 79f8270c35
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
Stypox d5cfcb28fc
Merge branch 'dev' into pr2335 2022-01-24 10:25:07 +01:00
litetex e127db6fa6 Simplified toast showing behavior
after feedback from the review
2022-01-23 15:34:11 +01:00
litetex 49b1649348 Revert "Merge pull request #7568 from vhouriet/vhouriet_feature_already-playing-in-backgroud"
This reverts commit ee19ea66b3, reversing
changes made to 6b490ee547.
2022-01-23 15:34:11 +01:00
Stypox cd95ec4e12
Merge branch 'dev' into pr2335 2021-12-31 19:20:18 +01:00
litetex fc0e709817
Fixed usage of wrong string 2021-12-27 00:14:04 +01:00
litetex b67bf16d4f
Minified code 2021-12-26 23:57:54 +01:00
vhouriet 989bcbf895 Add Already playing in background toast 2021-12-23 22:12:38 +01:00
TobiGr 1130aba7ca Merge remote-tracking branch 'origin/dev' into notifications-1 2021-11-02 07:56:09 +01:00
TobiGr 80bf47493e Fix check wether the app's notifications are disabled via system settings
Add comments
Rename a few methods
2021-10-22 21:24:43 +02:00
Tobi 44cad27d0a
Merge pull request #7268 from TeamNewPipe/release/0.21.13
Release 0.21.13
- Fix playback resume
- Ensure that the service for new version checks is not started in background
2021-10-21 20:51:01 +02:00
Stypox ac071b383f Revert part of #6872 and fix playback resuming 2021-10-20 23:20:26 +02:00
TobiGr 5fcc3b4dab [Player] Fix resuming playback
This was caused by #6872
2021-10-17 12:13:38 +02:00
litetex 7edef8d5a2
Merge pull request #7222 from ktprograms/queue-menu-channel-details
Added the 'Show Channel Details' menu item to the Queue long press menu
2021-10-15 20:28:18 +02:00
litetex 2271ea4281 Improved documentation 2021-10-15 20:16:34 +02:00
TobiGr 16d4a034e2 Merge remote-tracking branch 'origin/dev' into notifications 2021-10-14 21:15:43 +02:00
ktprograms afc8db8f81 Add reasoning for separate openChannelFragmentUsingIntent method 2021-10-14 09:51:25 +08:00
litetex 9f7a8407ca
Merge pull request #7224 from vhouriet/vhouriet_fix_check-background-player-type
Check if background player already active before displaying player toast
2021-10-12 19:47:50 +02:00
vhouriet 50634eb2b3 Check player type before displaying background player toast 2021-10-11 19:41:22 +02:00
TobiGr cea14c9d0d Merge remote-tracking branch 'origin/dev' into notifications-1 2021-10-11 16:37:49 +02:00
ktprograms a2ff770afc Added the 'Show Channel Details' menu item to the Queue long press menu
Created a method in NavigationHelper that opens the channel fragment using an Intent to MainActivity instead of replacing fragments.
2021-10-11 14:47:37 +08:00
vhouriet 1c9f68bcae Fix clicking timestamp shows Toast "Playing in popup mode"
Fixes #6662
2021-10-05 18:15:36 +02:00
litetex b633108a4c Use the correct TAG in NavigationHelper 2021-10-03 22:04:34 +02:00
Koitharu fb0473da39
Merge branch 'dev' of https://github.com/TeamNewPipe/NewPipe into feature/notifications 2021-09-20 07:26:01 +03:00
Stypox 7e26748dc4
Merge branch 'master' into dev 2021-09-19 22:37:00 +02:00
z3r0r4 70354eb73e
Add play next to long press menu & refactor enqueue methods (#6872)
* added mvp play next button in long press menu; new intent handling, new long press dialog entry, new dialog functions, new strings

* changed line length for checkstyle pass

* cleaned comments, moved strings

* Update app/src/main/res/values/strings.xml

to make long press entry more descriptive

Co-authored-by: opusforlife2 <53176348+opusforlife2@users.noreply.github.com>

* Update app/src/main/res/values/strings.xml

Co-authored-by: Stypox <stypox@pm.me>

* replace redundant nextOnVideoPlayer methods

Co-authored-by: Stypox <stypox@pm.me>

* add enqueueNextOnPlayer and enqueueOnPlayer without selectOnAppend and RESUME_PLAYBACK/ deprecate enqueueNextOn*Player and enqueueOn*Player methods
add getPlayerIntent, getPlayerEnqueueIntent and getPlayerEnqueueNextIntent without selectOnAppend and RESUME_PLAYBACK/ deprecate those with
add section comments

* removed deprecated methods
removed redundant methods

* removed deprecated methods
removed redundant methods

* replaced APPEND_ONLY, removed SELECT_ON_APPEND / replaced remaining enqueueOn*Player methods

* now works with playlists

* renamed dialog entry

* checking for >1 items in the queue using the PlayerHolder

* making enqueue*OnPlayer safe to call when no video is playing (defaulting to audio)

* corrected strings

* improve getQueueSize in PlayerHolder

* long press to enqueue only if queue isnt empty

* add Whitespace

Co-authored-by: Stypox <stypox@pm.me>

* clarify comments / add spaces

* PlayerType as parameter of the enqueueOnPlayer method
add Helper method

* using the helper function everywhere (except for the background and popup long-press actions (also on playlists, history, ...)), so basically nowhere
/ passing checkstyle

* assimilated the enqueue*OnPlayer methods

* removed redundant comment, variable

* simplify code line

Co-authored-by: Stypox <stypox@pm.me>

* move if

* replace workaround for isPlayerOpen()

Co-authored-by: Stypox <stypox@pm.me>

* replaced workarounds (getType), corrected static access with getInstance

* remove unused imports

* changed method call to original, new method doesnt exist yet.

* Use getter method instead of property access syntax.

* improve conditional for play next entry

Co-authored-by: Stypox <stypox@pm.me>

* show play next btn in feed fragment

Co-authored-by: Stypox <stypox@pm.me>

* add play next to local playlist and statistics fragment

Co-authored-by: Stypox <stypox@pm.me>

* formating

Co-authored-by: Stypox <stypox@pm.me>

* correcting logic

Co-authored-by: Stypox <stypox@pm.me>

* remove 2 year old unused string, formating

Co-authored-by: Stypox <stypox@pm.me>

* correct enqueue (next) conditionals, default to background if no player is open. Dont generally default to background play.

* remove player open checks from button long press enqueue actions

* improve log msg

* Rename next to enqueue_next

* Refactor kotlin

Co-authored-by: opusforlife2 <53176348+opusforlife2@users.noreply.github.com>
Co-authored-by: Stypox <stypox@pm.me>
2021-09-18 11:22:49 +02:00
Tobi a2887034a6
Merge pull request #7068 from litetex/fix-restart
Fixed restarting not working properly
2021-09-11 12:51:38 +02:00
Vasiliy da9bd1d420
Notifications about new streams 2021-09-07 13:30:16 +03:00
litetex fda0a550fd Fixed the app restarting not working properly
* Using [``process-phoenix``](https://github.com/JakeWharton/ProcessPhoenix)
2021-09-06 20:47:44 +02:00
TobiGr 4d51ebc37a Fix a few SonarLint warnings 2021-09-05 19:54:28 +02:00