Browse Source

sync plex library name changes (#2783)

* sync plex library name changes

* feedback
pull/2784/head
Jason Dove 7 months ago committed by GitHub
parent
commit
e925bd6913
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 5
      ErsatzTV.Infrastructure/Data/Repositories/MediaSourceRepository.cs

1
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 - Fix playback of AC3 audio when targeting stereo output and input layout changes mid-stream
- Use other video artwork in XMLTV template - Use other video artwork in XMLTV template
- Properly update (add or remove) artwork for all local media libraries when files have changed - 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 ## [26.1.1] - 2026-01-08
### Fixed ### Fixed

5
ErsatzTV.Infrastructure/Data/Repositories/MediaSourceRepository.cs

@ -171,8 +171,9 @@ public class MediaSourceRepository(IDbContextFactory<TvContext> dbContextFactory
foreach (PlexLibrary incoming in toUpdate) foreach (PlexLibrary incoming in toUpdate)
{ {
Option<PlexLibrary> maybeExisting = await dbContext.PlexLibraries Option<PlexLibrary> maybeExisting = await dbContext.PlexLibraries
.Where(pl => pl.MediaSourceId == plexMediaSourceId)
.Include(l => l.Paths) .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) foreach (PlexLibrary existingLibrary in maybeExisting)
{ {
@ -201,6 +202,8 @@ public class MediaSourceRepository(IDbContextFactory<TvContext> dbContextFactory
existing.Path = path.Path; existing.Path = path.Path;
} }
} }
existingLibrary.Name = incoming.Name;
} }
} }

Loading…
Cancel
Save