CopyClipboardAction

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open val isPlayer: Boolean = false

if true, this action could be selected as default player (one press action) in settings

Link copied to clipboard
open override val name: UiText
Link copied to clipboard
open override val oneSource: Boolean = true

if true, the app will show dialog to select source - result.linksindex

Link copied to clipboard

Determines which plugin a given provider is from. This is the full path to the plugin.

Link copied to clipboard

Which type of sources this action can handle.

Functions

Link copied to clipboard
suspend fun launch(intent: Intent?, bundle: Bundle? = null)

Internally uses startActivity, use this when you don't have any result that needs to be stored when exiting the activity

Link copied to clipboard
suspend fun launchResult(intent: Intent?, options: <Error class: unknown class>? = null)

Internally uses activityResultLauncher, use this when the activity has a result like watched position

Link copied to clipboard
open suspend override fun runAction(context: Context?, video: ResultEpisode, result: LinkLoadingResult, index: Int?)

This function is called when the action is clicked.

Link copied to clipboard
fun runActionSafe(context: Context?, video: ResultEpisode, result: LinkLoadingResult, index: Int?): <Error class: unknown class>

Safe version of runAction, as we don't trust extension devs to handle exceptions

Link copied to clipboard
open override fun shouldShow(context: Context?, video: ResultEpisode?): Boolean
Link copied to clipboard
fun shouldShowSafe(context: Context?, video: ResultEpisode?): Boolean

Safe version of shouldShow, as we don't trust extension devs to handle exceptions, however no dev should throw in shouldShow

Link copied to clipboard
suspend fun <T> uiThread(callable: Callable<T>): T?

Even if VideoClickAction should not run any UI code, startActivity requires it, this is a wrapper for runOnUiThread in a suspended safe context that bubble up exceptions

Link copied to clipboard