Skip to content

Commit

Permalink
bjshare: fix title parsing (#9728)
Browse files Browse the repository at this point in the history
  • Loading branch information
christianfds committed Oct 4, 2020
1 parent d12a86f commit 68b4393
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/Jackett.Common/Indexers/BJShare.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ private string ParseTitle(string title, string seasonEp, string year, string cat
cleanTitle += " " + seasonEp;
else
cleanTitle += " " + year + " " + seasonEp;
return FixAbsoluteNumbering(cleanTitle);

cleanTitle = FixAbsoluteNumbering(cleanTitle);
cleanTitle = FixNovelNumber(cleanTitle);
return cleanTitle;
}

private bool IsAbsoluteNumbering(string title)
Expand Down Expand Up @@ -422,6 +425,7 @@ private async Task<List<ReleaseInfo>> ParseLast24HoursAsync()
var qTitle = qDetailsLink.QuerySelector("font");
// Get international title if available, or use the full title if not
release.Title = Regex.Replace(qTitle.TextContent, @".* \[(.*?)\](.*)", "$1$2");
var seasonEp = _EpisodeRegex.Match(qTitle.TextContent).Value;
var year = "";
release.Description = "";
var extraInfo = "";
Expand Down Expand Up @@ -474,11 +478,8 @@ private async Task<List<ReleaseInfo>> ParseLast24HoursAsync()

var catStr = qCatLink.GetAttribute("href").Split('=')[1].Split('&')[0];
if (!string.IsNullOrEmpty(year))
release.Title = FixYearPosition(release.Title, year);

release.Title = FixAbsoluteNumbering(release.Title);
release.Title = FixNovelNumber(release.Title);

release.Title = ParseTitle(release.Title, seasonEp, year, catStr);

if (qQuality != null)
{
var quality = qQuality.TextContent;
Expand Down

0 comments on commit 68b4393

Please sign in to comment.