sirk123au / ArrTools

A collection of tools for Radarr, Sonarr & Lidarr
GNU General Public License v3.0
141 stars 16 forks source link

Lidarr Foreign Artist Id must not be empty #24

Open quinneydavid opened 1 year ago

quinneydavid commented 1 year ago

I have CSV file formatted with a blank Foreign Artist ID in a csv, for example.

artist | foreignArtistId The Chainsmokers |   Zedd |

Arrtools will state the artist already exists when it doesn't in Lidarr

python3 lidarr_add_from_list.py artists.csv [INFO] Downloading Lidarr Artist Data. :) [DEBUG] Starting new HTTP connection (1): 192.168.86.2:8686 [DEBUG] http://192.168.86.2:8686 "GET /api/v1/artist HTTP/1.1" 200 None [INFO] Found 2 Artists in artists.csv. :) [DEBUG] Starting new HTTP connection (1): 192.168.86.2:8686 [DEBUG] http://192.168.86.2:8686 "POST /api/v1/artist HTTP/1.1" 400 None [INFO] Zedd already Exists in Lidarr. [DEBUG] Starting new HTTP connection (1): 192.168.86.2:8686 [DEBUG] http://192.168.86.2:8686 "POST /api/v1/artist HTTP/1.1" 400 None [INFO] Leikeli47 already Exists in Lidarr. [INFO] Added 0 of 2 Artists, 2 Already Exist

Looking at the logs, it is looking for the Foreign Artist ID which does not exist in my CSV

2023-07-30 17:58:38.8|Warn|LidarrErrorPipeline|Invalid request Validation failed: -- ForeignArtistId: 'Foreign Artist Id' must not be empty. 2023-07-30 17:59:52.3|Info|ImportListSyncService|Starting Import List Sync 2023-07-30 17:59:52.4|Info|ImportListSyncService|Processing 0 list items 2023-07-30 17:59:52.4|Info|ImportListSyncService|Import List Sync Completed. Items found: 0, Artists added: 0, Albums added: 0 2023-07-30 18:04:52.6|Info|ImportListSyncService|Starting Import List Sync 2023-07-30 18:04:52.6|Info|ImportListSyncService|Processing 0 list items 2023-07-30 18:04:52.6|Info|ImportListSyncService|Import List Sync Completed. Items found: 0, Artists added: 0, Albums added: 0 2023-07-30 18:05:44.7|Warn|LidarrErrorPipeline|FluentValidation.ValidationException: Validation failed: -- ForeignArtistId: 'Foreign Artist Id' must not be empty.

[v1.3.0.3322] FluentValidation.ValidationException: Validation failed: -- ForeignArtistId: 'Foreign Artist Id' must not be empty. at Lidarr.Http.REST.RestController1.ValidateResource(TResource resource, Boolean skipValidate, Boolean skipSharedValidate) in ./Lidarr.Http/REST/RestController.cs:line 122 at Lidarr.Http.REST.RestController1.OnActionExecuting(ActionExecutingContext context) in ./Lidarr.Http/REST/RestController.cs:line 67 at Microsoft.AspNetCore.Mvc.Controller.OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.gAwaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.gAwaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) at Lidarr.Http.Middleware.BufferingMiddleware.InvokeAsync(HttpContext context) in ./Lidarr.Http/Middleware/BufferingMiddleware.cs:line 28 at Lidarr.Http.Middleware.IfModifiedMiddleware.InvokeAsync(HttpContext context) in ./Lidarr.Http/Middleware/IfModifiedMiddleware.cs:line 41 at Lidarr.Http.Middleware.CacheHeaderMiddleware.InvokeAsync(HttpContext context) in ./Lidarr.Http/Middleware/CacheHeaderMiddleware.cs:line 33 at Lidarr.Http.Middleware.StartingUpMiddleware.InvokeAsync(HttpContext context) in ./Lidarr.Http/Middleware/StartingUpMiddleware.cs:line 38 at Lidarr.Http.Middleware.UrlBaseMiddleware.InvokeAsync(HttpContext context) in ./Lidarr.Http/Middleware/UrlBaseMiddleware.cs:line 27 at Lidarr.Http.Middleware.VersionMiddleware.InvokeAsync(HttpContext context) in ./Lidarr.Http/Middleware/VersionMiddleware.cs:line 29 at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context) at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)

Any possible way to fix this?