TorrentProvider

interface TorrentProvider

TorrentProviders define how to communicate with a single torrent provider.

Inheritors

Functions

Link copied to clipboard
abstract fun disable()

Disable this provider, so it cannot be used until enable is called.

Link copied to clipboard
abstract fun enable(username: String? = null, password: String? = null, cookies: List<String> = emptyList())

Enable this provider using the provided authentication details.

Link copied to clipboard
abstract suspend fun search(query: TorrentQuery): ProviderResult

Execute a search for the given query in category, returning TorrentDescriptions for each of the Provider's entries.

Properties

Link copied to clipboard
abstract val baseUrl: String

The Provider's base url. (ex. https://provider.link)

Link copied to clipboard
abstract val categories: Map<Category, String>

Maps a url safe string of provider categories to a Category.

Link copied to clipboard
abstract val isEnabled: Boolean

True if the provider is enabled.

Link copied to clipboard
abstract val name: String

The Provider's name.

Link copied to clipboard

The result limit for search requests.

Link copied to clipboard

The Provider's available query parameters and names.

Link copied to clipboard
abstract val searchPath: String

The Provider's path to search data.

Link copied to clipboard
abstract val tokenPath: String

The Provider's path to acquire a token.