1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-07-02 01:53:19 +00:00
Commit Graph

119 Commits

Author SHA1 Message Date
Nathan Schulzke
108af48b76 Enable Mark as Watched in all the other playlist fragments. 2021-09-23 21:39:47 -06: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
ktprograms
76803bfcb1 Save channelUrl to Database if it doesn't exist 2021-08-13 18:02:53 +08:00
TacoTheDank
50f3b08c59 Consolidate edittext alert dialogs into one layout 2021-07-27 13:31:58 -04:00
Stypox
5ba3ef0a25
Fix grid span count calculation; remove duplicate methods 2021-07-19 20:47:50 +02:00
evermind
48c2c156cb convert PlayerHolder to Singleton, handle context within, bugfix ServiceConnection leak
- bugfix: have ServiceConnection created only once!

- select the context within the PlayerHolder to start, stop, bind or unbind the service
  -> we have to make sure the Service is started AND stopped within the same context
  -> so let PlayerHolder be the one to select the context

- remove removeListener() and replace the call with setListener(null)
- Compatibility: use ContextCompat.startForegroundService instead of startService()
2021-07-06 12:31:26 +02:00
TacoTheDank
79deff3261 Annotate some overridden methods and parameters as NonNull 2021-06-19 18:37:02 -04: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
TiA4f8R
b4d6015464
Add the Open in browser option when long-pressing a stream for local and online playlists and for history 2021-06-03 13:21:31 +02:00
mhmdanas
b2b9938484 Put show channel details option in more long-press menus 2021-05-15 19:20:27 +03:00
PulkitGarg67
e1a6b69f9a
Functionality to rename playlist name from playlist interface 2021-04-01 21:30:15 +02:00
Stypox
1fc8e4c148
Optimize imports and solve checkstyle issues 2021-03-12 23:21:53 +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
Isira Seneviratne
920e560b4b Convert AnimationUtils functions to extension functions. 2021-01-16 14:49:37 +05:30
Isira Seneviratne
98be89a20a Return ViewBinding instead of View in BaseLocalListFragment's getListHeader() and getListFooter() methods. 2021-01-14 11:15:54 +05:30
khimaros
ac59382b84 pass serviceId instead of item, reduce duplication 2021-01-02 11:24:33 -08:00
khimaros
48a5107296 address pull request feedback 2020-12-30 14:45:14 -08:00
khimaros
83faf119a9 add list item to play video on kodi
closes: #5157
2020-12-29 18:53:32 -08:00
Stypox
f0ca916432
Update most dependencies 2020-11-22 14:03:10 +01:00
Stypox
1d42e45d78
Unify all ways of opening VideoDetailFragment 2020-11-08 10:00:27 +01:00
vkay94
2680d41a3d Fix PlaylistAppendDialog showing when no local playlists exist 2020-10-23 09:44:26 +02:00
vkay94
12f615c6da Enqueue: Removed unneeded dialog-entries and strings + adjustments 2020-10-06 17:22:12 +02:00
vkay94
ed6fc4d848 Enqueue: Replaced specific StreamDialogEntry items with one
The enqueue options won't be shown in the dialogs if the Player service is not running. When it's running one item (enqueue stream) will be shown and enqueues the item into the Player type which is currently selected.
2020-10-06 14:38:48 +02:00
TacoTheDank
273c287fbf
Fix some lambdas 2020-09-06 12:52:43 +02:00
wb9688
87228673b4 Use final where possible 2020-08-16 10:25:09 +02:00
wb9688
13a065f2dc Fix crash when opening video in local playlist tab 2020-08-03 14:47:10 +02:00
Avently
d2aaa6f691 Merged the latest changes 2020-07-13 04:17:21 +03:00
Stypox
437b86d1a7
Use centralized CompositeDisposable instead of custom Disposable
Also do not show any dialog if the user is aready removing watched videos in a local playlist
2020-04-23 23:35:00 +02:00
Grady Clark
73611004a0
Code cleanup, and best practices 2020-04-21 01:57:23 -05:00
Grady Clark
776ddddc83
fixed naming and formatting issues 2020-04-21 01:03:42 -05:00
Grady Clark
db335d5cec
Removed redundant code
reorganized code
2020-04-16 12:58:16 -05:00
Grady Clark
fe1646caa0
Changed "Remove Watched":
- Will now execute on the io thread
- Added confirmation dialog
  - Warning the user, and asking if they also want to remove partially watched videos
2020-04-14 13:15:07 -05:00
Stypox
92ca1e6e09
Check if already running before removing watched 2020-04-03 20:41:21 +02:00
Stypox
6571fdbaa2
Fix checkstyle errors 2020-04-03 20:13:56 +02:00
Stypox
9c3f138b8e
Use binary search to remove watched items from playlists 2020-04-03 19:51:29 +02:00
developer
0ac2865b74
Optimised 'removeWatchedStreams'
Removed merge mistake
Reordered code
Refactored 'removeWatchedWorker' to 'removeWatchedDisposable'
2020-04-03 19:50:12 +02:00
Grady Clark
98fc88dec6
Simplified the removal of watched videos, into the function removeWatchedStreams
Replaced unnecessary nested class.
Fixed formating issues
2020-04-03 19:49:41 +02:00
Grady Clark
8cab790030
- Will now use ReactiveX instead of AsyncTask, when removing watched videos.
- Removed redundant file 'local_playlist_control'
- Fixed grammer issue
2020-04-03 19:49:41 +02:00
Grady Clark
954399b255
Moved the 'Remove Watched' button to the three dot menu button. 2020-04-03 19:49:01 +02:00
Grady Clark
66c95f901d
Added the ability to remove all watched videos from local playlists
Changes:
 - local_playlist_control.xml
   * A copy of playlist_control.xml
   * To hold the 'Remove Watched Videos' buttton

 - local_playlist_header.xml
   * Changed the include layout	to now include local_playlist_control.xml

 - strings.xml
   * added string 'remove_watched' with value 'Remove Watched'

 - LocalPlaylistFragment.java
   * Added the functionality to remove watched videos,
      to the 'Remove Watched Videos' button in local_playlist_control.xml.
      In the background via AsyncTask.
      This will also change the playlist's thumbnail, if the thumbnail video is removed.

Tested on:
 - Pixel
2020-04-03 19:47:31 +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
Mauricio Colli
e8ab5aacc7
Setup initial database for feed implementation
- Update the database diagram
- Add new migration for the new tables and fields
- Enable schema exports
2020-03-14 00:12:30 -03:00
Xiang Rong Lin
8712310ad9 Move more log statements into "if (DEBUG)" 2020-02-01 16:36:45 +01:00
Avently
4c57893312 New features and fixes
- added autoplay options inside settings: always, only on wifi, never
- now statusbar will be shown in fullscreen mode
- playlists, channels can be autoplayed too (if enabled)
- changed title of background activity to Play queue
- fixed a crash
2020-01-08 19:16:50 +03:00
TobiGr
399e2626fb Fix code style and improve imports 2020-01-07 22:48:35 +01:00
decarvalhobo
752a76eb44 Usage of drawable instead of remote image + refactor the append to an empty playlist by just updating the thumbnail before adding the item in it. 2020-01-07 22:33:45 +01:00
De Carvalho Marcio Antonio
e9a4caaf0b remove comments 2020-01-07 22:33:45 +01:00
decarvalhobo
8de367e03f fix issue: thumbnail update when element deleted + thumbnail update when element added and no thumbnail 2020-01-07 22:33:45 +01:00
dotvirus
de19421de1 Update LocalPlaylistFragment.java 2019-12-31 01:42:41 +01:00
Robin
bf2a3ca043 Migrate to AndroidX 2019-10-04 14:59:08 +02:00
Stypox
c96a05a8f9
Customize "start here" actions in playlist item views
Now those actions start playing the whole playlist from the chosen stream, instead of playing only the chosen stream.
2019-08-14 14:17:05 +02:00
Stypox
d076fe72cd
Optimize imports in edited files 2019-07-25 11:47:38 +02:00
Stypox
9df27f43de
Ensure default actions cannot be overwritten permanently in StreamDialogEntry 2019-07-25 00:53:13 +02:00
Stypox
759e9846ad
Remove ugly if-else-cascade in
Common actions and labels are now in a unique enum: StreamDialogEntry
If an action is not common to every long-press menu (e.g. delete) a custom action has to be provided using e.g. delete.setAction(...)
2019-07-25 00:44:12 +02:00
Stypox
8edc332a4e
Fix showing popup options with audio-only streams 2019-07-22 11:58:01 +02:00
Stypox
bb5028364b
Complete merge after #2288: add resumePlayback to player calls.
`resumePlayback`'s value is `false` when the video is enqueued, `true` otherwise.
Also make the use of getContext() and getActivity() more consistant.
2019-07-22 10:28:53 +02:00
Stypox
064f0e414a
Merge branch 'dev' into menu-consistency 2019-07-21 11:11:06 +02:00
Stypox
8b584f3922
Make long-press menu consistent across views: fix #2354
Also made the code that creates the menus consistent across files.
2019-05-29 16:22:01 +02:00
Vasiliy
4e1423d224
Implement playback state management 2019-04-13 13:34:36 +03:00
Stypox
aadc8168be
Remove share utilities from BaseStateFragment
Replaced by ShareUtils
2019-04-06 20:17:04 +02:00
u1
b1a5547de2 Fix reordering playlist items on grid layout 2018-08-31 16:34:35 +03:00
Christian Schabesberger
eae7babf93
Merge pull request #1454 from Somethingweirdhere/dev
Added share option to long tap menu
2018-06-25 15:28:37 +02:00
John Zhen Mo
7fb9345344 -Fixed remote playlist metadata not updated when remote source data has changed. 2018-06-18 18:22:52 -07:00
Somethingweirdhere
baa63249d1 Added share option to long tap menu 2018-06-05 19:48:31 +02:00
Christian Schabesberger
a099fe35d2 reorder playqueue/localPlaylist classes 2018-04-29 12:51:57 +02:00
Christian Schabesberger
bcfd8a2450 rename playlist to player.playqueue 2018-04-29 12:49:52 +02:00
Christian Schabesberger
004c2fa55a Project restructure for history part 1
- add HistoryInfoItem (deriving from StreamInfoItem)
  in order to add a special options menu for the list items
- delete HistoryActivity and everything that belongs to its UI (not the
  manager tho)
- put everything that is local into local. (subscriptions still missing)
2018-04-29 12:47:12 +02:00