SwagOtaku / plugin.video.kaito

26 stars 32 forks source link

Improved title filtering, by implementing words separated by commas or using regex #109

Closed antoniem34 closed 2 weeks ago

antoniem34 commented 3 weeks 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.