Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
<package android:name="dev.anilbeesetti.nextplayer" />
<package android:name="com.instantbits.cast.webvideo" />
<package android:name="com.gianlu.aria2android" />
<package android:name="org.xbmc.kodi" />

<!-- Torrent clients -->
<package android:name="org.proninyaroslav.libretorrent" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import com.lagradost.cloudstream3.R
import com.lagradost.cloudstream3.actions.temp.BiglyBTPackage
import com.lagradost.cloudstream3.actions.temp.CopyClipboardAction
import com.lagradost.cloudstream3.actions.temp.JustPlayerPackage
import com.lagradost.cloudstream3.actions.temp.KodiPackage
import com.lagradost.cloudstream3.actions.temp.LibreTorrentPackage
import com.lagradost.cloudstream3.actions.temp.MpvExPackage
import com.lagradost.cloudstream3.actions.temp.MpvKtPackage
Expand Down Expand Up @@ -45,28 +46,109 @@ import java.util.concurrent.Callable
import java.util.concurrent.FutureTask

object VideoClickActionHolder {
/**
* To avoid supporting malicious apps, we have a requirement on the app
* being open source, popular and not brand new.
*/
val allVideoClickActions = atomicListOf(
// Default
PlayInBrowserAction(),
CopyClipboardAction(),
ViewM3U8Action(),
PlayMirrorAction(),
// main support external apps
/**
* Source: https://github.com/videolan/vlc-android/
* Stars: 4.1k
* Date: Jul 2, 2012
*/
VlcPackage(),
/**
* Source: https://github.com/mpv-android/mpv-android/
* Stars: 3.7k
* Date: Apr 20, 2016
*/
MpvPackage(),
/**
* Source: https://github.com/xbmc/xbmc/
* Stars: 21.5k
* Date: Oct 1, 2013
*/
KodiPackage,
/**
* Source: https://github.com/marlboro-advance/mpvEx/
* Stars: 2.8k
* Date: Nov 12, 2025
*/
MpvExPackage(),
/**
* Source: https://github.com/anilbeesetti/nextplayer/
* Stars: 4.7k
* Date: May 19, 2023
*/
NextPlayerPackage(),
/**
* Source: https://github.com/moneytoo/Player/
* Stars: 2.8k
* Date: Nov 16, 2020
*/
JustPlayerPackage(),
/**
* Mirror: https://github.com/futo-org/fcast/
* Source: https://gitlab.futo.org/videostreaming/fcast/
* Stars: 700
* Date: Sep 5, 2024
*/
FcastAction(),
/**
* Source: https://github.com/proninyaroslav/libretorrent/
* Stars: 4.1k
* Date: Feb 5, 2021
*/
LibreTorrentPackage(),
/**
* Source: https://github.com/BiglySoftware/BiglyBT-Android/
* Stars: 500
* Date: Nov 15, 2017
*/
BiglyBTPackage(),
// forks/backup apps
/**
* See VLC
*/
VlcNightlyPackage(),
/**
* Source: Proprietary https://www.webvideocaster.com/home/
* Reason: The built-in video caster is terrible, and no good FOSS alternatives exist.
* If a FOSS caster is found, this should be replaced.
*/
WebVideoCastPackage(),
/**
* Source: https://github.com/mpv-android/mpv-android/pull/58/
* See MPV
*/
MpvYTDLPackage(),
/**
* Source: https://github.com/abdallahmehiz/mpvKt/
* Stars: 1.3k
* Date: Aug 18, 2024
*/
MpvKtPackage(),
/**
* See MPV KT
*/
MpvKtPreviewPackage(),
/**
* Source: https://github.com/Kindness-Kismet/only_player/
* Stars: 500
* Date: Mar 8, 2026
*/
OnlyPlayer(),
/**
* Source: https://github.com/Riteshp2001/mpvRx/
* Stars: 900
* Date: Apr 29, 2026
*/
MpvRxPackage(),
// Always Ask option
AlwaysAskAction(),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package com.lagradost.cloudstream3.actions.temp

import android.app.Activity
import android.content.Context
import android.content.Intent
import androidx.core.net.toUri
import com.lagradost.cloudstream3.actions.OpenInAppAction
import com.lagradost.cloudstream3.ui.result.LinkLoadingResult
import com.lagradost.cloudstream3.ui.result.ResultEpisode
import com.lagradost.cloudstream3.utils.txt

/**
* https://github.com/xbmc/xbmc/
* https://github.com/xbmc/xbmc/blob/6a524b06c89168708a9486e01d0125b03737d1f6/tools/android/packaging/xbmc/src/Main.java.in#L64
* https://github.com/xbmc/xbmc/blob/6a524b06c89168708a9486e01d0125b03737d1f6/xbmc/platform/android/activity/XBMCApp.cpp#L1382
*/
object KodiPackage : OpenInAppAction(
appName = txt("Kodi"),
packageName = "org.xbmc.kodi",
intentClass = "org.xbmc.kodi.Splash"
) {
override val oneSource: Boolean = true
override suspend fun putExtra(
context: Context,
intent: Intent,
video: ResultEpisode,
result: LinkLoadingResult,
index: Int?
) {
val link = result.links[index!!]
val headers = link.getAllHeaders()
/** See https://kodi.wiki/view/HTTP */
if (headers.isNotEmpty()) {
intent.data = "${link.url}|${
headers.map { "${it.key}=${it.value}" }.joinToString(separator = "&")
}".toUri()
} else {
intent.data = link.url.toUri()
}
}

override fun onResult(activity: Activity, intent: Intent?) = Unit
}
Loading