[Group] Jellyfin.db EFCore refactor bugs & issues #6474

Open
opened 2026-02-07 03:41:44 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @JPVenson on GitHub (Nov 17, 2024).

Originally assigned to: @JPVenson on GitHub.

This is the group issue for Bugs releated to the refactor of library.db into the jellyfin.db.

Originally created by @JPVenson on GitHub (Nov 17, 2024). Originally assigned to: @JPVenson on GitHub. This is the group issue for Bugs releated to [the refactor of library.db into the jellyfin.db](https://github.com/jellyfin/jellyfin/pull/12798).
OVERLORD added the roadmaphelp wantedrelease criticalarea:databaseEFjellyfin.db labels 2026-02-07 03:41:44 +03:00
Author
Owner

@crobibero commented on GitHub (Nov 24, 2024):

  • LiveTV program ChannelIds are saved as Guid.ToString("D") but then queried as Guid.ToString("N"). Consider changing the BaseItemEntity.ChannelId to be a Guid instead of string
  • Unable to view Episodes when going Show -> Season for migrated shows. New shows seem to be linked correctly. If you go to an episode view you can navigate back to its parent season
@crobibero commented on GitHub (Nov 24, 2024): - [x] LiveTV program ChannelIds are saved as `Guid.ToString("D")` but then queried as `Guid.ToString("N")`. Consider changing the `BaseItemEntity.ChannelId` to be a `Guid` instead of `string` - [ ] Unable to view Episodes when going Show -> Season for migrated shows. New shows seem to be linked correctly. If you go to an episode view you can navigate back to its parent season
Author
Owner

@gnattu commented on GitHub (Nov 24, 2024):

  • LiveTV program ChannelIds are saved as Guid.ToString("D") but then queried as Guid.ToString("N"). Consider changing the BaseItemEntity.ChannelId to be a Guid instead of string[ ] Unable to view Episodes when going Show -> Season for migrated shows. New shows seem to be linked correctly. If you go to an episode view you can navigate back to its parent season

Can’t really use guid for channel id for LiveTV because some LiveTV plugins will not generate valid channel ID because it was not required to be a guid, and this field may be very hard to migrate for those plugins.

@gnattu commented on GitHub (Nov 24, 2024): > * [ ] LiveTV program ChannelIds are saved as `Guid.ToString("D")` but then queried as `Guid.ToString("N")`. Consider changing the `BaseItemEntity.ChannelId` to be a `Guid` instead of `string`[ ] Unable to view Episodes when going Show -> Season for migrated shows. New shows seem to be linked correctly. If you go to an episode view you can navigate back to its parent season Can’t really use guid for channel id for LiveTV because some LiveTV plugins will not generate valid channel ID because it was not required to be a guid, and this field may be very hard to migrate for those plugins.
Author
Owner

@joshuaboniface commented on GitHub (Nov 26, 2024):

Can't replicate @crobibero 's issue 2, at least for a few shows on my migrated library. It does take 2-3 seconds to load the episodes, but then they load.

@joshuaboniface commented on GitHub (Nov 26, 2024): Can't replicate @crobibero 's issue 2, at least for a few shows on my migrated library. It does take 2-3 seconds to load the episodes, but then they load.
Author
Owner

@TheMelmacian commented on GitHub (Jan 27, 2025):

At the moment the OwnerId of BaseItemEntity is of type string while all other fields that reference the Id (Id, ParentId, TopParentId, SeriesId, SeasonId) are of type Guid:

7684986fa1/Jellyfin.Data/Entities/BaseItemEntity.cs (L137)

While both Id and OwnerId are defined as text in the database, due to the different types in the code the former is saved as upper case and the latter is saved as lower case. This makes any comparison between these two fields inconvenient and inefficient.
So maybe it makes sense to convert OwnerId to a Guid?

@TheMelmacian commented on GitHub (Jan 27, 2025): At the moment the OwnerId of BaseItemEntity is of type `string` while all other fields that reference the Id (Id, ParentId, TopParentId, SeriesId, SeasonId) are of type `Guid`: https://github.com/jellyfin/jellyfin/blob/7684986fa16cd6246d4929097f76d379f55fc1fe/Jellyfin.Data/Entities/BaseItemEntity.cs#L137 While both Id and OwnerId are defined as text in the database, due to the different types in the code the former is saved as upper case and the latter is saved as lower case. This makes any comparison between these two fields inconvenient and inefficient. So maybe it makes sense to convert OwnerId to a Guid?
Author
Owner

@FerronN commented on GitHub (Jun 7, 2025):

I read about the refactoring in the RC release notes. Does this also enable us to use other EF Core database providers like postgresql or mysql?

@FerronN commented on GitHub (Jun 7, 2025): I read about the refactoring in the RC release notes. Does this also enable us to use other EF Core database providers like postgresql or mysql?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#6474