Commit Graph

12 Commits

Author SHA1 Message Date
Shadowghost ccdc69e3b0 Treat an item deleted mid-save as a no-op when saving its images 2026-09-01 21:42:07 +02:00
martin-77 7c148c3c7c Fix large playlist persistence 2026-08-16 21:30:37 +02:00
Marc Brooks 1c5c95ad1d Move the deletion of old related info to just before the save
This makes the deletion of BaseItemProviders, BaseItemImageInfos, and BaseItemMetadataFields happen in batch as  a contiguous block so the lock isn't held across items, just before the bulk SaveChanges.
2026-08-06 01:00:17 -05:00
Marc Brooks 812c819162 Speed up search for existing item values
Replace the O(n²)  array .First scan with a dictionary lookup
2026-08-05 22:48:26 -05:00
Marc Brooks 234a49903b Use a HashSet for existing items
Makes the test O(log n)
2026-08-05 22:48:13 -05:00
Shadowghost 8293eb26b9 Fix playlist entries being lost on migration and library scans 2026-07-29 14:40:49 +02:00
Shadowghost dc300fae53 Allow duplicate LinkedChildren for Playlists 2026-07-23 13:41:51 +02:00
Joshua M. Boniface 069eb40ebf Fix too many SQL variables in DeleteItem for large batch deletes
The FixIncorrectOwnerIdRelationships migration deletes all duplicate
items in a single DeleteItemsUnsafeFast -> DeleteItem(ids) call. Inside
DeleteItem, the owned-extras lookup used a raw HashSet.Contains, which EF
inlines as one SQL variable per id and overflows SQLite's variable limit
on large libraries. Use WhereOneOrMany so the id set is bound as a single
json_each parameter, like the rest of the method, making bulk deletes
work for unlimited library sizes.
2026-06-21 23:03:45 -04:00
Shadowghost fe1accc0e7 Prefer local alternate versions when deduplicating linked children
(cherry picked from commit 53f02a04ef7ff8f9d78c5f4e0924a0871b0e96fb)
2026-06-07 23:06:37 +02:00
Shadowghost bcd5c33ecd Merge remote-tracking branch 'upstream/master' into perf-rebased 2026-03-11 19:36:37 +01:00
Shadowghost e6e7f2a692 Fix batch delete of items with same userdata keys 2026-03-07 21:23:35 +01:00
Shadowghost 077fa89717 Split BaseItemRepository and IItemRepository 2026-03-07 20:12:42 +01:00