feat: 添加 SourceHandler 接口

This commit is contained in:
xiaji
2026-06-09 19:50:22 +08:00
parent 146fc9b8c4
commit 507e3fdbb4

View File

@@ -0,0 +1,19 @@
package com.videoapp.tv.engine
import com.videoapp.tv.data.SearchResult
interface SourceHandler {
val id: String
val displayName: String
val baseUrl: String
suspend fun search(
keyword: String,
onResult: suspend (List<SearchResult>) -> Unit,
onError: suspend (String) -> Unit
)
suspend fun extractVideos(detailUrl: String): List<PlaySource>
suspend fun resolvePlayUrl(playUrl: String): Pair<String?, String?>
}