Closed mohkale closed 2 years ago
It looks to me like you are missing NYoutubeDLP, this is my fork of NYoutubeDL. https://github.com/ankenyr/NYoutubeDLP
I don't think I have ever tried building my plugin from inside of a docker container like this before.
@ankenyr
I'm surprised since dotnet should auto fetch dependencies when doing a build. Looking at Jellyfin.Plugin.YoutubeMetadata/Jellyfin.Plugin.YoutubeMetadata.csproj
it seems as if you added it as a local reference dependency which probably explains why I couldn't resolve it. And it looks like someone else has already published it as a NuGeT package so trying to add it as a conventional external dependency will fail because it'll be fetching the wrong package.
<Reference Include="NYoutubeDL">
<HintPath>..\..\NYoutubeDLP\src\NYoutubeDL\bin\Debug\netstandard2.0\NYoutubeDL.dll</HintPath>
</Reference>
Update: Finally managed to get a build my Jellyfin instance can actually load. For reference here's the section from my Dockerfile:
ARG DOTNET_VERSION=6.0
FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} as plugin-builder
RUN mkdir /plugins
ARG YT_METADATA_VERSION=1.0.3.7
ARG NYTDLP_VERSION=12dcfe3
RUN cd $(mktemp -d) \
&& curl \
-L \
--output YoutubeMetadata.tar.gz \
https://github.com/ankenyr/jellyfin-youtube-metadata-plugin/archive/refs/tags/$YT_METADATA_VERSION.tar.gz \
&& tar xvzf YoutubeMetadata.tar.gz \
&& cd jellyfin-youtube-metadata-plugin-$YT_METADATA_VERSION \
&& git clone https://github.com/ankenyr/NYoutubeDLP \
&& git --work-tree NYoutubeDLP --git-dir NYoutubeDLP/.git checkout $NYTDLP_VERSION \
&& dotnet add Jellyfin.Plugin.YoutubeMetadata reference NYoutubeDLP/src/NYoutubeDL \
&& dotnet publish --configuration Release --output bin Jellyfin.Plugin.YoutubeMetadata \
&& mv bin /plugins/Jellyfin.Plugin.YoutubeMetadata
I'm happy to close this issue now, hopefully anyone trying to do the same in the future will stumble upon it as well.
Yea forked theirs since it needed to be changed to work for yt-dlp. I could rename it and upload it to nugget which would then work but I have not had the need to so I have not learned how to. If you have references I could do that if it simplifies things.for others.
On Sat, Jul 2, 2022, 2:11 PM Mohsin Kaleem @.***> wrote:
Closed #56 https://github.com/ankenyr/jellyfin-youtube-metadata-plugin/issues/56 as completed.
— Reply to this email directly, view it on GitHub https://github.com/ankenyr/jellyfin-youtube-metadata-plugin/issues/56#event-6922559414, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALYWLRCM2ZLS3OEEX2CY4TVSCV6ZANCNFSM52DUJZZQ . You are receiving this because you were mentioned.Message ID: <ankenyr/jellyfin-youtube-metadata-plugin/issue/56/issue_event/6922559414@ github.com>
If you have references I could do that if it simplifies things.for others.
I agree this should be done (it'll make building as easy as git clone remote . && dotnet build
). But I'm a complete newb at C# so I have no idea how to either :sweat_smile:. A quick documentation search however does make it seem pretty easy. First produce a nupkg file from your code (looks like dotnet pack can do this) and then you can upload straight to the site.
Ahh same, this and the other half baked plugin are my only C# code I have written. Only the phone and not signed in but let's reopen this and track this as an issue.
On Sat, Jul 2, 2022, 3:17 PM Mohsin Kaleem @.***> wrote:
If you have references I could do that if it simplifies things.for others.
I agree this should be done (it'll make building as easy as git clone remote . && dotnet build). But I'm a complete newb at C# so I have no idea how to either 😅. A quick documentation search however does make it seem pretty easy. First produce a nupkg file from your code (looks like dotnet pack https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package-using-the-dotnet-cli#run-the-pack-command can do this) and then you can upload straight to the site https://docs.microsoft.com/en-us/nuget/nuget-org/publish-a-package.
— Reply to this email directly, view it on GitHub https://github.com/ankenyr/jellyfin-youtube-metadata-plugin/issues/56#issuecomment-1172971445, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALYWLWM3TWIWLSOHVRWJ6LVSC5Y5ANCNFSM52DUJZZQ . You are receiving this because you were mentioned.Message ID: @.***>
Looks like someone had the same idea as me and already packaged this. https://www.nuget.org/packages/NYoutubeDLP/
@ankenyr
I don't think that's the same. I tried building against it and it failed. The github repo it links to is https://github.com/Antfere/NYoutubeDLP and that doesn't look to be the same as your fork (at least to me).
It is forked from the same project. It looks to be more up to date with the latest yt-dlp stuff than mine. So if it isn't strictly compatible I will move to it so there is one less thing for me to support.
Makes sense. Could you keep this issue open until you get a chance to migrate onto it (or create a new issue) so that I can subscribe to updates regarding this change?
I already moved to it.
On Fri, Jul 8, 2022, 5:58 AM Mohsin Kaleem @.***> wrote:
Makes sense. Could you keep this issue open until you get a chance to migrate onto it (or create a new issue) so that I can subscribe to updates regarding this change?
— Reply to this email directly, view it on GitHub https://github.com/ankenyr/jellyfin-youtube-metadata-plugin/issues/56#issuecomment-1178960562, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALYWLVL7RGCPWAR2KHMKALVTAQW7ANCNFSM52DUJZZQ . You are receiving this because you were mentioned.Message ID: @.***>
Hi, how're we supposed to build this project?
In a sandboxed Docker environment it's failing.
When I run
docker build .
it eventually fails with: