Added logic for Searching through available medias and basic ui

This commit is contained in:
2026-03-26 22:22:56 +01:00
parent f91c2f88a1
commit 9eccf859bc
7 changed files with 220 additions and 19 deletions

View File

@@ -0,0 +1,31 @@
package hu.bbara.purefin.core.model
import org.jellyfin.sdk.model.UUID
import org.jellyfin.sdk.model.api.BaseItemKind
data class SearchResult(
val id: UUID,
val title: String,
val posterUrl: String,
val type: BaseItemKind,
) {
companion object {
fun create(movie: Movie, imageUrl: String) : SearchResult {
return SearchResult(
id = movie.id,
title = movie.title,
posterUrl = imageUrl,
type = BaseItemKind.MOVIE
)
}
fun create(series: Series, imageUrl: String) : SearchResult {
return SearchResult(
id = series.id,
title = series.name,
posterUrl = imageUrl,
type = BaseItemKind.MOVIE
)
}
}
}