- Remove projetos mortos: VideoStudy.Native (MAUI), Controllers/LicenseController - Remove serviços não usados: FFmpegService, HardwareIdService, LicenseManager, PdfGeneratorService, ScreenshotService, TranscriptionService do UI - Remove dependências pesadas do UI: Whisper.net, YoutubeExplode, QuestPDF - Remove PuppeteerSharp e SkiaSharp do API (150MB Chromium não é mais necessário) - Screenshots agora usam FFmpeg diretamente (mais simples, mais confiável) - YouTubeService reescrito para chamar /api/video-info em vez de YoutubeExplode - Adiciona campo UserContext em AnalysisRequest (contexto livre do usuário) - UI traduzida para português; aba de arquivo local removida (nunca funcionou) - YouTubeProcessor simplificado: sem modo Advanced/Whisper - GetYtDlpPath busca yt-dlp.exe subindo até 7 níveis de diretório - Cookies do yt-dlp configuráveis via YtDlp:CookiesBrowser no appsettings - Chave Groq agora lida de env var GROQ_API_KEY (appsettings.json sem segredos) - VideoStudy.Linux (Photino) adicionado à solução como host multiplataforma - yt-dlp atualizado de 2025.01.26 para 2026.03.17 (fix do nsig extraction) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
62 lines
1.9 KiB
Plaintext
62 lines
1.9 KiB
Plaintext
@using VideoStudy.Shared
|
|
|
|
<div class="processor-card p-2">
|
|
<div class="input-group mb-3">
|
|
<input type="text" class="form-control form-control-lg"
|
|
placeholder="https://www.youtube.com/watch?v=..."
|
|
@bind="VideoUrl" disabled="@IsProcessing" />
|
|
<button type="button" class="btn btn-primary"
|
|
@onclick="FetchInfo"
|
|
disabled="@(IsProcessing || string.IsNullOrWhiteSpace(VideoUrl))">
|
|
Verificar
|
|
</button>
|
|
</div>
|
|
|
|
@if (VideoInfo != null)
|
|
{
|
|
<div class="mb-4 p-3 bg-light rounded-3">
|
|
<div class="fw-bold">@VideoInfo.Title</div>
|
|
<div class="d-flex gap-3 text-muted small mt-1">
|
|
<span>@VideoInfo.Author</span>
|
|
<span>@VideoInfo.Duration.ToString(@"hh\:mm\:ss")</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="d-grid">
|
|
<button class="btn btn-lg btn-primary" @onclick="StartProcessing" disabled="@IsProcessing">
|
|
@if (IsProcessing)
|
|
{
|
|
<span class="spinner-border spinner-border-sm me-2"></span>
|
|
<span>Analisando...</span>
|
|
}
|
|
else
|
|
{
|
|
<span>Analisar com IA</span>
|
|
}
|
|
</button>
|
|
</div>
|
|
}
|
|
</div>
|
|
|
|
@code {
|
|
[Parameter] public EventCallback<string> OnVideoUrlChanged { get; set; }
|
|
[Parameter] public EventCallback OnStart { get; set; }
|
|
[Parameter] public bool IsProcessing { get; set; }
|
|
[Parameter] public VideoInfo? VideoInfo { get; set; }
|
|
|
|
[Inject] YouTubeService YouTubeService { get; set; } = default!;
|
|
|
|
private string VideoUrl { get; set; } = "";
|
|
|
|
private async Task FetchInfo()
|
|
{
|
|
if (string.IsNullOrWhiteSpace(VideoUrl)) return;
|
|
await OnVideoUrlChanged.InvokeAsync(VideoUrl);
|
|
}
|
|
|
|
private async Task StartProcessing()
|
|
{
|
|
await OnStart.InvokeAsync();
|
|
}
|
|
}
|