mirror of
https://github.com/spaytac/linkdingsync.git
synced 2026-01-21 16:54:45 +00:00
**fixed** WallabagServiceEntries.cs: http scheme was always replaced with https. Now the replacement is bound to a condition (if the base adr scheme == https, then replace the next page url (http) with https).
This commit is contained in:
parent
fdcfba3c90
commit
f683963195
3
.gitignore
vendored
3
.gitignore
vendored
@ -4,4 +4,5 @@ obj/
|
||||
riderModule.iml
|
||||
/_ReSharper.Caches/
|
||||
**/.env
|
||||
.env
|
||||
.env
|
||||
compose/
|
||||
@ -5,6 +5,14 @@ IHost host = Host.CreateDefaultBuilder(args)
|
||||
{
|
||||
services.Add_Linkding_HttpClient(ctx.Configuration);
|
||||
services.AddHostedService<Worker>();
|
||||
}).ConfigureHostConfiguration((builder) =>
|
||||
{
|
||||
builder
|
||||
.AddEnvironmentVariables()
|
||||
.AddCommandLine(args)
|
||||
.AddJsonFile("appsettings.json")
|
||||
.AddJsonFile("appsettings.Development.json")
|
||||
.AddUserSecrets<Program>(true);
|
||||
})
|
||||
.Build();
|
||||
|
||||
|
||||
@ -26,7 +26,11 @@ public partial class WallabagService
|
||||
while (allQuery.QueryLinks.Next != null && !string.IsNullOrEmpty(allQuery.QueryLinks.Next.Href))
|
||||
{
|
||||
// url = allQuery.QueryLinks.Next.Href.Replace(_settings.Url, "");
|
||||
url = allQuery.QueryLinks.Next.Href.Replace("http://", "https://");
|
||||
if (_client.BaseAddress.Scheme == "https")
|
||||
{
|
||||
url = allQuery.QueryLinks.Next.Href.Replace("http://", "https://");
|
||||
}
|
||||
|
||||
allQuery = await GetJsonAsync<WallabagQuery>(url);
|
||||
bookmarks.AddRange(allQuery.Embedded.Items);
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ namespace Wallabag.Handler
|
||||
}
|
||||
}
|
||||
|
||||
if (addToWallabag && !updatedWallabags.ContainsKey(bookmark.Url))
|
||||
if (addToWallabag && !updatedWallabags.ContainsKey(cleanUrl))
|
||||
{
|
||||
updatedWallabags.Add(cleanUrl,
|
||||
bookmark.TagNames.Where(x => !x.Equals(tagName, StringComparison.OrdinalIgnoreCase)));
|
||||
|
||||
@ -7,6 +7,14 @@ IHost host = Host.CreateDefaultBuilder(args)
|
||||
services.Add_Linkding_HttpClient(ctx.Configuration);
|
||||
services.Add_Wallabag_Worker(ctx.Configuration);
|
||||
services.AddHostedService<Worker>();
|
||||
}).ConfigureHostConfiguration((builder) =>
|
||||
{
|
||||
builder
|
||||
.AddEnvironmentVariables()
|
||||
.AddCommandLine(args)
|
||||
.AddJsonFile("appsettings.json")
|
||||
.AddJsonFile("appsettings.Development.json")
|
||||
.AddUserSecrets<Program>(true);
|
||||
})
|
||||
.Build();
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
|
||||
<PackageReference Include="YamlDotNet" Version="12.3.1" />
|
||||
</ItemGroup>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user