2022-04-24 14:35:59 -04:00
|
|
|
package eu.kanade.data.source
|
|
|
|
|
|
|
|
import eu.kanade.domain.source.model.Source
|
2022-06-14 09:10:40 -04:00
|
|
|
import eu.kanade.domain.source.model.SourceData
|
2022-04-24 14:35:59 -04:00
|
|
|
import eu.kanade.tachiyomi.source.CatalogueSource
|
2022-06-14 09:10:40 -04:00
|
|
|
import eu.kanade.tachiyomi.source.SourceManager
|
2022-04-24 14:35:59 -04:00
|
|
|
|
2022-04-27 08:36:16 -04:00
|
|
|
val sourceMapper: (eu.kanade.tachiyomi.source.Source) -> Source = { source ->
|
2022-04-24 14:35:59 -04:00
|
|
|
Source(
|
|
|
|
source.id,
|
|
|
|
source.lang,
|
|
|
|
source.name,
|
2022-06-14 09:10:40 -04:00
|
|
|
supportsLatest = false,
|
|
|
|
isStub = source is SourceManager.StubSource,
|
2022-04-24 14:35:59 -04:00
|
|
|
)
|
|
|
|
}
|
2022-04-27 08:36:16 -04:00
|
|
|
|
|
|
|
val catalogueSourceMapper: (CatalogueSource) -> Source = { source ->
|
|
|
|
sourceMapper(source).copy(supportsLatest = source.supportsLatest)
|
|
|
|
}
|
2022-06-14 09:10:40 -04:00
|
|
|
|
|
|
|
val sourceDataMapper: (Long, String, String) -> SourceData = { id, lang, name ->
|
|
|
|
SourceData(id, lang, name)
|
|
|
|
}
|