Goldenfreddy0703 / Otaku

Repository for Otaku Development
GNU General Public License v3.0
114 stars 22 forks source link

Improvement for anime filtering using terms separated by commas or regex #293

Open antoniem34 opened 4 months ago

antoniem34 commented 4 months ago

Hello, I am a regular anime user, for a while I used radarr and sonarr to download content, but this is meaningless if you will not watch it again, but in these programs something called custom format is used which allows the use of regex or many other terms without limits and even with a scoring system to choose the best and download automatically.

cf-import-to-update

In these you can incorporate the audio channels, words in the titles, quality, video source among others, but this is very elaborate, I only use it for a brief introduction.

OTAKU ADDON

In otaku we already have the possibility of filtering by words but we only have the possibility of using 5 terms, although this seems like a lot, in some cases it is not enough because many times the titles do not always have the same strings even if they belong to the same group.

That is why it would be interesting to add more fields for greater control or the possibility of entering 5 more terms or even more (the more the better).

Filtering using Regex

Screenshot 2024-06-28 095938

(?=.\bMULTi\b)(?=.\bNanDesuKa\b)(?=.(CR))(?=.\bSpanish\b).*

This regular expression uses positive lookaheads ((?=...)) to ensure that all keywords are present on the same line. Here is the breakdown of the expression:

  1. (?=.*\bMULTi\b) ensures that "MULTi" is present on the line.
  2. (?=.*\bNanDesuKa\b) ensures that "NanDesuKa" is present on the line.
  3. (?=.*(CR)) ensures that "(CR)" is present on the line.
  4. (?=.*\bSpanish\b) ensures that "Spanish" is present on the line.
  5. .* allows the expression to match anything before, between, and after the keywords.

To create this expression, I asked ChatGPT

In the addon we would introduce it as follows

Screenshot 2024-06-28 101405

With these changes we could obtain better results and even use auto-reproduction.

Making sure to give priority to sources with Dubbing and that in case you don't select one with the other terms.

In my case I consume content with Spanish or Latin Dubbing, I use Kodi's preferences.

antoniem34 commented 3 months ago

A suggestion regarding this could be to include more terms, that is, more words that can be used for filtering. Sometimes the Subtitles tend to be Multi Subs or Multi Sub, you may not want to only use the Multi Method because it can also refer to more things, and although many believe that it is not so necessary to specify so much, sometimes it is, because for example I want the Multi Sub of a specific Uploader, but I do not want it to take that of another.