diff --git a/app/src/main/java/eu/kanade/domain/DomainModule.kt b/app/src/main/java/eu/kanade/domain/DomainModule.kt index f18dfe46e..55c9ea9c5 100644 --- a/app/src/main/java/eu/kanade/domain/DomainModule.kt +++ b/app/src/main/java/eu/kanade/domain/DomainModule.kt @@ -1,9 +1,7 @@ package eu.kanade.domain -import eu.kanade.data.chapter.ChapterRepositoryImpl import eu.kanade.data.source.SourceDataRepositoryImpl import eu.kanade.data.source.SourceRepositoryImpl -import eu.kanade.data.track.TrackRepositoryImpl import eu.kanade.domain.category.interactor.CreateCategoryWithName import eu.kanade.domain.category.interactor.DeleteCategory import eu.kanade.domain.category.interactor.GetCategories @@ -55,17 +53,19 @@ import eu.kanade.domain.track.interactor.DeleteTrack import eu.kanade.domain.track.interactor.GetTracks import eu.kanade.domain.track.interactor.GetTracksPerManga import eu.kanade.domain.track.interactor.InsertTrack -import eu.kanade.domain.track.repository.TrackRepository import eu.kanade.domain.updates.interactor.GetUpdates import tachiyomi.data.category.CategoryRepositoryImpl +import tachiyomi.data.chapter.ChapterRepositoryImpl import tachiyomi.data.history.HistoryRepositoryImpl import tachiyomi.data.manga.MangaRepositoryImpl +import tachiyomi.data.track.TrackRepositoryImpl import tachiyomi.data.updates.UpdatesRepositoryImpl import tachiyomi.domain.category.repository.CategoryRepository import tachiyomi.domain.chapter.repository.ChapterRepository import tachiyomi.domain.history.repository.HistoryRepository import tachiyomi.domain.manga.repository.MangaRepository import tachiyomi.domain.source.repository.SourceDataRepository +import tachiyomi.domain.track.repository.TrackRepository import tachiyomi.domain.updates.repository.UpdatesRepository import uy.kohesive.injekt.api.InjektModule import uy.kohesive.injekt.api.InjektRegistrar diff --git a/app/src/main/java/eu/kanade/domain/chapter/interactor/SyncChaptersWithSource.kt b/app/src/main/java/eu/kanade/domain/chapter/interactor/SyncChaptersWithSource.kt index 7093df5fc..c7a5f3ca9 100644 --- a/app/src/main/java/eu/kanade/domain/chapter/interactor/SyncChaptersWithSource.kt +++ b/app/src/main/java/eu/kanade/domain/chapter/interactor/SyncChaptersWithSource.kt @@ -1,7 +1,5 @@ package eu.kanade.domain.chapter.interactor -import eu.kanade.data.chapter.CleanupChapterName -import eu.kanade.data.chapter.NoChaptersException import eu.kanade.domain.chapter.model.copyFromSChapter import eu.kanade.domain.chapter.model.toSChapter import eu.kanade.domain.manga.interactor.UpdateManga @@ -13,7 +11,9 @@ import eu.kanade.tachiyomi.source.isLocal import eu.kanade.tachiyomi.source.model.SChapter import eu.kanade.tachiyomi.source.online.HttpSource import eu.kanade.tachiyomi.util.chapter.ChapterRecognition +import tachiyomi.data.chapter.ChapterSanitizer import tachiyomi.domain.chapter.model.Chapter +import tachiyomi.domain.chapter.model.NoChaptersException import tachiyomi.domain.chapter.model.toChapterUpdate import tachiyomi.domain.chapter.repository.ChapterRepository import tachiyomi.domain.manga.model.Manga @@ -55,7 +55,7 @@ class SyncChaptersWithSource( .mapIndexed { i, sChapter -> Chapter.create() .copyFromSChapter(sChapter) - .copy(name = CleanupChapterName.await(sChapter.name, manga.title)) + .copy(name = with(ChapterSanitizer) { sChapter.name.sanitize(manga.title) }) .copy(mangaId = manga.id, sourceOrder = i.toLong()) } diff --git a/app/src/main/java/eu/kanade/domain/chapter/interactor/SyncChaptersWithTrackServiceTwoWay.kt b/app/src/main/java/eu/kanade/domain/chapter/interactor/SyncChaptersWithTrackServiceTwoWay.kt index 449534a14..513b1c2eb 100644 --- a/app/src/main/java/eu/kanade/domain/chapter/interactor/SyncChaptersWithTrackServiceTwoWay.kt +++ b/app/src/main/java/eu/kanade/domain/chapter/interactor/SyncChaptersWithTrackServiceTwoWay.kt @@ -1,13 +1,13 @@ package eu.kanade.domain.chapter.interactor import eu.kanade.domain.track.interactor.InsertTrack -import eu.kanade.domain.track.model.Track import eu.kanade.domain.track.model.toDbTrack import eu.kanade.tachiyomi.data.track.TrackService import eu.kanade.tachiyomi.util.system.logcat import logcat.LogPriority import tachiyomi.domain.chapter.model.Chapter import tachiyomi.domain.chapter.model.toChapterUpdate +import tachiyomi.domain.track.model.Track import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get diff --git a/app/src/main/java/eu/kanade/domain/track/interactor/DeleteTrack.kt b/app/src/main/java/eu/kanade/domain/track/interactor/DeleteTrack.kt index f7e608089..970dc864e 100644 --- a/app/src/main/java/eu/kanade/domain/track/interactor/DeleteTrack.kt +++ b/app/src/main/java/eu/kanade/domain/track/interactor/DeleteTrack.kt @@ -1,8 +1,8 @@ package eu.kanade.domain.track.interactor -import eu.kanade.domain.track.repository.TrackRepository import eu.kanade.tachiyomi.util.system.logcat import logcat.LogPriority +import tachiyomi.domain.track.repository.TrackRepository class DeleteTrack( private val trackRepository: TrackRepository, diff --git a/app/src/main/java/eu/kanade/domain/track/interactor/GetTracks.kt b/app/src/main/java/eu/kanade/domain/track/interactor/GetTracks.kt index 1c35e8852..f02c96266 100644 --- a/app/src/main/java/eu/kanade/domain/track/interactor/GetTracks.kt +++ b/app/src/main/java/eu/kanade/domain/track/interactor/GetTracks.kt @@ -1,10 +1,10 @@ package eu.kanade.domain.track.interactor -import eu.kanade.domain.track.model.Track -import eu.kanade.domain.track.repository.TrackRepository import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.flow.Flow import logcat.LogPriority +import tachiyomi.domain.track.model.Track +import tachiyomi.domain.track.repository.TrackRepository class GetTracks( private val trackRepository: TrackRepository, diff --git a/app/src/main/java/eu/kanade/domain/track/interactor/GetTracksPerManga.kt b/app/src/main/java/eu/kanade/domain/track/interactor/GetTracksPerManga.kt index 3d6157e48..4a0ba6007 100644 --- a/app/src/main/java/eu/kanade/domain/track/interactor/GetTracksPerManga.kt +++ b/app/src/main/java/eu/kanade/domain/track/interactor/GetTracksPerManga.kt @@ -1,8 +1,8 @@ package eu.kanade.domain.track.interactor -import eu.kanade.domain.track.repository.TrackRepository import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.map +import tachiyomi.domain.track.repository.TrackRepository class GetTracksPerManga( private val trackRepository: TrackRepository, diff --git a/app/src/main/java/eu/kanade/domain/track/interactor/InsertTrack.kt b/app/src/main/java/eu/kanade/domain/track/interactor/InsertTrack.kt index b1add2fda..3da31e58f 100644 --- a/app/src/main/java/eu/kanade/domain/track/interactor/InsertTrack.kt +++ b/app/src/main/java/eu/kanade/domain/track/interactor/InsertTrack.kt @@ -1,9 +1,9 @@ package eu.kanade.domain.track.interactor -import eu.kanade.domain.track.model.Track -import eu.kanade.domain.track.repository.TrackRepository import eu.kanade.tachiyomi.util.system.logcat import logcat.LogPriority +import tachiyomi.domain.track.model.Track +import tachiyomi.domain.track.repository.TrackRepository class InsertTrack( private val trackRepository: TrackRepository, diff --git a/app/src/main/java/eu/kanade/domain/track/model/Track.kt b/app/src/main/java/eu/kanade/domain/track/model/Track.kt index 5fa87b16d..f9712b698 100644 --- a/app/src/main/java/eu/kanade/domain/track/model/Track.kt +++ b/app/src/main/java/eu/kanade/domain/track/model/Track.kt @@ -1,31 +1,16 @@ package eu.kanade.domain.track.model +import tachiyomi.domain.track.model.Track import eu.kanade.tachiyomi.data.database.models.Track as DbTrack -data class Track( - val id: Long, - val mangaId: Long, - val syncId: Long, - val remoteId: Long, - val libraryId: Long?, - val title: String, - val lastChapterRead: Double, - val totalChapters: Long, - val status: Long, - val score: Float, - val remoteUrl: String, - val startDate: Long, - val finishDate: Long, -) { - fun copyPersonalFrom(other: Track): Track { - return this.copy( - lastChapterRead = other.lastChapterRead, - score = other.score, - status = other.status, - startDate = other.startDate, - finishDate = other.finishDate, - ) - } +fun Track.copyPersonalFrom(other: Track): Track { + return this.copy( + lastChapterRead = other.lastChapterRead, + score = other.score, + status = other.status, + startDate = other.startDate, + finishDate = other.finishDate, + ) } fun Track.toDbTrack(): DbTrack = DbTrack.create(syncId).also { diff --git a/app/src/main/java/eu/kanade/domain/track/store/DelayedTrackingStore.kt b/app/src/main/java/eu/kanade/domain/track/store/DelayedTrackingStore.kt index a973da02e..4d346706c 100644 --- a/app/src/main/java/eu/kanade/domain/track/store/DelayedTrackingStore.kt +++ b/app/src/main/java/eu/kanade/domain/track/store/DelayedTrackingStore.kt @@ -2,9 +2,9 @@ package eu.kanade.domain.track.store import android.content.Context import androidx.core.content.edit -import eu.kanade.domain.track.model.Track import eu.kanade.tachiyomi.util.system.logcat import logcat.LogPriority +import tachiyomi.domain.track.model.Track class DelayedTrackingStore(context: Context) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt index 081c6c4ae..b73e6a641 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt @@ -6,7 +6,6 @@ import android.content.Intent import android.os.IBinder import android.os.PowerManager import androidx.core.content.ContextCompat -import eu.kanade.data.chapter.NoChaptersException import eu.kanade.domain.category.interactor.GetCategories import eu.kanade.domain.chapter.interactor.GetChapterByMangaId import eu.kanade.domain.chapter.interactor.SyncChaptersWithSource @@ -64,6 +63,7 @@ import kotlinx.coroutines.sync.withPermit import logcat.LogPriority import tachiyomi.domain.category.model.Category import tachiyomi.domain.chapter.model.Chapter +import tachiyomi.domain.chapter.model.NoChaptersException import tachiyomi.domain.library.model.LibraryManga import tachiyomi.domain.manga.model.Manga import tachiyomi.domain.manga.model.toMangaUpdate diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/EnhancedTrackService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/EnhancedTrackService.kt index f49fcc530..75245cf80 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/EnhancedTrackService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/EnhancedTrackService.kt @@ -1,9 +1,9 @@ package eu.kanade.tachiyomi.data.track -import eu.kanade.domain.track.model.Track import eu.kanade.tachiyomi.data.track.model.TrackSearch import eu.kanade.tachiyomi.source.Source import tachiyomi.domain.manga.model.Manga +import tachiyomi.domain.track.model.Track /** * An Enhanced Track Service will never prompt the user to match a manga with the remote. diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/TrackService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/TrackService.kt index 422f0d3ba..27f81f80a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/TrackService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/TrackService.kt @@ -24,7 +24,7 @@ import okhttp3.OkHttpClient import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get import uy.kohesive.injekt.injectLazy -import eu.kanade.domain.track.model.Track as DomainTrack +import tachiyomi.domain.track.model.Track as DomainTrack abstract class TrackService(val id: Long) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt index 07e7e481e..1faae7b3a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.decodeFromString import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json import uy.kohesive.injekt.injectLazy -import eu.kanade.domain.track.model.Track as DomainTrack +import tachiyomi.domain.track.model.Track as DomainTrack class Anilist(private val context: Context, id: Long) : TrackService(id) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/kavita/Kavita.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/kavita/Kavita.kt index 1e029c2b1..e242f0da3 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/kavita/Kavita.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/kavita/Kavita.kt @@ -12,7 +12,7 @@ import eu.kanade.tachiyomi.data.track.model.TrackSearch import eu.kanade.tachiyomi.source.Source import tachiyomi.domain.manga.model.Manga import java.security.MessageDigest -import eu.kanade.domain.track.model.Track as DomainTrack +import tachiyomi.domain.track.model.Track as DomainTrack class Kavita(private val context: Context, id: Long) : TrackService(id), EnhancedTrackService { diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/Komga.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/Komga.kt index c9ca49065..5a7671ee4 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/Komga.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/Komga.kt @@ -12,7 +12,7 @@ import eu.kanade.tachiyomi.source.Source import okhttp3.Dns import okhttp3.OkHttpClient import tachiyomi.domain.manga.model.Manga -import eu.kanade.domain.track.model.Track as DomainTrack +import tachiyomi.domain.track.model.Track as DomainTrack class Komga(private val context: Context, id: Long) : TrackService(id), EnhancedTrackService { diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/suwayomi/Suwayomi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/suwayomi/Suwayomi.kt index bbc9407f4..367a6cf41 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/suwayomi/Suwayomi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/suwayomi/Suwayomi.kt @@ -9,8 +9,8 @@ import eu.kanade.tachiyomi.data.track.EnhancedTrackService import eu.kanade.tachiyomi.data.track.TrackService import eu.kanade.tachiyomi.data.track.model.TrackSearch import eu.kanade.tachiyomi.source.Source -import eu.kanade.domain.track.model.Track as DomainTrack import tachiyomi.domain.manga.model.Manga as DomainManga +import tachiyomi.domain.track.model.Track as DomainTrack class Suwayomi(private val context: Context, id: Long) : TrackService(id), EnhancedTrackService { val api by lazy { TachideskApi() } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt index c2765471d..91cd483ce 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt @@ -12,7 +12,6 @@ import eu.kanade.core.prefs.CheckboxState import eu.kanade.core.prefs.asState import eu.kanade.core.prefs.mapAsCheckboxState import eu.kanade.core.util.addOrRemove -import eu.kanade.data.chapter.NoChaptersException import eu.kanade.domain.category.interactor.GetCategories import eu.kanade.domain.category.interactor.SetMangaCategories import eu.kanade.domain.chapter.interactor.SetMangaDefaultChapterFlags @@ -70,6 +69,7 @@ import logcat.LogPriority import tachiyomi.domain.category.model.Category import tachiyomi.domain.chapter.model.Chapter import tachiyomi.domain.chapter.model.ChapterUpdate +import tachiyomi.domain.chapter.model.NoChaptersException import tachiyomi.domain.manga.model.Manga import tachiyomi.domain.manga.model.TriStateFilter import uy.kohesive.injekt.Injekt diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackInfoDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackInfoDialog.kt index 8be920a43..5ff5c0af5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackInfoDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackInfoDialog.kt @@ -245,7 +245,7 @@ data class TrackInfoDialogHomeScreen( } } - private fun List.mapToTrackItem(): List { + private fun List.mapToTrackItem(): List { val dbTracks = map { it.toDbTrack() } val loggedServices = Injekt.get().services.filter { it.isLogged } val source = Injekt.get().getOrStub(sourceId) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/stats/StatsScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/stats/StatsScreenModel.kt index 924f85773..7a53e046e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/stats/StatsScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/stats/StatsScreenModel.kt @@ -12,7 +12,6 @@ import eu.kanade.domain.library.service.LibraryPreferences import eu.kanade.domain.manga.interactor.GetLibraryManga import eu.kanade.domain.manga.model.isLocal import eu.kanade.domain.track.interactor.GetTracks -import eu.kanade.domain.track.model.Track import eu.kanade.presentation.more.stats.StatsScreenState import eu.kanade.presentation.more.stats.data.StatsData import eu.kanade.tachiyomi.data.download.DownloadManager @@ -24,6 +23,7 @@ import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.util.lang.launchIO import kotlinx.coroutines.flow.update import tachiyomi.domain.library.model.LibraryManga +import tachiyomi.domain.track.model.Track import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get diff --git a/app/src/main/java/eu/kanade/data/chapter/ChapterMapper.kt b/data/src/main/java/tachiyomi/data/chapter/ChapterMapper.kt similarity index 95% rename from app/src/main/java/eu/kanade/data/chapter/ChapterMapper.kt rename to data/src/main/java/tachiyomi/data/chapter/ChapterMapper.kt index 037275243..7b1888205 100644 --- a/app/src/main/java/eu/kanade/data/chapter/ChapterMapper.kt +++ b/data/src/main/java/tachiyomi/data/chapter/ChapterMapper.kt @@ -1,4 +1,4 @@ -package eu.kanade.data.chapter +package tachiyomi.data.chapter import tachiyomi.domain.chapter.model.Chapter diff --git a/app/src/main/java/eu/kanade/data/chapter/ChapterRepositoryImpl.kt b/data/src/main/java/tachiyomi/data/chapter/ChapterRepositoryImpl.kt similarity index 99% rename from app/src/main/java/eu/kanade/data/chapter/ChapterRepositoryImpl.kt rename to data/src/main/java/tachiyomi/data/chapter/ChapterRepositoryImpl.kt index 0f0f62c18..259787466 100644 --- a/app/src/main/java/eu/kanade/data/chapter/ChapterRepositoryImpl.kt +++ b/data/src/main/java/tachiyomi/data/chapter/ChapterRepositoryImpl.kt @@ -1,4 +1,4 @@ -package eu.kanade.data.chapter +package tachiyomi.data.chapter import eu.kanade.tachiyomi.util.system.logcat import eu.kanade.tachiyomi.util.toLong diff --git a/app/src/main/java/eu/kanade/data/chapter/CleanupChapterName.kt b/data/src/main/java/tachiyomi/data/chapter/ChapterSanitizer.kt similarity index 76% rename from app/src/main/java/eu/kanade/data/chapter/CleanupChapterName.kt rename to data/src/main/java/tachiyomi/data/chapter/ChapterSanitizer.kt index 12ce6b298..ee1b3d698 100644 --- a/app/src/main/java/eu/kanade/data/chapter/CleanupChapterName.kt +++ b/data/src/main/java/tachiyomi/data/chapter/ChapterSanitizer.kt @@ -1,11 +1,10 @@ -package eu.kanade.data.chapter +package tachiyomi.data.chapter -object CleanupChapterName { +object ChapterSanitizer { - fun await(chapterName: String, mangaTitle: String): String { - return chapterName - .trim() - .removePrefix(mangaTitle) + fun String.sanitize(title: String): String { + return trim() + .removePrefix(title) .trim(*CHAPTER_TRIM_CHARS) } diff --git a/app/src/main/java/eu/kanade/data/track/TrackMapper.kt b/data/src/main/java/tachiyomi/data/track/TrackMapper.kt similarity index 90% rename from app/src/main/java/eu/kanade/data/track/TrackMapper.kt rename to data/src/main/java/tachiyomi/data/track/TrackMapper.kt index d6f4bd181..d08a8b9a5 100644 --- a/app/src/main/java/eu/kanade/data/track/TrackMapper.kt +++ b/data/src/main/java/tachiyomi/data/track/TrackMapper.kt @@ -1,6 +1,6 @@ -package eu.kanade.data.track +package tachiyomi.data.track -import eu.kanade.domain.track.model.Track +import tachiyomi.domain.track.model.Track val trackMapper: (Long, Long, Long, Long, Long?, String, Double, Long, Long, Float, String, Long, Long) -> Track = { id, mangaId, syncId, remoteId, libraryId, title, lastChapterRead, totalChapters, status, score, remoteUrl, startDate, finishDate -> diff --git a/app/src/main/java/eu/kanade/data/track/TrackRepositoryImpl.kt b/data/src/main/java/tachiyomi/data/track/TrackRepositoryImpl.kt similarity index 94% rename from app/src/main/java/eu/kanade/data/track/TrackRepositoryImpl.kt rename to data/src/main/java/tachiyomi/data/track/TrackRepositoryImpl.kt index 56c13a860..0643c5c30 100644 --- a/app/src/main/java/eu/kanade/data/track/TrackRepositoryImpl.kt +++ b/data/src/main/java/tachiyomi/data/track/TrackRepositoryImpl.kt @@ -1,9 +1,9 @@ -package eu.kanade.data.track +package tachiyomi.data.track -import eu.kanade.domain.track.model.Track -import eu.kanade.domain.track.repository.TrackRepository import kotlinx.coroutines.flow.Flow import tachiyomi.data.DatabaseHandler +import tachiyomi.domain.track.model.Track +import tachiyomi.domain.track.repository.TrackRepository class TrackRepositoryImpl( private val handler: DatabaseHandler, diff --git a/app/src/main/java/eu/kanade/data/chapter/NoChaptersException.kt b/domain/src/main/java/tachiyomi/domain/chapter/model/NoChaptersException.kt similarity index 51% rename from app/src/main/java/eu/kanade/data/chapter/NoChaptersException.kt rename to domain/src/main/java/tachiyomi/domain/chapter/model/NoChaptersException.kt index f532f650a..bf21b0ffd 100644 --- a/app/src/main/java/eu/kanade/data/chapter/NoChaptersException.kt +++ b/domain/src/main/java/tachiyomi/domain/chapter/model/NoChaptersException.kt @@ -1,3 +1,3 @@ -package eu.kanade.data.chapter +package tachiyomi.domain.chapter.model class NoChaptersException : Exception() diff --git a/domain/src/main/java/tachiyomi/domain/track/model/Track.kt b/domain/src/main/java/tachiyomi/domain/track/model/Track.kt new file mode 100644 index 000000000..e3af5b7f7 --- /dev/null +++ b/domain/src/main/java/tachiyomi/domain/track/model/Track.kt @@ -0,0 +1,17 @@ +package tachiyomi.domain.track.model + +data class Track( + val id: Long, + val mangaId: Long, + val syncId: Long, + val remoteId: Long, + val libraryId: Long?, + val title: String, + val lastChapterRead: Double, + val totalChapters: Long, + val status: Long, + val score: Float, + val remoteUrl: String, + val startDate: Long, + val finishDate: Long, +) diff --git a/app/src/main/java/eu/kanade/domain/track/repository/TrackRepository.kt b/domain/src/main/java/tachiyomi/domain/track/repository/TrackRepository.kt similarity index 83% rename from app/src/main/java/eu/kanade/domain/track/repository/TrackRepository.kt rename to domain/src/main/java/tachiyomi/domain/track/repository/TrackRepository.kt index 75602e902..1edd76fdf 100644 --- a/app/src/main/java/eu/kanade/domain/track/repository/TrackRepository.kt +++ b/domain/src/main/java/tachiyomi/domain/track/repository/TrackRepository.kt @@ -1,7 +1,7 @@ -package eu.kanade.domain.track.repository +package tachiyomi.domain.track.repository -import eu.kanade.domain.track.model.Track import kotlinx.coroutines.flow.Flow +import tachiyomi.domain.track.model.Track interface TrackRepository {