Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

cuong-tran
Copy link
Contributor

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

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
@AntsyLich
Copy link
Member

remove changelog update

@cuong-tran cuong-tran force-pushed the network-to-local-manga branch from eaa0944 to b8997ec Compare November 21, 2024 02:41
@AntsyLich
Copy link
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
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
Member

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

@cuong-tran
Copy link
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
Copy link
Contributor Author

cuong-tran commented Dec 3, 2024

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
Member

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

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