Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import androidx.core.app.ActivityCompat
import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationManagerCompat
import androidx.fragment.app.FragmentActivity
import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.APIHolder
import com.lagradost.cloudstream3.APIHolder.removePluginMapping
import com.lagradost.cloudstream3.AllLanguagesName
Expand Down Expand Up @@ -76,11 +77,11 @@ const val EXTENSIONS_CHANNEL_DESCRIPT = "Extension notification channel"
// Data class for internal storage
@Serializable
data class PluginData(
@SerialName("internalName") val internalName: String,
@SerialName("url") val url: String?,
@SerialName("isOnline") val isOnline: Boolean,
@SerialName("filePath") val filePath: String,
@SerialName("version") val version: Int,
@JsonProperty("internalName") @SerialName("internalName") val internalName: String,
@JsonProperty("url") @SerialName("url") val url: String?,
@JsonProperty("isOnline") @SerialName("isOnline") val isOnline: Boolean,
@JsonProperty("filePath") @SerialName("filePath") val filePath: String,
@JsonProperty("version") @SerialName("version") val version: Int,
) {
@WorkerThread
fun toSitePlugin(): SitePlugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.lagradost.cloudstream3.plugins

import android.content.Context
import androidx.annotation.WorkerThread
import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.CloudStreamApp.Companion.context
import com.lagradost.cloudstream3.CloudStreamApp.Companion.getKey
import com.lagradost.cloudstream3.CloudStreamApp.Companion.setKey
Expand Down Expand Up @@ -32,11 +33,11 @@ import java.util.concurrent.atomic.AtomicInteger
*/
@Serializable
data class Repository(
@SerialName("iconUrl") val iconUrl: String?,
@SerialName("name") val name: String,
@SerialName("description") val description: String?,
@SerialName("manifestVersion") val manifestVersion: Int,
@SerialName("pluginLists") val pluginLists: List<String>,
@JsonProperty("iconUrl") @SerialName("iconUrl") val iconUrl: String?,
@JsonProperty("name") @SerialName("name") val name: String,
@JsonProperty("description") @SerialName("description") val description: String?,
@JsonProperty("manifestVersion") @SerialName("manifestVersion") val manifestVersion: Int,
@JsonProperty("pluginLists") @SerialName("pluginLists") val pluginLists: List<String>,
)

/**
Expand All @@ -49,30 +50,30 @@ data class Repository(
@Serializable
data class SitePlugin(
// Url to the .cs3 file
@SerialName("url") val url: String,
@JsonProperty("url") @SerialName("url") val url: String,
// Status to remotely disable the provider
@SerialName("status") val status: Int,
@JsonProperty("status") @SerialName("status") val status: Int,
// Integer over 0, any change of this will trigger an auto update
@SerialName("version") val version: Int,
@JsonProperty("version") @SerialName("version") val version: Int,
// Unused currently, used to make the api backwards compatible?
// Set to 1
@SerialName("apiVersion") val apiVersion: Int,
@JsonProperty("apiVersion") @SerialName("apiVersion") val apiVersion: Int,
// Name to be shown in app
@SerialName("name") val name: String,
@JsonProperty("name") @SerialName("name") val name: String,
// Name to be referenced internally. Separate to make name and url changes possible
@SerialName("internalName") val internalName: String,
@SerialName("authors") val authors: List<String>,
@SerialName("description") val description: String?,
@JsonProperty("internalName") @SerialName("internalName") val internalName: String,
@JsonProperty("authors") @SerialName("authors") val authors: List<String>,
@JsonProperty("description") @SerialName("description") val description: String?,
// Might be used to go directly to the plugin repo in the future
@SerialName("repositoryUrl") val repositoryUrl: String?,
@JsonProperty("repositoryUrl") @SerialName("repositoryUrl") val repositoryUrl: String?,
// These types are yet to be mapped and used, ignore for now
@SerialName("tvTypes") val tvTypes: List<String>?,
@JsonProperty("tvTypes") @SerialName("tvTypes") val tvTypes: List<String>?,
// Most often a language tag like "en" or "zh-TW"
@SerialName("language") val language: String?,
@SerialName("iconUrl") val iconUrl: String?,
@JsonProperty("language") @SerialName("language") val language: String?,
@JsonProperty("iconUrl") @SerialName("iconUrl") val iconUrl: String?,
// Automatically generated by the gradle plugin
@SerialName("fileSize") val fileSize: Long?,
@SerialName("fileHash") val fileHash: String?,
@JsonProperty("fileSize") @SerialName("fileSize") val fileSize: Long?,
@JsonProperty("fileHash") @SerialName("fileHash") val fileHash: String?,
)

object RepositoryManager {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.lagradost.cloudstream3.plugins

import android.util.Log
import android.widget.Toast
import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.CloudStreamApp.Companion.context
import com.lagradost.cloudstream3.CloudStreamApp.Companion.getKey
import com.lagradost.cloudstream3.CloudStreamApp.Companion.setKey
Expand All @@ -15,7 +16,6 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

object VotingApi {

private const val LOGKEY = "VotingApi"
private const val API_DOMAIN = "https://api.countify.xyz"

Expand Down Expand Up @@ -95,7 +95,7 @@ object VotingApi {

@Serializable
private data class CountifyResult(
@SerialName("id") val id: String? = null,
@SerialName("count") val count: Int? = null,
@JsonProperty("id") @SerialName("id") val id: String? = null,
@JsonProperty("count") @SerialName("count") val count: Int? = null,
)
}