适配.NET7 rc
This commit is contained in:
parent
18311ec29d
commit
0992359ed6
|
@ -4,7 +4,7 @@ on:
|
|||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
DOTNET_SDK_VERSION: '7.0.100-preview.6.22352.1'
|
||||
DOTNET_SDK_VERSION: '7.0.*'
|
||||
|
||||
jobs:
|
||||
|
||||
|
@ -85,28 +85,7 @@ jobs:
|
|||
name: N_m3u8DL-RE_Beta_linux-arm64
|
||||
path: artifact/N_m3u8DL-RE
|
||||
|
||||
build-mac-x64:
|
||||
|
||||
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:
|
||||
build-mac-x64-arm64:
|
||||
|
||||
runs-on: macOS-latest
|
||||
|
||||
|
@ -121,8 +100,14 @@ jobs:
|
|||
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
|
||||
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-x64 -c Release -o artifact-x64 -p:PublishTrimmed=true -p:PublishReadyToRun=true -p:PublishSingleFile=true --self-contained true
|
||||
|
||||
- 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
|
||||
with:
|
||||
name: N_m3u8DL-RE_Beta_osx-arm64
|
||||
|
|
|
@ -9,11 +9,11 @@ namespace N_m3u8DL_RE.Common.Entity
|
|||
{
|
||||
public partial class WebVttSub
|
||||
{
|
||||
[RegexGenerator("X-TIMESTAMP-MAP.*")]
|
||||
[GeneratedRegex("X-TIMESTAMP-MAP.*")]
|
||||
private static partial Regex TSMapRegex();
|
||||
[RegexGenerator("MPEGTS:(\\d+)")]
|
||||
[GeneratedRegex("MPEGTS:(\\d+)")]
|
||||
private static partial Regex TSValueRegex();
|
||||
[RegexGenerator("\\s")]
|
||||
[GeneratedRegex("\\s")]
|
||||
private static partial Regex SplitRegex();
|
||||
|
||||
public List<SubCue> Cues { get; set; } = new List<SubCue>();
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace N_m3u8DL_RE.Common.Log
|
|||
{
|
||||
public partial class Logger
|
||||
{
|
||||
[RegexGenerator("{}")]
|
||||
[GeneratedRegex("{}")]
|
||||
private static partial Regex VarsRepRegex();
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -30,9 +30,9 @@ namespace Mp4SubtitleParser
|
|||
|
||||
public partial class MP4TtmlUtil
|
||||
{
|
||||
[RegexGenerator("<p.*?>(.+?)<\\/p>")]
|
||||
[GeneratedRegex("<p.*?>(.+?)<\\/p>")]
|
||||
private static partial Regex LabelFixRegex();
|
||||
[RegexGenerator("\\<tt[\\s\\S]*?\\<\\/tt\\>")]
|
||||
[GeneratedRegex("\\<tt[\\s\\S]*?\\<\\/tt\\>")]
|
||||
private static partial Regex MultiElementsFixRegex();
|
||||
|
||||
public static bool CheckInit(byte[] data)
|
||||
|
|
|
@ -12,15 +12,15 @@ namespace N_m3u8DL_RE.Parser.Processor.HLS
|
|||
{
|
||||
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();
|
||||
[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();
|
||||
[RegexGenerator("#EXTINF:.*?,\\s+.*BUMPER.*\\s+?#EXT-X-DISCONTINUITY")]
|
||||
[GeneratedRegex("#EXTINF:.*?,\\s+.*BUMPER.*\\s+?#EXT-X-DISCONTINUITY")]
|
||||
private static partial Regex DNSPSubRegex();
|
||||
[RegexGenerator("(#EXTINF.*)(\\s+)(#EXT-X-KEY.*)")]
|
||||
[GeneratedRegex("(#EXTINF.*)(\\s+)(#EXT-X-KEY.*)")]
|
||||
private static partial Regex OrderFixRegex();
|
||||
[RegexGenerator("#EXT-X-MAP.*\\.apple\\.com/")]
|
||||
[GeneratedRegex("#EXT-X-MAP.*\\.apple\\.com/")]
|
||||
private static partial Regex ATVRegex();
|
||||
|
||||
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
|
||||
{
|
||||
[RegexGenerator("\\$Number%([^$]+)d\\$")]
|
||||
[GeneratedRegex("\\$Number%([^$]+)d\\$")]
|
||||
private static partial Regex VarsNumberRegex();
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace N_m3u8DL_RE.CommandLine
|
|||
{
|
||||
internal partial class CommandInvoker
|
||||
{
|
||||
[RegexGenerator("((best|worst)\\d*|all)")]
|
||||
[GeneratedRegex("((best|worst)\\d*|all)")]
|
||||
private static partial Regex ForStrRegex();
|
||||
|
||||
private readonly static Argument<string> Input = new(name: "input", description: ResString.cmd_Input);
|
||||
|
|
|
@ -10,15 +10,9 @@
|
|||
<IlcGenerateStackTraceData>true</IlcGenerateStackTraceData>
|
||||
<SatelliteResourceLanguages>zh-CN;zh-TW;en-US</SatelliteResourceLanguages>
|
||||
<NativeAotCompilerVersion>7.0.0-*</NativeAotCompilerVersion>
|
||||
<PublishAot>true</PublishAot>
|
||||
</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>
|
||||
<RdXmlFile Include="rd.xml" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -141,6 +141,7 @@ namespace N_m3u8DL_RE
|
|||
parserConfig.UrlProcessors.Insert(0, new NowehoryzontyUrlProcessor());
|
||||
|
||||
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://media.axprod.net/TestVectors/v7-Clear/Manifest_1080p.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
|
||||
{
|
||||
[RegexGenerator(" Stream #.*")]
|
||||
[GeneratedRegex(" Stream #.*")]
|
||||
private static partial Regex TextRegex();
|
||||
[RegexGenerator("#0:\\d(\\[0x\\w+?\\])")]
|
||||
[GeneratedRegex("#0:\\d(\\[0x\\w+?\\])")]
|
||||
private static partial Regex IdRegex();
|
||||
[RegexGenerator(": (\\w+): (.*)")]
|
||||
[GeneratedRegex(": (\\w+): (.*)")]
|
||||
private static partial Regex TypeRegex();
|
||||
[RegexGenerator("(.*?)(,|$)")]
|
||||
[GeneratedRegex("(.*?)(,|$)")]
|
||||
private static partial Regex BaseInfoRegex();
|
||||
[RegexGenerator(" \\/ 0x\\w+")]
|
||||
[GeneratedRegex(" \\/ 0x\\w+")]
|
||||
private static partial Regex ReplaceRegex();
|
||||
[RegexGenerator("\\d{2,}x\\d+")]
|
||||
[GeneratedRegex("\\d{2,}x\\d+")]
|
||||
private static partial Regex ResRegex();
|
||||
[RegexGenerator("\\d+ kb\\/s")]
|
||||
[GeneratedRegex("\\d+ kb\\/s")]
|
||||
private static partial Regex BitrateRegex();
|
||||
[RegexGenerator("\\d+ fps")]
|
||||
[GeneratedRegex("\\d+ fps")]
|
||||
private static partial Regex FpsRegex();
|
||||
|
||||
public static async Task<List<Mediainfo>> ReadInfoAsync(string binary, string file)
|
||||
|
|
Loading…
Reference in New Issue