Any jackett search I do returns releases for every synonym regardless of whether "Add releases for each synonym title" is checked or not.
I would like to disable this as some anime have up to 4 or 5 synonyms making the results list bloated. This makes searches in sonarr/radarr very slow.
On that note, I've noticed that the other settings under AnimeBytes don't have any effect on my searches regardless if checked or not.
Filter results by season/episode
? Because I know that has only worked for very rare cases for me at least. It seems to be due to how it parses episode numbers at the moment, and tbh I think it would be pretty hard to write a predictable parser for all the different styles used on AB. You could probably make different parsing strategies based on release group to make it work for most cases.Making bnf grammars for the different groups would probably be pretty easy, given support for using whitespace in tokens
-- bnfc doesn't work with spaces in tokens ;(
Hsub. Rel ::= "[HorribleSubs]" Title "-" Episode ;-- The rest of the stuff after episode cba to type it out
Other. Rel ::= "[SomeOtherGroup]" Title "[" Episode "]" ; -- again, rest of stuff, big lazy cba
token Episode digit+ ;
token Title (letter|digit|':'|'/')+ ;
Something like this could probably be done to parse groups differently.
And given syntax error in input, you could fall back to the current parsing strategy.
EDIT: Actually now that I think about it you might just want to use a list of title elements and use whitespace as separator. That way you could extract specific keywords later to find "Sxx" for example.
And I just found out C# has pattern matching so it wouldn't be the most annoying thing to implement in all existance !!
@feffes Thanks for the quick fix. The "Include Raw" checkbox doesn't seem to work. When I uncheck it, I still get results for raw (unsubtitled anime).
For example, Try a search for "hero academia" with the box unchecked, you will see results being returned for "[Erai-raws]".
@feffes Regarding the Filter results by season/episode
, I never really understood what its purpose was so I can't comment on it and thus have no issue with its current implementation.
For example, Try a search for "hero academia" with the box unchecked, you will see results being returned for "[Erai-raws]".
Erai-raws actually has subtitles in their releases. Their releases use official translations so they're pretty similar to horriblesubs.
Edit :And as to why it allows it, I think it was due to looking for a specific raw tag like [RAW] rest of the stuff
so it doesn't match when raw is simply a substring in another tag. Can't look it up right now though as I'm not at my desktop.
@feffes oh I wasn’t aware of that. Thanks for pointing that out. Let me test again for releases with the ‘’’[RAW]’’’ tag and confirm.
@feffes Try a search for “haikyu karasuno”.
All the dvd sourced releases should be raws (you can confirm this using the AB website search - it will have the raw tag on the OVA).
The unsubtitled OVA raws are still showing up in Jackett despite leaving the “IncludeRaw” checkbox unticked.
EDIT: I reread your comment and just realised you mention it must match “...[RAW]...”. Looks like the raw tag isn’t being parsed by Jackett since it isn’t embedded in the search results, that is if I am understanding it correctly.
This is where it splits out the release tags.
This extracts the releasegroup from the tags.
This checks for any string converted to lower case if it starts with "raw". So any string like "raw" "raw-group-yo-waddup" "RaWREEEELEASSSE" .
Here it checks for any release tag containing the exact string "Raw".
So, basically, it looks like it should be filtering any group that has "raw" at the start of their name or any release tagged with the exact string "Raw". Dunno what the reasoning behind matching with strict case in tags was.
@feffes I think I understand what you're getting at (pardon my ignorance since I am fairly new to coding).
Looks like a strict-case issue. Would it be as simple as just changing the exact string "Raw" to the exact AB tag string "RAW"? Seems like that would fix the tag matching issue.
Tried by replacing https://github.com/Jackett/Jackett/blob/96d5f4800be7f2e9c1ebba653686eb617dd49811/src/Jackett.Common/Indexers/AnimeBytes.cs#L352
With
if (releaseTags[i].ToLowerInvariant() == "raw" && !AllowRaws)
```
but it didn't seem to do anything, it still matches the ovas marked raw.
I tried printing the tag it was checking before doing the check as well but no raw tag ever turned up. The original Property definitely contains it so it's probably either the release tag splitter or the check iteration over the releaseTag list being wonky. Don't have time right now to investigate any further but hope it helps if someone else wants to give it a try ^^
EDIT: Okay that last part was only kind of true but I saw that for loop over the "Raw" tag check was wonky so I tried making it more reasonable and now it at least checks the raw tags, but it's still not filtering correctly for some reason.
EDIT2: Aaaaand one last check before I leave,
```cs
releaseTags[i].ToLowerInvariant() == "raw"
definitely returns true when it should, so now it's something else.
@feffes I'm taking a guess here - could be completely wrong.
Despite it returning true, could it be that the continue
statement within the for loop: for (int i = 0; i + 1 < releaseTags.Count(); i++)
(iterating over release tags) will only skip an iteration of that specific loop? It should be skipping an iteration of the main loop: foreach (JObject torrent in group["Torrents"])
That was actually the problem, here's a pretty ugly patch using goto to exit out of both loops.
From 3e9c7ad6f2056c22253435b7ab3f3a97a1482884 Mon Sep 17 00:00:00 2001
From: feffe <[email protected]>
Date: Sat, 1 Feb 2020 15:42:56 +0100
Subject: [PATCH] Ugly AB raw filter hack fix
---
src/Jackett.Common/Indexers/AnimeBytes.cs | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/Jackett.Common/Indexers/AnimeBytes.cs b/src/Jackett.Common/Indexers/AnimeBytes.cs
index f8fd5227..30531db1 100644
--- a/src/Jackett.Common/Indexers/AnimeBytes.cs
+++ b/src/Jackett.Common/Indexers/AnimeBytes.cs
@@ -318,7 +318,6 @@ namespace Jackett.Common.Indexers
Category = new List<int> { TorznabCatType.AudioOther.ID };
}
}
-
// We dont actually have a release name >.> so try to create one
var releaseTags = Property.Split("|".ToCharArray(), StringSplitOptions.RemoveEmptyEntries).ToList();
for (int i = releaseTags.Count - 1; i >= 0; i--)
@@ -347,11 +346,11 @@ namespace Jackett.Common.Indexers
var infoString = "";
- for (int i = 0; i + 1 < releaseTags.Count(); i++)
+ foreach (var tag in releaseTags)
{
- if (releaseTags[i] == "Raw" && !AllowRaws)
- continue;
- infoString += "[" + releaseTags[i] + "]";
+ if (tag.ToLowerInvariant() == "raw" && !AllowRaws)
+ goto RAWCONT;
+ infoString += "[" + tag + "]";
}
var MinimumSeedTime = 259200;
@@ -391,6 +390,7 @@ namespace Jackett.Common.Indexers
releases.Add(release);
}
+ RAWCONT: continue;
}
}
}
@@ -410,3 +410,7 @@ namespace Jackett.Common.Indexers
}
}
}
+
+
+
+
--
2.25.0
EDIT: @garfield69 is this type of solution acceptable?
oh, ugly ugly code. surely you can do better.
if you need suggestions, perhaps @ngosang can help?
jackett 0.12.1701