Commit Graph

45 Commits

Author SHA1 Message Date
Stypox 7907182e7e
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 064242d962
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
Douile 3ff00ff50e
Fix lambda code formatting
Co-authored-by: Stypox <stypox@pm.me>
2021-12-12 13:04:32 +00:00
Tom baee915db5
Remove unecessary line
Co-authored-by: Stypox <stypox@pm.me>
2021-12-12 12:51:01 +00:00
Douile 7cd3603bbb
Fetch sparse items when playing in background or popup 2021-12-03 22:38:03 +00:00
Douile ec7de2a6dc
Fix StreamType check, missing import, and styling errors 2021-12-03 21:53:36 +00:00
Tom 3d1a3606c9
Remove unused variable
Co-authored-by: Stypox <stypox@pm.me>
2021-12-03 21:30:26 +00:00
Tom 91611fcae4
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 9e44053e22
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 dee32c3dc5 Factor out shouldAddMarkAsWatched as a shared function 2021-11-13 10:18:17 -07:00
Douile bc2f0f9f3e
Update stream state in database after loading 2021-10-28 01:11:53 +01:00
litetex 731640997e Cleaned up PlaylistDialog-related code 2021-10-09 18:46:20 +02:00
Kalle Struik 87c958b2e7 Rename the "append_playlist" string to "add_to_playlist" 2021-10-03 13:27:24 +02:00
Douile 62d36126ea
Load full stream info when enqueuing a stream
This commit calls getStreamInfo causing a full network fetch of stream
info (I believe only if required) when adding a stream item to the
queue. This should prevent UI issues of missing metadata when queueing
videos that have been fast-loaded and are missing metadata.

Fixes #7035
2021-09-19 00:15:56 +01: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 2928df0cc9 Fix checkstyle ParenPad error 2021-08-24 21:17:08 +08:00
ktprograms a209e87c69 Add Loading Channel Details Toast 2021-08-21 09:30:40 +08:00
ktprograms bd0427c79f Refactor duplicated code into method 2021-08-14 17:32:38 +08:00
ktprograms 241054fd26 Remove hardcoded string 2021-08-14 15:38:57 +08:00
ktprograms d8888e3495 Catch error from ExtractorHelper.getStreamInfo, remove blockingGet 2021-08-14 09:07:27 +08:00
ktprograms 76803bfcb1 Save channelUrl to Database if it doesn't exist 2021-08-13 18:02:53 +08:00
Nathan Schulzke 2b41f710a8 Change played to watched 2021-07-27 13:26:51 -06:00
Nathan Schulzke 7fd2ebc252 Add ability to mark an item as played 2021-07-26 20:51:41 -06: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
Stypox 74ad488f4a
Merge pull request #6394 from TacoTheDank/androidx-fragment-134
Update AndroidX Fragment to 1.3.4
2021-06-18 13:14:30 +02:00
TacoTheDank e4885e3c52 Fix some older deprecations from previous Fragment versions 2021-06-15 22:08:25 -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 d85afd6435
Initial work to add the image of the content in the share sheet
Also do some fixes when sharing a file in downloads and some improvements in JavaDocs of ShareUtils class.
2021-06-11 12:12:00 +02:00
TobiGr abc354f516 Use reqireContext(), requireActivity() instead of getters 2021-06-05 16:13:12 +02:00
TiA4f8R b9aaafdb30
Add Open in browser option to long-press menu
Add Open in browser option to long-press menu when long pressing a stream and a subscription
2021-06-03 13:15:08 +02:00
Mohammed Anas 6a9cae3de8
Add channel details option to long-press menu (#5851)
Add dialog item to open channel details
Use `List` as type of `entries`
Put channel details item last
Only show channel option when channel is present
2021-03-28 18:32:40 +02: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
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
vkay94 32a142bf79 Fix PlaylistAppendDialog: Renamed method and replaced with Runnable 2020-10-23 09:44:26 +02: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
vkay94 cd515993f5 Enqueue: Add auto-select StreamDialogEntry for current PlayerType 2020-10-06 13:33:44 +02:00
wb9688 87228673b4 Use final where possible 2020-08-16 10:25:09 +02:00
wb9688 fda5405e48 Improve code style to be more consistent 2020-04-02 15:57:50 +02:00
Robin bf2a3ca043 Migrate to AndroidX 2019-10-04 14:59:08 +02:00
Stypox 25fbbfaf94
Rename action to defaultAction in StreamDialogEntry
To improve readability
2019-07-25 01:07:51 +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