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

Feature/add quality profiles #7293

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

Conversation

p0psicles
Copy link
Contributor

  • PR is based on the DEVELOP branch
  • Don't send big changes all at once. Split up big PRs into multiple smaller PRs that are easier to manage and review
  • Read the contribution guide

For now this needs to be added manually through an sqllite editor.

CREATE TABLE "quality_profile_options" (
	`option_id`	INTEGER PRIMARY KEY AUTOINCREMENT,
	`quality_profile_id`	INTEGER NOT NULL,
	`quality_allowed`	INTEGER,
	`quality_preferred`	INTEGER,
	`size_min`	INTEGER,
	`size_max`	INTEGER,
	`rls_require_words`	TEXT,
	`rls_ignore_words`	TEXT,
	`rls_require_exclude`	INTEGER,
	`rls_ignore_exclude`	INTEGER
)

CREATE TABLE "quality_profiles" (
	`quality_profile_id`	INTEGER PRIMARY KEY AUTOINCREMENT,
	`description`	TEXT,
	`enabled`	INTEGER NOT NULL DEFAULT 0,
	`default`	INTEGER NOT NULL DEFAULT 1
)


# add to quality_profiles.csv
quality_profile_id,description,enabled,default
1,Default Profile,1,1

# add to quality_profile_options.csv (as some default values)
option_id,quality_profile_id,quality_allowed,quality_preferred,size_min,size_max,rls_require_words,rls_ignore_words,rls_require_exclude,rls_ignore_exclude
1,0,8,,256,512,,,,
2,0,16,,256,600,,,,
3,0,32,,512,1024,,,,
4,0,64,,512,1400,,,,
5,0,,16,256,600,,,,
6,0,,32,512,1024,,,,
7,0,,64,512,1600,,,,

* Start with classes for the QualityProfile and QualityOptions.
* self.quality_profile now loads the default (0). Default can change.
Newly added profiles 1,2,3,.. can be used per tvshow.
self.profile_description = None
self.enabled = None
self.default = None
self.qualities = []
Copy link
Contributor Author

Choose a reason for hiding this comment

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

)

for option in quality_options:
self.qualities.append(QualityOption(db_row=option))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here is each QualityOption added to the array qualities

@rafi-d
Copy link
Contributor

rafi-d commented Nov 20, 2019

So, I am trying to compare this to my own implementation (before commenting) , running for about a year now, and am trying to understand the concept here. Will This profile (say for my_1080p-FHD) will be one global for all shows, or needs/can be defined per show?

@p0psicles
Copy link
Contributor Author

It will allow you to specify a min max per quality. Like 100/200 for sd and 500/1000 for hd. There are more possible future improvements. Like you can sort your qualities. And have required words for webdl but not fullhd.

@p0psicles
Copy link
Contributor Author

But where far from that. For now laying the foundation.

@rafi-d
Copy link
Contributor

rafi-d commented Nov 20, 2019

So, since all my shows are now set to snatch only 1080p, it WILL be one for all, right?

@rafi-d
Copy link
Contributor

rafi-d commented Nov 21, 2019

Comments raised in internal discussion:

  1. Normalization of the size per play-time is required (there is a factors-per-quality which I can share) so this factor needs to be defined per-quality somewhere (hard coded, or in this infrastructure) .
  2. Global/base (also the default) + local (per-show, user-generated) profiles are recommended

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

Successfully merging this pull request may close these issues.

None yet

2 participants