Polish Round 2 (#2411)
This commit is contained in:
parent
ba3e760b31
commit
a2fd87c454
35 changed files with 213 additions and 95 deletions
|
@ -134,7 +134,7 @@ public class LibraryController : BaseApiController
|
|||
/// <returns></returns>
|
||||
[Authorize(Policy = "RequireAdminRole")]
|
||||
[HttpGet("list")]
|
||||
public ActionResult<IEnumerable<DirectoryDto>> GetDirectories(string path)
|
||||
public ActionResult<IEnumerable<DirectoryDto>> GetDirectories(string? path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
|
@ -385,7 +385,7 @@ public class LibraryController : BaseApiController
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, await _localizationService.Translate(User.GetUserId(), "generic-library"));
|
||||
_logger.LogError(ex, "There was a critical issue. Please try again");
|
||||
await _unitOfWork.RollbackAsync();
|
||||
return Ok(false);
|
||||
}
|
||||
|
@ -441,7 +441,7 @@ public class LibraryController : BaseApiController
|
|||
// Override Scrobbling for Comic libraries since there are no providers to scrobble to
|
||||
if (library.Type == LibraryType.Comic)
|
||||
{
|
||||
_logger.LogInformation("Overrode Library {Name} to disable scrobbling since there are no providers for Comics", dto.Name);
|
||||
_logger.LogInformation("Overrode Library {Name} to disable scrobbling since there are no providers for Comics", dto.Name.Replace(Environment.NewLine, string.Empty));
|
||||
library.AllowScrobbling = false;
|
||||
}
|
||||
|
||||
|
@ -471,7 +471,11 @@ public class LibraryController : BaseApiController
|
|||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns the type of the underlying library
|
||||
/// </summary>
|
||||
/// <param name="libraryId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("type")]
|
||||
public async Task<ActionResult<LibraryType>> GetLibraryType(int libraryId)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue