fix mixed platform directory mapping (#106)
* sync plex platform and platform version * fix mixed-platform path replacements
This commit is contained in:
@@ -135,6 +135,7 @@ namespace ErsatzTV.Infrastructure.Data.Repositories
|
||||
inner join PlexPathReplacement ppr on ppr.PlexMediaSourceId = l.MediaSourceId
|
||||
where lp.Id = {0}",
|
||||
plexLibraryPathId)
|
||||
.Include(ppr => ppr.PlexMediaSource)
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
@@ -158,8 +159,20 @@ namespace ErsatzTV.Infrastructure.Data.Repositories
|
||||
List<PlexConnection> toDelete)
|
||||
{
|
||||
await _dbConnection.ExecuteAsync(
|
||||
@"UPDATE PlexMediaSource SET ProductVersion = @ProductVersion, ServerName = @ServerName WHERE Id = @Id",
|
||||
new { plexMediaSource.ProductVersion, plexMediaSource.ServerName, plexMediaSource.Id });
|
||||
@"UPDATE PlexMediaSource SET
|
||||
ProductVersion = @ProductVersion,
|
||||
Platform = @Platform,
|
||||
PlatformVersion = @PlatformVersion,
|
||||
ServerName = @ServerName
|
||||
WHERE Id = @Id",
|
||||
new
|
||||
{
|
||||
plexMediaSource.ProductVersion,
|
||||
plexMediaSource.Platform,
|
||||
plexMediaSource.PlatformVersion,
|
||||
plexMediaSource.ServerName,
|
||||
plexMediaSource.Id
|
||||
});
|
||||
|
||||
await using TvContext dbContext = _dbContextFactory.CreateDbContext();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user