Skip to content

Commit

Permalink
升级到.net9
Browse files Browse the repository at this point in the history
  • Loading branch information
Harlan-H committed Dec 18, 2024
1 parent 054ad40 commit 01ecd78
Show file tree
Hide file tree
Showing 17 changed files with 174 additions and 61 deletions.
30 changes: 25 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ jobs:
- name: Install .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: 9.0.x

- name: Publish
run: |
dotnet publish M3u8Downloader_H/ -o M3u8Downloader_H/bin/Publish --configuration Release
dotnet publish M3u8Downloader_H/ -o M3u8Downloader_H/bin/PublishSingleFile -c Release --self-contained true -r win7-x64 -p:PublishSingleFile=true
- name: Download .NET 6 SDK And Copy .NET 6 SDK
- name: Download .NET 9 SDK And Copy .NET 9 SDK
run: |
Invoke-WebRequest -Uri 'https://download.visualstudio.microsoft.com/download/pr/d0849e66-227d-40f7-8f7b-c3f7dfe51f43/37f8a04ab7ff94db7f20d3c598dc4d74/windowsdesktop-runtime-6.0.29-win-x64.exe' -OutFile 'dotnet-sdk-win-x64.exe'
Copy-Item dotnet-sdk-win-x64.exe M3u8Downloader_H/bin/Publish -Recurse
Invoke-WebRequest -Uri 'https://download.visualstudio.microsoft.com/download/pr/99bd07c2-c95c-44dc-9d47-36d3b18df240/bdf26c62f69c1b783687c1dce83ccf7a/dotnet-runtime-9.0.0-win-x64.exe' -OutFile 'dotnet-9.0-runtime-x64.exe'
Copy-Item dotnet-9.0-runtime-x64.exe M3u8Downloader_H/bin/Publish -Recurse
- name: Upload artifacts normal
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -71,12 +71,32 @@ jobs:
Compress-Archive -Path M3u8Downloader_H/* -DestinationPath M3u8Downloader_H.zip -Force
Compress-Archive -Path M3u8Downloader_H-SingleFile/* -DestinationPath M3u8Downloader_H-SingleFile.zip -Force
shell: pwsh

- name: Get Releases Descript
id : get_desc
run: |
curl -Lo changlog.md https://raw.githubusercontent.com/Harlan-H/M3u8Downloader_H/refs/heads/master/Changelog.md
result=$(awk '/^# /{if (flag) exit; flag=1} flag && NF' changlog.md)
echo "release_body<<EOF" >> $GITHUB_OUTPUT
echo "$result" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create release
uses: softprops/action-gh-release@v1
with:
body: |
- [更新日志](https://github.com/Harlan-H/M3u8Downloader_H/blob/master/Changelog.md)
${{ steps.get_desc.outputs.release_body }}
#
- [更多更新内容](https://github.com/Harlan-H/M3u8Downloader_H/blob/master/Changelog.md)
#
| 名称 | 描述 |
|-------|-------|
| [m3u8Downloader_H.zip](https://github.com/Harlan-H/M3u8Downloader_H/releases/download/${{github.ref_name}}/M3u8Downloader_H.zip) | 需要运行库版本,程序文件夹中的dotnet-9.0-runtime-x64.exe |
| [M3u8Downloader_H-SingleFile.zip](https://github.com/Harlan-H/M3u8Downloader_H/releases/download/${{github.ref_name}}/M3u8Downloader_H-SingleFile.zip) | 无需运行库版本,可能某些功能无法使用 |
- 如果你是win7用户且程序双击没反应 那么就必须安装KB4457144 [跳转环境问题](https://github.com/Harlan-H/M3u8Downloader_H/wiki#%E7%8E%AF%E5%A2%83%E9%97%AE%E9%A2%98)
draft: false
prerelease: false
files: |
Expand Down
102 changes: 102 additions & 0 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: main

on:
workflow_dispatch:
inputs:
tags:
description: '版本号'
required: true

jobs:
package:
runs-on: windows-latest

env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x

- name: Publish
run: |
dotnet publish M3u8Downloader_H/ -o M3u8Downloader_H/bin/Publish --configuration Release
dotnet publish M3u8Downloader_H/ -o M3u8Downloader_H/bin/PublishSingleFile -c Release --self-contained true -r win7-x64 -p:PublishSingleFile=true
- name: Download .NET 9 SDK And Copy .NET 9 SDK
run: |
Invoke-WebRequest -Uri 'https://download.visualstudio.microsoft.com/download/pr/99bd07c2-c95c-44dc-9d47-36d3b18df240/bdf26c62f69c1b783687c1dce83ccf7a/dotnet-runtime-9.0.0-win-x64.exe' -OutFile 'dotnet-9.0-runtime-x64.exe'
Copy-Item dotnet-9.0-runtime-x64.exe M3u8Downloader_H/bin/Publish -Recurse
- name: Upload artifacts normal
uses: actions/upload-artifact@v3
with:
name: M3u8Downloader_H
path: M3u8Downloader_H/bin/Publish

- name: Upload artifacts single file
uses: actions/upload-artifact@v3
with:
name: M3u8Downloader_H-SingleFile
path: M3u8Downloader_H/bin/PublishSingleFile

deploy:
needs: package
runs-on: ubuntu-latest

steps:
- name: Download artifacts normal
uses: actions/download-artifact@v3
with:
name: M3u8Downloader_H
path: M3u8Downloader_H

- name: Download artifacts single file
uses: actions/download-artifact@v3
with:
name: M3u8Downloader_H-SingleFile
path: M3u8Downloader_H-SingleFile

- name: Create package
run: |
Compress-Archive -Path M3u8Downloader_H/* -DestinationPath M3u8Downloader_H.zip -Force
Compress-Archive -Path M3u8Downloader_H-SingleFile/* -DestinationPath M3u8Downloader_H-SingleFile.zip -Force
shell: pwsh

- name: Get Releases Descript
id : get_desc
run: |
curl -Lo changlog.md https://raw.githubusercontent.com/Harlan-H/M3u8Downloader_H/refs/heads/master/Changelog.md
result=$(awk '/^# /{if (flag) exit; flag=1} flag && NF' changlog.md)
echo "release_body<<EOF" >> $GITHUB_OUTPUT
echo "$result" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create release
uses: softprops/action-gh-release@v1
with:
body: |
${{ steps.get_desc.outputs.release_body }}
#
- [更多更新内容](https://github.com/Harlan-H/M3u8Downloader_H/blob/master/Changelog.md)
#
| 名称 | 描述 |
|-------|-------|
| [m3u8Downloader_H.zip](https://github.com/Harlan-H/M3u8Downloader_H/releases/download/${{ github.event.inputs.tags }}/M3u8Downloader_H.zip) | 需要运行库版本,程序文件夹中的dotnet-9.0-runtime-x64.exe |
| [M3u8Downloader_H-SingleFile.zip](https://github.com/Harlan-H/M3u8Downloader_H/releases/download/${{ github.event.inputs.tags }}/M3u8Downloader_H-SingleFile.zip) | 无需运行库版本,可能某些功能无法使用 |
- 如果你是win7用户且程序双击没反应 那么就必须安装KB4457144 [跳转环境问题](https://github.com/Harlan-H/M3u8Downloader_H/wiki#%E7%8E%AF%E5%A2%83%E9%97%AE%E9%A2%98)
draft: false
prerelease: false
files: |
M3u8Downloader_H.zip
M3u8Downloader_H-SingleFile.zip
13 changes: 13 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# 3.14.6 (2024/12/18)
- .net6官方停止维护故升级.net9
- 设置中增加关闭声音按钮
- 设置中删除相同缓存按钮
- 修改重复下载机制,改成同时判断路径和名称
- 修改名称生成规则,由原先的随机改成链接地址hash以保证断点续传功能的正常使用
- 修改api接口中的DownloadByContent实现方案,当传入m3u8文件内容时将直接解析,如果出现错误会通过接口返回
- 因为api接口实现的改变删除一个方法
- 代码优化,均升级成官方推荐代码
- 日志中删除xx.ts下载成功的提示
- 修复在某些情况下转到mp4会报错的问题
- 下个版本将推出支持mp3,mp4,flv等长连接视频的下载方案,尽情期待

# 3.14.5 (2024/07/06)
- 修复上次更新后导致缓存无法删除的bug

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
12 changes: 5 additions & 7 deletions M3u8Downloader_H.Combiners/M3uCombinerClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,11 @@ protected async ValueTask ConverterToMp4(string m3u8FilePath, bool allowed_exten
if (allowed_extensions)
arguments.Add("-allowed_extensions").Add("ALL");

arguments.Add("-i").Add(m3u8FilePath);

arguments.Add("-f").Add(Settings.SelectedFormat);

arguments
.Add("-c:a").Add("copy")
.Add("-c:v").Add("copy");
arguments.Add("-i").Add(m3u8FilePath)
.Add("-f").Add(Settings.SelectedFormat)
.Add("-c:a").Add("copy")
.Add("-c:v").Add("copy")
.Add("-bsf:a").Add("aac_adtstoasc");

var tmpOutputFile = Path.ChangeExtension(DownloadParams.VideoFullName, Settings.SelectedFormat);
DownloadParams.ChangeVideoNameDelegate(tmpOutputFile);
Expand Down
2 changes: 1 addition & 1 deletion M3u8Downloader_H.Common/M3u8Downloader_H.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Authors>Harlan</Authors>
Expand Down
6 changes: 3 additions & 3 deletions M3u8Downloader_H.Core/M3u8Downloader_H.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<Version>3.14.5.0</Version>
<Version>3.14.6.0</Version>
<Authors>Harlan</Authors>
<AssemblyVersion>3.14.5.0</AssemblyVersion>
<AssemblyVersion>3.14.6.0</AssemblyVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion M3u8Downloader_H.M3U8/M3u8Downloader_H.M3U8.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>1.0.1.0</Version>
Expand Down
2 changes: 1 addition & 1 deletion M3u8Downloader_H.Plugin/M3u8Downloader_H.Plugin.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>1.0.2.0</Version>
Expand Down
1 change: 0 additions & 1 deletion M3u8Downloader_H/Bootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ protected override void BuildUp(object instance)

protected override async void OnStartup(object sender, StartupEventArgs e)
{
ServicePointManager.DefaultConnectionLimit = 2000;
await DisplayRootViewForAsync<MainWindowViewModel>();
}

Expand Down
8 changes: 4 additions & 4 deletions M3u8Downloader_H/M3u8Downloader_H.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows7.0</TargetFramework>
<TargetFramework>net9.0-windows7.0</TargetFramework>
<RootNamespace>M3u8Downloader_H</RootNamespace>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyVersion>3.14.5.0</AssemblyVersion>
<Version>3.14.5.0</Version>
<AssemblyVersion>3.14.6.0</AssemblyVersion>
<Version>3.14.6.0</Version>
<PackageId>m3u8视频下载器</PackageId>
<Product>m3u8视频下载器</Product>
<ApplicationIcon>icon.ico</ApplicationIcon>
Expand Down Expand Up @@ -39,7 +39,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Caliburn.Micro" Version="4.0.212" />
<PackageReference Include="Caliburn.Micro" Version="4.0.230" />
<PackageReference Include="MaterialDesignThemes" Version="4.9.0" />
<PackageReference Include="PropertyChanged.Fody" Version="4.1.0" PrivateAssets="All" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
45 changes: 13 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# M3u8Downloader_H
软件分两个版本:
- [m3u8Downloader_H.zip](https://github.com/Harlan-H/M3u8Downloader_H/releases/latest/download/M3u8Downloader_H.zip) 需要.net 6的运行库的版本
- [M3u8Downloader_H-SingleFile.zip](https://github.com/Harlan-H/M3u8Downloader_H/releases/latest/download/M3u8Downloader_H-SingleFile.zip) 不需要.net 6运行库
**如果你是win7用户 不管你用哪个版本都必须安装KB4457144 ,具体看下面的环境问题,点击上方版本直接下载**
- [特点](#特点)
- [插件项目地址](#插件项目地址)
- [帮助文档](#帮助文档)
- [软件截图](#截图)
- [支持作者](#支持作者)

# 插件项目地址
- https://github.com/Harlan-H/M3u8Downloader_H.Plugins


# 特点
## 特点
- 支持多线程,多任务,断点续传
- 支持aes-128-cbc,aes-192-cbc,aes-256-cbc自动解密
- 支持对m3u8的ts,fmp4格式下载
Expand All @@ -26,36 +23,20 @@
- 提供插件功能,可以个性化定制自己的下载需求,具体参见帮助文档->插件开发
- 特定网站可以直接通过网页地址来下载m3u8视频

# 帮助文档
- 在线地址:http://note.youdao.com/noteshare?id=c6ba2fb478ad300b7095c7c951556fc6
- wiki : https://github.com/Harlan-H/M3u8Downloader_H/wiki/

# 环境问题
1. 程序是64位 只支持64位系统
2. 如果提示安装.net6 可以自行下载安装,地址:https://dotnet.microsoft.com/zh-cn/download/dotnet/thank-you/runtime-desktop-6.0.9-windows-x64-installer
3. 对于win7 64用户.net6安装完成 如果出现点击程序没有任何反应(没有反应指没有任何报错也不出任何界面) 那么就需要进行第二个步骤
- 下载一个更新KB4457144 地址:http://download.windowsupdate.com/d/msdownload/update/software/secu/2018/09/windows6.1-kb4457144-x64_5ca467d42deadc2b2f4010c4a26b4a6903790dd5.msu
- 如果上面两个步骤都做了还是不行 这边给你提供一个参考资料 [点击跳转](https://www.cnblogs.com/simadi/p/14410536.html)


# 开发相关
- 本项目不依赖任何第三方的下载器,解析器,所有下载及解析实现全部由本程序自己实现
- 核心只使用了一个cli的库,转码采用的ffmpeg,因为本人对音视频不熟悉没有办法自己实现
## 插件项目地址
- https://github.com/Harlan-H/M3u8Downloader_H.Plugins

## 依赖
#### 本项目一共使用这4个库,前3个都是针对界面的
- [Caliburn.Micro](https://github.com/Caliburn-Micro/Caliburn.Micro) : mvvm框架
- [MaterialDesignThemes](https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit) : ui库
- [PropertyChanged.Fody](https://github.com/Fody/PropertyChanged) : 属性绑定库,此库功能非常强大,他可以自动生成NotifyOfPropertyChange相关代码
- [CliWrap](https://github.com/Tyrrrz/CliWrap) : 对命令行调用的封装库
## 帮助文档
- 在线地址:http://note.youdao.com/noteshare?id=c6ba2fb478ad300b7095c7c951556fc6
- wiki : https://github.com/Harlan-H/M3u8Downloader_H/wiki/

# 截图
## 截图
![QQ截图20221120192851](https://user-images.githubusercontent.com/39378318/202899529-a6d8ae44-f578-4312-b6b7-77d354c874b4.png)
![setting1](https://user-images.githubusercontent.com/39378318/202899568-874bbf90-1198-42eb-b42a-d8e3df27ba5c.png)
![QQ截图20221120192700](https://user-images.githubusercontent.com/39378318/202899573-ee513782-f792-464b-b7ee-eb8b48f02ce6.png)


# 支持作者
## 支持作者
|微信|支付宝|
|:--:|:--:|
|![weixin](https://user-images.githubusercontent.com/39378318/190890312-ab314b1e-24e8-4237-aa24-2f49752b49ab.png)|![zhi](https://user-images.githubusercontent.com/39378318/190890316-d16156a1-88bb-487a-a7a4-664cf0a5e4da.png)|
2 changes: 1 addition & 1 deletion SettingsManager/M3u8Downloader_H.Settings.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
Expand Down

0 comments on commit 01ecd78

Please sign in to comment.