mirror of
https://github.com/bbara04/Purefin.git
synced 2026-07-23 19:26:50 +00:00
refactor: update image handling in Series dto to use imageUrlPrefix and JellyfinImageHelper
This commit is contained in:
@@ -451,10 +451,9 @@ class InMemoryAppContentRepository @Inject constructor(
|
||||
synopsis = this.overview ?: "No synopsis available",
|
||||
year = this.productionYear?.toString()
|
||||
?: this.premiereDate?.year?.toString().orEmpty(),
|
||||
heroImageUrl = JellyfinImageHelper.toImageUrl(
|
||||
imageUrlPrefix = JellyfinImageHelper.toPrefixImageUrl(
|
||||
url = serverUrl,
|
||||
itemId = this.id,
|
||||
type = ImageType.PRIMARY
|
||||
itemId = this.id
|
||||
),
|
||||
unwatchedEpisodeCount = this.userData!!.unplayedItemCount!!,
|
||||
seasonCount = this.childCount!!,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package hu.bbara.purefin.core.data.room.entity
|
||||
|
||||
import androidx.room.Entity
|
||||
import androidx.room.ForeignKey
|
||||
import androidx.room.Index
|
||||
import androidx.room.PrimaryKey
|
||||
import java.util.UUID
|
||||
@@ -16,7 +15,7 @@ data class SeriesEntity(
|
||||
val name: String,
|
||||
val synopsis: String,
|
||||
val year: String,
|
||||
val heroImageUrl: String,
|
||||
val imageUrlPrefix: String,
|
||||
val unwatchedEpisodeCount: Int,
|
||||
val seasonCount: Int
|
||||
)
|
||||
|
||||
@@ -23,7 +23,7 @@ import hu.bbara.purefin.core.data.room.entity.SmartDownloadEntity
|
||||
EpisodeEntity::class,
|
||||
SmartDownloadEntity::class,
|
||||
],
|
||||
version = 7,
|
||||
version = 8,
|
||||
exportSchema = false
|
||||
)
|
||||
@TypeConverters(UuidConverters::class)
|
||||
@@ -33,4 +33,4 @@ abstract class OfflineMediaDatabase : RoomDatabase() {
|
||||
abstract fun seasonDao(): SeasonDao
|
||||
abstract fun episodeDao(): EpisodeDao
|
||||
abstract fun smartDownloadDao(): SmartDownloadDao
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ class OfflineRoomMediaLocalDataSource(
|
||||
name = name,
|
||||
synopsis = synopsis,
|
||||
year = year,
|
||||
heroImageUrl = heroImageUrl,
|
||||
imageUrlPrefix = imageUrlPrefix,
|
||||
unwatchedEpisodeCount = unwatchedEpisodeCount,
|
||||
seasonCount = seasonCount
|
||||
)
|
||||
@@ -272,7 +272,7 @@ class OfflineRoomMediaLocalDataSource(
|
||||
name = name,
|
||||
synopsis = synopsis,
|
||||
year = year,
|
||||
heroImageUrl = heroImageUrl,
|
||||
imageUrlPrefix = imageUrlPrefix,
|
||||
unwatchedEpisodeCount = unwatchedEpisodeCount,
|
||||
seasonCount = seasonCount,
|
||||
seasons = seasons,
|
||||
@@ -305,4 +305,4 @@ class OfflineRoomMediaLocalDataSource(
|
||||
heroImageUrl = heroImageUrl,
|
||||
cast = emptyList()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ data class Series(
|
||||
val name: String,
|
||||
val synopsis: String,
|
||||
val year: String,
|
||||
val heroImageUrl: String,
|
||||
val imageUrlPrefix: String,
|
||||
val unwatchedEpisodeCount: Int,
|
||||
val seasonCount: Int,
|
||||
val seasons: List<Season>,
|
||||
|
||||
Reference in New Issue
Block a user