lingarr-translate / lingarr

Lingarr is an application that utilizes LibreTranslate to translate subtitle files to a user-specified target language, providing a locally hosted solution for subtitle localization.
64 stars 0 forks source link

System.IO.DirectoryNotFoundException: Could not find a part of the path #14

Open HomerBeer opened 1 day ago

HomerBeer commented 1 day ago

Looks very promising!

But after the latest version install, it can not found the correct paths anymore. Set Sonarr configs, the shows appears.

But then i get this error: System.IO.DirectoryNotFoundException: Could not find a part of the path

rowanfuchs commented 15 hours ago

The shows, seasons, and episodes are imported via Sonarr's api, whereas the subtitles are collected via scanning the mapped volumes. Did you map your tv volume correctly? You have to replace "/path/to/tv" fully with the path you also use in Sonarr or your media application: - /path/to/tv:/app/media/tv

If you have a little more logging or endpoint that fails(check the browser console), I can give a more exact answer, but with this, I assume the volume mapping is incorrect.

HomerBeer commented 12 hours ago

I have, and it worked in the first version.

But know i get this:

fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "*********", Request id "*********:*********": An unhandled exception was thrown by the application. System.IO.DirectoryNotFoundException: Could not find a part of the path '/app/media/Media/Series/*********'. at System.IO.Enumeration.FileSystemEnumerator1.CreateDirectoryHandle(String path, Boolean ignoreNotFound) at System.IO.Enumeration.FileSystemEnumerator1.Init() at System.IO.Enumeration.FileSystemEnumerable1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized) at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options) at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options) at System.IO.Directory.GetFiles(String path, String searchPattern, EnumerationOptions enumerationOptions) at Lingarr.Server.Services.SubtitleService.<>c__DisplayClass0_0.<Collect>b__1() in /src/Lingarr.Server/Services/SubtitleService.cs:line 18 at System.Threading.Tasks.Task1.InnerInvoke() at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at Lingarr.Server.Services.SubtitleService.Collect(String path) in /src/Lingarr.Server/Services/SubtitleService.cs:line 18 at Lingarr.Server.Controllers.SubtitleController.Collect(String path) in /src/Lingarr.Server/Controllers/SubtitleController.cs:line 27 at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.gAwaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.gAwaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) 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.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application) fail: Microsoft.AspNetCore.Server.Kestrel[13]

rowanfuchs commented 12 hours ago

media/Media/ media is mentioned twice, are you sure that is correct? i.e. my setup is as following:

volumes:
  - /mnt/hdd/media/movies:/app/media/movies
  - /mnt/hdd/media/tvshows:/app/media/tv

ps. I've taken the liberty to redact your reply here and there so that it remains private.

HomerBeer commented 9 hours ago

Aah, thanx.. i was don't aware of that.

Found that strange to:

volumes:

I use these in my sonarr to.

rowanfuchs commented 3 hours ago

This looks correct, had the problem been resolved or is this mapping causing the issue?