Fixed: (RetroFlix) Update description and improve clean title

pull/1337/head
Bogdan 2 years ago committed by Qstick
parent 1529527af9
commit 4b7e47c397

@ -9,9 +9,9 @@ namespace NzbDrone.Core.Indexers.Definitions
public class RetroFlix : SpeedAppBase public class RetroFlix : SpeedAppBase
{ {
public override string Name => "RetroFlix"; public override string Name => "RetroFlix";
public override string[] IndexerUrls => new string[] { "https://retroflix.club/" }; public override string[] IndexerUrls => new[] { "https://retroflix.club/" };
public override string[] LegacyUrls => new string[] { "https://retroflix.net/" }; public override string[] LegacyUrls => new[] { "https://retroflix.net/" };
public override string Description => "Private Torrent Tracker for Classic Movies / TV / General Releases"; public override string Description => "RetroFlix (RFX) is a Private Torrent Tracker for Classic Movies / TV / General Releases";
public override IndexerPrivacy Privacy => IndexerPrivacy.Private; public override IndexerPrivacy Privacy => IndexerPrivacy.Private;
public override TimeSpan RateLimit => TimeSpan.FromSeconds(2.1); public override TimeSpan RateLimit => TimeSpan.FromSeconds(2.1);
protected override int MinimumSeedTime => 432000; // 120 hours protected override int MinimumSeedTime => 432000; // 120 hours

@ -304,7 +304,7 @@ namespace NzbDrone.Core.Indexers.Definitions
return jsonResponse.Resource.Select(torrent => new TorrentInfo return jsonResponse.Resource.Select(torrent => new TorrentInfo
{ {
Guid = torrent.Id.ToString(), Guid = torrent.Id.ToString(),
Title = Regex.Replace(torrent.Name, @"(?i:\[REQUESTED\])", "").Trim(' ', '.'), Title = CleanTitle(torrent.Name),
Description = torrent.ShortDescription, Description = torrent.ShortDescription,
Size = torrent.Size, Size = torrent.Size,
ImdbId = ParseUtil.GetImdbID(torrent.ImdbId).GetValueOrDefault(), ImdbId = ParseUtil.GetImdbID(torrent.ImdbId).GetValueOrDefault(),
@ -323,6 +323,13 @@ namespace NzbDrone.Core.Indexers.Definitions
UploadVolumeFactor = torrent.UploadVolumeFactor, UploadVolumeFactor = torrent.UploadVolumeFactor,
}).ToArray(); }).ToArray();
} }
private static string CleanTitle(string title)
{
title = Regex.Replace(title, @"\[REQUEST(ED)?\]", string.Empty, RegexOptions.Compiled | RegexOptions.IgnoreCase);
return title.Trim(' ', '.');
}
} }
public class SpeedAppSettingsValidator : AbstractValidator<SpeedAppSettings> public class SpeedAppSettingsValidator : AbstractValidator<SpeedAppSettings>

Loading…
Cancel
Save