Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "Comment1": "Sample auto_torrent_customizer_rules.json",
- "Comment2": "Designed for testing with https://webtorrent.io/free-torrents",
- "Comment3": "These comment fields are for human readers. qBt ignores them.",
- "Rules": [
- {
- "Comment1": "This should match any torrent. However since rules are ",
- "Comment2": "applied in order, it may be overwritten by any other ",
- "Comment3": "SetCategory rule afterward.",
- "Condition": {
- "RegexPattern": ".*",
- "Type": "AnyFilePathRegex"
- },
- "Modifier": {
- "Category": "DefaultCategory",
- "Type": "SetCategory"
- }
- },
- {
- "Comment1": "This should also match any torrent. However AddTag ",
- "Comment2": "rules do not override each other, their order is ",
- "Comment3": "typically not important.",
- "Condition": {
- "RegexPattern": ".*",
- "Type": "AnyTrackerUrlRegex"
- },
- "Modifier": {
- "Tag": "HasAnyTracker",
- "Type": "AddTag"
- }
- },
- {
- "Condition": {
- "RegexPattern": ".*(jpg|mp3|mp4|webm)",
- "Type": "AnyFilePathRegex"
- },
- "Modifier": {
- "Category": "Media",
- "Type": "SetCategory"
- }
- },
- {
- "Comment": "Similar to above, but with a compound condition.",
- "Condition": {
- "Conditions": [
- {
- "RegexPattern": ".*mp3",
- "Type": "AnyFilePathRegex"
- },
- {
- "RegexPattern": ".*mp4",
- "Type": "AnyFilePathRegex"
- },
- {
- "RegexPattern": ".*jpg",
- "Type": "AnyFilePathRegex"
- },
- {
- "RegexPattern": ".*webm",
- "Type": "AnyFilePathRegex"
- }
- ],
- "Type": "AnyOf"
- },
- "Modifier": {
- "Tag": "Media",
- "Type": "AddTag"
- }
- },
- {
- "Comment": "Escape special regex characters with a double-slash.",
- "Condition": {
- "RegexPattern": ".*\\.srt",
- "Type": "AnyFilePathRegex"
- },
- "Modifier": {
- "Tag": "Subtitles",
- "Type": "AddTag"
- }
- },
- {
- "Comment1": "Advanced regex use: Contains English SRT and no ",
- "Comment2": "non-English SRT. QT supports PCRE syntax, allowing ",
- "Comment3": "use of negative look-around patterns.",
- "Condition": {
- "Conditions": [
- {
- "RegexPattern": ".*\\.en\\.srt",
- "Type": "AnyFilePathRegex"
- },
- {
- "Type": "Not",
- "Condition": {
- "RegexPattern": ".*(?<!\\.en)\\.srt",
- "Type": "AnyFilePathRegex"
- }
- }
- ],
- "Type": "AllOf"
- },
- "Modifier": {
- "Tag": "English Subtitles Only",
- "Type": "AddTag"
- }
- },
- {
- "Comment": "Using AND-style conditions and compound modifier.",
- "Condition": {
- "Conditions": [
- {
- "RegexPattern": ".*(mp4|webm)",
- "Type": "AnyFilePathRegex"
- },
- {
- "RegexPattern": ".*poster.*(jpg|png)",
- "Type": "AnyFilePathRegex"
- }
- ],
- "Type": "AllOf"
- },
- "Modifier": {
- "Modifiers": [
- {
- "Tag": "VideoWithPoster",
- "Type": "AddTag"
- },
- {
- "Tag": "MixedMedia",
- "Type": "AddTag"
- }
- ],
- "Type": "Compound"
- }
- },
- {
- "Comment": "Using a relative save path",
- "Condition": {
- "RegexPattern": ".*mp4",
- "Type": "AnyFilePathRegex"
- },
- "Modifier": {
- "Path": "Video",
- "Type": "SetSavePath"
- }
- },
- {
- "Comment1": "Using an absolute save path. Update 'Path' to a valid ",
- "Comment2": "path for your system to avoid an error.",
- "Condition": {
- "RegexPattern": ".*webm",
- "Type": "AnyFilePathRegex"
- },
- "Modifier": {
- "Path": "/home/user/Downloads/Video",
- "Type": "SetSavePath"
- }
- },
- {
- "Comment": "Error: Invalid save path",
- "Condition": {
- "RegexPattern": ".*mp3",
- "Type": "AnyFilePathRegex"
- },
- "Modifier": {
- "Path": "",
- "Type": "SetSavePath"
- }
- },
- {
- "Condition": {
- "RegexPattern": ".*",
- "Type": "AnyFilePathRegex"
- },
- "Modifier": {
- "Comment": "Error: Missing required 'Category' field",
- "Type": "SetCategory"
- }
- },
- {
- "Condition": {
- "RegexPattern": ".*",
- "Type": "AnyFilePathRegex"
- },
- "Modifier": {
- "Comment": "Error: Unsupported Modifier Type",
- "Type": "EnableTurboMode"
- }
- },
- {
- "Condition": {
- "Comment": "Error: Unsupported Condition Type",
- "Type": "IsThisWorthMyTime"
- },
- "Modifier": {
- "Category": "Worthy",
- "Type": "SetCategory"
- }
- }
- ]
- }
Add Comment
Please, Sign In to add comment