mirror of
https://github.com/bbara04/Purefin.git
synced 2026-03-31 17:10:08 +02:00
Added logic for Searching through available medias and basic ui
This commit is contained in:
@@ -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
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user