Actually fix favorite entry parent versions

This commit is contained in:
Jobobby04 2023-05-13 12:06:02 -04:00
parent 912d2ecd62
commit 8c78ae48c1
3 changed files with 3 additions and 4 deletions

View File

@ -48,11 +48,11 @@ import tachiyomi.domain.manga.interactor.GetSearchMetadata
import tachiyomi.domain.manga.interactor.GetSearchTags
import tachiyomi.domain.manga.interactor.GetSearchTitles
import tachiyomi.domain.manga.interactor.InsertFavoriteEntries
import tachiyomi.domain.manga.interactor.InsertFavoriteEntryAlternative
import tachiyomi.domain.manga.interactor.InsertFlatMetadata
import tachiyomi.domain.manga.interactor.InsertMergedReference
import tachiyomi.domain.manga.interactor.SetCustomMangaInfo
import tachiyomi.domain.manga.interactor.SetMangaFilteredScanlators
import tachiyomi.domain.manga.interactor.InsertFavoriteEntryAlternative
import tachiyomi.domain.manga.interactor.UpdateMergedSettings
import tachiyomi.domain.manga.repository.CustomMangaRepository
import tachiyomi.domain.manga.repository.FavoritesEntryRepository

View File

@ -44,6 +44,5 @@ class FavoritesEntryRepositoryImpl(
} catch (e: Exception) {
logcat(LogPriority.INFO, e)
}
}
}

View File

@ -19,9 +19,9 @@ CREATE INDEX eh_favorites_alternatives_gid_token_index ON eh_favorites_alternati
CREATE INDEX eh_favorites_alternatives_other_gid_token_index ON eh_favorites_alternatives(otherGid, otherToken);
selectAll:
SELECT f.gid, f.token, f.title, f.category, a.otherGid, a.otherToken
SELECT coalesce(a.gid, f.gid), coalesce(a.token, f.token), f.title, f.category, a.otherGid, a.otherToken
FROM eh_favorites AS f
LEFT JOIN eh_favorites_alternatives AS a ON f.gid = a.gid AND f.token = a.token;
LEFT JOIN eh_favorites_alternatives AS a ON (f.gid = a.gid AND f.token = a.token) OR (f.gid = a.otherGid AND f.token = a.otherToken);
insertEhFavorites:
INSERT INTO eh_favorites (title, gid, token, category) VALUES (?, ?, ?, ?);