Metadata
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Elias Jansson
2025-08-29 15:30:11 +02:00
parent a6fd3d720f
commit f63ccc2a38
2 changed files with 12 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Aberwyn.Data
{
@@ -93,8 +94,11 @@ namespace Aberwyn.Data
public List<Provider>? Rent { get; set; }
public List<Provider>? Buy { get; set; }
}
public class Provider { public string ProviderName { get; set; } = ""; }
public class Provider
{
[JsonPropertyName("provider_name")]
public string ProviderName { get; set; } = "";
}
}

View File

@@ -26,7 +26,12 @@ namespace Aberwyn.Data
public async Task ProcessRssFeeds()
{
var debug = false;
var oneHourAgo = DateTime.UtcNow.AddHours(-1);
if (debug)
oneHourAgo = DateTime.UtcNow.AddHours(1);
var activeFeeds = await _context.RssFeeds
.Where(f => f.IsActive && f.LastChecked <= oneHourAgo)
@@ -85,7 +90,7 @@ namespace Aberwyn.Data
{
torrentItem.Metadata = metadata;
var tmdbService = new TmdbService();
torrentItem.Metadata.Providers = await tmdbService.GetWatchProvidersByTitleAsync(torrentItem.Title, torrentItem.Year);
torrentItem.Metadata.Providers = await tmdbService.GetWatchProvidersByTitleAsync(torrentItem.MovieName, torrentItem.Year);
}