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: Release Type (Single/Multi episode and Season Pack) for Custom Formats #6567

Merged
merged 2 commits into from
Mar 2, 2024

Conversation

markus101
Copy link
Member

Description

Adds a new CF type of Release Type which can be used to prefer or avoid releases based on whether they are single episode, multi-episode or season packs. The value of the release type is stored in history, blocklist and with the final episode file to prevent download loops that previously existed with release title regex matching alone.

In a roundabout way it closes #3562 by embracing the lose of season/multi-episode preference that currently exists, but also adds some changes towards #5598.

Screenshots for UI Changes

image

Database Migration

YES - 203

Issues Fixed or Closed by this PR

Alter.Table("Blocklist").AddColumn("ReleaseType").AsInt32().WithDefaultValue(0);
Alter.Table("EpisodeFiles").AddColumn("ReleaseType").AsInt32().WithDefaultValue(0);

Execute.WithConnection(UpdateEpisodeFiles);
Copy link
Member Author

Choose a reason for hiding this comment

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

This only updates episode files to keep it lighter than trying to update existing history and blocklist, though it would be possible.

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if a migration timeout increase would be necessary for big libraries, since the db migration is doing some title parsing.

Copy link
Member Author

Choose a reason for hiding this comment

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

Parsing should be pretty quick, but let me try and benchmark it a bit to see if that'll trigger often.

Copy link
Member Author

Choose a reason for hiding this comment

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

I pulled in a list of 12060 file paths and ran them through the parser, 12045 of them parsed successfully, with 15 failing for whatever reason. Total time taken was 923ms. There will be some additional overhead reading/writing from/to the DB, but I think we still have a lot of overhead here.

Copy link
Contributor

Choose a reason for hiding this comment

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

I had to raise it in Prowlarr when I added some db migrations altering the History table. The user reporting the issue was using FreeBSD, so I'm not fully certain if it was only a OS fluke.

Copy link
Member Author

Choose a reason for hiding this comment

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

What's at it in Prowlarr now? Not opposed to increasing the limit, but also, of course it's FreeBSD.

Copy link
Contributor

Choose a reason for hiding this comment

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

10 mins just to be safe since the db migrations were taking 5-6 mins on some setups.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've bumped it to 5 minutes, let's see how that goes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good.

@owine
Copy link
Contributor

owine commented Feb 29, 2024

Would this allow for #6550 to be handled via CF scoring (negative score MultiEpisode, for example)? I believe there is separate handling that blocks those upgrades but it would be nice to set a preference for SingleEpisode via CF.

@markus101
Copy link
Member Author

No, you'd still run into things not being an upgrade for all episodes and getting rejected.

@markus101 markus101 merged commit 086d3b5 into develop Mar 2, 2024
12 checks passed
@markus101 markus101 deleted the release-type-custom-format branch March 2, 2024 01:26
}
}

public class SeasonPackSpecification : CustomFormatSpecificationBase
Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't matter that much at this point, but I just noticed SeasonPackSpecification while exporting the new CF.

@markus101
Copy link
Member Author

Ahh, I forgot to rename when I changed directions a bit. I'll fix in a separate PR with a migration to fix as well.

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

Successfully merging this pull request may close these issues.

Preferred Words overrule season pack preference
3 participants