mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-27 23:16:58 -04:00
Anime!
New: Anime support New: pull alternate names from thexem.de New: Search using all alternate names (if rage ID is unavailable) New: Show scene mapping information when hovering over episode number New: Full season searching for anime (searches for each episode) New: animezb.com anime indexer New: Treat BD as bluray Fixed: Parsing of 2 digit absolute episode numbers Fixed: Loading series details page for series that start with period Fixed: Return 0 results when manual search fails, instead of an error Fixed: animezb URL
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.Eventing.Reader;
|
||||
using System.Linq;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Core.ThingiProvider;
|
||||
|
||||
namespace NzbDrone.Core.Indexers.Newznab
|
||||
@@ -79,13 +81,9 @@ namespace NzbDrone.Core.Indexers.Newznab
|
||||
{
|
||||
get
|
||||
{
|
||||
//Todo: We should be able to update settings on start
|
||||
if (Settings.Url.Contains("nzbs.org"))
|
||||
{
|
||||
Settings.Categories = new List<int> { 5000 };
|
||||
}
|
||||
var categories = String.Join(",", Settings.Categories.Concat(Settings.AnimeCategories));
|
||||
|
||||
var url = String.Format("{0}/api?t=tvsearch&cat={1}&extended=1", Settings.Url.TrimEnd('/'), String.Join(",", Settings.Categories));
|
||||
var url = String.Format("{0}/api?t=tvsearch&cat={1}&extended=1{2}", Settings.Url.TrimEnd('/'), categories, Settings.AdditionalParameters);
|
||||
|
||||
if (!String.IsNullOrWhiteSpace(Settings.ApiKey))
|
||||
{
|
||||
@@ -96,14 +94,71 @@ namespace NzbDrone.Core.Indexers.Newznab
|
||||
}
|
||||
}
|
||||
|
||||
public override IEnumerable<string> GetEpisodeSearchUrls(string seriesTitle, int tvRageId, int seasonNumber, int episodeNumber)
|
||||
public override IEnumerable<string> GetEpisodeSearchUrls(List<String> titles, int tvRageId, int seasonNumber, int episodeNumber)
|
||||
{
|
||||
if (Settings.Categories.Empty())
|
||||
{
|
||||
return Enumerable.Empty<String>();
|
||||
}
|
||||
|
||||
if (tvRageId > 0)
|
||||
{
|
||||
return RecentFeed.Select(url => String.Format("{0}&limit=100&rid={1}&season={2}&ep={3}", url, tvRageId, seasonNumber, episodeNumber));
|
||||
}
|
||||
|
||||
return RecentFeed.Select(url => String.Format("{0}&limit=100&q={1}&season={2}&ep={3}", url, NewsnabifyTitle(seriesTitle), seasonNumber, episodeNumber));
|
||||
return titles.SelectMany(title =>
|
||||
RecentFeed.Select(url =>
|
||||
String.Format("{0}&limit=100&q={1}&season={2}&ep={3}",
|
||||
url, NewsnabifyTitle(title), seasonNumber, episodeNumber)));
|
||||
}
|
||||
|
||||
public override IEnumerable<string> GetDailyEpisodeSearchUrls(List<String> titles, int tvRageId, DateTime date)
|
||||
{
|
||||
if (Settings.Categories.Empty())
|
||||
{
|
||||
return Enumerable.Empty<String>();
|
||||
}
|
||||
|
||||
if (tvRageId > 0)
|
||||
{
|
||||
return RecentFeed.Select(url => String.Format("{0}&limit=100&rid={1}&season={2:yyyy}&ep={2:MM}/{2:dd}", url, tvRageId, date)).ToList();
|
||||
}
|
||||
|
||||
return titles.SelectMany(title =>
|
||||
RecentFeed.Select(url =>
|
||||
String.Format("{0}&limit=100&q={1}&season={2:yyyy}&ep={2:MM}/{2:dd}",
|
||||
url, NewsnabifyTitle(title), date)).ToList());
|
||||
}
|
||||
|
||||
public override IEnumerable<string> GetAnimeEpisodeSearchUrls(List<String> titles, int tvRageId, int absoluteEpisodeNumber)
|
||||
{
|
||||
if (Settings.AnimeCategories.Empty())
|
||||
{
|
||||
return Enumerable.Empty<String>();
|
||||
}
|
||||
|
||||
return titles.SelectMany(title =>
|
||||
RecentFeed.Select(url =>
|
||||
String.Format("{0}&limit=100&q={1}+{2:00}",
|
||||
url.Replace("t=tvsearch", "t=search"), NewsnabifyTitle(title), absoluteEpisodeNumber)));
|
||||
}
|
||||
|
||||
public override IEnumerable<string> GetSeasonSearchUrls(List<String> titles, int tvRageId, int seasonNumber, int offset)
|
||||
{
|
||||
if (Settings.Categories.Empty())
|
||||
{
|
||||
return Enumerable.Empty<String>();
|
||||
}
|
||||
|
||||
if (tvRageId > 0)
|
||||
{
|
||||
return RecentFeed.Select(url => String.Format("{0}&limit=100&rid={1}&season={2}&offset={3}", url, tvRageId, seasonNumber, offset));
|
||||
}
|
||||
|
||||
return titles.SelectMany(title =>
|
||||
RecentFeed.Select(url =>
|
||||
String.Format("{0}&limit=100&q={1}&season={2}&offset={3}",
|
||||
url, NewsnabifyTitle(title), seasonNumber, offset)));
|
||||
}
|
||||
|
||||
public override IEnumerable<string> GetSearchUrls(string query, int offset)
|
||||
@@ -114,33 +169,6 @@ namespace NzbDrone.Core.Indexers.Newznab
|
||||
return RecentFeed.Select(url => String.Format("{0}&offset={1}&limit=100&q={2}", url.Replace("t=tvsearch", "t=search"), offset, query));
|
||||
}
|
||||
|
||||
|
||||
public override IEnumerable<string> GetDailyEpisodeSearchUrls(string seriesTitle, int tvRageId, DateTime date)
|
||||
{
|
||||
if (tvRageId > 0)
|
||||
{
|
||||
return RecentFeed.Select(url => String.Format("{0}&limit=100&rid={1}&season={2:yyyy}&ep={2:MM}/{2:dd}", url, tvRageId, date)).ToList();
|
||||
}
|
||||
|
||||
return RecentFeed.Select(url => String.Format("{0}&limit=100&q={1}&season={2:yyyy}&ep={2:MM}/{2:dd}", url, NewsnabifyTitle(seriesTitle), date)).ToList();
|
||||
}
|
||||
|
||||
public override IEnumerable<string> GetAnimeEpisodeSearchUrls(string seriesTitle, int tvRageId, int absoluteEpisodeNumber)
|
||||
{
|
||||
// TODO: Implement
|
||||
return new List<string>();
|
||||
}
|
||||
|
||||
public override IEnumerable<string> GetSeasonSearchUrls(string seriesTitle, int tvRageId, int seasonNumber, int offset)
|
||||
{
|
||||
if (tvRageId > 0)
|
||||
{
|
||||
return RecentFeed.Select(url => String.Format("{0}&limit=100&rid={1}&season={2}&offset={3}", url, tvRageId, seasonNumber, offset));
|
||||
}
|
||||
|
||||
return RecentFeed.Select(url => String.Format("{0}&limit=100&q={1}&season={2}&offset={3}", url, NewsnabifyTitle(seriesTitle), seasonNumber, offset));
|
||||
}
|
||||
|
||||
private static string NewsnabifyTitle(string title)
|
||||
{
|
||||
return title.Replace("+", "%20");
|
||||
|
||||
Reference in New Issue
Block a user