mirror of
https://github.com/NohamR/N_m3u8DL-RE.git
synced 2025-05-24 14:21:58 +00:00
Compare commits
4 Commits
948f7aa75a
...
6b181338c9
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6b181338c9 | ||
![]() |
48ba42b220 | ||
![]() |
a824cb22e1 | ||
![]() |
b456e9e23a |
11
.github/workflows/build_latest.yml
vendored
11
.github/workflows/build_latest.yml
vendored
@ -33,6 +33,7 @@ jobs:
|
|||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v3
|
||||||
with:
|
with:
|
||||||
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
|
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
|
||||||
|
include-prerelease: true
|
||||||
|
|
||||||
- run: dotnet publish src/N_m3u8DL-RE -r win-x64 -c Release -o artifact-x64
|
- run: dotnet publish src/N_m3u8DL-RE -r win-x64 -c Release -o artifact-x64
|
||||||
- run: dotnet publish src/N_m3u8DL-RE -r win-arm64 -c Release -o artifact-arm64
|
- run: dotnet publish src/N_m3u8DL-RE -r win-arm64 -c Release -o artifact-arm64
|
||||||
@ -51,7 +52,8 @@ jobs:
|
|||||||
|
|
||||||
build-linux-x64:
|
build-linux-x64:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ubuntu:18.04
|
# container: ubuntu:18.04
|
||||||
|
container: ubuntu:22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- run: apt-get update
|
- run: apt-get update
|
||||||
@ -61,6 +63,7 @@ jobs:
|
|||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v3
|
||||||
with:
|
with:
|
||||||
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
|
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
|
||||||
|
include-prerelease: true
|
||||||
- run: apt-get install -y libicu-dev libcurl4-openssl-dev zlib1g-dev libkrb5-dev
|
- run: apt-get install -y libicu-dev libcurl4-openssl-dev zlib1g-dev libkrb5-dev
|
||||||
- run: dotnet publish src/N_m3u8DL-RE -r linux-x64 -c Release -o artifact
|
- run: dotnet publish src/N_m3u8DL-RE -r linux-x64 -c Release -o artifact
|
||||||
|
|
||||||
@ -72,7 +75,8 @@ jobs:
|
|||||||
|
|
||||||
build-linux-arm64:
|
build-linux-arm64:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-arm64-20220312201346-b2c2436
|
# container: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-arm64-20220312201346-b2c2436
|
||||||
|
container: ubuntu:22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
@ -80,6 +84,7 @@ jobs:
|
|||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v3
|
||||||
with:
|
with:
|
||||||
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
|
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
|
||||||
|
include-prerelease: true
|
||||||
- run: dotnet publish src/N_m3u8DL-RE -r linux-arm64 -c Release -p:StripSymbols=true -p:CppCompilerAndLinker=clang-9 -p:SysRoot=/crossrootfs/arm64 -o artifact
|
- run: dotnet publish src/N_m3u8DL-RE -r linux-arm64 -c Release -p:StripSymbols=true -p:CppCompilerAndLinker=clang-9 -p:SysRoot=/crossrootfs/arm64 -o artifact
|
||||||
|
|
||||||
- name: Upload Artifact[linux-arm64]
|
- name: Upload Artifact[linux-arm64]
|
||||||
@ -98,9 +103,9 @@ jobs:
|
|||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v3
|
||||||
with:
|
with:
|
||||||
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
|
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
|
||||||
|
include-prerelease: true
|
||||||
- run: dotnet publish src/N_m3u8DL-RE -r osx-arm64 -c Release -o artifact-arm64
|
- run: dotnet publish src/N_m3u8DL-RE -r osx-arm64 -c Release -o artifact-arm64
|
||||||
- run: dotnet publish src/N_m3u8DL-RE -r osx-x64 -c Release -o artifact-x64
|
- run: dotnet publish src/N_m3u8DL-RE -r osx-x64 -c Release -o artifact-x64
|
||||||
|
|
||||||
- name: Upload Artifact[osx-x64]
|
- name: Upload Artifact[osx-x64]
|
||||||
uses: actions/upload-artifact@v3.1.3
|
uses: actions/upload-artifact@v3.1.3
|
||||||
with:
|
with:
|
||||||
|
@ -17,27 +17,24 @@ namespace N_m3u8DL_RE.Parser.Processor
|
|||||||
|
|
||||||
public override string Process(string oriUrl, ParserConfig paserConfig)
|
public override string Process(string oriUrl, ParserConfig paserConfig)
|
||||||
{
|
{
|
||||||
if (oriUrl.StartsWith("http"))
|
var uriFromConfig = new Uri(paserConfig.Url);
|
||||||
{
|
var uriFromConfigQuery = HttpUtility.ParseQueryString(uriFromConfig.Query);
|
||||||
var uriFromConfig = new Uri(paserConfig.Url);
|
|
||||||
var uriFromConfigQuery = HttpUtility.ParseQueryString(uriFromConfig.Query);
|
var oldUri = new Uri(oriUrl);
|
||||||
|
var newQuery = HttpUtility.ParseQueryString(oldUri.Query);
|
||||||
var oldUri = new Uri(oriUrl);
|
foreach (var item in uriFromConfigQuery.AllKeys)
|
||||||
var newQuery = HttpUtility.ParseQueryString(oldUri.Query);
|
{
|
||||||
foreach (var item in uriFromConfigQuery.AllKeys)
|
if (newQuery.AllKeys.Contains(item))
|
||||||
{
|
newQuery.Set(item, uriFromConfigQuery.Get(item));
|
||||||
if (newQuery.AllKeys.Contains(item))
|
else
|
||||||
newQuery.Set(item, uriFromConfigQuery.Get(item));
|
newQuery.Add(item, uriFromConfigQuery.Get(item));
|
||||||
else
|
}
|
||||||
newQuery.Add(item, uriFromConfigQuery.Get(item));
|
|
||||||
}
|
if (!string.IsNullOrEmpty(newQuery.ToString()))
|
||||||
|
{
|
||||||
if (!string.IsNullOrEmpty(newQuery.ToString()))
|
Logger.Debug("Before: " + oriUrl);
|
||||||
{
|
oriUrl = (oldUri.GetLeftPart(UriPartial.Path) + "?" + newQuery.ToString()).TrimEnd('?');
|
||||||
Logger.Debug("Before: " + oriUrl);
|
Logger.Debug("After: " + oriUrl);
|
||||||
oriUrl = (oldUri.GetLeftPart(UriPartial.Path) + "?" + newQuery.ToString()).TrimEnd('?');
|
|
||||||
Logger.Debug("After: " + oriUrl);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return oriUrl;
|
return oriUrl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user