Skip to content

Always update fresh data from source if manga isn't favorited - #1435

Closed
cuong-tran wants to merge 7 commits into
mihonapp:mainfrom
cuong-tran:network-to-local-manga
Closed

Always update fresh data from source if manga isn't favorited#1435
cuong-tran wants to merge 7 commits into
mihonapp:mainfrom
cuong-tran:network-to-local-manga

Conversation

@cuong-tran

@cuong-tran cuong-tran commented Nov 2, 2024

Copy link
Copy Markdown
Contributor

while browsing source, new data (title, cover...) will be updated to db if it isn't favorited yet

Closes #923

@cuong-tran
cuong-tran marked this pull request as draft November 2, 2024 18:10
@cuong-tran cuong-tran changed the title Cleanup usage of NetworkToLocalManga Always update fresh data from source if manga isn't favorited Nov 2, 2024
@cuong-tran
cuong-tran marked this pull request as ready for review November 2, 2024 19:02
Comment thread domain/src/main/java/tachiyomi/domain/manga/interactor/NetworkToLocalManga.kt Outdated
@AntsyLich

Copy link
Copy Markdown
Member

remove changelog update

Comment thread domain/src/main/java/tachiyomi/domain/manga/interactor/NetworkToLocalManga.kt Outdated
@cuong-tran
cuong-tran force-pushed the network-to-local-manga branch from eaa0944 to b8997ec Compare November 21, 2024 02:41
Comment thread domain/src/main/java/tachiyomi/domain/manga/interactor/NetworkToLocalManga.kt Outdated
@AntsyLich

Copy link
Copy Markdown
Member

What happens if you have a 'initialized' non library entry loaded with full data but while browsing source returns a not 'initialized' data 🤔

@cuong-tran

Copy link
Copy Markdown
Contributor Author

What happens if you have a 'initialized' non library entry loaded with full data but while browsing source returns a not 'initialized' data 🤔

'initialized' is being used to make app check for manga's detail. If a 'initialized' non-library entry loaded with full data while source returns a not 'initialized' will make app auto refresh tags/descriptions/author... again when user decides to open the entry. Pretty mush like pull-refresh every time he open that entry (except for not checking chapters).

I think this will be useful too, since a non-library entry can also updates its details information.
Or we can skip overwriting 'initialized' to avoid that.

@AntsyLich

Copy link
Copy Markdown
Member

If the browse manga is initialized update everything otherwise only update the title and thumbnail

@cuong-tran

Copy link
Copy Markdown
Contributor Author

If the browse manga is initialized update everything otherwise only update the title and thumbnail

although I made the change as per your request but I don't really get it though. When browsing, an non-initialized manga would also only has title & cover available, the rest are null. And null value won't overwrite already existed data of database's entries.

@cuong-tran
cuong-tran marked this pull request as draft December 3, 2024 16:11
@cuong-tran

cuong-tran commented Dec 3, 2024

Copy link
Copy Markdown
Contributor Author

This seems cause performance issue while browsing caused by database overwrite. Need to find another way.

Maybe, only use new info for display without updating database while browsing. And only update database on manga opening or manual refresh manga. How about that?

@AntsyLich

Copy link
Copy Markdown
Member

i guess keep this draft until the db rework (#1195)

@AntsyLich

Copy link
Copy Markdown
Member

Superseded by #1967

@AntsyLich AntsyLich closed this Apr 4, 2025
@cuong-tran
cuong-tran deleted the network-to-local-manga branch April 9, 2025 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prefer new data from source instead of db when browsing

2 participants