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

Update manga info when browsing if not in library #958

Merged
merged 2 commits into from
Jun 7, 2024

Conversation

Syer10
Copy link
Collaborator

@Syer10 Syer10 commented Jun 3, 2024

Closes #957

this[MangaTable.thumbnail_url] = sManga.thumbnail_url
this[MangaTable.updateStrategy] = sManga.update_strategy.name
if (!sManga.thumbnail_url.isNullOrEmpty() && manga[MangaTable.thumbnail_url] != sManga.thumbnail_url) {
this[MangaTable.thumbnailUrlLastFetched] = Instant.now().epochSecond
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could Manga.clearThumbnail be called from here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably

if (!sManga.thumbnail_url.isNullOrEmpty() && manga[MangaTable.thumbnail_url] != sManga.thumbnail_url) {
this[MangaTable.thumbnailUrlLastFetched] = Instant.now().epochSecond
} else {
this[MangaTable.thumbnailUrlLastFetched] = manga[MangaTable.thumbnailUrlLastFetched]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it required to set the current value?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Batch update statements require that you set the same columns in every batch, so we need to set a MangaTable.thumbnailUrlLastFetched even if its the same value

@Syer10 Syer10 merged commit 306eb0e into Suwayomi:master Jun 7, 2024
2 checks passed
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.

[Bug] Suwayomi Database storing old metadata (bato source)
2 participants