1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-06-18 11:20:00 +00:00
Commit Graph

63 Commits

Author SHA1 Message Date
Stypox
53f8415e9b
Use @SuppressWarnings for checkstyle suppressions & warnings
It's better to use @SuppressWarnings instead of the suppressions file, so that the warning suppression is at the place where it acts.
2022-03-18 23:57:11 +01:00
litetex
ccc3d38c45
Merge pull request #7910 from avently/equalscheck
Better equals check
2022-02-26 16:20:27 +01:00
Avently
01e0dd50ad Added serviceId check while comparing PlayQueues 2022-02-23 00:53:39 +03:00
Avently
835c5e9d43 Better equals check
It ensures that queues are not the same. Without this check when you have multiple videos in the backstack and navigating back via Back button you'll get duplicated videos
2022-02-19 22:12:31 +03:00
Stypox
4789cf6c31
Use Java streams in AbstractInfoPlayQueue 2022-02-19 18:01:16 +01:00
Stypox
5f1f52b6ce
Remove useless constructor in *PlayQueue
Also removes unused <> parameter in AbstractInfoPlayQueue and deduplicates constructor code in extending classes
2022-02-19 17:49:43 +01:00
Stypox
62abfa96b8
Solve Java warning "Raw use of parameterized class" 2022-02-19 17:30:38 +01:00
litetex
2e862b4ccc
Merge pull request #6844 from 0x416c6578/shuffle-mode-ui-fix
Fixed shuffle button opacity UI bug
2021-11-03 18:18:31 +01:00
litetex
ecac897e7b
Fixed typo 2021-11-03 17:30:30 +01:00
litetex
af936bc646 Always create a backup list when shuffling
The backup-list has to be created at all cost (even when current list size <= 2). Otherwise it's not possible to enter shuffle-mode (as ``isShuffled()`` always returns false)!
2021-10-23 17:35:42 +02:00
TacoTheDank
b6b19b474e Update RecyclerView & Groupie 2021-10-19 17:31:59 -04:00
Stypox
2027b743b4
Merge pull request #6919 from ktprograms/channel-details-all-places
Add Show Channel Details where it's missing
2021-08-24 16:43:21 +02:00
Stypox
fcef783bbb
Replace UniversalImageLoader with Picasso 2021-08-24 10:56:25 +02:00
ktprograms
712985ced1 Save uploader url when adding from PlayQueueItem 2021-08-16 08:08:50 +08:00
Stypox
4a2bd7bd7b
Remove equals() method from PlayQueueItem 2021-07-21 18:09:18 +02:00
Stypox
a102fc9cad
Use constraint layout for play queue item
Also remove invalid ic_selected attribute
2021-06-07 08:07:27 +02:00
Zhiheng Xu
2e161a1f45 Change shuffle() guard to check for size <= 2
After testing the app, I realized that shuffling a queue with size 2
does nothing
2021-05-24 12:20:19 -04:00
Zhiheng Xu
5ab6e84044 Remove redundant clearing of list 2021-05-24 12:20:19 -04:00
Zhiheng Xu
e1a6347c4e Refactor shuffle and update documentation
- Add early return for invalid sizes to shuffle

 - Rename variables to be more descriptive

 - Refactor moving list element, removing unnecessary operations

 - Unwrap if clause for adding to history because the condition is
   guaranteed by the guard clause

 - Inline the value 0 for the ReorderEvent

 - Update documentation to reflect new changes
2021-05-24 12:20:19 -04:00
Eric Xu
92a67bb8cb Rearrange fields
Final fields should be arranged first
2021-05-24 12:20:19 -04:00
Eric Xu
e8eeac6735 Resolve TODO in indexOf(...)
PlayQueueItem overrides equals and hashCode, so using indexOf is
perfectly fine.
2021-05-24 12:20:19 -04:00
Eric Xu
775fbc9a75 Rewrite setIndex(int) to pass unit tests
Original did not cover the case of when streams is empty and
documentation does not specify any input restrictions.

There's an ambiguity with broadcasting an event between the
documentation and the actual code (see TODO).
2021-05-24 12:20:19 -04:00
Eric Xu
8efe2859b8 Refactor assignments to field declaration
Assignments that don't require the constructor can be moved out.
2021-05-24 12:20:19 -04:00
Eric Xu
441c68ead2 Add hashCode() to match equals(other) 2021-05-24 12:20:19 -04:00
Eric Xu
4cd1f201f5 Refactor streams to initialize with values 2021-05-24 12:20:19 -04:00
Eric Xu
013c59f904 Refactor ArrayList fields to List 2021-05-24 12:20:19 -04:00
Eric Xu
57474e2dab Refactor and optimize equals
- Remove multiple casts of obj

 - Simply use object equals on the streams because PlayQueueItem’s
   equals already compares urls
2021-05-24 12:20:19 -04: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
Tobias Groza
db9f20a22f
Merge pull request #4961 from TeamNewPipe/lint
Fix some Lint errors
2020-12-07 11:19:01 +01:00
Stypox
f0ca916432
Update most dependencies 2020-11-22 14:03:10 +01:00
TobiGr
7a8dab2d58 Fix typos 2020-11-22 10:39:00 +01:00
TacoTheDank
0274cd6beb Lint: Inner class may be static 2020-11-18 18:02:33 -05:00
Stypox
2a2c82e73b
More fixes with opening VideoDetailFragment 2020-11-08 10:00:28 +01:00
Stypox
1d42e45d78
Unify all ways of opening VideoDetailFragment 2020-11-08 10:00:27 +01:00
Tobias Groza
f4435f9031
Merge pull request #4555 from Stypox/playqueue-crash
Fix NullPointerException in queue handling
2020-11-08 01:19:38 +01:00
Stypox
e406b6f780
Fix NullPointerException in queue handling 2020-10-26 18:15:59 +01:00
Stypox
941028ba6f
Don't rearrange lists by dragging the thumbnails 2020-10-17 16:25:06 +02:00
TobiGr
c66c81294e Remove unused and redundant code. 2020-09-01 17:39:06 +02:00
wb9688
87228673b4 Use final where possible 2020-08-16 10:25:09 +02:00
Avently
06e70abb86 Merged the latest changes 2020-07-21 01:37:36 +03:00
wb9688
d0c03a0211 Use androidx.annotation.NonNull instead of io.reactivex.annotations.NonNull 2020-07-14 21:15:29 +02:00
Avently
d8f7db4715 Made checkStyle happy 2020-07-14 20:21:32 +03:00
Avently
d2aaa6f691 Merged the latest changes 2020-07-13 04:17:21 +03:00
Avently
b2164ce5fc Marked many (too many) variables as final 2020-07-12 03:59:47 +03:00
wb9688
dd57e246b8 Use getNextPage() instead of getNextPageUrl() 2020-07-07 21:03:24 +02:00
Stypox
b3db8c9549
Do not remove items generating errors form queue 2020-05-31 14:06:22 +02:00
wb9688
63bcc04eff Move things back to its original place 2020-04-02 15:57:50 +02:00
wb9688
fda5405e48 Improve code style to be more consistent 2020-04-02 15:57:50 +02:00
Avently
f334a2740f Mini player, ExpandableSurfaceView with ZOOM support, popup
- mini player's title, image and author information will be updated in many situations but the main idea is that the info will be the same as currently playing stream. If nothing played then you'll see the info about currently opened stream in fragment. When MainPlayer service stops the info updates too
- made ExpandableSurfaceView to replace AspectRatioFrameLayout. The reason for that is to make possible to use aspect ratio mode ZOOM. It's impossible to show a stream inside AspectRatioFrameLayout with ZOOM mode and to fit the video view to a screen space at the same time. Now the new view able to do that and to show vertical videos in a slightly wide space for them
- refactored some methods to make the code more understandable
- made fixes for player view for landscape-to-landscape orientation change
- added Java docs
- adapted swipe tracking inside bottom sheet
- fixed PlayQueue crashes on clearing
- paddings for popup player now as small as possible
2020-02-05 08:59:30 +03:00
Avently
a2d5314cf7 Fourth block of fixes for review
- wrote more methods to PlayQueue. Now it supports internal history of played items with ability to play previous() item. Also it has equals() to check whether queues has the same content or not
- backstack in fragment is more powerful now with help of PlayQueue's history and able to work great with playlists' PlayQueue and SinglePlayQueue at the same time
- simplified logic inside fragment. Easy to understand. New PlayQueue will be added in backstack from only one place; less number of setInitialData() calls
- BasePlayer now able to check PlayQueue and compare it with currently playing. And if it is the same queue it tries to not init() it twice. It gives possibility to have a great backstack in fragment since the same queue will not be played from two different instances and will not be added to backstack twice  with duplicated history inside
- better support of Player.STATE_IDLE
- worked with layouts of player and made them better and more universal
- service will be stopped when activity finishes by a user decision
- fixed a problem related to ChannelPlayQueue and PlaylistPlayQueue in initial start of fragment
- fixed crash in popup
2020-01-06 13:39:01 +03:00