Commit graph

529 commits

Author SHA1 Message Date
Stypox
463c720a5c Deduplicate code for fetching stream info when sparse
Fixes #7941
2022-03-03 16:54:40 +01:00
litetex
e6b480fdbc Merge pull request #7570 from TeamNewPipe/improvement/infoItemDialogBuilder
Refactor generating InfoItemDialog's
2022-02-26 16:18:39 +01:00
litetex
ae111a8850 Merge pull request #7349 from TiA4f8R/seamless-transition-players
Add seamless transition between background and video players when putting the app in background (for video-only streams and audio-only streams only)
2022-02-26 16:16:18 +01:00
TobiGr
05af350375 Move StreamDialogEntry.openChannelFragment to NavigationHelper 2022-02-20 20:26:27 +01:00
TobiGr
58abf4b834 Move Classes related to InfoItemDIalog into own package 2022-02-20 20:17:04 +01:00
TobiGr
a97ea9af70 Fix rebase 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
926e00d467 Use ErrorActivity to notifiy about errors occourred while loading channel details 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
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
litetex
994003815b Fixed typo 2022-02-20 19:40:01 +01:00
litetex
2bf9ed12ed Fixed checkstyle problems
Unable to compile!

* Cleaned up ``getMostCompactAudioIndex`` and ``getHighestQualityAudioIndex`` into a new method ``getAudioIndexByHighestRank``
* Removed unreadable code and use Java Streams API
* Tests work as expected
2022-02-20 19:38:40 +01:00
litetex
299056effb Improved `ListHelper#getSortedStreamVideosList` 2022-02-20 19:38:40 +01: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
Stypox
f3f443ea85 Solve Java warning "Raw use of parameterized class" 2022-02-19 17:30:38 +01:00
litetex
4bfcf47a81 Merge pull request #7586 from litetex/add-preference-search
Made preferences searchable
2022-01-30 17:08:04 +01:00
ktprograms
08cb92b40d Load uploaderUrl when showing Channel Details from Play Queue
This checks if the uploaderUrl is in the database, if not it gets the
uploaderUrl and puts it in the database. This is similar to the fetching
of uploaderUrl when it doesn't exist done in #6919.

Also use createNotification when error occurs in getStreamInfo.
2022-01-25 11:00:34 +08:00
litetex
d094b4f11a Abstracted methods for the Android keyboard 2022-01-24 21:08:39 +01:00
litetex
52342d7358 Simplified toast showing behavior
after feedback from the review
2022-01-23 15:34:11 +01:00
litetex
34848c7cc3 Revert "Merge pull request #7568 from vhouriet/vhouriet_feature_already-playing-in-backgroud"
This reverts commit 4a12bedce8, reversing
changes made to 4f06d935cd.
2022-01-23 15:34:11 +01:00
Stypox
08ef37691f Merge pull request #7036 from Douile/fix/queue-metadata
Load full stream info when enqueuing a stream
2022-01-07 21:57:30 +01:00
Douile
0ee6530339 Remove unecessary interface InfoCallback
Co-authored-by: Stypox <stypox@pm.me>

Replace the unecessary callback interface InfoCallback in favour of the
standard type Consumer<SinglePlayQueue>
2022-01-03 17:52:27 +00:00
litetex
a87845e98e Fixed usage of wrong string 2021-12-27 00:14:04 +01:00
litetex
1eb2688eea Minified code 2021-12-26 23:57:54 +01:00
vhouriet
ee4678f788 Add Already playing in background toast 2021-12-23 22:12:38 +01:00
Jaspann
23bd0842a9 Adds comment to HASHTAGS_PATTERN 2021-12-20 14:13:40 -05:00
Jaspann
4c3504c956 Allows multilingual support in hashtags 2021-12-19 20:33:55 -05:00
Douile
4b72ec36bc Fix lambda code formatting
Co-authored-by: Stypox <stypox@pm.me>
2021-12-12 13:04:32 +00:00
Tom
77cb082f4b Remove unecessary line
Co-authored-by: Stypox <stypox@pm.me>
2021-12-12 12:51:01 +00:00
Robin
5baf6e8229 Disable media tunneling on Philips QM16XE 2021-12-04 22:23:09 +01:00
Douile
8c2b6416b5 Fetch sparse items when playing in background or popup 2021-12-03 22:38:03 +00:00
Douile
6fd567ff99 Fix StreamType check, missing import, and styling errors 2021-12-03 21:53:36 +00:00
Tom
46f9795305 Remove unused variable
Co-authored-by: Stypox <stypox@pm.me>
2021-12-03 21:30:26 +00:00
Tom
90987e660d Don't fetch uneeded stream info for live streams
Co-authored-by: Stypox <stypox@pm.me>
2021-11-23 15:22:11 +00:00
Stypox
3427253824 Merge pull request #7412 from litetex/code-cleanup
Some code cleanup(s)
2021-11-23 08:59:34 +01:00
litetex
e8727b36c7 Fixed feed when animations are off
Introduced a check if corresponding animations on the devices are enabled
2021-11-15 20:22:20 +01:00
Stypox
f27bd764ec Merge pull request #7160 from nschulzke/mark-as-watched-everywhere
Enable Mark as Watched in all the other playlist fragments.
2021-11-13 20:37:59 +01:00
Nathan Schulzke
517a98bdf9 Factor out shouldAddMarkAsWatched as a shared function 2021-11-13 10:18:17 -07:00
litetex
735f3e436e Removed unused imports 2021-11-06 21:07:00 +01:00
litetex
14e4b760ea Removed dead code 2021-11-05 18:04:57 +01:00
litetex
9080d3d6dd Removed `e.printStacktrace` and used an proper logger 2021-11-05 18:04:49 +01:00
Douile
7d462db50d Update stream state in database after loading 2021-10-28 01:11:53 +01:00
litetex
67bcafd8bd Merge pull request #7061 from TiA4f8R/custom-textview-edittext
Use custom TextViews and EditTexts in all XML resources
2021-10-27 20:47:15 +02:00
Tobi
0a15251ec4 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
a707961ef4 Revert part of #6872 and fix playback resuming 2021-10-20 23:20:26 +02:00
TobiGr
dd2725ca62 [Player] Fix resuming playback
This was caused by #6872
2021-10-17 12:13:38 +02:00
TiA4f8R
5e25566b67 Adress new requested changes 2021-10-16 15:32:56 +02:00
TiA4f8R
35401c0103 Adress requested changes and remove an unused return value in NewPipeTextViewHelper 2021-10-16 13:41:05 +02:00
TiA4f8R
648641341f Simplify code 2021-10-16 13:41:05 +02:00
TiA4f8R
4cd970fc97 Merge the Share process of the two classes into one
A new class has been added in the util package: NewPipeTextViewHelper.
It shares the selected text of a TextView with ShareUtils#shareText (with the created shareSelectedTextWithShareUtils static method).
Only this static method can be used by other classes, other methods are private.
2021-10-16 13:41:04 +02:00