Closed gnattu closed 1 month ago
I am hoping that the goblin at apple who implemented SwiftData is having a bad day because I am getting some weird, obscure errors when running my migration. But I am confident that I will be able to solve soon, so I am pretty sure that we can use the new models for this. I added an enum to the track model with the filetypes in the PR, so we don't have to run another migration for this.
So it seems like SwiftData cannot cope with two models with the same name, even though they are in different containers. But the migration is working now.
I added an enum to the track model with the filetypes in the PR, so we don't have to run another migration for this.
Would adding new file type to the enum require extra migration? If it is the case then we can just use string i guess
The enum's raw value is a string so it makes no difference to the database. Adding new values doesn't require a migration.
Do you have an ETA for this? I really want to release the next version. It's no problem if it takes longer, I can create a new release for this PR.
It should due this weekend. I'm busy at bugfix for the Jellyfin server currently. Sorry for that.
Closed in favor of #47
This uses another
modelContainer
attached directly to the download manager. This avoids data migration and works with current data, which is good enough until we find a better data structure and/or Apple fixes their migration bug.Replaces #31