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

New: freeleech token minimum torrent size #1280

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

kageurufu
Copy link

Database Migration

NO

Description

I only want to use my tokens for torrents above a given size. This
extends IIndexer.Download() to include optional ReleaseInfo, which can
be used to compare ReleaseInfo.Size against the configured
FreeleechSize.

In cases like Gazelle where GetDownloadUrl() handles the usetoken
parameter, I added a torrentSize parameter as well.

Screenshot (if UI related)

image

Todos

  • Tests
  • Translation Keys (./src/NzbDrone.Core/Localization/Core/en.json)
  • Wiki Updates

Issues Fixed or Closed by this PR

I haven't created an issue, I figured I would just PR this.

Changes to Gazelle's settings ended up based on my other PR #1279

Frank Tackitt added 2 commits January 3, 2023 12:39
Many indexers were not properly validating inherited properties, this
adjusts UserPassBaseSettingsValidator and NoAuthSettingsValidator to be
generic, and subclasses of the settings that need their own validators
added now inherity properly from that.
I only want to use my tokens for torrents above a given size. This
extends IIndexer.Download() to include optional ReleaseInfo, which can
be used to compare ReleaseInfo.Size against the configured
FreeleechSize.

In cases like Gazelle where GetDownloadUrl() handles the `usetoken`
parameter, I added a `torrentSize` parameter as well.
@bakerboy448

This comment was marked as spam.

}

public string AuthKey;
public string PassKey;

[FieldDefinition(4, Type = FieldType.Checkbox, Label = "Use Freeleech Token", HelpText = "Use freeleech tokens when available")]
public bool UseFreeleechToken { get; set; }

[FieldDefinition(5, Type = FieldType.Number, Label = "Freeleech Torrent Size", Unit = "bytes", Advanced = true, HelpText = "Only use freeleech tokens for torrents above a given size")]
public long FreeleechSize { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not FreeleechTokenMinimumSize?

@bakerboy448 bakerboy448 added Status: Waiting for OP Action Required from OP Area: Indexer Issue is related to indexers. labels Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Indexer Issue is related to indexers. Status: Waiting for OP Action Required from OP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants