Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Searching For Anime Seasons #6495

Open
1 task done
Ravencentric opened this issue Feb 9, 2024 · 11 comments
Open
1 task done

Improve Searching For Anime Seasons #6495

Ravencentric opened this issue Feb 9, 2024 · 11 comments

Comments

@Ravencentric
Copy link

Ravencentric commented Feb 9, 2024

Is there an existing issue for this?

  • I have searched the existing open and closed issues

Is your feature request related to a problem? Please describe

Series Type: Anime makes it so Sonarr searches every episode times every alias for every season of an Anime. This was probably necessary long long ago but in modern anime scene, this does nothing but slow down searches and waste api hits. For a 24 episode anime, it took Sonarr 10 mins on Nyaa and 4 mins on AB, this number usually varies depending on the number of episodes and alias but you get the gist of the problem.

This behavior is based on the philosophy that "anime has no seasons" which isn't true, atleast hasn't been true for years. Anime has seasons, They usually will either use SXX/Season X or more commonly, "Season Titles" to declare seasons. For example, a season pack may use a season title to differentiate itself, i.e, [group] Dr. Stone: Stone Wars [...] (xem has this info, #5195) where Stone Wars is the title of the second season.

To better demonstrate my point, consider the two "main" trackers for anime:

  1. AnimeBytes does not allow anything that isn't a pack at all, even airing episodes are all under a single group. Searching every episode of an anime on AnimeBytes is such a massive waste because of their strict grouping and season pack policies. The SysOp of AB himself addressed how AB only allows season packs. Prowlarr already realizes this and strips out the episode number from the search and caches the results so when Sonarr hits AB for the 100th time, it gives the same cached result again and again till Sonarr exhausts all the episode and alias combos but this still ends up adding a weird artificial slowness to the whole process. Sonarr could have had done the same thing by just searching the season aliases in a few seconds.

  2. Nyaa, the biggest anime public tracker (and possibly the only relevant one), is the source of most anime. Nyaa is where most content originates and then gets cross posted to AB. So practically, Nyaa has most of the season packs that AB has, albeit with worse retention. Once again, Sonarr searching every alias of every episode ends up being a massive waste of both API hits and anime (which can sometimes get you 429'd). This takes even longer than AB due to no Prowlarr magic behind it, causing a 24 episode anime to take 10 whole mins to search.

Q. But One Piece/Pokemon/{insert old and long anime here}?
A. Although I would say these are exceptions, they still have season packs on both Nyaa and AB. Even if they don't series like these are exceptions and should not be considered for the default behavior any longer.

The anime that don't have batches are a minority and an exception. The old continuously running anime for thousands of episode isn't thing anymore and hasn't been a thing for years. Anime has followed a much more digestable 12-24 episode "seasons" format for years. These get immediately packed as soon as they end airing.

The current behavior favors a now dead system that makes up a minority of anime and ends up making things worse for every thing released in the last decade and later. Most of the time you'll end up having to grab these messy super long shows manually anyway.

Describe the solution you'd like

The solution would be making it behave much more like Series Type: Standard but without the forced season/ep params. Search the season aliases and be done with it. Why not use Standard? because it forces the season param and tacks on the S01, S02, etc when this is mostly "optional" in the anime scene. You'll miss Dr Stone: Stone Wars (S02) if you search Dr Stone S02. The season pack can be either Dr Stone: Stone wars or Dr Stone S02.

EDITED to include #6495 (comment)

Ideally, an Anime Type should do the following:

  • When user explicitly requests a single episode, the current behavior should continue as is like so:
    • Dr Stone 13 # S02E01
    • Dr Stone S2 01 # S02E01
    • Dr Stone S02E01 # S02E01
    • Dr Stone Stone wars 01 # S02E01
  • When season packs are requested, do NOT search individual episodes. Search the xem aliases:
    • Dr Stone S02
    • Dr Stone S2
    • Dr Stone Stone Wars
      Only 3 searches get the job done instead of 4x12

Describe alternatives you've considered

Grabbing a pack manually because it's faster than letting Sonarr search every episode

Anything else?

No response

@thezoggy
Copy link

thezoggy commented Feb 9, 2024

if you have better indexers where they support id searches then you dont deal with the suboptimal nature of string searches².
https://wiki.servarr.com/sonarr/faq#how-does-sonarr-find-episodes

now about season packs.. 'anime' series type in sonarr (i hate that sonarr calls it anime) but its really just means absolute numbering. which does not have season packs.. its just episode number. if you want season concept, use 'standard' type. then season packs work fine

²assuming that there is results for the id search. if none, then will fall back to string searches.

@mynameisbogdan
Copy link
Contributor

I already had this talk about searching on AB, to me the solution is either AB starts to support season+episode search or it's added natively into Sonarr and does a single search.

@Ravencentric
Copy link
Author

if you have better indexers where they support id searches then you dont deal with the suboptimal nature of string searches².
https://wiki.servarr.com/sonarr/faq#how-does-sonarr-find-episodes

Issue isn't really about what Indexer/tracker I have, AB/Nyaa are the home for anime, they get more anime and they get it faster than the top indexers/trackers

now about season packs.. 'anime' series type in sonarr (i hate that sonarr calls it anime) but its really just means absolute numbering. which does not have season packs.. its just episode number. if you want season concept, use 'standard' type. then season packs work fine

Ideally, an Anime Type should do the following:

  • When user explicitly requests a single episode, the current behavior should continue as is like so:
    • Dr Stone 13 # S02E01
    • Dr Stone S2 01 # S02E01
    • Dr Stone S02E01 # S02E01
    • Dr Stone Stone wars 01 # S02E01
  • When season packs are requested, do NOT search individual episodes. Search the xem aliases:
    • Dr Stone S02
    • Dr Stone S2
    • Dr Stone Stone Wars
      Only 3 searches get the job done instead of 4x12

This will pretty much deal with anime smoothly.

@thezoggy
Copy link

thezoggy commented Feb 9, 2024

if you have better indexers where they support id searches then you dont deal with the suboptimal nature of string searches².
https://wiki.servarr.com/sonarr/faq#how-does-sonarr-find-episodes

Issue isn't really about what Indexer/tracker I have, AB/Nyaa are the home for anime, they get more anime and they get it faster than the top indexers/trackers

now about season packs.. 'anime' series type in sonarr (i hate that sonarr calls it anime) but its really just means absolute numbering. which does not have season packs.. its just episode number. if you want season concept, use 'standard' type. then season packs work fine

Ideally, an Anime Type should do the following:

* When user explicitly requests a single episode, the current behavior should continue as is like so:
  
  * `Dr Stone 13` # S02E01
  * `Dr Stone S2 01` # S02E01
  * `Dr Stone S02E01` # S02E01
  * `Dr Stone Stone wars 01` # S02E01

* When season packs are requested, do NOT search individual episodes. Search the xem aliases:
  
  * `Dr Stone S02`
  * `Dr Stone S2`
  * `Dr Stone Stone Wars`
    _Only 3 searches get the job done instead of 4x12_

This will pretty much deal with anime smoothly.

this assumption is that all series are in xem (they arent, nor would i want them to be).. then not every release group uses the same season alias or need aliases to begin with. and yes it goes back to if you were using better indexers which supported id searches where the series title part of this equation is removed on searching only for matching.

@Ravencentric
Copy link
Author

this assumption is that all series are in xem (they arent, nor would i want them to be).. then not every release group uses the same season alias or need aliases to begin with.

If they are not in xem then they already only search a single alias but 12 episodes (again, useless) and they would get the same thing by just searching the name of the show. There was never an assumption that they must be in xem, i just picked an example from xem to convey the waste sonarr generates. In pretty much every case, Searching Show Name 01, Show Name 02, ..., Show Name 12 (no xem aliases) is a waste that at best gives you the same result as searching Show Name once or at worst, actually filters out season packs because they don't mention the episode number.

yes it goes back to if you were using better indexers which supported id searches where the series title part of this equation is removed on searching only for matching.

I already have the top trackers and secret indexers, the point is they are not the home for anime, they are slower to get it and they have smaller anime library compared to AB (which is obvious, anime tracker vs trackers that happen to have anime)

You can boil down my request to this:

  • Do not search every alias of every episode when season packs are requested. Only search the show name (and it's aliases IF available). Anime has packs and sonarr at best finds them after going through every episode or at worst filters them out because of the way it's searching
  • Nothing else changes

@thezoggy
Copy link

But this is not true. Sites return limited results so searching by just the series (or even just the alias) may have to many results to return pushing the one the user wants out of the return results if it's not within that limit. This happens with vaguely named series or very long running series...

Which is why you would want to have the absolute number to limit scope.

There is definitely room for improvement with how sonarr does aliases (wish it only did aliases for the lang the user cares for example) but then there is the dataset problem where people want sub/sub which may not align with the lang of the alias or what the group is known for.. so it gets messy to assume. This is why I do push back on adding aliases on xem to try and limit resources drain that it will bring on everyone because of how things work.

In perfect world anime would use some sensible standards with naming that one could just simply leverage that metadata.. but sadly it doesn't exist. So we have to play this alias game most of the time.

@Ravencentric
Copy link
Author

Ravencentric commented Feb 10, 2024

But this is not true. Sites return limited results so searching by just the series (or even just the alias) may have to many results to return pushing the one the user wants out of the return results if it's not within that limit.

Searching every episode is helping sonarr narrow down an episode, which it shouldn't look for to begin with for a completed season. Season packs are uploaded after the airing ends so they'll be top of the result when searched without the episode numbers. Searching season packs with episode numbers is actually shoving season packs down the results or filtering them out entirely!

This happens with vaguely named series or very long running series...

These are issues with the current system too and often require you to manually do it anyway. There are 170 anime in the whole world that cross the 100 episode count, a large portion of these are older than 2000s and exclusive to Japan. Again, a minority of anime should not be considered for the default search behavior causing issues for a majority of anime.

In perfect world anime would use some sensible standards with naming that one could just simply leverage that metadata.. but sadly it doesn't exist.

Yes, and it'll probably never exist either. Best thing that could be done here is improving the current method to work better with modern anime scene instead of following practices from 2 decades ago.

@rg9400
Copy link
Contributor

rg9400 commented Feb 10, 2024

But this is not true. Sites return limited results so searching by just the series (or even just the alias) may have to many results to return pushing the one the user wants out of the return results if it's not within that limit. This happens with vaguely named series or very long running series...

Which is why you would want to have the absolute number to limit scope.

There is definitely room for improvement with how sonarr does aliases (wish it only did aliases for the lang the user cares for example) but then there is the dataset problem where people want sub/sub which may not align with the lang of the alias or what the group is known for.. so it gets messy to assume. This is why I do push back on adding aliases on xem to try and limit resources drain that it will bring on everyone because of how things work.

In perfect world anime would use some sensible standards with naming that one could just simply leverage that metadata.. but sadly it doesn't exist. So we have to play this alias game most of the time.

Honestly, the current behavior makes searching anime beyond the episode level a complete no go. It's effectively useless. Because it searches every single episode across multiple aliases, you'll end with 3000+ results for a small show, and yet since the best releases are season packs, you still won't get the one you'd want. If you use Usenet, you'll exhaust your API hits with just a few searches. The advice given to people using Sonarr for anime is to simply not backfill and manually grab releases, and only use the RSS for ongoing anime.

Why? Because RSS actually grabs and parses season packs fine while also still grabbing the absolute episode individual episodes for currently airing stuff.

The behavior for anime would be significantly improved if a show and season search only searched season aliases for completed seasons, and episodes for ongoing seasons. This would actually make it functional. Also, not as important, but it would be nice if anime stopped pegging episodes to absolute episode numbers so that if the order changed, the files themselves got switched across seasons. I think the importance of absolute episode number is significantly less now as Raven mentioned, and while there are a few outliers, most don't need that much weightage on it. The main thing they should be used for is to parse and search episode numbers.

@markus101
Copy link
Member

Thanks for the discussion on this so far, this is something I've been thinking about off and on and it's definitely something that needs to be improved.

* When season packs are requested, do NOT search individual episodes. Search the xem aliases:
  
  * `Dr Stone S02`
  * `Dr Stone S2`
  * `Dr Stone Stone Wars`
    _Only 3 searches get the job done instead of 4x12_

What about searches for season 1?
Is Searching for Dr Stone S1 and Dr Stone S01 the expectation?
Searching for just Dr Stone will yield results from every season and alias it'd be virtually impossible to find them, but individual results would be very limited.

Should Sonarr always search for Dr Stone Sxx even on series + season combinations where that's not an explicit alias?

Searching for Dr Stone Stone Wars looks like it will yield results, but Sonarr isn't going to be able to do much with those results because of the lack of season/episode identifiers, though interactive search should be able to handle them (with override and grab).

@Ravencentric
Copy link
Author

Ravencentric commented Feb 22, 2024

What about searches for season 1?
Is Searching for Dr Stone S1 and Dr Stone S01 the expectation?
Searching for just Dr Stone will yield results from every season and alias it'd be virtually impossible to find them, but individual results would be very limited.

Yea, the best sonarr could do here is just search Dr stone, Dr stone s1, Dr stone season 1, and Dr stone s01 to try to get them. Sonarr can only fix bad naming so much so i think trying the season and failing early is still better the current behavior. This will atleast still make single season show searches far better.

Should Sonarr always search for Dr Stone Sxx even on series + season combinations where that's not an explicit alias?

yes

Searching for Dr Stone Stone Wars looks like it will yield results, but Sonarr isn't going to be able to do much with those results because of the lack of season/episode identifiers, though interactive search should be able to handle them (with override and grab).

Prowlarr already handles this by guesstimating the season number and appending it to the title before passing to sonarr.
For example:
Nyaa title: [MTBB] A Place Further than the Universe (BD 1080p) | Sora yori mo Tooi Basho
Prowlarr returns: [MTBB] A Place Further than the Universe (BD 1080p) | Sora yori mo Tooi Basho S01
Prowlarr does the same for AB too

side note: apologies for the late response, been a bit busy

@markus101 markus101 changed the title Series Type: Anime's behavior needs a re-evaluation Improve Searching For Anime Seasons Feb 24, 2024
@markus101
Copy link
Member

Thanks for the info.

Internally this will require changes to how aliases are fetched and used for searching for anime, as well as removing the individual episode searching that is currently used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants