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

Given known information, change which rules to apply #1

Open
platelminto opened this issue Apr 8, 2020 · 4 comments
Open

Given known information, change which rules to apply #1

platelminto opened this issue Apr 8, 2020 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@platelminto
Copy link
Owner

Often, the user will know more information than just the torrent title - for example, for movies, a release year is usually already known.

It would be useful to provide an optional **kwargs argument - the provided information would then be stripped from the title, skipping the appropriate rules, and the values added directly to the return dict.

@platelminto platelminto added enhancement New feature or request good first issue Good for newcomers labels Apr 8, 2020
@platelminto
Copy link
Owner Author

Generic information about the media could also be provided, such as whether it is a movie or a TV show/season/episode, which could also automatically filter out appropriate rules.

@platelminto
Copy link
Owner Author

Haven't found any rules that match too liberally that would benefit from some known information, so not actively working towards this.

@platelminto
Copy link
Owner Author

Could add a flag to parse() to only look for 'simple' fields, as some niche ones (like extended and proper, and generally most of the boolean ones) are sometimes words that could show up in release titles. This isn't a major issue as I've added the ones that could be found in a title to extras.py's patterns_ignore_title, but if that delimiter (currently either season or year) isn't available, it could be a problem. I haven't seen this yet though.

An example list of 'simple' fields could be:

['season', 'episode', 'year', 'month', 'day', 'resolution', 'quality',
'codec', 'audio', 'hardcoded', 'container', 'website', 'language', 'subtitles']

The aim of this list is to contain fields that are a) often useful b) mismatch rarely and c) enough to be able to still split the title correctly (as anything unmatched just after the title would be included with it).

Additionally, this would improve performance, as we are going through fewer fields. This isn't very important though, as the average parse already takes just a couple milliseconds.

@platelminto
Copy link
Owner Author

Possible search 'types' could be:

  • Movie Collection
  • Movie
  • TV episode
  • TV season
  • TV collection (multiseason)

platelminto pushed a commit that referenced this issue Oct 17, 2023
added shorten lang support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant