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

Card import duplicate on audio #3

Open
cd-FileX opened this issue Nov 23, 2023 · 6 comments
Open

Card import duplicate on audio #3

cd-FileX opened this issue Nov 23, 2023 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@cd-FileX
Copy link
Contributor

Sometimes seems not able to import card when audio is the first field. Being blocked by duplicate, though a duplicate card does not exist.

@tatsumoto-ren tatsumoto-ren added the help wanted Extra attention is needed label Nov 24, 2023
@tatsumoto-ren
Copy link
Member

Try to switch to a different note type. (Map to note type: ...)

@cd-FileX
Copy link
Contributor Author

I think I found the cause with that hint:
I got many note types pretty similar and I guess the mapping system sometimes doesn't get the small differences, choosing the wrong template. This ends up in cards missing their image or cards being marked as duplicate even though they are not.
I guess, the mapping system just takes the two names and checks if they are similar, so in this case it would have to be enhanced with, for ex. checking for specific field similarities on the new note type and the old note. Like is Japanese, has an image etc.

Also as another point it would be good to display available fields for all selectable note types.

@tatsumoto-ren
Copy link
Member

tatsumoto-ren commented Nov 26, 2023

When you select Map to note type:, the addon uses the exact note type you have selected (in the target collection). If the note type lacks some fields, the content in those fields is lost.

When you set it to None, it will try to find a note type with the exact same name and the exact same set of fields, and it will add a new note type if it can't find a matching note type.

@cd-FileX
Copy link
Contributor Author

cd-FileX commented Dec 6, 2023

Okay, makes sense.
The other thing is the model ID. As I'm also not too deep into those IDs, I wanted to ask if the IDs of two different models could be the same if they are just in 2 profiles?

@tatsumoto-ren
Copy link
Member

As far as I know nothing prevents two models in two different profiles from having the same ID.

@cd-FileX
Copy link
Contributor Author

cd-FileX commented Dec 6, 2023

So in that case, would'nt getting the model per ID have a high potential to fail?
Forget that, I forgot the addon is only taking that if it was specifically selected.
I'm still a bit confused how it failed to get the model correctly ones, but I'll add a pull request later which should make it at least a bit stronger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants