Skip to content

Commit

Permalink
merge hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm360 committed Mar 19, 2023
2 parents ec2d759 + a61804f commit 0a30f84
Show file tree
Hide file tree
Showing 174 changed files with 183 additions and 167 deletions.
42 changes: 0 additions & 42 deletions .github/ISSUE_TEMPLATE/bug-report.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/main.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/nuget-stable-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Stable release deploy to NuGet

on:
push:
tags:
- 'eth-v*.*.*'

jobs:
build-test-package:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'

- name: Build with dotnet
run: dotnet build --configuration Release

- name: Run unit tests
run: dotnet test --configuration Release

- name: Generate nuget package
run: dotnet pack --configuration Release -o nupkg

- name: Push packages
run: dotnet nuget push './nupkg/*.nupkg' --api-key ${{secrets.NUGET_KEY}} --source https://api.nuget.org/v3/index.json
10 changes: 10 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@

# Attention

These are changelogs from original repository.

Etherna changelogs instead are under github's releases:
https://github.com/Etherna/YoutubeExplode/releases

*************

# Changelog

## v6.2.10 (17-Mar-2023)
Expand Down
13 changes: 3 additions & 10 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<Project>

<PropertyGroup>
<Version>6.2.10</Version>
<Company>Tyrrrz</Company>
<Copyright>Copyright (C) Oleksii Holub</Copyright>
<Company>Etherna Sagl</Company>
<Copyright>Copyright (C) Oleksii Holub, Copyright (C) 2023 Etherna Sagl</Copyright>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<WarningsAsErrors>nullable</WarningsAsErrors>
Expand All @@ -20,19 +19,13 @@
<PropertyGroup>
<Authors>$(Company)</Authors>
<PackageTags>youtube video download playlist user channel closed caption tracks subtitles parse extract metadata info net core standard</PackageTags>
<PackageProjectUrl>https://github.com/Tyrrrz/YoutubeExplode</PackageProjectUrl>
<PackageReleaseNotes>https://github.com/Tyrrrz/YoutubeExplode/blob/master/Changelog.md</PackageReleaseNotes>
<PackageProjectUrl>https://github.com/Etherna/youtube-downloader</PackageProjectUrl>
<PackageReadmeFile>Readme.md</PackageReadmeFile>
<PackageIcon>favicon.png</PackageIcon>
<PackageLicenseExpression>LGPL-3.0-only</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<DebugType>embedded</DebugType>
</PropertyGroup>

<ItemGroup>
<None Include="../favicon.png" Pack="true" PackagePath="" Visible="false" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tag-prefix: 'eth-v'
3 changes: 3 additions & 0 deletions License.txt → LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
YoutubeExplode
Copyright (C) 2016-2023 Oleksii Holub

Etherna YoutubeDownloader fork
Copyright (C) 2023-present Etherna Sagl

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<ItemGroup>
<PackageReference Include="CliWrap" Version="3.6.0" />
<PackageReference Include="FluentAssertions" Version="6.10.0" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.1" PrivateAssets="all" />
<PackageReference Include="Gress" Version="2.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="xunit" Version="2.4.2" />
Expand All @@ -20,7 +19,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\YoutubeExplode.Converter\YoutubeExplode.Converter.csproj" />
<ProjectReference Include="..\YoutubeDownloader.Converter\YoutubeDownloader.Converter.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static async ValueTask DownloadAsync(
IProgress<double>? progress = null,
CancellationToken cancellationToken = default)
{
var ffmpeg = new FFmpeg(request.FFmpegCliFilePath);
var ffmpeg = new FFmpeg(request.FFmpegCliFilePath, videoClient.FFmpegHWAccelerationMethod);
var converter = new Converter(videoClient, ffmpeg, request.Preset);

await converter.ProcessAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ private async ValueTask ProcessAsync(
{
var arguments = new ArgumentsBuilder();

// Add HW acceleration
if (_ffmpeg.HWAccelerationMethod is not null)
arguments.Add("-hwaccel").Add(_ffmpeg.HWAccelerationMethod);

// Stream inputs
foreach (var streamInput in streamInputs)
arguments.Add("-i").Add(streamInput.FilePath);
Expand Down Expand Up @@ -88,9 +92,16 @@ private async ValueTask ProcessAsync(
}
}

// MP4: specify the codec for subtitles manually, otherwise they may not get injected
if (container == Container.Mp4 && subtitleInputs.Any())
arguments.Add("-c:s").Add("mov_text");
// MP4
if (container == Container.Mp4)
{
//specify the codec for subtitles manually, otherwise they may not get injected
if (subtitleInputs.Any())
arguments.Add("-c:s").Add("mov_text");

//move the index (moov atom) to the beginning of the file
arguments.Add("-movflags").Add("faststart");
}

// MP3: set constant bitrate for audio streams, otherwise the metadata may contain invalid total duration
// https://superuser.com/a/893044
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ internal partial class FFmpeg
{
private readonly string _filePath;

public FFmpeg(string filePath) => _filePath = filePath;
public FFmpeg(
string filePath,
string? hwAccelerationMethod)
{
_filePath = filePath;
HWAccelerationMethod = hwAccelerationMethod;
}

public string? HWAccelerationMethod { get; }

public async ValueTask ExecuteAsync(
string arguments,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
<PropertyGroup>
<TargetFrameworks>net5.0;netstandard2.1;netstandard2.0;net461;netcoreapp3.1</TargetFrameworks>
<IsPackable>true</IsPackable>
<PackageId>Etherna.$(AssemblyName)</PackageId>
</PropertyGroup>

<PropertyGroup>
<Description>
Extension for YoutubeExplode that provides an interface to download and convert videos using FFmpeg
</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageProjectUrl>https://github.com/Tyrrrz/YoutubeExplode/tree/master/YoutubeExplode.Converter</PackageProjectUrl>
<PackageProjectUrl>https://github.com/Etherna/youtube-downloader</PackageProjectUrl>
</PropertyGroup>

<ItemGroup>
Expand All @@ -19,13 +20,17 @@

<ItemGroup>
<PackageReference Include="CliWrap" Version="3.6.0" />
<PackageReference Include="GitVersion.MsBuild" Version="5.12.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
<PackageReference Include="PolySharp" Version="1.12.1" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\YoutubeExplode\YoutubeExplode.csproj" />
<ProjectReference Include="..\YoutubeDownloader\YoutubeDownloader.csproj" />
</ItemGroup>

</Project>
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ApplicationIcon>../favicon.ico</ApplicationIcon>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\YoutubeExplode\YoutubeExplode.csproj" />
<ProjectReference Include="..\YoutubeDownloader\YoutubeDownloader.csproj" />
</ItemGroup>

</Project>
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
Height="610"
Background="{DynamicResource MaterialDesignPaper}"
FocusManager.FocusedElement="{Binding ElementName=QueryTextBox}"
Icon="/YoutubeExplode.DemoWpf;component/favicon.ico"
Style="{DynamicResource MaterialDesignRoot}"
WindowStartupLocation="CenterScreen">
<Window.DataContext>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,15 @@
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<ApplicationIcon>../favicon.ico</ApplicationIcon>
</PropertyGroup>

<ItemGroup>
<Resource Include="../favicon.ico" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="MaterialDesignColors" Version="2.1.1" />
<PackageReference Include="MaterialDesignThemes" Version="4.7.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\YoutubeExplode\YoutubeExplode.csproj" />
<ProjectReference Include="..\YoutubeDownloader\YoutubeDownloader.csproj" />
</ItemGroup>

</Project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.10.0" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" PrivateAssets="all" />
<PackageReference Include="coverlet.collector" Version="3.2.0" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\YoutubeExplode\YoutubeExplode.csproj" />
<ProjectReference Include="..\YoutubeDownloader\YoutubeDownloader.csproj" />
</ItemGroup>

</Project>
File renamed without changes.
Loading

0 comments on commit 0a30f84

Please sign in to comment.