Move more repositories to domain module

This commit is contained in:
Jobobby04
2023-02-09 15:10:37 -05:00
parent ab0995ab9f
commit dd62337ad6
71 changed files with 110 additions and 110 deletions
+3 -3
View File
@@ -42,9 +42,6 @@ import eu.kanade.tachiyomi.util.system.DeviceUtil
import eu.kanade.tachiyomi.util.system.logcat
import exh.eh.EHentaiUpdateWorker
import exh.log.xLogE
import exh.merged.sql.models.MergedMangaReference
import exh.savedsearches.models.FeedSavedSearch
import exh.savedsearches.models.SavedSearch
import exh.source.BlacklistedSources
import exh.source.EH_SOURCE_ID
import exh.source.HBROWSE_SOURCE_ID
@@ -66,6 +63,9 @@ import tachiyomi.data.DatabaseHandler
import tachiyomi.data.category.categoryMapper
import tachiyomi.domain.chapter.model.ChapterUpdate
import tachiyomi.domain.manga.model.MangaUpdate
import tachiyomi.domain.manga.model.MergedMangaReference
import tachiyomi.domain.source.model.FeedSavedSearch
import tachiyomi.domain.source.model.SavedSearch
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
import uy.kohesive.injekt.injectLazy
@@ -24,7 +24,6 @@ import exh.GalleryAddEvent
import exh.GalleryAdder
import exh.eh.EHentaiThrottleManager
import exh.eh.EHentaiUpdateWorker
import exh.favorites.sql.models.FavoriteEntry
import exh.log.xLog
import exh.source.EH_SOURCE_ID
import exh.source.EXH_SOURCE_ID
@@ -39,6 +38,7 @@ import okhttp3.FormBody
import okhttp3.Request
import tachiyomi.domain.category.model.Category
import tachiyomi.domain.category.model.CategoryUpdate
import tachiyomi.domain.manga.model.FavoriteEntry
import tachiyomi.domain.manga.model.Manga
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
@@ -7,7 +7,6 @@ import eu.kanade.domain.manga.interactor.GetFavorites
import eu.kanade.domain.manga.interactor.InsertFavoriteEntries
import eu.kanade.domain.manga.model.toDomainManga
import eu.kanade.tachiyomi.source.online.all.EHentai
import exh.favorites.sql.models.FavoriteEntry
import exh.metadata.metadata.EHentaiSearchMetadata
import exh.source.EXH_SOURCE_ID
import exh.source.isEhBasedManga
@@ -18,6 +17,7 @@ import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.mapNotNull
import kotlinx.coroutines.flow.toList
import tachiyomi.domain.category.model.Category
import tachiyomi.domain.manga.model.FavoriteEntry
import tachiyomi.domain.manga.model.Manga
import uy.kohesive.injekt.injectLazy
@@ -1,17 +0,0 @@
package exh.favorites.sql.models
import exh.metadata.metadata.EHentaiSearchMetadata
data class FavoriteEntry(
val id: Long? = null,
val title: String,
val gid: String,
val token: String,
val category: Int = -1,
) {
fun getUrl() = EHentaiSearchMetadata.idAndTokenToUrl(gid, token)
}
@@ -1,44 +0,0 @@
package exh.merged.sql.models
data class MergedMangaReference(
// Tag identifier, unique
val id: Long,
// The manga where it grabs the updated manga info
val isInfoManga: Boolean,
// If false the manga will not grab chapter updates
val getChapterUpdates: Boolean,
// The mode in which the chapters are handeled, only set in the main merge reference
val chapterSortMode: Int,
// chapter priority the deduplication uses
val chapterPriority: Int,
// Set if you want it to download new chapters
val downloadChapters: Boolean,
// merged manga this reference is attached to
val mergeId: Long?,
// merged manga url this reference is attached to
val mergeUrl: String,
// manga id included in the merge this reference is attached to
val mangaId: Long?,
// manga url included in the merge this reference is attached to
val mangaUrl: String,
// source of the manga that is merged into this merge
val mangaSourceId: Long,
) {
companion object {
const val CHAPTER_SORT_NONE = 0
const val CHAPTER_SORT_NO_DEDUPE = 1
const val CHAPTER_SORT_PRIORITY = 2
const val CHAPTER_SORT_MOST_CHAPTERS = 3
const val CHAPTER_SORT_HIGHEST_CHAPTER_NUMBER = 4
}
}
@@ -1,10 +0,0 @@
package exh.savedsearches
import eu.kanade.tachiyomi.source.model.FilterList
data class EXHSavedSearch(
val id: Long,
val name: String,
val query: String,
val filterList: FilterList?,
)
@@ -1,15 +0,0 @@
package exh.savedsearches.models
data class FeedSavedSearch(
// Tag identifier, unique
val id: Long,
// Source for the saved search
val source: Long,
// If -1 then get latest, if set get the saved search
val savedSearch: Long?,
// If the feed is a global or source specific feed
val global: Boolean,
)
@@ -1,18 +0,0 @@
package exh.savedsearches.models
data class SavedSearch(
// Tag identifier, unique
val id: Long,
// The source the saved search is for
val source: Long,
// If false the manga will not grab chapter updates
val name: String,
// The query if there is any
val query: String?,
// The filter list
val filtersJson: String?,
)