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

Edit basic Manga information #398

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

Splintorien
Copy link
Contributor

Closes #5

@Splintorien Splintorien changed the title Edit basic Manga information (#5) Edit basic Manga information Feb 14, 2024
@MajorTanya
Copy link
Contributor

Consider adding more fields, like “About”, “Author”, and “Artist” provided the code doesn’t get too complicated.

Author, Artist, and Description are in PR already, or are you asking for other fields beyond those?

@Xori71
Copy link

Xori71 commented Feb 15, 2024

Consider adding more fields, like “About”, “Author”, and “Artist” provided the code doesn’t get too complicated.

Author, Artist, and Description are in PR already, or are you asking for other fields beyond those?

Yeah, just saw it. I’m sleepy and I missed them before. I will delete the reply, my bad!

@Splintorien
Copy link
Contributor Author

Commit a745753 has a build error but I still pushed if anyone has an idea of why this is happening. I added a LEFT JOIN and some coalesce to give priority to the fields in the table mangas_edits, but there is an extra parameter of the Manga type that seems to be passed to the mapper

mihon/data/src/main/java/tachiyomi/data/manga/MangaRepositoryImpl.kt:19:66 Type mismatch: inferred type is

KFunction22<Long, Long, String, String?, String?, String?, List<String>?, String, Long, String?, Boolean, Long?, Long?, Boolean, Long, Long, Long, Long, UpdateStrategy, Long, Long, Long?, Manga>

but (Long, String?, String?, String?, String, Long, String, List<String>?, Long, String?, Boolean, Long?, Long?, Boolean, Long, Long, Long, Long, UpdateStrategy, Long, Long, Long?) -> TypeVariable(T) was expected

@Syer10
Copy link

Syer10 commented Feb 15, 2024

Its not worth using coalesce since we would have to modify each and every database query. Take a look at how this fork does it(og field, edited field, and the standard field that takes the edited field when its not null).
https://github.com/jobobby04/TachiyomiSY/blob/master/domain/src/main/java/tachiyomi/domain/manga/model/Manga.kt

Also don't make it a new table, add the columns to the manga table. since there is only going to be 1 edit row per manga row.

@MajorTanya
Copy link
Contributor

I believe they're using a table because that's what AntsyLich suggested in the server

@Syer10
Copy link

Syer10 commented Feb 15, 2024

Its not worth using a table, it will just make it difficult in the long run. Columns are much easier to manage for info that needs to be attached directly to 1 object

@Splintorien Splintorien marked this pull request as ready for review February 15, 2024 21:02
@imkunet imkunet mentioned this pull request Feb 19, 2024
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.

Manga info editor
4 participants