diff --git a/.github/workflows/build_latest.yml b/.github/workflows/build_latest.yml index 1bcf248..dca5b03 100644 --- a/.github/workflows/build_latest.yml +++ b/.github/workflows/build_latest.yml @@ -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 diff --git a/src/N_m3u8DL-RE.Common/Entity/WebVttSub.cs b/src/N_m3u8DL-RE.Common/Entity/WebVttSub.cs index f2f3100..1e915ce 100644 --- a/src/N_m3u8DL-RE.Common/Entity/WebVttSub.cs +++ b/src/N_m3u8DL-RE.Common/Entity/WebVttSub.cs @@ -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 Cues { get; set; } = new List(); diff --git a/src/N_m3u8DL-RE.Common/Log/Logger.cs b/src/N_m3u8DL-RE.Common/Log/Logger.cs index 9e4a647..298b8e1 100644 --- a/src/N_m3u8DL-RE.Common/Log/Logger.cs +++ b/src/N_m3u8DL-RE.Common/Log/Logger.cs @@ -10,7 +10,7 @@ namespace N_m3u8DL_RE.Common.Log { public partial class Logger { - [RegexGenerator("{}")] + [GeneratedRegex("{}")] private static partial Regex VarsRepRegex(); /// diff --git a/src/N_m3u8DL-RE.Parser/Mp4/MP4TtmlUtil.cs b/src/N_m3u8DL-RE.Parser/Mp4/MP4TtmlUtil.cs index 1696fcd..e7c41b8 100644 --- a/src/N_m3u8DL-RE.Parser/Mp4/MP4TtmlUtil.cs +++ b/src/N_m3u8DL-RE.Parser/Mp4/MP4TtmlUtil.cs @@ -30,9 +30,9 @@ namespace Mp4SubtitleParser public partial class MP4TtmlUtil { - [RegexGenerator("(.+?)<\\/p>")] + [GeneratedRegex("(.+?)<\\/p>")] private static partial Regex LabelFixRegex(); - [RegexGenerator("\\")] + [GeneratedRegex("\\")] private static partial Regex MultiElementsFixRegex(); public static bool CheckInit(byte[] data) diff --git a/src/N_m3u8DL-RE.Parser/Processor/HLS/DefaultHLSContentProcessor.cs b/src/N_m3u8DL-RE.Parser/Processor/HLS/DefaultHLSContentProcessor.cs index 84a0165..260fbca 100644 --- a/src/N_m3u8DL-RE.Parser/Processor/HLS/DefaultHLSContentProcessor.cs +++ b/src/N_m3u8DL-RE.Parser/Processor/HLS/DefaultHLSContentProcessor.cs @@ -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; diff --git a/src/N_m3u8DL-RE.Parser/Util/ParserUtil.cs b/src/N_m3u8DL-RE.Parser/Util/ParserUtil.cs index 9757209..0215c77 100644 --- a/src/N_m3u8DL-RE.Parser/Util/ParserUtil.cs +++ b/src/N_m3u8DL-RE.Parser/Util/ParserUtil.cs @@ -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(); /// diff --git a/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs b/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs index e960703..ab719ca 100644 --- a/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs +++ b/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs @@ -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 Input = new(name: "input", description: ResString.cmd_Input); diff --git a/src/N_m3u8DL-RE/Directory.Build.props b/src/N_m3u8DL-RE/Directory.Build.props index 038218e..c4ac7ef 100644 --- a/src/N_m3u8DL-RE/Directory.Build.props +++ b/src/N_m3u8DL-RE/Directory.Build.props @@ -10,15 +10,9 @@ true zh-CN;zh-TW;en-US 7.0.0-* + true - - - - - - - diff --git a/src/N_m3u8DL-RE/Program.cs b/src/N_m3u8DL-RE/Program.cs index 05e7ea8..03ae254 100644 --- a/src/N_m3u8DL-RE/Program.cs +++ b/src/N_m3u8DL-RE/Program.cs @@ -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"; //直播 diff --git a/src/N_m3u8DL-RE/Util/MediainfoUtil.cs b/src/N_m3u8DL-RE/Util/MediainfoUtil.cs index 36d5f7c..e2da284 100644 --- a/src/N_m3u8DL-RE/Util/MediainfoUtil.cs +++ b/src/N_m3u8DL-RE/Util/MediainfoUtil.cs @@ -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> ReadInfoAsync(string binary, string file)