diff --git a/bruno/sonarr/get-quality-profile.bru b/bruno/sonarr/get-quality-profile.bru new file mode 100644 index 0000000..a3e46f4 --- /dev/null +++ b/bruno/sonarr/get-quality-profile.bru @@ -0,0 +1,15 @@ +meta { + name: Get Quality Profile + type: http + seq: 1 +} + +get { + url: {{sonarrUrl}}/api/v3/qualityprofile/7 + body: none + auth: none +} + +headers { + X-Api-Key: {{sonarrApiKey}} +} diff --git a/bruno/sonarr/get-quality-profiles.bru b/bruno/sonarr/get-quality-profiles.bru new file mode 100644 index 0000000..ed28b37 --- /dev/null +++ b/bruno/sonarr/get-quality-profiles.bru @@ -0,0 +1,15 @@ +meta { + name: Get Quality Profiles + type: http + seq: 1 +} + +get { + url: {{sonarrUrl}}/api/v3/qualityprofile + body: none + auth: none +} + +headers { + X-Api-Key: {{sonarrApiKey}} +} diff --git a/bruno/sonarr/update-quality-profile-any.bru b/bruno/sonarr/update-quality-profile-any.bru new file mode 100644 index 0000000..bc6e680 --- /dev/null +++ b/bruno/sonarr/update-quality-profile-any.bru @@ -0,0 +1,1212 @@ +meta { + name: Update Quality Profile (Any Test) + type: http + seq: 2 +} + +put { + url: {{sonarrUrl}}/api/v3/qualityprofile/7 + body: json + auth: none +} + +headers { + X-Api-Key: {{sonarrApiKey}} + Content-Type: application/json +} + +body:json { + { + "id": 7, + "name": "1080p Quality", + "upgradeAllowed": true, + "cutoff": 1001, + "items": [ + { + "quality": { + "id": 21, + "name": "Bluray-2160p Remux", + "source": "blurayRaw", + "resolution": 2160 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 20, + "name": "Bluray-1080p Remux", + "source": "blurayRaw", + "resolution": 1080 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 19, + "name": "Bluray-2160p", + "source": "bluray", + "resolution": 2160 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 18, + "name": "WEBDL-2160p", + "source": "web", + "resolution": 2160 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 17, + "name": "WEBRip-2160p", + "source": "webRip", + "resolution": 2160 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 16, + "name": "HDTV-2160p", + "source": "television", + "resolution": 2160 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 12, + "name": "WEBRip-480p", + "source": "webRip", + "resolution": 480 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 10, + "name": "Raw-HD", + "source": "televisionRaw", + "resolution": 1080 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 9, + "name": "HDTV-1080p", + "source": "television", + "resolution": 1080 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 4, + "name": "HDTV-720p", + "source": "television", + "resolution": 720 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 1, + "name": "SDTV", + "source": "television", + "resolution": 480 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 0, + "name": "Unknown", + "source": "unknown", + "resolution": 0 + }, + "items": [], + "allowed": false + }, + { + "name": "480p Quality", + "items": [ + { + "quality": { + "id": 13, + "name": "Bluray-480p", + "source": "bluray", + "resolution": 480 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 22, + "name": "Bluray-576p", + "source": "bluray", + "resolution": 576 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 2, + "name": "DVD", + "source": "dvd", + "resolution": 480 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 8, + "name": "WEBDL-480p", + "source": "web", + "resolution": 480 + }, + "items": [], + "allowed": true + } + ], + "allowed": true, + "id": 1003 + }, + { + "name": "720p Quality", + "items": [ + { + "quality": { + "id": 6, + "name": "Bluray-720p", + "source": "bluray", + "resolution": 720 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 5, + "name": "WEBDL-720p", + "source": "web", + "resolution": 720 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 14, + "name": "WEBRip-720p", + "source": "webRip", + "resolution": 720 + }, + "items": [], + "allowed": true + } + ], + "allowed": true, + "id": 1002 + }, + { + "name": "1080p Quality", + "items": [ + { + "quality": { + "id": 7, + "name": "Bluray-1080p", + "source": "bluray", + "resolution": 1080 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 3, + "name": "WEBDL-1080p", + "source": "web", + "resolution": 1080 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 15, + "name": "WEBRip-1080p", + "source": "webRip", + "resolution": 1080 + }, + "items": [], + "allowed": true + } + ], + "allowed": true, + "id": 1001 + } + ], + "minFormatScore": 20000, + "cutoffFormatScore": 888888, + "minUpgradeFormatScore": 1, + "language": { + "id": -1, + "name": "Any" + }, + "formatItems": [ + { + "format": 791, + "name": "1080p Bluray", + "score": 280000 + }, + { + "format": 792, + "name": "1080p Quality Tier 1", + "score": 125000 + }, + { + "format": 793, + "name": "1080p Quality Tier 2", + "score": 124000 + }, + { + "format": 794, + "name": "1080p Quality Tier 3", + "score": 123000 + }, + { + "format": 795, + "name": "1080p Quality Tier 4", + "score": 122000 + }, + { + "format": 796, + "name": "1080p Quality Tier 5", + "score": 121000 + }, + { + "format": 797, + "name": "1080p Quality Tier 6", + "score": 120000 + }, + { + "format": 707, + "name": "1080p WEB-DL", + "score": 380000 + }, + { + "format": 798, + "name": "1080p WEBRip", + "score": 280000 + }, + { + "format": 708, + "name": "480p Bluray", + "score": 80000 + }, + { + "format": 709, + "name": "480p Quality Tier 1", + "score": 23000 + }, + { + "format": 710, + "name": "480p Quality Tier 2", + "score": 22000 + }, + { + "format": 711, + "name": "480p Quality Tier 3", + "score": 21000 + }, + { + "format": 712, + "name": "480p Quality Tier 4", + "score": 20000 + }, + { + "format": 713, + "name": "480p WEB-DL", + "score": 60000 + }, + { + "format": 714, + "name": "576p Bluray", + "score": 120000 + }, + { + "format": 715, + "name": "576p Quality Tier 1", + "score": 43000 + }, + { + "format": 716, + "name": "576p Quality Tier 2", + "score": 42000 + }, + { + "format": 717, + "name": "576p Quality Tier 3", + "score": 41000 + }, + { + "format": 718, + "name": "576p Quality Tier 4", + "score": 40000 + }, + { + "format": 719, + "name": "720p Bluray", + "score": 180000 + }, + { + "format": 720, + "name": "720p Quality Tier 1", + "score": 85000 + }, + { + "format": 721, + "name": "720p Quality Tier 2", + "score": 84000 + }, + { + "format": 722, + "name": "720p Quality Tier 3", + "score": 83000 + }, + { + "format": 723, + "name": "720p Quality Tier 4", + "score": 82000 + }, + { + "format": 724, + "name": "720p Quality Tier 5", + "score": 81000 + }, + { + "format": 725, + "name": "720p Quality Tier 6", + "score": 80000 + }, + { + "format": 726, + "name": "720p WEB-DL", + "score": 240000 + }, + { + "format": 727, + "name": "720p WEBRip", + "score": 180000 + }, + { + "format": 728, + "name": "AAC", + "score": 200 + }, + { + "format": 729, + "name": "AMZN", + "score": 3000 + }, + { + "format": 730, + "name": "ATVP", + "score": 2000 + }, + { + "format": 731, + "name": "AV1", + "score": -999999 + }, + { + "format": 734, + "name": "BCORE", + "score": -999999 + }, + { + "format": 732, + "name": "Banned Groups", + "score": -999999 + }, + { + "format": 733, + "name": "Banned WEBRip", + "score": -999999 + }, + { + "format": 735, + "name": "CRAV", + "score": 0 + }, + { + "format": 736, + "name": "CRIT", + "score": 0 + }, + { + "format": 741, + "name": "DRPO", + "score": 0 + }, + { + "format": 742, + "name": "DSNP", + "score": 3000 + }, + { + "format": 743, + "name": "DTS", + "score": 300 + }, + { + "format": 744, + "name": "DTS-ES", + "score": 500 + }, + { + "format": 745, + "name": "DTS-HD HRA", + "score": 700 + }, + { + "format": 746, + "name": "DVD", + "score": 20000 + }, + { + "format": 747, + "name": "DVD Remux", + "score": 20000 + }, + { + "format": 737, + "name": "Dolby Atmos", + "score": 400 + }, + { + "format": 738, + "name": "Dolby Digital", + "score": 400 + }, + { + "format": 739, + "name": "Dolby Digital +", + "score": 600 + }, + { + "format": 740, + "name": "Dolby Vision", + "score": -999999 + }, + { + "format": 748, + "name": "FLAC", + "score": 800 + }, + { + "format": 749, + "name": "Full Disc", + "score": -999999 + }, + { + "format": 751, + "name": "HDR", + "score": -999999 + }, + { + "format": 752, + "name": "HDR10", + "score": -999999 + }, + { + "format": 753, + "name": "HDR10+", + "score": -999999 + }, + { + "format": 754, + "name": "HLG", + "score": -999999 + }, + { + "format": 755, + "name": "HMAX", + "score": 2000 + }, + { + "format": 756, + "name": "HTSR", + "score": 0 + }, + { + "format": 757, + "name": "HULU", + "score": 0 + }, + { + "format": 760, + "name": "MAX", + "score": 2000 + }, + { + "format": 761, + "name": "MUBI", + "score": 0 + }, + { + "format": 762, + "name": "NF", + "score": 1000 + }, + { + "format": 763, + "name": "NOW", + "score": 0 + }, + { + "format": 764, + "name": "Opus", + "score": 700 + }, + { + "format": 765, + "name": "PCOK", + "score": 0 + }, + { + "format": 766, + "name": "PLAY", + "score": 0 + }, + { + "format": 767, + "name": "PMTP", + "score": 0 + }, + { + "format": 768, + "name": "PQ", + "score": -999999 + }, + { + "format": 774, + "name": "ROKU", + "score": 0 + }, + { + "format": 769, + "name": "Remux", + "score": -999999 + }, + { + "format": 770, + "name": "Remux (Source)", + "score": -999999 + }, + { + "format": 771, + "name": "Repack1", + "score": 6 + }, + { + "format": 772, + "name": "Repack2", + "score": 7 + }, + { + "format": 773, + "name": "Repack3", + "score": 8 + }, + { + "format": 775, + "name": "SD Quality Tier 1", + "score": 11000 + }, + { + "format": 776, + "name": "SD Quality Tier 2", + "score": 10000 + }, + { + "format": 778, + "name": "SHO", + "score": 0 + }, + { + "format": 779, + "name": "STAN", + "score": 0 + }, + { + "format": 777, + "name": "Season Pack", + "score": 10 + }, + { + "format": 780, + "name": "TV Extras", + "score": -999999 + }, + { + "format": 781, + "name": "Upscaled", + "score": -999999 + }, + { + "format": 782, + "name": "VP9", + "score": -999999 + }, + { + "format": 783, + "name": "VVC", + "score": -999999 + }, + { + "format": 784, + "name": "WEB-DL Tier 1", + "score": 100 + }, + { + "format": 785, + "name": "WEB-DL Tier 2", + "score": 80 + }, + { + "format": 786, + "name": "WEB-DL Tier 3", + "score": 60 + }, + { + "format": 787, + "name": "WEB-DL Tier 4", + "score": 40 + }, + { + "format": 788, + "name": "WEB-DL Tier 5", + "score": 20 + }, + { + "format": 790, + "name": "Xvid", + "score": -999999 + }, + { + "format": 750, + "name": "h265", + "score": -999999 + }, + { + "format": 758, + "name": "iP", + "score": 0 + }, + { + "format": 759, + "name": "iT", + "score": 1000 + }, + { + "format": 789, + "name": "x265", + "score": -999999 + }, + { + "format": 799, + "name": "1080p Remux", + "score": 0 + }, + { + "format": 800, + "name": "2160p Balanced Tier 1", + "score": 0 + }, + { + "format": 801, + "name": "2160p Quality Tier 1", + "score": 0 + }, + { + "format": 802, + "name": "2160p Quality Tier 2", + "score": 0 + }, + { + "format": 803, + "name": "2160p Quality Tier 3", + "score": 0 + }, + { + "format": 804, + "name": "2160p Quality Tier 4", + "score": 0 + }, + { + "format": 805, + "name": "2160p Quality Tier 5", + "score": 0 + }, + { + "format": 806, + "name": "2160p Quality Tier 6", + "score": 0 + }, + { + "format": 807, + "name": "2160p Remux", + "score": 0 + }, + { + "format": 808, + "name": "2160p WEB-DL", + "score": 0 + }, + { + "format": 809, + "name": "Amazon Enhancement", + "score": 0 + }, + { + "format": 810, + "name": "Atmos", + "score": 0 + }, + { + "format": 811, + "name": "Atmos (Missing)", + "score": 0 + }, + { + "format": 812, + "name": "Banned Remux", + "score": 0 + }, + { + "format": 813, + "name": "Banned UHD Bluray", + "score": 0 + }, + { + "format": 814, + "name": "Dolby Vision (Without Fallback)", + "score": 0 + }, + { + "format": 815, + "name": "DTS-HD MA", + "score": 0 + }, + { + "format": 816, + "name": "DTS-X", + "score": 0 + }, + { + "format": 817, + "name": "HBO Max Enhancement", + "score": 0 + }, + { + "format": 818, + "name": "HDR (Missing)", + "score": 0 + }, + { + "format": 819, + "name": "HDR10 (Missing)", + "score": 0 + }, + { + "format": 820, + "name": "PCM", + "score": 0 + }, + { + "format": 821, + "name": "Remux Tier 1", + "score": 0 + }, + { + "format": 822, + "name": "Remux Tier 2", + "score": 0 + }, + { + "format": 823, + "name": "Remux Tier 3", + "score": 0 + }, + { + "format": 824, + "name": "Remux Tier 4", + "score": 0 + }, + { + "format": 825, + "name": "TrueHD", + "score": 0 + }, + { + "format": 826, + "name": "TrueHD (Missing)", + "score": 0 + }, + { + "format": 827, + "name": "UHD Bluray", + "score": 0 + }, + { + "format": 828, + "name": "x264 (2160p)", + "score": 0 + }, + { + "format": 829, + "name": "x265 (Bluray)", + "score": 0 + }, + { + "format": 830, + "name": "x265 (Missing)", + "score": 0 + }, + { + "format": 831, + "name": "x265 (Remux)", + "score": 0 + }, + { + "format": 832, + "name": "x265 (WEB)", + "score": 0 + }, + { + "format": 833, + "name": "1080p Compact TV Bluray Tier 1", + "score": 0 + }, + { + "format": 834, + "name": "1080p Compact TV Bluray Tier 2", + "score": 0 + }, + { + "format": 835, + "name": "1080p Compact TV Bluray Tier 3", + "score": 0 + }, + { + "format": 836, + "name": "1080p Compact TV Bluray Tier 4", + "score": 0 + }, + { + "format": 837, + "name": "1080p Compact TV Bluray Tier 5", + "score": 0 + }, + { + "format": 838, + "name": "1080p Compact TV Bluray Tier 6", + "score": 0 + }, + { + "format": 839, + "name": "1080p Compact TV Trash Tier 1", + "score": 0 + }, + { + "format": 840, + "name": "1080p Compact TV Trash Tier 2", + "score": 0 + }, + { + "format": 841, + "name": "1080p Compact TV WEB Tier 1", + "score": 0 + }, + { + "format": 842, + "name": "1080p Compact TV WEB Tier 2", + "score": 0 + }, + { + "format": 843, + "name": "1080p Compact TV WEB Tier 3", + "score": 0 + }, + { + "format": 844, + "name": "1080p Compact TV WEB Tier 4", + "score": 0 + }, + { + "format": 845, + "name": "1080p Compact TV WEB Tier 5", + "score": 0 + }, + { + "format": 846, + "name": "1080p HDTV", + "score": 0 + }, + { + "format": 847, + "name": "1080p HDTV Tier 1", + "score": 0 + }, + { + "format": 848, + "name": "1080p HDTV Tier 2", + "score": 0 + }, + { + "format": 849, + "name": "1080p HDTV Tier 3", + "score": 0 + }, + { + "format": 850, + "name": "1080p WEB-DL (h264)", + "score": 0 + }, + { + "format": 851, + "name": "720p Balanced Tier 1", + "score": 0 + }, + { + "format": 852, + "name": "720p HDTV", + "score": 0 + }, + { + "format": 853, + "name": "720p HDTV Tier 1", + "score": 0 + }, + { + "format": 854, + "name": "720p HDTV Tier 2", + "score": 0 + }, + { + "format": 855, + "name": "720p HDTV Tier 3", + "score": 0 + }, + { + "format": 856, + "name": "Banned Groups (Efficient)", + "score": 0 + }, + { + "format": 857, + "name": "Banned WEBRip (Efficient)", + "score": 0 + }, + { + "format": 858, + "name": "Lossless Audio", + "score": 0 + }, + { + "format": 859, + "name": "QxR Bluray", + "score": 0 + }, + { + "format": 860, + "name": "QxR WEB", + "score": 0 + }, + { + "format": 861, + "name": "SDTV", + "score": 0 + }, + { + "format": 862, + "name": "SDTV Tier 1", + "score": 0 + }, + { + "format": 863, + "name": "TAoE Bluray", + "score": 0 + }, + { + "format": 864, + "name": "TAoE WEB", + "score": 0 + }, + { + "format": 865, + "name": "UHD Bluray (Efficient)", + "score": 0 + }, + { + "format": 866, + "name": "Vialle Bluray", + "score": 0 + }, + { + "format": 867, + "name": "Vialle WEB", + "score": 0 + }, + { + "format": 868, + "name": "Weasley WEB", + "score": 0 + }, + { + "format": 869, + "name": "h265 (Efficient)", + "score": 0 + }, + { + "format": 870, + "name": "x265 (Efficient)", + "score": 0 + }, + { + "format": 871, + "name": "1080p Bluray HEVC Tier 1", + "score": 0 + }, + { + "format": 872, + "name": "1080p Efficient TV Bluray Tier 1", + "score": 0 + }, + { + "format": 873, + "name": "1080p Efficient TV Bluray Tier 2", + "score": 0 + }, + { + "format": 874, + "name": "1080p Efficient TV Bluray Tier 3", + "score": 0 + }, + { + "format": 875, + "name": "1080p Efficient TV Bluray Tier 4", + "score": 0 + }, + { + "format": 876, + "name": "1080p Efficient TV Bluray Tier 5", + "score": 0 + }, + { + "format": 877, + "name": "1080p Efficient TV Bluray Tier 6", + "score": 0 + }, + { + "format": 878, + "name": "1080p Efficient TV WEB Tier 1", + "score": 0 + }, + { + "format": 879, + "name": "1080p Efficient TV WEB Tier 2", + "score": 0 + }, + { + "format": 880, + "name": "1080p Efficient TV WEB Tier 3", + "score": 0 + }, + { + "format": 881, + "name": "1080p Efficient TV WEB Tier 4", + "score": 0 + }, + { + "format": 882, + "name": "1080p Efficient TV WEB Tier 5", + "score": 0 + }, + { + "format": 883, + "name": "1080p WEB-DL HEVC Tier 1", + "score": 0 + }, + { + "format": 884, + "name": "DS4K", + "score": 0 + }, + { + "format": 885, + "name": "HONE Bluray", + "score": 0 + }, + { + "format": 886, + "name": "HONE WEB", + "score": 0 + }, + { + "format": 887, + "name": "2160p Efficient TV Bluray Tier 1", + "score": 0 + }, + { + "format": 888, + "name": "2160p Efficient TV WEB Tier 1", + "score": 0 + }, + { + "format": 889, + "name": "2160p WEB-DL (Efficient)", + "score": 0 + }, + { + "format": 890, + "name": "QxR Blurays", + "score": 0 + }, + { + "format": 891, + "name": "QxR WEBs", + "score": 0 + }, + { + "format": 892, + "name": "TAoE Blurays", + "score": 0 + }, + { + "format": 893, + "name": "TAoE WEBs", + "score": 0 + } + ] + } +} diff --git a/bruno/sonarr/update-quality-profile-english.bru b/bruno/sonarr/update-quality-profile-english.bru new file mode 100644 index 0000000..7128e98 --- /dev/null +++ b/bruno/sonarr/update-quality-profile-english.bru @@ -0,0 +1,1212 @@ +meta { + name: Update Quality Profile (English Test) + type: http + seq: 2 +} + +put { + url: {{sonarrUrl}}/api/v3/qualityprofile/7 + body: json + auth: none +} + +headers { + X-Api-Key: {{sonarrApiKey}} + Content-Type: application/json +} + +body:json { + { + "id": 7, + "name": "1080p Quality", + "upgradeAllowed": true, + "cutoff": 1001, + "items": [ + { + "quality": { + "id": 21, + "name": "Bluray-2160p Remux", + "source": "blurayRaw", + "resolution": 2160 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 20, + "name": "Bluray-1080p Remux", + "source": "blurayRaw", + "resolution": 1080 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 19, + "name": "Bluray-2160p", + "source": "bluray", + "resolution": 2160 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 18, + "name": "WEBDL-2160p", + "source": "web", + "resolution": 2160 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 17, + "name": "WEBRip-2160p", + "source": "webRip", + "resolution": 2160 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 16, + "name": "HDTV-2160p", + "source": "television", + "resolution": 2160 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 12, + "name": "WEBRip-480p", + "source": "webRip", + "resolution": 480 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 10, + "name": "Raw-HD", + "source": "televisionRaw", + "resolution": 1080 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 9, + "name": "HDTV-1080p", + "source": "television", + "resolution": 1080 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 4, + "name": "HDTV-720p", + "source": "television", + "resolution": 720 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 1, + "name": "SDTV", + "source": "television", + "resolution": 480 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 0, + "name": "Unknown", + "source": "unknown", + "resolution": 0 + }, + "items": [], + "allowed": false + }, + { + "name": "480p Quality", + "items": [ + { + "quality": { + "id": 13, + "name": "Bluray-480p", + "source": "bluray", + "resolution": 480 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 22, + "name": "Bluray-576p", + "source": "bluray", + "resolution": 576 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 2, + "name": "DVD", + "source": "dvd", + "resolution": 480 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 8, + "name": "WEBDL-480p", + "source": "web", + "resolution": 480 + }, + "items": [], + "allowed": true + } + ], + "allowed": true, + "id": 1003 + }, + { + "name": "720p Quality", + "items": [ + { + "quality": { + "id": 6, + "name": "Bluray-720p", + "source": "bluray", + "resolution": 720 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 5, + "name": "WEBDL-720p", + "source": "web", + "resolution": 720 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 14, + "name": "WEBRip-720p", + "source": "webRip", + "resolution": 720 + }, + "items": [], + "allowed": true + } + ], + "allowed": true, + "id": 1002 + }, + { + "name": "1080p Quality", + "items": [ + { + "quality": { + "id": 7, + "name": "Bluray-1080p", + "source": "bluray", + "resolution": 1080 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 3, + "name": "WEBDL-1080p", + "source": "web", + "resolution": 1080 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 15, + "name": "WEBRip-1080p", + "source": "webRip", + "resolution": 1080 + }, + "items": [], + "allowed": true + } + ], + "allowed": true, + "id": 1001 + } + ], + "minFormatScore": 20000, + "cutoffFormatScore": 888888, + "minUpgradeFormatScore": 1, + "language": { + "id": 1, + "name": "English" + }, + "formatItems": [ + { + "format": 791, + "name": "1080p Bluray", + "score": 280000 + }, + { + "format": 792, + "name": "1080p Quality Tier 1", + "score": 125000 + }, + { + "format": 793, + "name": "1080p Quality Tier 2", + "score": 124000 + }, + { + "format": 794, + "name": "1080p Quality Tier 3", + "score": 123000 + }, + { + "format": 795, + "name": "1080p Quality Tier 4", + "score": 122000 + }, + { + "format": 796, + "name": "1080p Quality Tier 5", + "score": 121000 + }, + { + "format": 797, + "name": "1080p Quality Tier 6", + "score": 120000 + }, + { + "format": 707, + "name": "1080p WEB-DL", + "score": 380000 + }, + { + "format": 798, + "name": "1080p WEBRip", + "score": 280000 + }, + { + "format": 708, + "name": "480p Bluray", + "score": 80000 + }, + { + "format": 709, + "name": "480p Quality Tier 1", + "score": 23000 + }, + { + "format": 710, + "name": "480p Quality Tier 2", + "score": 22000 + }, + { + "format": 711, + "name": "480p Quality Tier 3", + "score": 21000 + }, + { + "format": 712, + "name": "480p Quality Tier 4", + "score": 20000 + }, + { + "format": 713, + "name": "480p WEB-DL", + "score": 60000 + }, + { + "format": 714, + "name": "576p Bluray", + "score": 120000 + }, + { + "format": 715, + "name": "576p Quality Tier 1", + "score": 43000 + }, + { + "format": 716, + "name": "576p Quality Tier 2", + "score": 42000 + }, + { + "format": 717, + "name": "576p Quality Tier 3", + "score": 41000 + }, + { + "format": 718, + "name": "576p Quality Tier 4", + "score": 40000 + }, + { + "format": 719, + "name": "720p Bluray", + "score": 180000 + }, + { + "format": 720, + "name": "720p Quality Tier 1", + "score": 85000 + }, + { + "format": 721, + "name": "720p Quality Tier 2", + "score": 84000 + }, + { + "format": 722, + "name": "720p Quality Tier 3", + "score": 83000 + }, + { + "format": 723, + "name": "720p Quality Tier 4", + "score": 82000 + }, + { + "format": 724, + "name": "720p Quality Tier 5", + "score": 81000 + }, + { + "format": 725, + "name": "720p Quality Tier 6", + "score": 80000 + }, + { + "format": 726, + "name": "720p WEB-DL", + "score": 240000 + }, + { + "format": 727, + "name": "720p WEBRip", + "score": 180000 + }, + { + "format": 728, + "name": "AAC", + "score": 200 + }, + { + "format": 729, + "name": "AMZN", + "score": 3000 + }, + { + "format": 730, + "name": "ATVP", + "score": 2000 + }, + { + "format": 731, + "name": "AV1", + "score": -999999 + }, + { + "format": 734, + "name": "BCORE", + "score": -999999 + }, + { + "format": 732, + "name": "Banned Groups", + "score": -999999 + }, + { + "format": 733, + "name": "Banned WEBRip", + "score": -999999 + }, + { + "format": 735, + "name": "CRAV", + "score": 0 + }, + { + "format": 736, + "name": "CRIT", + "score": 0 + }, + { + "format": 741, + "name": "DRPO", + "score": 0 + }, + { + "format": 742, + "name": "DSNP", + "score": 3000 + }, + { + "format": 743, + "name": "DTS", + "score": 300 + }, + { + "format": 744, + "name": "DTS-ES", + "score": 500 + }, + { + "format": 745, + "name": "DTS-HD HRA", + "score": 700 + }, + { + "format": 746, + "name": "DVD", + "score": 20000 + }, + { + "format": 747, + "name": "DVD Remux", + "score": 20000 + }, + { + "format": 737, + "name": "Dolby Atmos", + "score": 400 + }, + { + "format": 738, + "name": "Dolby Digital", + "score": 400 + }, + { + "format": 739, + "name": "Dolby Digital +", + "score": 600 + }, + { + "format": 740, + "name": "Dolby Vision", + "score": -999999 + }, + { + "format": 748, + "name": "FLAC", + "score": 800 + }, + { + "format": 749, + "name": "Full Disc", + "score": -999999 + }, + { + "format": 751, + "name": "HDR", + "score": -999999 + }, + { + "format": 752, + "name": "HDR10", + "score": -999999 + }, + { + "format": 753, + "name": "HDR10+", + "score": -999999 + }, + { + "format": 754, + "name": "HLG", + "score": -999999 + }, + { + "format": 755, + "name": "HMAX", + "score": 2000 + }, + { + "format": 756, + "name": "HTSR", + "score": 0 + }, + { + "format": 757, + "name": "HULU", + "score": 0 + }, + { + "format": 760, + "name": "MAX", + "score": 2000 + }, + { + "format": 761, + "name": "MUBI", + "score": 0 + }, + { + "format": 762, + "name": "NF", + "score": 1000 + }, + { + "format": 763, + "name": "NOW", + "score": 0 + }, + { + "format": 764, + "name": "Opus", + "score": 700 + }, + { + "format": 765, + "name": "PCOK", + "score": 0 + }, + { + "format": 766, + "name": "PLAY", + "score": 0 + }, + { + "format": 767, + "name": "PMTP", + "score": 0 + }, + { + "format": 768, + "name": "PQ", + "score": -999999 + }, + { + "format": 774, + "name": "ROKU", + "score": 0 + }, + { + "format": 769, + "name": "Remux", + "score": -999999 + }, + { + "format": 770, + "name": "Remux (Source)", + "score": -999999 + }, + { + "format": 771, + "name": "Repack1", + "score": 6 + }, + { + "format": 772, + "name": "Repack2", + "score": 7 + }, + { + "format": 773, + "name": "Repack3", + "score": 8 + }, + { + "format": 775, + "name": "SD Quality Tier 1", + "score": 11000 + }, + { + "format": 776, + "name": "SD Quality Tier 2", + "score": 10000 + }, + { + "format": 778, + "name": "SHO", + "score": 0 + }, + { + "format": 779, + "name": "STAN", + "score": 0 + }, + { + "format": 777, + "name": "Season Pack", + "score": 10 + }, + { + "format": 780, + "name": "TV Extras", + "score": -999999 + }, + { + "format": 781, + "name": "Upscaled", + "score": -999999 + }, + { + "format": 782, + "name": "VP9", + "score": -999999 + }, + { + "format": 783, + "name": "VVC", + "score": -999999 + }, + { + "format": 784, + "name": "WEB-DL Tier 1", + "score": 100 + }, + { + "format": 785, + "name": "WEB-DL Tier 2", + "score": 80 + }, + { + "format": 786, + "name": "WEB-DL Tier 3", + "score": 60 + }, + { + "format": 787, + "name": "WEB-DL Tier 4", + "score": 40 + }, + { + "format": 788, + "name": "WEB-DL Tier 5", + "score": 20 + }, + { + "format": 790, + "name": "Xvid", + "score": -999999 + }, + { + "format": 750, + "name": "h265", + "score": -999999 + }, + { + "format": 758, + "name": "iP", + "score": 0 + }, + { + "format": 759, + "name": "iT", + "score": 1000 + }, + { + "format": 789, + "name": "x265", + "score": -999999 + }, + { + "format": 799, + "name": "1080p Remux", + "score": 0 + }, + { + "format": 800, + "name": "2160p Balanced Tier 1", + "score": 0 + }, + { + "format": 801, + "name": "2160p Quality Tier 1", + "score": 0 + }, + { + "format": 802, + "name": "2160p Quality Tier 2", + "score": 0 + }, + { + "format": 803, + "name": "2160p Quality Tier 3", + "score": 0 + }, + { + "format": 804, + "name": "2160p Quality Tier 4", + "score": 0 + }, + { + "format": 805, + "name": "2160p Quality Tier 5", + "score": 0 + }, + { + "format": 806, + "name": "2160p Quality Tier 6", + "score": 0 + }, + { + "format": 807, + "name": "2160p Remux", + "score": 0 + }, + { + "format": 808, + "name": "2160p WEB-DL", + "score": 0 + }, + { + "format": 809, + "name": "Amazon Enhancement", + "score": 0 + }, + { + "format": 810, + "name": "Atmos", + "score": 0 + }, + { + "format": 811, + "name": "Atmos (Missing)", + "score": 0 + }, + { + "format": 812, + "name": "Banned Remux", + "score": 0 + }, + { + "format": 813, + "name": "Banned UHD Bluray", + "score": 0 + }, + { + "format": 814, + "name": "Dolby Vision (Without Fallback)", + "score": 0 + }, + { + "format": 815, + "name": "DTS-HD MA", + "score": 0 + }, + { + "format": 816, + "name": "DTS-X", + "score": 0 + }, + { + "format": 817, + "name": "HBO Max Enhancement", + "score": 0 + }, + { + "format": 818, + "name": "HDR (Missing)", + "score": 0 + }, + { + "format": 819, + "name": "HDR10 (Missing)", + "score": 0 + }, + { + "format": 820, + "name": "PCM", + "score": 0 + }, + { + "format": 821, + "name": "Remux Tier 1", + "score": 0 + }, + { + "format": 822, + "name": "Remux Tier 2", + "score": 0 + }, + { + "format": 823, + "name": "Remux Tier 3", + "score": 0 + }, + { + "format": 824, + "name": "Remux Tier 4", + "score": 0 + }, + { + "format": 825, + "name": "TrueHD", + "score": 0 + }, + { + "format": 826, + "name": "TrueHD (Missing)", + "score": 0 + }, + { + "format": 827, + "name": "UHD Bluray", + "score": 0 + }, + { + "format": 828, + "name": "x264 (2160p)", + "score": 0 + }, + { + "format": 829, + "name": "x265 (Bluray)", + "score": 0 + }, + { + "format": 830, + "name": "x265 (Missing)", + "score": 0 + }, + { + "format": 831, + "name": "x265 (Remux)", + "score": 0 + }, + { + "format": 832, + "name": "x265 (WEB)", + "score": 0 + }, + { + "format": 833, + "name": "1080p Compact TV Bluray Tier 1", + "score": 0 + }, + { + "format": 834, + "name": "1080p Compact TV Bluray Tier 2", + "score": 0 + }, + { + "format": 835, + "name": "1080p Compact TV Bluray Tier 3", + "score": 0 + }, + { + "format": 836, + "name": "1080p Compact TV Bluray Tier 4", + "score": 0 + }, + { + "format": 837, + "name": "1080p Compact TV Bluray Tier 5", + "score": 0 + }, + { + "format": 838, + "name": "1080p Compact TV Bluray Tier 6", + "score": 0 + }, + { + "format": 839, + "name": "1080p Compact TV Trash Tier 1", + "score": 0 + }, + { + "format": 840, + "name": "1080p Compact TV Trash Tier 2", + "score": 0 + }, + { + "format": 841, + "name": "1080p Compact TV WEB Tier 1", + "score": 0 + }, + { + "format": 842, + "name": "1080p Compact TV WEB Tier 2", + "score": 0 + }, + { + "format": 843, + "name": "1080p Compact TV WEB Tier 3", + "score": 0 + }, + { + "format": 844, + "name": "1080p Compact TV WEB Tier 4", + "score": 0 + }, + { + "format": 845, + "name": "1080p Compact TV WEB Tier 5", + "score": 0 + }, + { + "format": 846, + "name": "1080p HDTV", + "score": 0 + }, + { + "format": 847, + "name": "1080p HDTV Tier 1", + "score": 0 + }, + { + "format": 848, + "name": "1080p HDTV Tier 2", + "score": 0 + }, + { + "format": 849, + "name": "1080p HDTV Tier 3", + "score": 0 + }, + { + "format": 850, + "name": "1080p WEB-DL (h264)", + "score": 0 + }, + { + "format": 851, + "name": "720p Balanced Tier 1", + "score": 0 + }, + { + "format": 852, + "name": "720p HDTV", + "score": 0 + }, + { + "format": 853, + "name": "720p HDTV Tier 1", + "score": 0 + }, + { + "format": 854, + "name": "720p HDTV Tier 2", + "score": 0 + }, + { + "format": 855, + "name": "720p HDTV Tier 3", + "score": 0 + }, + { + "format": 856, + "name": "Banned Groups (Efficient)", + "score": 0 + }, + { + "format": 857, + "name": "Banned WEBRip (Efficient)", + "score": 0 + }, + { + "format": 858, + "name": "Lossless Audio", + "score": 0 + }, + { + "format": 859, + "name": "QxR Bluray", + "score": 0 + }, + { + "format": 860, + "name": "QxR WEB", + "score": 0 + }, + { + "format": 861, + "name": "SDTV", + "score": 0 + }, + { + "format": 862, + "name": "SDTV Tier 1", + "score": 0 + }, + { + "format": 863, + "name": "TAoE Bluray", + "score": 0 + }, + { + "format": 864, + "name": "TAoE WEB", + "score": 0 + }, + { + "format": 865, + "name": "UHD Bluray (Efficient)", + "score": 0 + }, + { + "format": 866, + "name": "Vialle Bluray", + "score": 0 + }, + { + "format": 867, + "name": "Vialle WEB", + "score": 0 + }, + { + "format": 868, + "name": "Weasley WEB", + "score": 0 + }, + { + "format": 869, + "name": "h265 (Efficient)", + "score": 0 + }, + { + "format": 870, + "name": "x265 (Efficient)", + "score": 0 + }, + { + "format": 871, + "name": "1080p Bluray HEVC Tier 1", + "score": 0 + }, + { + "format": 872, + "name": "1080p Efficient TV Bluray Tier 1", + "score": 0 + }, + { + "format": 873, + "name": "1080p Efficient TV Bluray Tier 2", + "score": 0 + }, + { + "format": 874, + "name": "1080p Efficient TV Bluray Tier 3", + "score": 0 + }, + { + "format": 875, + "name": "1080p Efficient TV Bluray Tier 4", + "score": 0 + }, + { + "format": 876, + "name": "1080p Efficient TV Bluray Tier 5", + "score": 0 + }, + { + "format": 877, + "name": "1080p Efficient TV Bluray Tier 6", + "score": 0 + }, + { + "format": 878, + "name": "1080p Efficient TV WEB Tier 1", + "score": 0 + }, + { + "format": 879, + "name": "1080p Efficient TV WEB Tier 2", + "score": 0 + }, + { + "format": 880, + "name": "1080p Efficient TV WEB Tier 3", + "score": 0 + }, + { + "format": 881, + "name": "1080p Efficient TV WEB Tier 4", + "score": 0 + }, + { + "format": 882, + "name": "1080p Efficient TV WEB Tier 5", + "score": 0 + }, + { + "format": 883, + "name": "1080p WEB-DL HEVC Tier 1", + "score": 0 + }, + { + "format": 884, + "name": "DS4K", + "score": 0 + }, + { + "format": 885, + "name": "HONE Bluray", + "score": 0 + }, + { + "format": 886, + "name": "HONE WEB", + "score": 0 + }, + { + "format": 887, + "name": "2160p Efficient TV Bluray Tier 1", + "score": 0 + }, + { + "format": 888, + "name": "2160p Efficient TV WEB Tier 1", + "score": 0 + }, + { + "format": 889, + "name": "2160p WEB-DL (Efficient)", + "score": 0 + }, + { + "format": 890, + "name": "QxR Blurays", + "score": 0 + }, + { + "format": 891, + "name": "QxR WEBs", + "score": 0 + }, + { + "format": 892, + "name": "TAoE Blurays", + "score": 0 + }, + { + "format": 893, + "name": "TAoE WEBs", + "score": 0 + } + ] + } +} diff --git a/bruno/sonarr/update-quality-profile-no-language.bru b/bruno/sonarr/update-quality-profile-no-language.bru new file mode 100644 index 0000000..6ccbb8a --- /dev/null +++ b/bruno/sonarr/update-quality-profile-no-language.bru @@ -0,0 +1,1208 @@ +meta { + name: Update Quality Profile (No Language) + type: http + seq: 2 +} + +put { + url: {{sonarrUrl}}/api/v3/qualityprofile/7 + body: json + auth: none +} + +headers { + X-Api-Key: {{sonarrApiKey}} + Content-Type: application/json +} + +body:json { + { + "id": 7, + "name": "1080p Quality", + "upgradeAllowed": true, + "cutoff": 1001, + "items": [ + { + "quality": { + "id": 21, + "name": "Bluray-2160p Remux", + "source": "blurayRaw", + "resolution": 2160 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 20, + "name": "Bluray-1080p Remux", + "source": "blurayRaw", + "resolution": 1080 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 19, + "name": "Bluray-2160p", + "source": "bluray", + "resolution": 2160 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 18, + "name": "WEBDL-2160p", + "source": "web", + "resolution": 2160 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 17, + "name": "WEBRip-2160p", + "source": "webRip", + "resolution": 2160 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 16, + "name": "HDTV-2160p", + "source": "television", + "resolution": 2160 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 12, + "name": "WEBRip-480p", + "source": "webRip", + "resolution": 480 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 10, + "name": "Raw-HD", + "source": "televisionRaw", + "resolution": 1080 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 9, + "name": "HDTV-1080p", + "source": "television", + "resolution": 1080 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 4, + "name": "HDTV-720p", + "source": "television", + "resolution": 720 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 1, + "name": "SDTV", + "source": "television", + "resolution": 480 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 0, + "name": "Unknown", + "source": "unknown", + "resolution": 0 + }, + "items": [], + "allowed": false + }, + { + "name": "480p Quality", + "items": [ + { + "quality": { + "id": 13, + "name": "Bluray-480p", + "source": "bluray", + "resolution": 480 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 22, + "name": "Bluray-576p", + "source": "bluray", + "resolution": 576 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 2, + "name": "DVD", + "source": "dvd", + "resolution": 480 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 8, + "name": "WEBDL-480p", + "source": "web", + "resolution": 480 + }, + "items": [], + "allowed": true + } + ], + "allowed": true, + "id": 1003 + }, + { + "name": "720p Quality", + "items": [ + { + "quality": { + "id": 6, + "name": "Bluray-720p", + "source": "bluray", + "resolution": 720 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 5, + "name": "WEBDL-720p", + "source": "web", + "resolution": 720 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 14, + "name": "WEBRip-720p", + "source": "webRip", + "resolution": 720 + }, + "items": [], + "allowed": true + } + ], + "allowed": true, + "id": 1002 + }, + { + "name": "1080p Quality", + "items": [ + { + "quality": { + "id": 7, + "name": "Bluray-1080p", + "source": "bluray", + "resolution": 1080 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 3, + "name": "WEBDL-1080p", + "source": "web", + "resolution": 1080 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 15, + "name": "WEBRip-1080p", + "source": "webRip", + "resolution": 1080 + }, + "items": [], + "allowed": true + } + ], + "allowed": true, + "id": 1001 + } + ], + "minFormatScore": 20000, + "cutoffFormatScore": 888888, + "minUpgradeFormatScore": 1, + "formatItems": [ + { + "format": 791, + "name": "1080p Bluray", + "score": 280000 + }, + { + "format": 792, + "name": "1080p Quality Tier 1", + "score": 125000 + }, + { + "format": 793, + "name": "1080p Quality Tier 2", + "score": 124000 + }, + { + "format": 794, + "name": "1080p Quality Tier 3", + "score": 123000 + }, + { + "format": 795, + "name": "1080p Quality Tier 4", + "score": 122000 + }, + { + "format": 796, + "name": "1080p Quality Tier 5", + "score": 121000 + }, + { + "format": 797, + "name": "1080p Quality Tier 6", + "score": 120000 + }, + { + "format": 707, + "name": "1080p WEB-DL", + "score": 380000 + }, + { + "format": 798, + "name": "1080p WEBRip", + "score": 280000 + }, + { + "format": 708, + "name": "480p Bluray", + "score": 80000 + }, + { + "format": 709, + "name": "480p Quality Tier 1", + "score": 23000 + }, + { + "format": 710, + "name": "480p Quality Tier 2", + "score": 22000 + }, + { + "format": 711, + "name": "480p Quality Tier 3", + "score": 21000 + }, + { + "format": 712, + "name": "480p Quality Tier 4", + "score": 20000 + }, + { + "format": 713, + "name": "480p WEB-DL", + "score": 60000 + }, + { + "format": 714, + "name": "576p Bluray", + "score": 120000 + }, + { + "format": 715, + "name": "576p Quality Tier 1", + "score": 43000 + }, + { + "format": 716, + "name": "576p Quality Tier 2", + "score": 42000 + }, + { + "format": 717, + "name": "576p Quality Tier 3", + "score": 41000 + }, + { + "format": 718, + "name": "576p Quality Tier 4", + "score": 40000 + }, + { + "format": 719, + "name": "720p Bluray", + "score": 180000 + }, + { + "format": 720, + "name": "720p Quality Tier 1", + "score": 85000 + }, + { + "format": 721, + "name": "720p Quality Tier 2", + "score": 84000 + }, + { + "format": 722, + "name": "720p Quality Tier 3", + "score": 83000 + }, + { + "format": 723, + "name": "720p Quality Tier 4", + "score": 82000 + }, + { + "format": 724, + "name": "720p Quality Tier 5", + "score": 81000 + }, + { + "format": 725, + "name": "720p Quality Tier 6", + "score": 80000 + }, + { + "format": 726, + "name": "720p WEB-DL", + "score": 240000 + }, + { + "format": 727, + "name": "720p WEBRip", + "score": 180000 + }, + { + "format": 728, + "name": "AAC", + "score": 200 + }, + { + "format": 729, + "name": "AMZN", + "score": 3000 + }, + { + "format": 730, + "name": "ATVP", + "score": 2000 + }, + { + "format": 731, + "name": "AV1", + "score": -999999 + }, + { + "format": 734, + "name": "BCORE", + "score": -999999 + }, + { + "format": 732, + "name": "Banned Groups", + "score": -999999 + }, + { + "format": 733, + "name": "Banned WEBRip", + "score": -999999 + }, + { + "format": 735, + "name": "CRAV", + "score": 0 + }, + { + "format": 736, + "name": "CRIT", + "score": 0 + }, + { + "format": 741, + "name": "DRPO", + "score": 0 + }, + { + "format": 742, + "name": "DSNP", + "score": 3000 + }, + { + "format": 743, + "name": "DTS", + "score": 300 + }, + { + "format": 744, + "name": "DTS-ES", + "score": 500 + }, + { + "format": 745, + "name": "DTS-HD HRA", + "score": 700 + }, + { + "format": 746, + "name": "DVD", + "score": 20000 + }, + { + "format": 747, + "name": "DVD Remux", + "score": 20000 + }, + { + "format": 737, + "name": "Dolby Atmos", + "score": 400 + }, + { + "format": 738, + "name": "Dolby Digital", + "score": 400 + }, + { + "format": 739, + "name": "Dolby Digital +", + "score": 600 + }, + { + "format": 740, + "name": "Dolby Vision", + "score": -999999 + }, + { + "format": 748, + "name": "FLAC", + "score": 800 + }, + { + "format": 749, + "name": "Full Disc", + "score": -999999 + }, + { + "format": 751, + "name": "HDR", + "score": -999999 + }, + { + "format": 752, + "name": "HDR10", + "score": -999999 + }, + { + "format": 753, + "name": "HDR10+", + "score": -999999 + }, + { + "format": 754, + "name": "HLG", + "score": -999999 + }, + { + "format": 755, + "name": "HMAX", + "score": 2000 + }, + { + "format": 756, + "name": "HTSR", + "score": 0 + }, + { + "format": 757, + "name": "HULU", + "score": 0 + }, + { + "format": 760, + "name": "MAX", + "score": 2000 + }, + { + "format": 761, + "name": "MUBI", + "score": 0 + }, + { + "format": 762, + "name": "NF", + "score": 1000 + }, + { + "format": 763, + "name": "NOW", + "score": 0 + }, + { + "format": 764, + "name": "Opus", + "score": 700 + }, + { + "format": 765, + "name": "PCOK", + "score": 0 + }, + { + "format": 766, + "name": "PLAY", + "score": 0 + }, + { + "format": 767, + "name": "PMTP", + "score": 0 + }, + { + "format": 768, + "name": "PQ", + "score": -999999 + }, + { + "format": 774, + "name": "ROKU", + "score": 0 + }, + { + "format": 769, + "name": "Remux", + "score": -999999 + }, + { + "format": 770, + "name": "Remux (Source)", + "score": -999999 + }, + { + "format": 771, + "name": "Repack1", + "score": 6 + }, + { + "format": 772, + "name": "Repack2", + "score": 7 + }, + { + "format": 773, + "name": "Repack3", + "score": 8 + }, + { + "format": 775, + "name": "SD Quality Tier 1", + "score": 11000 + }, + { + "format": 776, + "name": "SD Quality Tier 2", + "score": 10000 + }, + { + "format": 778, + "name": "SHO", + "score": 0 + }, + { + "format": 779, + "name": "STAN", + "score": 0 + }, + { + "format": 777, + "name": "Season Pack", + "score": 10 + }, + { + "format": 780, + "name": "TV Extras", + "score": -999999 + }, + { + "format": 781, + "name": "Upscaled", + "score": -999999 + }, + { + "format": 782, + "name": "VP9", + "score": -999999 + }, + { + "format": 783, + "name": "VVC", + "score": -999999 + }, + { + "format": 784, + "name": "WEB-DL Tier 1", + "score": 100 + }, + { + "format": 785, + "name": "WEB-DL Tier 2", + "score": 80 + }, + { + "format": 786, + "name": "WEB-DL Tier 3", + "score": 60 + }, + { + "format": 787, + "name": "WEB-DL Tier 4", + "score": 40 + }, + { + "format": 788, + "name": "WEB-DL Tier 5", + "score": 20 + }, + { + "format": 790, + "name": "Xvid", + "score": -999999 + }, + { + "format": 750, + "name": "h265", + "score": -999999 + }, + { + "format": 758, + "name": "iP", + "score": 0 + }, + { + "format": 759, + "name": "iT", + "score": 1000 + }, + { + "format": 789, + "name": "x265", + "score": -999999 + }, + { + "format": 799, + "name": "1080p Remux", + "score": 0 + }, + { + "format": 800, + "name": "2160p Balanced Tier 1", + "score": 0 + }, + { + "format": 801, + "name": "2160p Quality Tier 1", + "score": 0 + }, + { + "format": 802, + "name": "2160p Quality Tier 2", + "score": 0 + }, + { + "format": 803, + "name": "2160p Quality Tier 3", + "score": 0 + }, + { + "format": 804, + "name": "2160p Quality Tier 4", + "score": 0 + }, + { + "format": 805, + "name": "2160p Quality Tier 5", + "score": 0 + }, + { + "format": 806, + "name": "2160p Quality Tier 6", + "score": 0 + }, + { + "format": 807, + "name": "2160p Remux", + "score": 0 + }, + { + "format": 808, + "name": "2160p WEB-DL", + "score": 0 + }, + { + "format": 809, + "name": "Amazon Enhancement", + "score": 0 + }, + { + "format": 810, + "name": "Atmos", + "score": 0 + }, + { + "format": 811, + "name": "Atmos (Missing)", + "score": 0 + }, + { + "format": 812, + "name": "Banned Remux", + "score": 0 + }, + { + "format": 813, + "name": "Banned UHD Bluray", + "score": 0 + }, + { + "format": 814, + "name": "Dolby Vision (Without Fallback)", + "score": 0 + }, + { + "format": 815, + "name": "DTS-HD MA", + "score": 0 + }, + { + "format": 816, + "name": "DTS-X", + "score": 0 + }, + { + "format": 817, + "name": "HBO Max Enhancement", + "score": 0 + }, + { + "format": 818, + "name": "HDR (Missing)", + "score": 0 + }, + { + "format": 819, + "name": "HDR10 (Missing)", + "score": 0 + }, + { + "format": 820, + "name": "PCM", + "score": 0 + }, + { + "format": 821, + "name": "Remux Tier 1", + "score": 0 + }, + { + "format": 822, + "name": "Remux Tier 2", + "score": 0 + }, + { + "format": 823, + "name": "Remux Tier 3", + "score": 0 + }, + { + "format": 824, + "name": "Remux Tier 4", + "score": 0 + }, + { + "format": 825, + "name": "TrueHD", + "score": 0 + }, + { + "format": 826, + "name": "TrueHD (Missing)", + "score": 0 + }, + { + "format": 827, + "name": "UHD Bluray", + "score": 0 + }, + { + "format": 828, + "name": "x264 (2160p)", + "score": 0 + }, + { + "format": 829, + "name": "x265 (Bluray)", + "score": 0 + }, + { + "format": 830, + "name": "x265 (Missing)", + "score": 0 + }, + { + "format": 831, + "name": "x265 (Remux)", + "score": 0 + }, + { + "format": 832, + "name": "x265 (WEB)", + "score": 0 + }, + { + "format": 833, + "name": "1080p Compact TV Bluray Tier 1", + "score": 0 + }, + { + "format": 834, + "name": "1080p Compact TV Bluray Tier 2", + "score": 0 + }, + { + "format": 835, + "name": "1080p Compact TV Bluray Tier 3", + "score": 0 + }, + { + "format": 836, + "name": "1080p Compact TV Bluray Tier 4", + "score": 0 + }, + { + "format": 837, + "name": "1080p Compact TV Bluray Tier 5", + "score": 0 + }, + { + "format": 838, + "name": "1080p Compact TV Bluray Tier 6", + "score": 0 + }, + { + "format": 839, + "name": "1080p Compact TV Trash Tier 1", + "score": 0 + }, + { + "format": 840, + "name": "1080p Compact TV Trash Tier 2", + "score": 0 + }, + { + "format": 841, + "name": "1080p Compact TV WEB Tier 1", + "score": 0 + }, + { + "format": 842, + "name": "1080p Compact TV WEB Tier 2", + "score": 0 + }, + { + "format": 843, + "name": "1080p Compact TV WEB Tier 3", + "score": 0 + }, + { + "format": 844, + "name": "1080p Compact TV WEB Tier 4", + "score": 0 + }, + { + "format": 845, + "name": "1080p Compact TV WEB Tier 5", + "score": 0 + }, + { + "format": 846, + "name": "1080p HDTV", + "score": 0 + }, + { + "format": 847, + "name": "1080p HDTV Tier 1", + "score": 0 + }, + { + "format": 848, + "name": "1080p HDTV Tier 2", + "score": 0 + }, + { + "format": 849, + "name": "1080p HDTV Tier 3", + "score": 0 + }, + { + "format": 850, + "name": "1080p WEB-DL (h264)", + "score": 0 + }, + { + "format": 851, + "name": "720p Balanced Tier 1", + "score": 0 + }, + { + "format": 852, + "name": "720p HDTV", + "score": 0 + }, + { + "format": 853, + "name": "720p HDTV Tier 1", + "score": 0 + }, + { + "format": 854, + "name": "720p HDTV Tier 2", + "score": 0 + }, + { + "format": 855, + "name": "720p HDTV Tier 3", + "score": 0 + }, + { + "format": 856, + "name": "Banned Groups (Efficient)", + "score": 0 + }, + { + "format": 857, + "name": "Banned WEBRip (Efficient)", + "score": 0 + }, + { + "format": 858, + "name": "Lossless Audio", + "score": 0 + }, + { + "format": 859, + "name": "QxR Bluray", + "score": 0 + }, + { + "format": 860, + "name": "QxR WEB", + "score": 0 + }, + { + "format": 861, + "name": "SDTV", + "score": 0 + }, + { + "format": 862, + "name": "SDTV Tier 1", + "score": 0 + }, + { + "format": 863, + "name": "TAoE Bluray", + "score": 0 + }, + { + "format": 864, + "name": "TAoE WEB", + "score": 0 + }, + { + "format": 865, + "name": "UHD Bluray (Efficient)", + "score": 0 + }, + { + "format": 866, + "name": "Vialle Bluray", + "score": 0 + }, + { + "format": 867, + "name": "Vialle WEB", + "score": 0 + }, + { + "format": 868, + "name": "Weasley WEB", + "score": 0 + }, + { + "format": 869, + "name": "h265 (Efficient)", + "score": 0 + }, + { + "format": 870, + "name": "x265 (Efficient)", + "score": 0 + }, + { + "format": 871, + "name": "1080p Bluray HEVC Tier 1", + "score": 0 + }, + { + "format": 872, + "name": "1080p Efficient TV Bluray Tier 1", + "score": 0 + }, + { + "format": 873, + "name": "1080p Efficient TV Bluray Tier 2", + "score": 0 + }, + { + "format": 874, + "name": "1080p Efficient TV Bluray Tier 3", + "score": 0 + }, + { + "format": 875, + "name": "1080p Efficient TV Bluray Tier 4", + "score": 0 + }, + { + "format": 876, + "name": "1080p Efficient TV Bluray Tier 5", + "score": 0 + }, + { + "format": 877, + "name": "1080p Efficient TV Bluray Tier 6", + "score": 0 + }, + { + "format": 878, + "name": "1080p Efficient TV WEB Tier 1", + "score": 0 + }, + { + "format": 879, + "name": "1080p Efficient TV WEB Tier 2", + "score": 0 + }, + { + "format": 880, + "name": "1080p Efficient TV WEB Tier 3", + "score": 0 + }, + { + "format": 881, + "name": "1080p Efficient TV WEB Tier 4", + "score": 0 + }, + { + "format": 882, + "name": "1080p Efficient TV WEB Tier 5", + "score": 0 + }, + { + "format": 883, + "name": "1080p WEB-DL HEVC Tier 1", + "score": 0 + }, + { + "format": 884, + "name": "DS4K", + "score": 0 + }, + { + "format": 885, + "name": "HONE Bluray", + "score": 0 + }, + { + "format": 886, + "name": "HONE WEB", + "score": 0 + }, + { + "format": 887, + "name": "2160p Efficient TV Bluray Tier 1", + "score": 0 + }, + { + "format": 888, + "name": "2160p Efficient TV WEB Tier 1", + "score": 0 + }, + { + "format": 889, + "name": "2160p WEB-DL (Efficient)", + "score": 0 + }, + { + "format": 890, + "name": "QxR Blurays", + "score": 0 + }, + { + "format": 891, + "name": "QxR WEBs", + "score": 0 + }, + { + "format": 892, + "name": "TAoE Blurays", + "score": 0 + }, + { + "format": 893, + "name": "TAoE WEBs", + "score": 0 + } + ] + } +} diff --git a/bruno/sonarr/update-quality-profile.bru b/bruno/sonarr/update-quality-profile.bru new file mode 100644 index 0000000..a1c0884 --- /dev/null +++ b/bruno/sonarr/update-quality-profile.bru @@ -0,0 +1,1212 @@ +meta { + name: Update Quality Profile + type: http + seq: 2 +} + +put { + url: {{sonarrUrl}}/api/v3/qualityprofile/7 + body: json + auth: none +} + +headers { + X-Api-Key: {{sonarrApiKey}} + Content-Type: application/json +} + +body:json { + { + "id": 7, + "name": "1080p Quality", + "upgradeAllowed": true, + "cutoff": 1001, + "items": [ + { + "quality": { + "id": 21, + "name": "Bluray-2160p Remux", + "source": "blurayRaw", + "resolution": 2160 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 20, + "name": "Bluray-1080p Remux", + "source": "blurayRaw", + "resolution": 1080 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 19, + "name": "Bluray-2160p", + "source": "bluray", + "resolution": 2160 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 18, + "name": "WEBDL-2160p", + "source": "web", + "resolution": 2160 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 17, + "name": "WEBRip-2160p", + "source": "webRip", + "resolution": 2160 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 16, + "name": "HDTV-2160p", + "source": "television", + "resolution": 2160 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 12, + "name": "WEBRip-480p", + "source": "webRip", + "resolution": 480 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 10, + "name": "Raw-HD", + "source": "televisionRaw", + "resolution": 1080 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 9, + "name": "HDTV-1080p", + "source": "television", + "resolution": 1080 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 4, + "name": "HDTV-720p", + "source": "television", + "resolution": 720 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 1, + "name": "SDTV", + "source": "television", + "resolution": 480 + }, + "items": [], + "allowed": false + }, + { + "quality": { + "id": 0, + "name": "Unknown", + "source": "unknown", + "resolution": 0 + }, + "items": [], + "allowed": false + }, + { + "name": "480p Quality", + "items": [ + { + "quality": { + "id": 13, + "name": "Bluray-480p", + "source": "bluray", + "resolution": 480 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 22, + "name": "Bluray-576p", + "source": "bluray", + "resolution": 576 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 2, + "name": "DVD", + "source": "dvd", + "resolution": 480 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 8, + "name": "WEBDL-480p", + "source": "web", + "resolution": 480 + }, + "items": [], + "allowed": true + } + ], + "allowed": true, + "id": 1003 + }, + { + "name": "720p Quality", + "items": [ + { + "quality": { + "id": 6, + "name": "Bluray-720p", + "source": "bluray", + "resolution": 720 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 5, + "name": "WEBDL-720p", + "source": "web", + "resolution": 720 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 14, + "name": "WEBRip-720p", + "source": "webRip", + "resolution": 720 + }, + "items": [], + "allowed": true + } + ], + "allowed": true, + "id": 1002 + }, + { + "name": "1080p Quality", + "items": [ + { + "quality": { + "id": 7, + "name": "Bluray-1080p", + "source": "bluray", + "resolution": 1080 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 3, + "name": "WEBDL-1080p", + "source": "web", + "resolution": 1080 + }, + "items": [], + "allowed": true + }, + { + "quality": { + "id": 15, + "name": "WEBRip-1080p", + "source": "webRip", + "resolution": 1080 + }, + "items": [], + "allowed": true + } + ], + "allowed": true, + "id": 1001 + } + ], + "minFormatScore": 20000, + "cutoffFormatScore": 888888, + "minUpgradeFormatScore": 1, + "language": { + "id": -2, + "name": "Original" + }, + "formatItems": [ + { + "format": 791, + "name": "1080p Bluray", + "score": 280000 + }, + { + "format": 792, + "name": "1080p Quality Tier 1", + "score": 125000 + }, + { + "format": 793, + "name": "1080p Quality Tier 2", + "score": 124000 + }, + { + "format": 794, + "name": "1080p Quality Tier 3", + "score": 123000 + }, + { + "format": 795, + "name": "1080p Quality Tier 4", + "score": 122000 + }, + { + "format": 796, + "name": "1080p Quality Tier 5", + "score": 121000 + }, + { + "format": 797, + "name": "1080p Quality Tier 6", + "score": 120000 + }, + { + "format": 707, + "name": "1080p WEB-DL", + "score": 380000 + }, + { + "format": 798, + "name": "1080p WEBRip", + "score": 280000 + }, + { + "format": 708, + "name": "480p Bluray", + "score": 80000 + }, + { + "format": 709, + "name": "480p Quality Tier 1", + "score": 23000 + }, + { + "format": 710, + "name": "480p Quality Tier 2", + "score": 22000 + }, + { + "format": 711, + "name": "480p Quality Tier 3", + "score": 21000 + }, + { + "format": 712, + "name": "480p Quality Tier 4", + "score": 20000 + }, + { + "format": 713, + "name": "480p WEB-DL", + "score": 60000 + }, + { + "format": 714, + "name": "576p Bluray", + "score": 120000 + }, + { + "format": 715, + "name": "576p Quality Tier 1", + "score": 43000 + }, + { + "format": 716, + "name": "576p Quality Tier 2", + "score": 42000 + }, + { + "format": 717, + "name": "576p Quality Tier 3", + "score": 41000 + }, + { + "format": 718, + "name": "576p Quality Tier 4", + "score": 40000 + }, + { + "format": 719, + "name": "720p Bluray", + "score": 180000 + }, + { + "format": 720, + "name": "720p Quality Tier 1", + "score": 85000 + }, + { + "format": 721, + "name": "720p Quality Tier 2", + "score": 84000 + }, + { + "format": 722, + "name": "720p Quality Tier 3", + "score": 83000 + }, + { + "format": 723, + "name": "720p Quality Tier 4", + "score": 82000 + }, + { + "format": 724, + "name": "720p Quality Tier 5", + "score": 81000 + }, + { + "format": 725, + "name": "720p Quality Tier 6", + "score": 80000 + }, + { + "format": 726, + "name": "720p WEB-DL", + "score": 240000 + }, + { + "format": 727, + "name": "720p WEBRip", + "score": 180000 + }, + { + "format": 728, + "name": "AAC", + "score": 200 + }, + { + "format": 729, + "name": "AMZN", + "score": 3000 + }, + { + "format": 730, + "name": "ATVP", + "score": 2000 + }, + { + "format": 731, + "name": "AV1", + "score": -999999 + }, + { + "format": 734, + "name": "BCORE", + "score": -999999 + }, + { + "format": 732, + "name": "Banned Groups", + "score": -999999 + }, + { + "format": 733, + "name": "Banned WEBRip", + "score": -999999 + }, + { + "format": 735, + "name": "CRAV", + "score": 0 + }, + { + "format": 736, + "name": "CRIT", + "score": 0 + }, + { + "format": 741, + "name": "DRPO", + "score": 0 + }, + { + "format": 742, + "name": "DSNP", + "score": 3000 + }, + { + "format": 743, + "name": "DTS", + "score": 300 + }, + { + "format": 744, + "name": "DTS-ES", + "score": 500 + }, + { + "format": 745, + "name": "DTS-HD HRA", + "score": 700 + }, + { + "format": 746, + "name": "DVD", + "score": 20000 + }, + { + "format": 747, + "name": "DVD Remux", + "score": 20000 + }, + { + "format": 737, + "name": "Dolby Atmos", + "score": 400 + }, + { + "format": 738, + "name": "Dolby Digital", + "score": 400 + }, + { + "format": 739, + "name": "Dolby Digital +", + "score": 600 + }, + { + "format": 740, + "name": "Dolby Vision", + "score": -999999 + }, + { + "format": 748, + "name": "FLAC", + "score": 800 + }, + { + "format": 749, + "name": "Full Disc", + "score": -999999 + }, + { + "format": 751, + "name": "HDR", + "score": -999999 + }, + { + "format": 752, + "name": "HDR10", + "score": -999999 + }, + { + "format": 753, + "name": "HDR10+", + "score": -999999 + }, + { + "format": 754, + "name": "HLG", + "score": -999999 + }, + { + "format": 755, + "name": "HMAX", + "score": 2000 + }, + { + "format": 756, + "name": "HTSR", + "score": 0 + }, + { + "format": 757, + "name": "HULU", + "score": 0 + }, + { + "format": 760, + "name": "MAX", + "score": 2000 + }, + { + "format": 761, + "name": "MUBI", + "score": 0 + }, + { + "format": 762, + "name": "NF", + "score": 1000 + }, + { + "format": 763, + "name": "NOW", + "score": 0 + }, + { + "format": 764, + "name": "Opus", + "score": 700 + }, + { + "format": 765, + "name": "PCOK", + "score": 0 + }, + { + "format": 766, + "name": "PLAY", + "score": 0 + }, + { + "format": 767, + "name": "PMTP", + "score": 0 + }, + { + "format": 768, + "name": "PQ", + "score": -999999 + }, + { + "format": 774, + "name": "ROKU", + "score": 0 + }, + { + "format": 769, + "name": "Remux", + "score": -999999 + }, + { + "format": 770, + "name": "Remux (Source)", + "score": -999999 + }, + { + "format": 771, + "name": "Repack1", + "score": 6 + }, + { + "format": 772, + "name": "Repack2", + "score": 7 + }, + { + "format": 773, + "name": "Repack3", + "score": 8 + }, + { + "format": 775, + "name": "SD Quality Tier 1", + "score": 11000 + }, + { + "format": 776, + "name": "SD Quality Tier 2", + "score": 10000 + }, + { + "format": 778, + "name": "SHO", + "score": 0 + }, + { + "format": 779, + "name": "STAN", + "score": 0 + }, + { + "format": 777, + "name": "Season Pack", + "score": 10 + }, + { + "format": 780, + "name": "TV Extras", + "score": -999999 + }, + { + "format": 781, + "name": "Upscaled", + "score": -999999 + }, + { + "format": 782, + "name": "VP9", + "score": -999999 + }, + { + "format": 783, + "name": "VVC", + "score": -999999 + }, + { + "format": 784, + "name": "WEB-DL Tier 1", + "score": 100 + }, + { + "format": 785, + "name": "WEB-DL Tier 2", + "score": 80 + }, + { + "format": 786, + "name": "WEB-DL Tier 3", + "score": 60 + }, + { + "format": 787, + "name": "WEB-DL Tier 4", + "score": 40 + }, + { + "format": 788, + "name": "WEB-DL Tier 5", + "score": 20 + }, + { + "format": 790, + "name": "Xvid", + "score": -999999 + }, + { + "format": 750, + "name": "h265", + "score": -999999 + }, + { + "format": 758, + "name": "iP", + "score": 0 + }, + { + "format": 759, + "name": "iT", + "score": 1000 + }, + { + "format": 789, + "name": "x265", + "score": -999999 + }, + { + "format": 799, + "name": "1080p Remux", + "score": 0 + }, + { + "format": 800, + "name": "2160p Balanced Tier 1", + "score": 0 + }, + { + "format": 801, + "name": "2160p Quality Tier 1", + "score": 0 + }, + { + "format": 802, + "name": "2160p Quality Tier 2", + "score": 0 + }, + { + "format": 803, + "name": "2160p Quality Tier 3", + "score": 0 + }, + { + "format": 804, + "name": "2160p Quality Tier 4", + "score": 0 + }, + { + "format": 805, + "name": "2160p Quality Tier 5", + "score": 0 + }, + { + "format": 806, + "name": "2160p Quality Tier 6", + "score": 0 + }, + { + "format": 807, + "name": "2160p Remux", + "score": 0 + }, + { + "format": 808, + "name": "2160p WEB-DL", + "score": 0 + }, + { + "format": 809, + "name": "Amazon Enhancement", + "score": 0 + }, + { + "format": 810, + "name": "Atmos", + "score": 0 + }, + { + "format": 811, + "name": "Atmos (Missing)", + "score": 0 + }, + { + "format": 812, + "name": "Banned Remux", + "score": 0 + }, + { + "format": 813, + "name": "Banned UHD Bluray", + "score": 0 + }, + { + "format": 814, + "name": "Dolby Vision (Without Fallback)", + "score": 0 + }, + { + "format": 815, + "name": "DTS-HD MA", + "score": 0 + }, + { + "format": 816, + "name": "DTS-X", + "score": 0 + }, + { + "format": 817, + "name": "HBO Max Enhancement", + "score": 0 + }, + { + "format": 818, + "name": "HDR (Missing)", + "score": 0 + }, + { + "format": 819, + "name": "HDR10 (Missing)", + "score": 0 + }, + { + "format": 820, + "name": "PCM", + "score": 0 + }, + { + "format": 821, + "name": "Remux Tier 1", + "score": 0 + }, + { + "format": 822, + "name": "Remux Tier 2", + "score": 0 + }, + { + "format": 823, + "name": "Remux Tier 3", + "score": 0 + }, + { + "format": 824, + "name": "Remux Tier 4", + "score": 0 + }, + { + "format": 825, + "name": "TrueHD", + "score": 0 + }, + { + "format": 826, + "name": "TrueHD (Missing)", + "score": 0 + }, + { + "format": 827, + "name": "UHD Bluray", + "score": 0 + }, + { + "format": 828, + "name": "x264 (2160p)", + "score": 0 + }, + { + "format": 829, + "name": "x265 (Bluray)", + "score": 0 + }, + { + "format": 830, + "name": "x265 (Missing)", + "score": 0 + }, + { + "format": 831, + "name": "x265 (Remux)", + "score": 0 + }, + { + "format": 832, + "name": "x265 (WEB)", + "score": 0 + }, + { + "format": 833, + "name": "1080p Compact TV Bluray Tier 1", + "score": 0 + }, + { + "format": 834, + "name": "1080p Compact TV Bluray Tier 2", + "score": 0 + }, + { + "format": 835, + "name": "1080p Compact TV Bluray Tier 3", + "score": 0 + }, + { + "format": 836, + "name": "1080p Compact TV Bluray Tier 4", + "score": 0 + }, + { + "format": 837, + "name": "1080p Compact TV Bluray Tier 5", + "score": 0 + }, + { + "format": 838, + "name": "1080p Compact TV Bluray Tier 6", + "score": 0 + }, + { + "format": 839, + "name": "1080p Compact TV Trash Tier 1", + "score": 0 + }, + { + "format": 840, + "name": "1080p Compact TV Trash Tier 2", + "score": 0 + }, + { + "format": 841, + "name": "1080p Compact TV WEB Tier 1", + "score": 0 + }, + { + "format": 842, + "name": "1080p Compact TV WEB Tier 2", + "score": 0 + }, + { + "format": 843, + "name": "1080p Compact TV WEB Tier 3", + "score": 0 + }, + { + "format": 844, + "name": "1080p Compact TV WEB Tier 4", + "score": 0 + }, + { + "format": 845, + "name": "1080p Compact TV WEB Tier 5", + "score": 0 + }, + { + "format": 846, + "name": "1080p HDTV", + "score": 0 + }, + { + "format": 847, + "name": "1080p HDTV Tier 1", + "score": 0 + }, + { + "format": 848, + "name": "1080p HDTV Tier 2", + "score": 0 + }, + { + "format": 849, + "name": "1080p HDTV Tier 3", + "score": 0 + }, + { + "format": 850, + "name": "1080p WEB-DL (h264)", + "score": 0 + }, + { + "format": 851, + "name": "720p Balanced Tier 1", + "score": 0 + }, + { + "format": 852, + "name": "720p HDTV", + "score": 0 + }, + { + "format": 853, + "name": "720p HDTV Tier 1", + "score": 0 + }, + { + "format": 854, + "name": "720p HDTV Tier 2", + "score": 0 + }, + { + "format": 855, + "name": "720p HDTV Tier 3", + "score": 0 + }, + { + "format": 856, + "name": "Banned Groups (Efficient)", + "score": 0 + }, + { + "format": 857, + "name": "Banned WEBRip (Efficient)", + "score": 0 + }, + { + "format": 858, + "name": "Lossless Audio", + "score": 0 + }, + { + "format": 859, + "name": "QxR Bluray", + "score": 0 + }, + { + "format": 860, + "name": "QxR WEB", + "score": 0 + }, + { + "format": 861, + "name": "SDTV", + "score": 0 + }, + { + "format": 862, + "name": "SDTV Tier 1", + "score": 0 + }, + { + "format": 863, + "name": "TAoE Bluray", + "score": 0 + }, + { + "format": 864, + "name": "TAoE WEB", + "score": 0 + }, + { + "format": 865, + "name": "UHD Bluray (Efficient)", + "score": 0 + }, + { + "format": 866, + "name": "Vialle Bluray", + "score": 0 + }, + { + "format": 867, + "name": "Vialle WEB", + "score": 0 + }, + { + "format": 868, + "name": "Weasley WEB", + "score": 0 + }, + { + "format": 869, + "name": "h265 (Efficient)", + "score": 0 + }, + { + "format": 870, + "name": "x265 (Efficient)", + "score": 0 + }, + { + "format": 871, + "name": "1080p Bluray HEVC Tier 1", + "score": 0 + }, + { + "format": 872, + "name": "1080p Efficient TV Bluray Tier 1", + "score": 0 + }, + { + "format": 873, + "name": "1080p Efficient TV Bluray Tier 2", + "score": 0 + }, + { + "format": 874, + "name": "1080p Efficient TV Bluray Tier 3", + "score": 0 + }, + { + "format": 875, + "name": "1080p Efficient TV Bluray Tier 4", + "score": 0 + }, + { + "format": 876, + "name": "1080p Efficient TV Bluray Tier 5", + "score": 0 + }, + { + "format": 877, + "name": "1080p Efficient TV Bluray Tier 6", + "score": 0 + }, + { + "format": 878, + "name": "1080p Efficient TV WEB Tier 1", + "score": 0 + }, + { + "format": 879, + "name": "1080p Efficient TV WEB Tier 2", + "score": 0 + }, + { + "format": 880, + "name": "1080p Efficient TV WEB Tier 3", + "score": 0 + }, + { + "format": 881, + "name": "1080p Efficient TV WEB Tier 4", + "score": 0 + }, + { + "format": 882, + "name": "1080p Efficient TV WEB Tier 5", + "score": 0 + }, + { + "format": 883, + "name": "1080p WEB-DL HEVC Tier 1", + "score": 0 + }, + { + "format": 884, + "name": "DS4K", + "score": 0 + }, + { + "format": 885, + "name": "HONE Bluray", + "score": 0 + }, + { + "format": 886, + "name": "HONE WEB", + "score": 0 + }, + { + "format": 887, + "name": "2160p Efficient TV Bluray Tier 1", + "score": 0 + }, + { + "format": 888, + "name": "2160p Efficient TV WEB Tier 1", + "score": 0 + }, + { + "format": 889, + "name": "2160p WEB-DL (Efficient)", + "score": 0 + }, + { + "format": 890, + "name": "QxR Blurays", + "score": 0 + }, + { + "format": 891, + "name": "QxR WEBs", + "score": 0 + }, + { + "format": 892, + "name": "TAoE Blurays", + "score": 0 + }, + { + "format": 893, + "name": "TAoE WEBs", + "score": 0 + } + ] + } +} diff --git a/docs/todo/scratchpad.md b/docs/todo/scratchpad.md index 83f9913..71ada0d 100644 --- a/docs/todo/scratchpad.md +++ b/docs/todo/scratchpad.md @@ -7,6 +7,8 @@ - maybe move langauges to general tab or put info directly below it to fill space - adding a database requires double click??? im not running into this personally +- new quality handling +- copy button on logs page not woprking? cant recreate # Adaptive Backoff diff --git a/src/lib/server/pcd/queries/qualityProfiles/create.ts b/src/lib/server/pcd/queries/qualityProfiles/create.ts index 5626051..eb6beda 100644 --- a/src/lib/server/pcd/queries/qualityProfiles/create.ts +++ b/src/lib/server/pcd/queries/qualityProfiles/create.ts @@ -9,6 +9,7 @@ export interface CreateQualityProfileInput { name: string; description: string | null; tags: string[]; + language: string | null; } export interface CreateQualityProfileOptions { @@ -89,6 +90,16 @@ export async function create(options: CreateQualityProfileOptions) { queries.push(insertQuality); } + // 4. Insert language if one is selected + if (input.language !== null) { + const insertLanguage = { + sql: `INSERT INTO quality_profile_languages (quality_profile_name, language_name, type) VALUES ('${esc(input.name)}', '${esc(input.language)}', 'simple')`, + parameters: [], + query: {} as never + }; + queries.push(insertLanguage); + } + // Write the operation const result = await writeOperation({ databaseId, diff --git a/src/lib/server/pcd/queries/qualityProfiles/general.ts b/src/lib/server/pcd/queries/qualityProfiles/general.ts index c49e533..e640055 100644 --- a/src/lib/server/pcd/queries/qualityProfiles/general.ts +++ b/src/lib/server/pcd/queries/qualityProfiles/general.ts @@ -32,6 +32,13 @@ export async function general( .orderBy('t.name') .execute(); + // Get language for this profile (first one if exists) + const languageRow = await db + .selectFrom('quality_profile_languages as qpl') + .select(['qpl.language_name']) + .where('qpl.quality_profile_name', '=', profile.name) + .executeTakeFirst(); + return { id: profile.id, name: profile.name, @@ -39,6 +46,7 @@ export async function general( tags: tags.map((tag) => ({ name: tag.tag_name, created_at: tag.tag_created_at - })) + })), + language: languageRow?.language_name ?? null }; } diff --git a/src/lib/server/pcd/queries/qualityProfiles/types.ts b/src/lib/server/pcd/queries/qualityProfiles/types.ts index b3af86e..c3ce2fb 100644 --- a/src/lib/server/pcd/queries/qualityProfiles/types.ts +++ b/src/lib/server/pcd/queries/qualityProfiles/types.ts @@ -40,6 +40,7 @@ export interface QualityProfileGeneral { name: string; description: string; // Raw markdown tags: Tag[]; + language: string | null; // Language name, null means "Any" } /** Language configuration for a quality profile */ diff --git a/src/lib/server/pcd/queries/qualityProfiles/updateGeneral.ts b/src/lib/server/pcd/queries/qualityProfiles/updateGeneral.ts index b85e95c..7304957 100644 --- a/src/lib/server/pcd/queries/qualityProfiles/updateGeneral.ts +++ b/src/lib/server/pcd/queries/qualityProfiles/updateGeneral.ts @@ -11,6 +11,7 @@ export interface UpdateGeneralInput { name: string; description: string; tags: string[]; + language: string | null; // Language name, null means no language set } export interface UpdateGeneralOptions { @@ -92,6 +93,27 @@ export async function updateGeneral(options: UpdateGeneralOptions) { queries.push(linkTag); } + // 3. Handle language changes + const profileNameForLanguage = input.name !== current.name ? input.name : current.name; + + // Delete existing language for this profile + const deleteLanguage = { + sql: `DELETE FROM quality_profile_languages WHERE quality_profile_name = '${esc(profileNameForLanguage)}'`, + parameters: [], + query: {} as never + }; + queries.push(deleteLanguage); + + // Insert new language if one is selected + if (input.language !== null) { + const insertLanguage = { + sql: `INSERT INTO quality_profile_languages (quality_profile_name, language_name, type) VALUES ('${esc(profileNameForLanguage)}', '${esc(input.language)}', 'simple')`, + parameters: [], + query: {} as never + }; + queries.push(insertLanguage); + } + // Log what's being changed const changes: Record = {}; @@ -104,6 +126,9 @@ export async function updateGeneral(options: UpdateGeneralOptions) { if (tagsToAdd.length > 0 || tagsToRemove.length > 0) { changes.tags = { from: currentTagNames, to: input.tags }; } + if (current.language !== input.language) { + changes.language = { from: current.language, to: input.language }; + } await logger.info(`Save quality profile "${input.name}"`, { source: 'QualityProfile', diff --git a/src/lib/server/sync/mappings.ts b/src/lib/server/sync/mappings.ts index 5e8a7e3..cc622bf 100644 --- a/src/lib/server/sync/mappings.ts +++ b/src/lib/server/sync/mappings.ts @@ -246,7 +246,13 @@ export const LANGUAGES: Record> malayalam: { id: 48, name: 'Malayalam' }, kannada: { id: 49, name: 'Kannada' }, albanian: { id: 50, name: 'Albanian' }, - afrikaans: { id: 51, name: 'Afrikaans' } + afrikaans: { id: 51, name: 'Afrikaans' }, + marathi: { id: 52, name: 'Marathi' }, + tagalog: { id: 53, name: 'Tagalog' }, + urdu: { id: 54, name: 'Urdu' }, + romansh: { id: 55, name: 'Romansh' }, + mongolian: { id: 56, name: 'Mongolian' }, + georgian: { id: 57, name: 'Georgian' } }, sonarr: { unknown: { id: 0, name: 'Unknown' }, @@ -479,3 +485,60 @@ export function getLanguageForProfile(name: string, arrType: SyncArrType): Langu return getLanguage(name, arrType); } + +/** + * Get all Radarr languages as an array (for UI dropdowns) + * Returns languages sorted by name, with Any and Original at the top + */ +export function getRadarrLanguages(): LanguageDefinition[] { + const languages = Object.values(LANGUAGES.radarr); + // Sort: Any first, Original second, then alphabetically + return languages.sort((a, b) => { + if (a.id === -1) return -1; + if (b.id === -1) return 1; + if (a.id === -2) return -1; + if (b.id === -2) return 1; + return a.name.localeCompare(b.name); + }); +} + +/** + * Language with arr type support information (for conditions UI) + */ +export interface LanguageWithSupport { + name: string; + radarr: boolean; + sonarr: boolean; +} + +/** + * Get all languages with their arr type support (for conditions page) + * Returns sorted array with Original first, then alphabetically + */ +export function getLanguagesWithSupport(): LanguageWithSupport[] { + const radarrLangs = new Set(Object.values(LANGUAGES.radarr).map((l) => l.name)); + const sonarrLangs = new Set(Object.values(LANGUAGES.sonarr).map((l) => l.name)); + + // Combine all language names + const allNames = new Set([...radarrLangs, ...sonarrLangs]); + + // Build result with support flags + const result: LanguageWithSupport[] = []; + for (const name of allNames) { + // Skip "Any" - it's only for quality profiles, not conditions + if (name === 'Any') continue; + + result.push({ + name, + radarr: radarrLangs.has(name), + sonarr: sonarrLangs.has(name) + }); + } + + // Sort: Original first, then alphabetically + return result.sort((a, b) => { + if (a.name === 'Original') return -1; + if (b.name === 'Original') return 1; + return a.name.localeCompare(b.name); + }); +} diff --git a/src/lib/server/sync/qualityProfiles.ts b/src/lib/server/sync/qualityProfiles.ts index 552ddaa..d10ed86 100644 --- a/src/lib/server/sync/qualityProfiles.ts +++ b/src/lib/server/sync/qualityProfiles.ts @@ -345,7 +345,7 @@ export class QualityProfileSyncer extends BaseSyncer { syncedProfiles.push({ name: arrProfile.name, action: isUpdate ? 'updated' : 'created', - language: arrProfile.language.name, + language: arrProfile.language?.name ?? 'N/A', cutoffFormatScore: arrProfile.cutoffFormatScore, minFormatScore: arrProfile.minFormatScore, formats: scoredFormats diff --git a/src/lib/server/sync/transformers/qualityProfile.ts b/src/lib/server/sync/transformers/qualityProfile.ts index bbe73e3..5b6b2bf 100644 --- a/src/lib/server/sync/transformers/qualityProfile.ts +++ b/src/lib/server/sync/transformers/qualityProfile.ts @@ -34,7 +34,7 @@ export interface ArrQualityProfile { id?: number; name: string; items: ArrQualityItem[]; - language: { id: number; name: string }; + language?: { id: number; name: string }; // Radarr only, Sonarr ignores this upgradeAllowed: boolean; cutoff: number; minFormatScore: number; @@ -201,9 +201,11 @@ export function transformQualityProfile( // Reverse items to match arr expected order items.reverse(); - // Build language config - const languageName = profile.language?.name ?? 'any'; - const language = getLanguageForProfile(languageName, arrType); + // Build language config (Radarr only - Sonarr uses custom formats for language filtering) + const language = + arrType === 'radarr' + ? getLanguageForProfile(profile.language?.name ?? 'any', arrType) + : undefined; // Build format items const formatItems: ArrFormatItem[] = []; @@ -236,7 +238,7 @@ export function transformQualityProfile( return { name: profile.name, items, - language, + ...(language && { language }), // Only include for Radarr upgradeAllowed: profile.upgradesAllowed, cutoff: cutoffId ?? items[items.length - 1]?.quality?.id ?? 0, minFormatScore: profile.minimumCustomFormatScore, diff --git a/src/lib/server/utils/arr/types.ts b/src/lib/server/utils/arr/types.ts index 994ec45..301ed8d 100644 --- a/src/lib/server/utils/arr/types.ts +++ b/src/lib/server/utils/arr/types.ts @@ -607,7 +607,7 @@ export interface ArrQualityProfilePayload { id?: number; name: string; items: ArrQualityProfileItem[]; - language: ArrLanguage; + language?: ArrLanguage; // Radarr only - Sonarr uses custom formats for language filtering upgradeAllowed: boolean; cutoff: number; minFormatScore: number; diff --git a/src/routes/quality-profiles/[databaseId]/[id]/+layout.svelte b/src/routes/quality-profiles/[databaseId]/[id]/+layout.svelte index 5d9ee07..8e54eda 100644 --- a/src/routes/quality-profiles/[databaseId]/[id]/+layout.svelte +++ b/src/routes/quality-profiles/[databaseId]/[id]/+layout.svelte @@ -2,7 +2,7 @@ import Tabs from '$ui/navigation/tabs/Tabs.svelte'; import DirtyModal from '$ui/modal/DirtyModal.svelte'; import { page } from '$app/stores'; - import { FileText, Scale, Layers, Earth } from 'lucide-svelte'; + import { FileText, Scale, Layers } from 'lucide-svelte'; $: databaseId = $page.params.databaseId; $: profileId = $page.params.id; @@ -26,12 +26,6 @@ href: `/quality-profiles/${databaseId}/${profileId}/qualities`, active: currentPath.includes('/qualities'), icon: Layers - }, - { - label: 'Languages', - href: `/quality-profiles/${databaseId}/${profileId}/languages`, - active: currentPath.includes('/languages'), - icon: Earth } ]; diff --git a/src/routes/quality-profiles/[databaseId]/[id]/general/+page.server.ts b/src/routes/quality-profiles/[databaseId]/[id]/general/+page.server.ts index d83bed9..fd6244e 100644 --- a/src/routes/quality-profiles/[databaseId]/[id]/general/+page.server.ts +++ b/src/routes/quality-profiles/[databaseId]/[id]/general/+page.server.ts @@ -3,6 +3,7 @@ import type { ServerLoad, Actions } from '@sveltejs/kit'; import { pcdManager } from '$pcd/pcd.ts'; import { canWriteToBase } from '$pcd/writer.ts'; import * as qualityProfileQueries from '$pcd/queries/qualityProfiles/index.ts'; +import { getRadarrLanguages } from '$lib/server/sync/mappings.ts'; import type { OperationLayer } from '$pcd/writer.ts'; export const load: ServerLoad = async ({ params }) => { @@ -44,9 +45,13 @@ export const load: ServerLoad = async ({ params }) => { throw error(404, 'Quality profile not found'); } + // Get Radarr languages (language field is Radarr-only) + const availableLanguages = getRadarrLanguages(); + return { currentDatabase, profile, + availableLanguages, canWriteToBase: canWriteToBase(currentDatabaseId) }; }; @@ -83,6 +88,8 @@ export const actions: Actions = { const name = formData.get('name') as string; const description = (formData.get('description') as string) || ''; const tagsJson = formData.get('tags') as string; + const languageRaw = formData.get('language') as string; + const language = languageRaw && languageRaw.trim() !== '' ? languageRaw.trim() : null; const layer = (formData.get('layer') as OperationLayer) || 'user'; // Validate @@ -122,7 +129,8 @@ export const actions: Actions = { input: { name: name.trim(), description: description.trim(), - tags + tags, + language } }); diff --git a/src/routes/quality-profiles/[databaseId]/[id]/general/+page.svelte b/src/routes/quality-profiles/[databaseId]/[id]/general/+page.svelte index b5f9ac6..81fa54d 100644 --- a/src/routes/quality-profiles/[databaseId]/[id]/general/+page.svelte +++ b/src/routes/quality-profiles/[databaseId]/[id]/general/+page.svelte @@ -8,7 +8,8 @@ $: initialData = { name: data.profile.name, tags: data.profile.tags.map((t) => t.name), - description: data.profile.description ?? '' + description: data.profile.description ?? '', + language: data.profile.language ?? null }; @@ -22,5 +23,6 @@ canWriteToBase={data.canWriteToBase} actionUrl="?/update" {initialData} + availableLanguages={data.availableLanguages} /> diff --git a/src/routes/quality-profiles/[databaseId]/[id]/languages/+page.server.ts b/src/routes/quality-profiles/[databaseId]/[id]/languages/+page.server.ts deleted file mode 100644 index 5764099..0000000 --- a/src/routes/quality-profiles/[databaseId]/[id]/languages/+page.server.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { error, fail } from '@sveltejs/kit'; -import type { ServerLoad, Actions } from '@sveltejs/kit'; -import { pcdManager } from '$pcd/pcd.ts'; -import { canWriteToBase } from '$pcd/writer.ts'; -import * as qualityProfileQueries from '$pcd/queries/qualityProfiles/index.ts'; -import * as languageQueries from '$pcd/queries/languages.ts'; -import type { OperationLayer } from '$pcd/writer.ts'; - -export const load: ServerLoad = async ({ params }) => { - const { databaseId, id } = params; - - // Validate params exist - if (!databaseId || !id) { - throw error(400, 'Missing required parameters'); - } - - // Parse and validate the database ID - const currentDatabaseId = parseInt(databaseId, 10); - if (isNaN(currentDatabaseId)) { - throw error(400, 'Invalid database ID'); - } - - // Parse and validate the profile ID - const profileId = parseInt(id, 10); - if (isNaN(profileId)) { - throw error(400, 'Invalid profile ID'); - } - - // Get the cache for the database - const cache = pcdManager.getCache(currentDatabaseId); - if (!cache) { - throw error(500, 'Database cache not available'); - } - - // Get profile name from ID - const profile = await cache.kb - .selectFrom('quality_profiles') - .select('name') - .where('id', '=', profileId) - .executeTakeFirst(); - - if (!profile) { - throw error(404, 'Quality profile not found'); - } - - // Load languages for the quality profile - const languagesData = await qualityProfileQueries.languages(cache, profile.name); - - // Load all available languages - const availableLanguages = languageQueries.list(cache); - - return { - languages: languagesData.languages, - availableLanguages, - canWriteToBase: canWriteToBase(currentDatabaseId) - }; -}; - -export const actions: Actions = { - update: async ({ request, params }) => { - const { databaseId, id } = params; - - if (!databaseId || !id) { - return fail(400, { error: 'Missing required parameters' }); - } - - const currentDatabaseId = parseInt(databaseId, 10); - if (isNaN(currentDatabaseId)) { - return fail(400, { error: 'Invalid database ID' }); - } - - const profileId = parseInt(id, 10); - if (isNaN(profileId)) { - return fail(400, { error: 'Invalid profile ID' }); - } - - const cache = pcdManager.getCache(currentDatabaseId); - if (!cache) { - return fail(500, { error: 'Database cache not available' }); - } - - const formData = await request.formData(); - - // Parse form data - const layer = (formData.get('layer') as OperationLayer) || 'user'; - const languageName = formData.get('languageName') as string | null; - const type = (formData.get('type') as 'must' | 'only' | 'not' | 'simple') || 'simple'; - - // Check layer permission - if (layer === 'base' && !canWriteToBase(currentDatabaseId)) { - return fail(403, { error: 'Cannot write to base layer without personal access token' }); - } - - // Get profile name for metadata - const profile = await cache.kb - .selectFrom('quality_profiles') - .select('name') - .where('id', '=', profileId) - .executeTakeFirst(); - - if (!profile) { - return fail(404, { error: 'Quality profile not found' }); - } - - // Update the languages - const result = await qualityProfileQueries.updateLanguages({ - databaseId: currentDatabaseId, - cache, - layer, - profileName: profile.name, - input: { - languageName, - type - } - }); - - if (!result.success) { - return fail(500, { error: result.error || 'Failed to update languages' }); - } - - return { success: true }; - } -}; diff --git a/src/routes/quality-profiles/[databaseId]/[id]/languages/+page.svelte b/src/routes/quality-profiles/[databaseId]/[id]/languages/+page.svelte deleted file mode 100644 index 7efb09f..0000000 --- a/src/routes/quality-profiles/[databaseId]/[id]/languages/+page.svelte +++ /dev/null @@ -1,262 +0,0 @@ - - - - Languages - Profilarr - - -
{ - isSaving = true; - return async ({ update: formUpdate }) => { - await formUpdate(); - isSaving = false; - if (form?.success) { - initEdit(initialData); - } - }; - }} -> - - - -
- -
-
-
-
Language
-

- Configure the language preference for this profile -

-
-
- {#if $isDirty} - - {/if} - -
-
- -
- -
- - - {#if showTypeDropdown} -
- {#each typeOptions as option} - - {/each} -
- {/if} -
- - -
- - - {#if showValidationError} -

- "{searchQuery}" is not a valid language. Please select from the dropdown. -

- {/if} - - {#if showLanguageDropdown && filteredLanguages.length > 0} -
- {#each filteredLanguages as language} - - {/each} -
- {/if} -
-
-
- - -
-
-
- Preferred - Radarr Only -
-
Uses Radarr's built-in language preference setting
-
-
-
Must Include
-
Release must include the specified language
-
-
-
Must Only Be
-
Release must only contain the specified language
-
-
-
Does Not Include
-
Release must not include the specified language
-
-
-
- - submitForm(e.detail)} - on:cancel={() => (showSaveModal = false)} -/> diff --git a/src/routes/quality-profiles/[databaseId]/components/GeneralForm.svelte b/src/routes/quality-profiles/[databaseId]/components/GeneralForm.svelte index 393fc3f..7597373 100644 --- a/src/routes/quality-profiles/[databaseId]/components/GeneralForm.svelte +++ b/src/routes/quality-profiles/[databaseId]/components/GeneralForm.svelte @@ -6,6 +6,7 @@ import TagInput from '$ui/form/TagInput.svelte'; import Modal from '$ui/modal/Modal.svelte'; import SaveTargetModal from '$ui/modal/SaveTargetModal.svelte'; + import Button from '$ui/button/Button.svelte'; import { alertStore } from '$alerts/store'; import { current, isDirty, initEdit, initCreate, update } from '$lib/client/stores/dirty'; @@ -14,14 +15,22 @@ name: string; tags: string[]; description: string; + language: string | null; [key: string]: unknown; } + // Language option + interface LanguageOption { + id: number; + name: string; + } + // Props export let mode: 'create' | 'edit'; export let canWriteToBase: boolean = false; export let actionUrl: string = ''; export let initialData: GeneralFormData; + export let availableLanguages: LanguageOption[] = []; // Event handlers export let onCancel: (() => void) | undefined = undefined; @@ -29,7 +38,8 @@ const defaults: GeneralFormData = { name: '', tags: [], - description: '' + description: '', + language: null }; if (mode === 'create') { @@ -68,6 +78,57 @@ $: name = ($current.name ?? '') as string; $: tags = ($current.tags ?? []) as string[]; $: description = ($current.description ?? '') as string; + $: selectedLanguageName = ($current.language ?? null) as string | null; + + // Language autocomplete state + let languageSearchQuery = initialData.language || ''; + let showLanguageDropdown = false; + + $: filteredLanguages = availableLanguages.filter((lang) => + lang.name.toLowerCase().includes(languageSearchQuery.toLowerCase()) + ); + + function selectLanguage(language: LanguageOption) { + update('language', language.name); + languageSearchQuery = language.name; + showLanguageDropdown = false; + } + + function clearLanguage() { + update('language', null); + languageSearchQuery = ''; + showLanguageDropdown = false; + } + + function handleLanguageInput(e: Event) { + const target = e.target as HTMLInputElement; + languageSearchQuery = target.value; + showLanguageDropdown = true; + + const exactMatch = availableLanguages.find( + (l) => l.name.toLowerCase() === languageSearchQuery.toLowerCase() + ); + if (!exactMatch) { + update('language', null); + } else { + update('language', exactMatch.name); + } + } + + function handleLanguageFocus() { + showLanguageDropdown = true; + } + + function handleLanguageBlur() { + setTimeout(() => { + showLanguageDropdown = false; + if (selectedLanguageName) { + languageSearchQuery = selectedLanguageName; + } else if (languageSearchQuery && !availableLanguages.find((l) => l.name === languageSearchQuery)) { + languageSearchQuery = ''; + } + }, 200); + } // Validation $: isValid = name.trim() !== ''; @@ -146,7 +207,9 @@ }} > + +
@@ -172,7 +235,6 @@ update('tags', newTags)} />
+ + {#if availableLanguages.length > 0} +
+
+ Language +
+

+ Set the preferred language for this profile. Leave empty for "Any". Radarr only. Sonarr uses custom formats for language filtering. +

+
+ + + {#if selectedLanguageName} + + {/if} + + {#if showLanguageDropdown && filteredLanguages.length > 0} +
+ {#each filteredLanguages as language} + + {/each} +
+ {/if} +
+
+ {/if} +
{#if mode === 'edit'} - + icon={deleting ? Loader2 : Trash2} + text={deleting ? 'Deleting...' : 'Delete'} + on:click={handleDeleteClick} + /> {/if}
{#if onCancel} - + + icon={saving ? Loader2 : Save} + text={saving ? (mode === 'create' ? 'Creating...' : 'Saving...') : submitButtonText} + on:click={handleSaveClick} + />
diff --git a/src/routes/quality-profiles/[databaseId]/new/+page.server.ts b/src/routes/quality-profiles/[databaseId]/new/+page.server.ts index 783ae6a..f746503 100644 --- a/src/routes/quality-profiles/[databaseId]/new/+page.server.ts +++ b/src/routes/quality-profiles/[databaseId]/new/+page.server.ts @@ -3,6 +3,7 @@ import type { ServerLoad, Actions } from '@sveltejs/kit'; import { pcdManager } from '$pcd/pcd.ts'; import { canWriteToBase } from '$pcd/writer.ts'; import * as qualityProfileQueries from '$pcd/queries/qualityProfiles/index.ts'; +import { getRadarrLanguages } from '$lib/server/sync/mappings.ts'; import type { OperationLayer } from '$pcd/writer.ts'; export const load: ServerLoad = ({ params }) => { @@ -22,8 +23,12 @@ export const load: ServerLoad = ({ params }) => { throw error(404, 'Database not found'); } + // Get Radarr languages (language field is Radarr-only) + const availableLanguages = getRadarrLanguages(); + return { currentDatabase, + availableLanguages, canWriteToBase: canWriteToBase(currentDatabaseId) }; }; @@ -52,6 +57,8 @@ export const actions: Actions = { const name = formData.get('name') as string; const description = (formData.get('description') as string) || null; const tagsJson = formData.get('tags') as string; + const languageRaw = formData.get('language') as string; + const language = languageRaw && languageRaw.trim() !== '' ? languageRaw.trim() : null; const layer = (formData.get('layer') as OperationLayer) || 'user'; // Validate @@ -88,7 +95,8 @@ export const actions: Actions = { input: { name: name.trim(), description: description?.trim() || null, - tags + tags, + language } }); diff --git a/src/routes/quality-profiles/[databaseId]/new/+page.svelte b/src/routes/quality-profiles/[databaseId]/new/+page.svelte index 71a5407..5a5fec0 100644 --- a/src/routes/quality-profiles/[databaseId]/new/+page.svelte +++ b/src/routes/quality-profiles/[databaseId]/new/+page.svelte @@ -10,7 +10,8 @@ const initialData = { name: '', tags: [], - description: '' + description: '', + language: null }; function handleCancel() { @@ -27,6 +28,7 @@ mode="create" canWriteToBase={data.canWriteToBase} {initialData} + availableLanguages={data.availableLanguages} onCancel={handleCancel} />