PixieDownloader.Sdk 1.1.0

dotnet add package PixieDownloader.Sdk --version 1.1.0
                    
NuGet\Install-Package PixieDownloader.Sdk -Version 1.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PixieDownloader.Sdk" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PixieDownloader.Sdk" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="PixieDownloader.Sdk" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PixieDownloader.Sdk --version 1.1.0
                    
#r "nuget: PixieDownloader.Sdk, 1.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PixieDownloader.Sdk@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PixieDownloader.Sdk&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=PixieDownloader.Sdk&version=1.1.0
                    
Install as a Cake Tool

PixieDownloader.Sdk

O contrato de plugin do PixieDownloader. Um plugin mora em plugins/ ao lado do PixieDownloader.exeum .dll solto quando ele não precisa de mais nada (plugins/Pixie.Hello.dll), ou uma pasta própria quando traz dependências (plugins/tracklist/ com o TagLibSharp.dll dele dentro), pra dependência de um nunca se misturar com outro. O app carrega cada um num AssemblyLoadContext próprio e conversa com o plugin só por estes tipos:

  • IPixiePlugin — o ponto de entrada: Configure(IPluginHost).
  • IPluginHost — o que o host oferece: Downloads (IYtDlpService, o mesmo serviço que o app usa), DataDirectory, Log, ShutdownToken, o Manifest do próprio plugin e o registro de capacidades. Desde a API 1.1: os eventos AnalysisCompleted (toda análise que o usuário fez) e DownloadCompleted (arquivo final entregue), e RequireAnalysisComments() pra análise trazer os comentários enquanto o plugin quiser.
  • IUiContribution — implemente na mesma classe se o plugin tem uma aba.
  • PluginManifest — o plugin.json tipado.

Nenhum plugin conhece outro. Tudo passa pelo host.

Referenciar

O pacote traz o PixieDownloader.Sdk.dll e o YtDlpCore.dll (a API inclui o core). Os dois já existem dentro do app, então não copie nenhum para a pasta do pluginExcludeAssets="runtime" cuida disso:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net10.0-windows</TargetFramework>
    <UseWPF>true</UseWPF>                       
    <EnableDynamicLoading>true</EnableDynamicLoading>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="PixieDownloader.Sdk" Version="1.1.0" ExcludeAssets="runtime" />
  </ItemGroup>
</Project>

No nuget.org é dotnet add package PixieDownloader.Sdk. Se preferir o asset da release: dotnet nuget add source <pasta-onde-está-o-.nupkg> --name pixie.

Como o app reconhece o plugin

Sem arquivo nenhum além do .dll: o host lê os metadados do assembly (sem carregar código) e tira dali tudo que precisa —

o quê de onde
id o nome da pasta, ou do arquivo sem .dll
assembly o único .dll da pasta que referencia PixieDownloader.Sdk
classe de entrada a única classe que implementa IPixiePlugin
nome <AssemblyTitle> do csproj (sem ele, o id)
versão <Version> do csproj
apiVersion a versão deste pacote que você referenciou

O host aceita o plugin quando o major do apiVersion é o mesmo e o minor não é mais novo que o dele — e recusa, com o motivo nos logs e na aba Plugins, antes de carregar qualquer código.

Um plugin.json na pasta substitui tudo isso, e é obrigatório quando a convenção não basta: mais de uma classe IPixiePlugin no assembly, dependência de outro plugin (dependsOn), id diferente da pasta. (Só em pasta: um .dll solto vai sempre pela convenção.)

{
  "id": "hello",
  "name": "Hello",
  "version": "0.1.0",
  "apiVersion": "1.1",
  "assemblyFile": "Pixie.Hello.dll",
  "entryType": "Pixie.Hello.HelloPlugin",
  "dependsOn": []
}

Plugin mínimo

using System.Windows;
using System.Windows.Controls;
using PixieDownloader.Sdk;
using YtDlpCore;

namespace Pixie.Hello;

public sealed class HelloPlugin : IPixiePlugin, IUiContribution
{
    private IPluginHost _host = null!;

    public void Configure(IPluginHost host) => _host = host;

    public string TabHeader => "Hello";

    public FrameworkElement CreateView()
    {
        var button = new Button { Content = "Ferramentas" };
        button.Click += async (_, _) =>
        {
            var status = await _host.Downloads.CheckYtDlpAsync(_host.ShutdownToken);
            _host.Log(LogLevel.Info, $"yt-dlp: {status}");
        };
        return button;
    }
}

Ciclo de vida

  • Desabilitar é imediato: a aba some, ShutdownToken é cancelado, as capacidades registradas são removidas. O assembly continua na memória até o app fechar — WPF não permite descarregar de verdade.
  • Desinstalar apaga o .dll (ou a pasta) no próximo start — o arquivo fica em uso até lá. data/<id>/ fica: é do usuário.
  • Recarregar (aba Plugins) olha a pasta de novo sem reiniciar: plugin novo entra e carrega, um recusado com o problema corrigido também.
Product Compatible and additional computed target framework versions.
.NET net10.0-windows7.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0-windows7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 42 9/15/2026