From 8f5776e0f3f6edc3ca941099b758c52991f5ba2d Mon Sep 17 00:00:00 2001 From: C10udburst <18114966+C10udburst@users.noreply.github.com> Date: Mon, 8 Aug 2022 12:08:53 +0200 Subject: [PATCH] add different setRepo --- .../lagradost/cloudstream3/gradle/CloudstreamExtension.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/kotlin/com/lagradost/cloudstream3/gradle/CloudstreamExtension.kt b/src/main/kotlin/com/lagradost/cloudstream3/gradle/CloudstreamExtension.kt index a8b5653..5a68cfa 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/CloudstreamExtension.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/CloudstreamExtension.kt @@ -25,6 +25,14 @@ abstract class CloudstreamExtension @Inject constructor(project: Project) { fun setRepo(user: String, repo: String) { repository = Repo(user, repo) } + fun setRepo(identifier: String) { + val split = identifier + .removePrefix("https://") + .removePrefix("github.com") + .removeSurrounding("/") + .split("/") + repository = Repo(split[0], split[1]) + } internal var pluginClassName: String? = null