From 9de54ad7cbfd9ddad77e1b803ace94c72c57f0c0 Mon Sep 17 00:00:00 2001 From: Jason Dove <1695733+jasongdove@users.noreply.github.com> Date: Fri, 16 Jan 2026 19:37:02 -0600 Subject: [PATCH] sync plex library name changes --- CHANGELOG.md | 1 + .../Data/Repositories/MediaSourceRepository.cs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25754d485..3903e962e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Fix playback of AC3 audio when targeting stereo output and input layout changes mid-stream - Use other video artwork in XMLTV template - Properly update (add or remove) artwork for all local media libraries when files have changed +- Sync plex library name changes ## [26.1.1] - 2026-01-08 ### Fixed diff --git a/ErsatzTV.Infrastructure/Data/Repositories/MediaSourceRepository.cs b/ErsatzTV.Infrastructure/Data/Repositories/MediaSourceRepository.cs index 7903c2bf1..98a039ac2 100644 --- a/ErsatzTV.Infrastructure/Data/Repositories/MediaSourceRepository.cs +++ b/ErsatzTV.Infrastructure/Data/Repositories/MediaSourceRepository.cs @@ -172,7 +172,7 @@ public class MediaSourceRepository(IDbContextFactory dbContextFactory { Option maybeExisting = await dbContext.PlexLibraries .Include(l => l.Paths) - .SelectOneAsync(l => l.Key, l => l.Key == incoming.Key, cancellationToken); + .SingleOrDefaultAsync(l => l.Key == incoming.Key, cancellationToken); foreach (PlexLibrary existingLibrary in maybeExisting) { @@ -201,6 +201,8 @@ public class MediaSourceRepository(IDbContextFactory dbContextFactory existing.Path = path.Path; } } + + existingLibrary.Name = incoming.Name; } }