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/). @@ -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

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

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

Loading…
Cancel
Save