mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
parent
9162feccf7
commit
82de6487e4
2 changed files with 8 additions and 1 deletions
|
|
@ -6,6 +6,7 @@
|
|||
using AutoMapper.QueryableExtensions;
|
||||
using FilterLists.Data;
|
||||
using FilterLists.Services.Snapshot.Models;
|
||||
using FilterLists.Services.Wayback;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace FilterLists.Services.Snapshot
|
||||
|
|
@ -37,7 +38,12 @@ await DbContext
|
|||
l.Snapshots
|
||||
.Select(s => s.CreatedDateUtc)
|
||||
.OrderByDescending(d => d)
|
||||
.First() < yesterday))
|
||||
.First() < yesterday &&
|
||||
!l.Snapshots
|
||||
.First()
|
||||
.FilterList
|
||||
.ViewUrl
|
||||
.StartsWith(WaybackService.WaybackMachineUrlPrefix)))
|
||||
.OrderBy(l => l.Snapshots.Any())
|
||||
.ThenBy(l => l.Snapshots
|
||||
.OrderByDescending(s => s.CreatedDateUtc)
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ namespace FilterLists.Services.Wayback
|
|||
{
|
||||
public static class WaybackService
|
||||
{
|
||||
public const string WaybackMachineUrlPrefix = "https://web.archive.org/web/";
|
||||
private const string WaybackAvailabilityApiUrlPrefix = "https://archive.org/wayback/available?url=";
|
||||
|
||||
public static async Task<SnapshotMetaDto> GetMostRecentSnapshotMeta(string url)
|
||||
|
|
|
|||
Loading…
Reference in a new issue