166 lines
3.2 KiB
JavaScript
166 lines
3.2 KiB
JavaScript
|
|
var macros = {
|
|
seriesfiler: {
|
|
desc: 'Series-Filer',
|
|
rules: [
|
|
{
|
|
"raw": "action {fileunder ""}",
|
|
"name": "Emulate Seriesfiler",
|
|
"type": "folder",
|
|
"enabled": "1",
|
|
"criteria": [
|
|
{
|
|
"negate": 0,
|
|
"cmd": "series",
|
|
"arg": ""
|
|
}
|
|
],
|
|
"action": {
|
|
"cmd": "fileunder",
|
|
"arg": ""
|
|
}
|
|
}
|
|
]
|
|
},
|
|
newk: {
|
|
desc: 'Remove New: prefix',
|
|
rules: [
|
|
{
|
|
"raw": "title New:* action {settitle {%orig%regsub,New:\\s*,,}}",
|
|
"name": "Remove New: prefix.",
|
|
"type": "global",
|
|
"enabled": "1",
|
|
"criteria": [
|
|
{
|
|
"negate": 0,
|
|
"cmd": "title",
|
|
"arg": "New:*"
|
|
}
|
|
],
|
|
"action": {
|
|
"cmd": "settitle",
|
|
"arg": "%orig%regsub,New:\\s*,,"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
example: {
|
|
desc: 'Example rules',
|
|
rules: [
|
|
{
|
|
"raw": "lcn {>= 70} lcn {<= 79} or {duration {>= 90} genre Film } action {move Children/Films}",
|
|
"name": "Move any Children's films",
|
|
"type": "file",
|
|
"enabled": "0",
|
|
"criteria": [
|
|
{
|
|
"negate": 0,
|
|
"cmd": "lcn",
|
|
"arg": ">= 70"
|
|
},
|
|
{
|
|
"negate": 0,
|
|
"cmd": "lcn",
|
|
"arg": "<= 79"
|
|
},
|
|
{
|
|
"negate": 0,
|
|
"cmd": "or",
|
|
"arg": "duration {>= 90} genre Film ",
|
|
"criteria": [
|
|
{
|
|
"negate": 0,
|
|
"cmd": "duration",
|
|
"arg": ">= 90"
|
|
},
|
|
{
|
|
"negate": 0,
|
|
"cmd": "genre",
|
|
"arg": "Film"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"action": {
|
|
"cmd": "move",
|
|
"arg": "Children/Films"
|
|
}
|
|
},
|
|
{
|
|
"raw": "lcn {>= 70} lcn {<= 79} action {move Children/Miscellaneous}",
|
|
"name": "Move anything else recorded from a children's channel",
|
|
"type": "file",
|
|
"enabled": "0",
|
|
"criteria": [
|
|
{
|
|
"cmd": "lcn",
|
|
"arg": ">= 70"
|
|
},
|
|
{
|
|
"cmd": "lcn",
|
|
"arg": "<= 79"
|
|
}
|
|
],
|
|
"action": {
|
|
"cmd": "move",
|
|
"arg": "Children/Miscellaneous"
|
|
}
|
|
},
|
|
{
|
|
"raw": "lcn {>= 70} lcn {<= 79} action {fileundercreate Children}",
|
|
"name": "Move any series recordings from a Children's channel (folder rule)",
|
|
"type": "folder",
|
|
"enabled": "0",
|
|
"criteria": [
|
|
{
|
|
"cmd": "lcn",
|
|
"arg": ">= 70"
|
|
},
|
|
{
|
|
"cmd": "lcn",
|
|
"arg": "<= 79"
|
|
}
|
|
],
|
|
"action": {
|
|
"cmd": "fileundercreate",
|
|
"arg": "Children"
|
|
}
|
|
},
|
|
{
|
|
"raw": "title {Formula 1} action {move F1}",
|
|
"name": "Move any one-off Formula 1 recordings into the F1 folder",
|
|
"type": "file",
|
|
"enabled": "0",
|
|
"criteria": [
|
|
{
|
|
"cmd": "title",
|
|
"arg": "Formula 1"
|
|
}
|
|
],
|
|
"action": {
|
|
"cmd": "move",
|
|
"arg": "F1"
|
|
}
|
|
},
|
|
{
|
|
"raw": "age {> 120} action {movecreate Misc}",
|
|
"name": "Move any one-off recordings into a folder called Misc after a while",
|
|
"type": "file",
|
|
"enabled": "0",
|
|
"criteria": [
|
|
{
|
|
"cmd": "age",
|
|
"arg": "> 120"
|
|
}
|
|
],
|
|
"action": {
|
|
"cmd": "movecreate",
|
|
"arg": "Misc"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
|
|
};
|
|
|