FritzTheCat9 / YoutubeLinks

YoutubeLinks allow users to save YouTube links as playlists. Users are able to download mp3/mp4 files from the playlists they create. Project created as part of the "100 Commits" competition.
27 stars 1 forks source link

Error on docker yt-dlp not found #21

Closed FritzTheCat9 closed 6 months ago

FritzTheCat9 commented 7 months ago

[UnitOfWork] Rollback Transaction System.ComponentModel.Win32Exception (2): An error occurred trying to start process '/app\yt-dlp.exe' with working directory '/app'. No such file or directory at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec) at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) at YoutubeLinks.Api.Services.YoutubeService.GetVideoTitle(String videoId) in /src/YoutubeLinks.Api/Services/YoutubeService.cs:line 63 at YoutubeLinks.Api.Features.Links.Commands.CreateLinkFeature.Handler.Handle(Command command, CancellationToken cancellationToken) in /src/YoutubeLinks.Api/Features/Links/Commands/CreateLinkFeature.cs:line 69 at YoutubeLinks.Api.Behaviors.UnitOfWorkBehavior2.Handle(TRequest request, RequestHandlerDelegate1 next, CancellationToken can

image image

FritzTheCat9 commented 6 months ago

On linux we must download python3 and ffmpeg to the container to use yt-dlp. Then we download the latest yt-dlp from github. Then we must copy yt-dlp to the container. On windows we can use yt-dlp.exe from our solution.

Depending which system we are using we take different approach.

Fixed with docker file changes and YoutubeService updates :)