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

Add information about last time manga and chapters were fetched from source #431

Merged

Conversation

martinek
Copy link
Contributor

This PR fixes #428. It contains:

  • migration to add columns on manga where data will be stored
  • changes to add new columns to API
  • changes to update the data when manga / chapters are fetched from source
  • "virtual" properties on manga to show calculated age of data in API

I am not sure about the way age is calculated, but I could not figure out, better way to do that.

Copy link
Member

@AriaMoradi AriaMoradi left a comment

Choose a reason for hiding this comment

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

@martinek
Copy link
Contributor Author

You could merge the two migrations into one by writing a sql migraion https://github.com/Suwayomi/exposed-migrations/blob/master/lib/src/main/kotlin/de/neonew/exposed/migrations/helpers/AddColumnMigration.kt

Is that better then using helper from library though? If there was helper for multiple columns, that would be better, but custom SQL for something that can be done with lib feels less safe to me.

@AriaMoradi
Copy link
Member

If there was helper for multiple columns, that would be better

Well, If you are uncomfortable with doing a direct SQL Migration, make a PR to the migration lib, we own it.

@martinek
Copy link
Contributor Author

I have added the custom sql migration.

@AriaMoradi AriaMoradi merged commit 0fa2834 into Suwayomi:master Oct 30, 2022
@martinek martinek deleted the feature/last-fetched-at-columns-on-manga branch October 30, 2022 16:59
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.

[Feature Request] Store and serve timestamp of last data fetch
3 participants