适配.NET7 rc
This commit is contained in:
parent
18311ec29d
commit
0992359ed6
|
@ -4,7 +4,7 @@ on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOTNET_SDK_VERSION: '7.0.100-preview.6.22352.1'
|
DOTNET_SDK_VERSION: '7.0.*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
@ -85,28 +85,7 @@ jobs:
|
||||||
name: N_m3u8DL-RE_Beta_linux-arm64
|
name: N_m3u8DL-RE_Beta_linux-arm64
|
||||||
path: artifact/N_m3u8DL-RE
|
path: artifact/N_m3u8DL-RE
|
||||||
|
|
||||||
build-mac-x64:
|
build-mac-x64-arm64:
|
||||||
|
|
||||||
runs-on: macOS-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up dotnet
|
|
||||||
uses: actions/setup-dotnet@v1
|
|
||||||
with:
|
|
||||||
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
|
|
||||||
include-prerelease: true
|
|
||||||
- run: dotnet publish src/N_m3u8DL-RE -r osx-x64 -c Release -o artifact
|
|
||||||
- run: strip artifact/N_m3u8DL-RE
|
|
||||||
|
|
||||||
- name: Upload Artifact[osx-x64]
|
|
||||||
uses: actions/upload-artifact@v1.0.0
|
|
||||||
with:
|
|
||||||
name: N_m3u8DL-RE_Beta_osx-x64
|
|
||||||
path: artifact/N_m3u8DL-RE
|
|
||||||
|
|
||||||
build-mac-arm64:
|
|
||||||
|
|
||||||
runs-on: macOS-latest
|
runs-on: macOS-latest
|
||||||
|
|
||||||
|
@ -121,8 +100,14 @@ jobs:
|
||||||
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
|
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
|
||||||
include-prerelease: true
|
include-prerelease: true
|
||||||
- run: dotnet publish src/N_m3u8DL-RE -r osx-arm64 -c Release -o artifact-arm64 -p:PublishTrimmed=true -p:PublishReadyToRun=true -p:PublishSingleFile=true --self-contained true
|
- run: dotnet publish src/N_m3u8DL-RE -r osx-arm64 -c Release -o artifact-arm64 -p:PublishTrimmed=true -p:PublishReadyToRun=true -p:PublishSingleFile=true --self-contained true
|
||||||
|
- run: dotnet publish src/N_m3u8DL-RE -r osx-x64 -c Release -o artifact-x64 -p:PublishTrimmed=true -p:PublishReadyToRun=true -p:PublishSingleFile=true --self-contained true
|
||||||
|
|
||||||
- name: Upload Artifact[osx-x64]
|
- name: Upload Artifact[osx-x64]
|
||||||
|
uses: actions/upload-artifact@v1.0.0
|
||||||
|
with:
|
||||||
|
name: N_m3u8DL-RE_Beta_osx-x64
|
||||||
|
path: artifact-x64/N_m3u8DL-RE
|
||||||
|
- name: Upload Artifact[osx-arm64]
|
||||||
uses: actions/upload-artifact@v1.0.0
|
uses: actions/upload-artifact@v1.0.0
|
||||||
with:
|
with:
|
||||||
name: N_m3u8DL-RE_Beta_osx-arm64
|
name: N_m3u8DL-RE_Beta_osx-arm64
|
||||||
|
|
|
@ -9,11 +9,11 @@ namespace N_m3u8DL_RE.Common.Entity
|
||||||
{
|
{
|
||||||
public partial class WebVttSub
|
public partial class WebVttSub
|
||||||
{
|
{
|
||||||
[RegexGenerator("X-TIMESTAMP-MAP.*")]
|
[GeneratedRegex("X-TIMESTAMP-MAP.*")]
|
||||||
private static partial Regex TSMapRegex();
|
private static partial Regex TSMapRegex();
|
||||||
[RegexGenerator("MPEGTS:(\\d+)")]
|
[GeneratedRegex("MPEGTS:(\\d+)")]
|
||||||
private static partial Regex TSValueRegex();
|
private static partial Regex TSValueRegex();
|
||||||
[RegexGenerator("\\s")]
|
[GeneratedRegex("\\s")]
|
||||||
private static partial Regex SplitRegex();
|
private static partial Regex SplitRegex();
|
||||||
|
|
||||||
public List<SubCue> Cues { get; set; } = new List<SubCue>();
|
public List<SubCue> Cues { get; set; } = new List<SubCue>();
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace N_m3u8DL_RE.Common.Log
|
||||||
{
|
{
|
||||||
public partial class Logger
|
public partial class Logger
|
||||||
{
|
{
|
||||||
[RegexGenerator("{}")]
|
[GeneratedRegex("{}")]
|
||||||
private static partial Regex VarsRepRegex();
|
private static partial Regex VarsRepRegex();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -30,9 +30,9 @@ namespace Mp4SubtitleParser
|
||||||
|
|
||||||
public partial class MP4TtmlUtil
|
public partial class MP4TtmlUtil
|
||||||
{
|
{
|
||||||
[RegexGenerator("<p.*?>(.+?)<\\/p>")]
|
[GeneratedRegex("<p.*?>(.+?)<\\/p>")]
|
||||||
private static partial Regex LabelFixRegex();
|
private static partial Regex LabelFixRegex();
|
||||||
[RegexGenerator("\\<tt[\\s\\S]*?\\<\\/tt\\>")]
|
[GeneratedRegex("\\<tt[\\s\\S]*?\\<\\/tt\\>")]
|
||||||
private static partial Regex MultiElementsFixRegex();
|
private static partial Regex MultiElementsFixRegex();
|
||||||
|
|
||||||
public static bool CheckInit(byte[] data)
|
public static bool CheckInit(byte[] data)
|
||||||
|
|
|
@ -12,15 +12,15 @@ namespace N_m3u8DL_RE.Parser.Processor.HLS
|
||||||
{
|
{
|
||||||
public partial class DefaultHLSContentProcessor : ContentProcessor
|
public partial class DefaultHLSContentProcessor : ContentProcessor
|
||||||
{
|
{
|
||||||
[RegexGenerator("#EXT-X-DISCONTINUITY\\s+#EXT-X-MAP:URI=\\\"(.*?)\\\",BYTERANGE=\\\"(.*?)\\\"")]
|
[GeneratedRegex("#EXT-X-DISCONTINUITY\\s+#EXT-X-MAP:URI=\\\"(.*?)\\\",BYTERANGE=\\\"(.*?)\\\"")]
|
||||||
private static partial Regex YkDVRegex();
|
private static partial Regex YkDVRegex();
|
||||||
[RegexGenerator("#EXT-X-MAP:URI=\\\".*?BUMPER/[\\s\\S]+?#EXT-X-DISCONTINUITY")]
|
[GeneratedRegex("#EXT-X-MAP:URI=\\\".*?BUMPER/[\\s\\S]+?#EXT-X-DISCONTINUITY")]
|
||||||
private static partial Regex DNSPRegex();
|
private static partial Regex DNSPRegex();
|
||||||
[RegexGenerator("#EXTINF:.*?,\\s+.*BUMPER.*\\s+?#EXT-X-DISCONTINUITY")]
|
[GeneratedRegex("#EXTINF:.*?,\\s+.*BUMPER.*\\s+?#EXT-X-DISCONTINUITY")]
|
||||||
private static partial Regex DNSPSubRegex();
|
private static partial Regex DNSPSubRegex();
|
||||||
[RegexGenerator("(#EXTINF.*)(\\s+)(#EXT-X-KEY.*)")]
|
[GeneratedRegex("(#EXTINF.*)(\\s+)(#EXT-X-KEY.*)")]
|
||||||
private static partial Regex OrderFixRegex();
|
private static partial Regex OrderFixRegex();
|
||||||
[RegexGenerator("#EXT-X-MAP.*\\.apple\\.com/")]
|
[GeneratedRegex("#EXT-X-MAP.*\\.apple\\.com/")]
|
||||||
private static partial Regex ATVRegex();
|
private static partial Regex ATVRegex();
|
||||||
|
|
||||||
public override bool CanProcess(ExtractorType extractorType, string rawText, ParserConfig parserConfig) => extractorType == ExtractorType.HLS;
|
public override bool CanProcess(ExtractorType extractorType, string rawText, ParserConfig parserConfig) => extractorType == ExtractorType.HLS;
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace N_m3u8DL_RE.Parser.Util
|
||||||
{
|
{
|
||||||
public partial class ParserUtil
|
public partial class ParserUtil
|
||||||
{
|
{
|
||||||
[RegexGenerator("\\$Number%([^$]+)d\\$")]
|
[GeneratedRegex("\\$Number%([^$]+)d\\$")]
|
||||||
private static partial Regex VarsNumberRegex();
|
private static partial Regex VarsNumberRegex();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace N_m3u8DL_RE.CommandLine
|
||||||
{
|
{
|
||||||
internal partial class CommandInvoker
|
internal partial class CommandInvoker
|
||||||
{
|
{
|
||||||
[RegexGenerator("((best|worst)\\d*|all)")]
|
[GeneratedRegex("((best|worst)\\d*|all)")]
|
||||||
private static partial Regex ForStrRegex();
|
private static partial Regex ForStrRegex();
|
||||||
|
|
||||||
private readonly static Argument<string> Input = new(name: "input", description: ResString.cmd_Input);
|
private readonly static Argument<string> Input = new(name: "input", description: ResString.cmd_Input);
|
||||||
|
|
|
@ -10,15 +10,9 @@
|
||||||
<IlcGenerateStackTraceData>true</IlcGenerateStackTraceData>
|
<IlcGenerateStackTraceData>true</IlcGenerateStackTraceData>
|
||||||
<SatelliteResourceLanguages>zh-CN;zh-TW;en-US</SatelliteResourceLanguages>
|
<SatelliteResourceLanguages>zh-CN;zh-TW;en-US</SatelliteResourceLanguages>
|
||||||
<NativeAotCompilerVersion>7.0.0-*</NativeAotCompilerVersion>
|
<NativeAotCompilerVersion>7.0.0-*</NativeAotCompilerVersion>
|
||||||
|
<PublishAot>true</PublishAot>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Microsoft.DotNet.ILCompiler" Version="$(NativeAotCompilerVersion)" />
|
|
||||||
<!-- Cross-compilation for Windows x64-arm64 and Linux x64-arm64 -->
|
|
||||||
<PackageReference Condition="'$(RuntimeIdentifier)'=='win-arm64'" Include="runtime.win-x64.Microsoft.DotNet.ILCompiler" Version="$(NativeAotCompilerVersion)" />
|
|
||||||
<PackageReference Condition="'$(RuntimeIdentifier)'=='linux-arm64'" Include="runtime.linux-x64.Microsoft.DotNet.ILCompiler" Version="$(NativeAotCompilerVersion)" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<RdXmlFile Include="rd.xml" />
|
<RdXmlFile Include="rd.xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -141,6 +141,7 @@ namespace N_m3u8DL_RE
|
||||||
parserConfig.UrlProcessors.Insert(0, new NowehoryzontyUrlProcessor());
|
parserConfig.UrlProcessors.Insert(0, new NowehoryzontyUrlProcessor());
|
||||||
|
|
||||||
var url = string.Empty;
|
var url = string.Empty;
|
||||||
|
//url = "https://vod-ftc-eu-west-1.media.dssott.com/ps01/disney/29a73209-b706-4f21-8384-acddccb154d2/ctr-all-6cf6fec6-94dc-4f8b-ae67-5ada60ee1e83-42bd5bca-f9a8-4299-83e3-0fb2b4ec0a62.m3u8"; //迪士尼
|
||||||
//url = "https://play.itunes.apple.com/WebObjects/MZPlay.woa/hls/subscription/playlist.m3u8?cc=US&svcId=tvs.vds.4105&a=1580273278&isExternal=true&brandId=tvs.sbd.4000&id=337246031&l=en-US&aec=UHD&xtrick=true&webbrowser=true"; //啥都有
|
//url = "https://play.itunes.apple.com/WebObjects/MZPlay.woa/hls/subscription/playlist.m3u8?cc=US&svcId=tvs.vds.4105&a=1580273278&isExternal=true&brandId=tvs.sbd.4000&id=337246031&l=en-US&aec=UHD&xtrick=true&webbrowser=true"; //啥都有
|
||||||
//url = "https://media.axprod.net/TestVectors/v7-Clear/Manifest_1080p.mpd"; //多音轨多字幕
|
//url = "https://media.axprod.net/TestVectors/v7-Clear/Manifest_1080p.mpd"; //多音轨多字幕
|
||||||
//url = "https://cmafref.akamaized.net/cmaf/live-ull/2006350/akambr/out.mpd"; //直播
|
//url = "https://cmafref.akamaized.net/cmaf/live-ull/2006350/akambr/out.mpd"; //直播
|
||||||
|
|
|
@ -12,21 +12,21 @@ namespace N_m3u8DL_RE.Util
|
||||||
{
|
{
|
||||||
internal partial class MediainfoUtil
|
internal partial class MediainfoUtil
|
||||||
{
|
{
|
||||||
[RegexGenerator(" Stream #.*")]
|
[GeneratedRegex(" Stream #.*")]
|
||||||
private static partial Regex TextRegex();
|
private static partial Regex TextRegex();
|
||||||
[RegexGenerator("#0:\\d(\\[0x\\w+?\\])")]
|
[GeneratedRegex("#0:\\d(\\[0x\\w+?\\])")]
|
||||||
private static partial Regex IdRegex();
|
private static partial Regex IdRegex();
|
||||||
[RegexGenerator(": (\\w+): (.*)")]
|
[GeneratedRegex(": (\\w+): (.*)")]
|
||||||
private static partial Regex TypeRegex();
|
private static partial Regex TypeRegex();
|
||||||
[RegexGenerator("(.*?)(,|$)")]
|
[GeneratedRegex("(.*?)(,|$)")]
|
||||||
private static partial Regex BaseInfoRegex();
|
private static partial Regex BaseInfoRegex();
|
||||||
[RegexGenerator(" \\/ 0x\\w+")]
|
[GeneratedRegex(" \\/ 0x\\w+")]
|
||||||
private static partial Regex ReplaceRegex();
|
private static partial Regex ReplaceRegex();
|
||||||
[RegexGenerator("\\d{2,}x\\d+")]
|
[GeneratedRegex("\\d{2,}x\\d+")]
|
||||||
private static partial Regex ResRegex();
|
private static partial Regex ResRegex();
|
||||||
[RegexGenerator("\\d+ kb\\/s")]
|
[GeneratedRegex("\\d+ kb\\/s")]
|
||||||
private static partial Regex BitrateRegex();
|
private static partial Regex BitrateRegex();
|
||||||
[RegexGenerator("\\d+ fps")]
|
[GeneratedRegex("\\d+ fps")]
|
||||||
private static partial Regex FpsRegex();
|
private static partial Regex FpsRegex();
|
||||||
|
|
||||||
public static async Task<List<Mediainfo>> ReadInfoAsync(string binary, string file)
|
public static async Task<List<Mediainfo>> ReadInfoAsync(string binary, string file)
|
||||||
|
|
Loading…
Reference in New Issue