mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-13 16:40:01 +00:00
Implement direct download via plugin
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package de.grimsi.gameyfin.pluginapi.download
|
||||
|
||||
import java.io.InputStream
|
||||
|
||||
sealed interface Download
|
||||
|
||||
data class FileDownload(
|
||||
val data: InputStream,
|
||||
val fileExtension: String? = null,
|
||||
val size: Long? = null
|
||||
) : Download
|
||||
|
||||
data class LinkDownload(
|
||||
val url: String
|
||||
) : Download
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package de.grimsi.gameyfin.pluginapi.download
|
||||
|
||||
import org.pf4j.ExtensionPoint
|
||||
import java.nio.file.Path
|
||||
|
||||
interface DownloadProvider : ExtensionPoint {
|
||||
|
||||
fun getDownloadSources(path: Path): Download
|
||||
}
|
||||
Reference in New Issue
Block a user