- option to choose what app export is "using". Allows similar profiles, custom formats for both apps to exist at the same time.
- added many release groups. Mostly TV related
- fixed some outlier issues with Radarr profiles
- added v0.1 Transparent and Optimal profiles for Sonarr
- updated custom formats to work with either / radarr sonarr
This commit is contained in:
Samuel Chau
2024-01-19 13:39:04 +10:30
parent eacb063164
commit aba057a8c9
8 changed files with 11191 additions and 1717 deletions

View File

@@ -2384,6 +2384,27 @@
"isFloat": false
}
]
},
{
"name": "x264",
"implementation": "ReleaseTitleSpecification",
"implementationName": "Release Title",
"infoLink": "https://wiki.servarr.com/radarr/settings#custom-formats-2",
"negate": false,
"required": true,
"fields": [
{
"order": 0,
"name": "value",
"label": "Regular Expression",
"helpText": "Custom Format RegEx is Case Insensitive",
"value": "^(?!.*(?i:remux)).*([xh](\\.?264)|DVDRip)",
"type": "textbox",
"advanced": false,
"privacy": "normal",
"isFloat": false
}
]
}
]
},
@@ -4807,7 +4828,7 @@
"name": "value",
"label": "Regular Expression",
"helpText": "Custom Format RegEx is Case Insensitive",
"value": "^(?!.*(?i:remux)).*([xh](\\.?265)|HEVC)",
"value": "^(?!.*(?i:remux)).*([x]\\s?(\\.?265))",
"type": "textbox",
"advanced": false,
"privacy": "normal",
@@ -6866,36 +6887,44 @@
]
},
{
"name": "size",
"implementation": "SizeSpecification",
"implementationName": "Size",
"name": "FLUX: FLUX",
"implementation": "ReleaseGroupSpecification",
"implementationName": "Release Group",
"infoLink": "https://wiki.servarr.com/radarr/settings#custom-formats-2",
"negate": false,
"required": false,
"negate": true,
"required": true,
"fields": [
{
"order": 0,
"name": "min",
"label": "Minimum Size",
"unit": "GB",
"helpText": "Release must be greater than this size",
"value": 999,
"type": "number",
"name": "value",
"label": "Regular Expression",
"helpText": "Custom Format RegEx is Case Insensitive",
"value": "(?<=^|[\\s.-])FLUX\\b",
"type": "textbox",
"advanced": false,
"privacy": "normal",
"isFloat": true
},
"isFloat": false
}
]
},
{
"name": "playBD",
"implementation": "ReleaseGroupSpecification",
"implementationName": "Release Group",
"infoLink": "https://wiki.servarr.com/radarr/settings#custom-formats-2",
"negate": true,
"required": true,
"fields": [
{
"order": 1,
"name": "max",
"label": "Maximum Size",
"unit": "GB",
"helpText": "Release must be less than or equal to this size",
"value": 1000,
"type": "number",
"order": 0,
"name": "value",
"label": "Regular Expression",
"helpText": "Custom Format RegEx is Case Insensitive",
"value": "(?<=^|[\\s.-])playBD\\b",
"type": "textbox",
"advanced": false,
"privacy": "normal",
"isFloat": true
"isFloat": false
}
]
}
@@ -11660,6 +11689,27 @@
"isFloat": false
}
]
},
{
"name": "10bit",
"implementation": "ReleaseTitleSpecification",
"implementationName": "Release Title",
"infoLink": "https://wiki.servarr.com/radarr/settings#custom-formats-2",
"negate": false,
"required": false,
"fields": [
{
"order": 0,
"name": "value",
"label": "Regular Expression",
"helpText": "Custom Format RegEx is Case Insensitive",
"value": "10bit",
"type": "textbox",
"advanced": false,
"privacy": "normal",
"isFloat": false
}
]
}
]
},
@@ -11814,5 +11864,95 @@
]
}
]
},
{
"name": "h265",
"includeCustomFormatWhenRenaming": false,
"specifications": [
{
"name": "h265",
"implementation": "ReleaseTitleSpecification",
"implementationName": "Release Title",
"infoLink": "https://wiki.servarr.com/radarr/settings#custom-formats-2",
"negate": false,
"required": true,
"fields": [
{
"order": 0,
"name": "value",
"label": "Regular Expression",
"helpText": "Custom Format RegEx is Case Insensitive",
"value": "^(?!.*(?i:remux)).*([h]\\s?(\\.?265))",
"type": "textbox",
"advanced": false,
"privacy": "normal",
"isFloat": false
}
]
},
{
"name": "Disc",
"implementation": "ReleaseTitleSpecification",
"implementationName": "Release Title",
"infoLink": "https://wiki.servarr.com/radarr/settings#custom-formats-2",
"negate": true,
"required": true,
"fields": [
{
"order": 0,
"name": "value",
"label": "Regular Expression",
"helpText": "Custom Format RegEx is Case Insensitive",
"value": "^(?!.*\\b((?<!HD[._ -]|HD)DVD|BDRip|MKV|XviD|WMV|d3g|BDREMUX|REMUX|^(?=.*1080p)(?=.*HEVC)|[xh][-_. ]?26[45]|German.*DL|((?<=\\d{4}).*German.*(DL)?)(?=.*\\b(AVC|HEVC|VC[-_. ]?1|MVC|MPEG[-_. ]?2)\\b))\\b)(((?=.*\\b(Blu[-_. ]?ray|BD|HD[-_. ]?DVD)\\b)(?=.*\\b(AVC|HEVC|VC[-_. ]?1|MVC|MPEG[-_. ]?2|BDMV|ISO)\\b))|^((?=.*\\b(^((?=.*\\b((.*_)?COMPLETE.*|Dis[ck])\\b)(?=.*(Blu[-_. ]?ray|HD[-_. ]?DVD)))|3D[-_. ]?BD|BR[-_. ]?DISK|Full[-_. ]?Blu[-_. ]?ray|^((?=.*((BD|UHD)[-_. ]?(25|50|66|100|ISO)))))))).*|(?i)(DVD9|DVD5|NTSC|PAL|VOB IFO|VC-1|AVC|MPEG-2|\\bCOMPLETE[-.\\s]?(?:UHD[-.\\s])?BLU[-.\\s]?RAY\\b|\\bCOMPLETE BLURAY\\b|\\bBR-Disk\\b)",
"type": "textbox",
"advanced": false,
"privacy": "normal",
"isFloat": false
}
]
},
{
"name": "Remux",
"implementation": "ReleaseTitleSpecification",
"implementationName": "Release Title",
"infoLink": "https://wiki.servarr.com/radarr/settings#custom-formats-2",
"negate": true,
"required": true,
"fields": [
{
"order": 0,
"name": "value",
"label": "Regular Expression",
"helpText": "Custom Format RegEx is Case Insensitive",
"value": "(?i)(REMUX|DVDRip)",
"type": "textbox",
"advanced": false,
"privacy": "normal",
"isFloat": false
}
]
},
{
"name": "WEB",
"implementation": "ReleaseTitleSpecification",
"implementationName": "Release Title",
"infoLink": "https://wiki.servarr.com/radarr/settings#custom-formats-2",
"negate": false,
"required": true,
"fields": [
{
"order": 0,
"name": "value",
"label": "Regular Expression",
"helpText": "Custom Format RegEx is Case Insensitive",
"value": "(?<!dts[ .-]?hd[ .-]?)ma\\b(?=.*\\bweb[ ._-]?(dl|rip)\\b)|\\b(amzn|amazon)\\b|\\b(atvp|aptv|Apple TV\\+)\\b|\\b(dsnp|dsny|disney|Disney\\+)\\b|\\b(nf|netflix)\\b|\\b(hmax|hbom|hbo[ ._-]max)\\b(?=[ ._-]web[ ._-]?(dl|rip)\\b)|\\b(hulu)\\b|\\b(pcok|peacock)\\b|\\b(pmtp|Paramount Plus)\\b|\\b(it|itunes)\\b(?=[ ._-]web[ ._-]?(dl|rip)\\b)",
"type": "textbox",
"advanced": false,
"privacy": "normal",
"isFloat": false
}
]
}
]
}
]

File diff suppressed because it is too large Load Diff

View File

@@ -22,6 +22,12 @@ if response.status_code != 200:
exit()
def export_cf():
# Prompt the user to specify the source (Radarr or Sonarr)
source = input("Enter the source (radarr/sonarr): ").lower()
while source not in ["radarr", "sonarr"]:
print("Invalid input. Please enter either 'radarr' or 'sonarr'.")
source = input("Enter the source (radarr/sonarr): ").lower()
custom_format_url = f"{base_url}/api/v3/customformat"
response = requests.get(custom_format_url, params=params, headers=headers)
@@ -31,15 +37,12 @@ def export_cf():
# Remove 'id' from each custom format
for custom_format in data:
custom_format.pop('id', None)
# Ensure the ./custom_formats directory exists
if not os.path.exists('./custom_formats'):
os.makedirs('./custom_formats')
# Save to JSON file
with open('./custom_formats/cf.json', 'w') as f:
# Save to JSON file with adjusted name based on source
file_path = f'./custom_formats/{source}_custom_formats.json'
with open(file_path, 'w') as f:
json.dump(data, f, indent=4)
print("Custom Formats have been saved to './custom_formats/cf.json'")
print(f"Custom Formats have been saved to '{file_path}'")
else:
print(f"Failed to retrieve custom formats! (HTTP {response.status_code})")
print("Response Content: ", response.content)
@@ -50,6 +53,15 @@ def sanitize_filename(filename):
return sanitized_filename
def export_qf():
# Prompt the user to specify the source (Radarr or Sonarr)
source = input("Enter the source (radarr/sonarr): ").lower()
while source not in ["radarr", "sonarr"]:
print("Invalid input. Please enter either 'radarr' or 'sonarr'.")
source = input("Enter the source (radarr/sonarr): ").lower()
# Capitalize the first letter of the source
source = source.capitalize()
response = requests.get(f"{base_url}/api/v3/qualityprofile", params=params, headers=headers)
if response.status_code == 200:
@@ -63,10 +75,10 @@ def export_qf():
for profile in quality_profiles:
profile.pop('id', None) # Remove the 'id' field
# Use the name of the profile to create a filename
# Use the name of the profile to create a filename and append the source
profile_name = profile.get('name', 'unnamed_profile') # Use a default name if the profile has no name
profile_name = sanitize_filename(profile_name) # Sanitize the filename
profile_filename = f"{profile_name}.json"
profile_filename = f"{profile_name} ({source}).json"
profile_filepath = os.path.join('./profiles', profile_filename)
# Save the individual profile to a file as a single-element array
@@ -78,8 +90,6 @@ def export_qf():
print("Failed to retrieve quality profiles!")
print("Response Content: ", response.content.decode('utf-8'))
if __name__ == "__main__":
export_cf()
export_qf()

View File

@@ -357,8 +357,13 @@
}
],
"minFormatScore": 0,
"cutoffFormatScore": 0,
"cutoffFormatScore": 320,
"formatItems": [
{
"format": 333,
"name": "h265",
"score": 0
},
{
"format": 331,
"name": "Golden Popcorn 720p",

View File

@@ -366,6 +366,11 @@
"minFormatScore": 0,
"cutoffFormatScore": 500,
"formatItems": [
{
"format": 333,
"name": "h265",
"score": -9999
},
{
"format": 331,
"name": "Golden Popcorn 720p",

View File

@@ -1,6 +1,6 @@
[
{
"name": "Transparent (Sonarr)",
"name": "Transparent",
"upgradeAllowed": true,
"cutoff": 1001,
"items": [
@@ -239,6 +239,51 @@
"minFormatScore": 0,
"cutoffFormatScore": 500,
"formatItems": [
{
"format": 224,
"name": "h265",
"score": -9999
},
{
"format": 223,
"name": "LiNG",
"score": 80
},
{
"format": 221,
"name": "hdalx",
"score": 80
},
{
"format": 220,
"name": "VLAD",
"score": 80
},
{
"format": 219,
"name": "AJP69",
"score": 80
},
{
"format": 218,
"name": "iON",
"score": 80
},
{
"format": 217,
"name": "BTN",
"score": 30
},
{
"format": 216,
"name": "pcroland",
"score": 80
},
{
"format": 215,
"name": "CJ",
"score": 80
},
{
"format": 214,
"name": "LQ",
@@ -282,7 +327,7 @@
{
"format": 206,
"name": "Dolby Vision w/out Fallback",
"score": 0
"score": -9999
},
{
"format": 205,
@@ -302,22 +347,22 @@
{
"format": 202,
"name": "HDR10 (Missing)",
"score": 0
"score": -9999
},
{
"format": 201,
"name": "HDR10",
"score": 0
"score": -9999
},
{
"format": 200,
"name": "Dolby Vision",
"score": 0
"score": -9999
},
{
"format": 199,
"name": "HDR10+",
"score": 0
"score": -9999
},
{
"format": 198,

File diff suppressed because it is too large Load Diff