mirror of
https://github.com/Radarr/Radarr
synced 2026-01-31 03:42:57 +01:00
fix: resolve build errors from Copilot API response code changes (#115)
- Fix void return handling in Update() methods that Copilot incorrectly assumed returned the updated object - Remove unused System.Linq using in NotificationHelpers.cs - Fix trailing whitespace style violations Co-authored-by: admin <admin@ardentleatherworks.com>
This commit is contained in:
parent
cf490da7f2
commit
cde79b6e3b
7 changed files with 17751 additions and 1253 deletions
16268
package-lock.json
generated
Normal file
16268
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Core.Movies;
|
||||
|
||||
|
|
@ -69,8 +68,8 @@ public static string GetTitle(Movie movie)
|
|||
return string.Empty;
|
||||
}
|
||||
|
||||
var title = (movie.MovieMetadata.Value.Year > 0
|
||||
? $"{movie.MovieMetadata.Value.Title} ({movie.MovieMetadata.Value.Year})"
|
||||
var title = (movie.MovieMetadata.Value.Year > 0
|
||||
? $"{movie.MovieMetadata.Value.Title} ({movie.MovieMetadata.Value.Year})"
|
||||
: movie.MovieMetadata.Value.Title).Replace("`", "\\`");
|
||||
|
||||
return title.Length > 256 ? $"{title.AsSpan(0, 253).TrimEnd('\\')}..." : title;
|
||||
|
|
|
|||
|
|
@ -68,9 +68,9 @@ public ActionResult<AutoTaggingResource> Update([FromBody] AutoTaggingResource r
|
|||
|
||||
Validate(model);
|
||||
|
||||
var updated = _autoTaggingService.Update(model);
|
||||
_autoTaggingService.Update(model);
|
||||
|
||||
return Ok(updated.ToResource());
|
||||
return Ok(GetResourceById(model.Id));
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
|
|
|
|||
|
|
@ -72,9 +72,9 @@ public ActionResult<CustomFormatResource> Update([FromBody] CustomFormatResource
|
|||
|
||||
Validate(model);
|
||||
|
||||
var updated = _formatService.Update(model);
|
||||
_formatService.Update(model);
|
||||
|
||||
return Ok(updated.ToResource(true));
|
||||
return Ok(GetResourceById(model.Id));
|
||||
}
|
||||
|
||||
[HttpPut("bulk")]
|
||||
|
|
|
|||
|
|
@ -101,9 +101,9 @@ public ActionResult<MovieFileResource> SetMovieFile([FromBody] MovieFileResource
|
|||
movieFile.SceneName = movieFileResource.SceneName;
|
||||
}
|
||||
|
||||
var updatedFile = _mediaFileService.Update(movieFile);
|
||||
var movie = _movieService.GetMovie(updatedFile.MovieId);
|
||||
return Ok(updatedFile.ToResource(movie, _upgradableSpecification, _formatCalculator));
|
||||
_mediaFileService.Update(movieFile);
|
||||
var movie = _movieService.GetMovie(movieFile.MovieId);
|
||||
return Ok(movieFile.ToResource(movie, _upgradableSpecification, _formatCalculator));
|
||||
}
|
||||
|
||||
[Obsolete("Use bulk endpoint instead")]
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ public ActionResult<TProviderResource> UpdateProvider([FromRoute] int id, [FromB
|
|||
|
||||
if (hasDefinitionChanged)
|
||||
{
|
||||
providerDefinition = _providerFactory.Update(providerDefinition);
|
||||
_providerFactory.Update(providerDefinition);
|
||||
}
|
||||
|
||||
return Ok(_resourceMapper.ToResource(providerDefinition));
|
||||
|
|
|
|||
Loading…
Reference in a new issue