422 lines
7.7 KiB
JavaScript
422 lines
7.7 KiB
JavaScript
|
|
|
|
var queueselect = {
|
|
decrypt: 'Decryption',
|
|
shrink: 'Shrink',
|
|
mp3: 'Audio Extraction',
|
|
mpg: 'Conversion to MPG'
|
|
};
|
|
|
|
var schema = {
|
|
criterion: {
|
|
lcn: {
|
|
'class': 'all',
|
|
type: 'int',
|
|
desc: 'Logical Channel Number',
|
|
negate: true,
|
|
def: "0"
|
|
},
|
|
duration: {
|
|
'class': 'all',
|
|
type: 'int',
|
|
desc: 'Recording duration (in minutes)',
|
|
negate: true,
|
|
def: "0"
|
|
},
|
|
schedduration: {
|
|
'class': 'all',
|
|
type: 'int',
|
|
desc: 'Scheduled duration (in minutes)',
|
|
negate: true,
|
|
def: "0"
|
|
},
|
|
size: {
|
|
'class': 'all',
|
|
type: 'int',
|
|
desc: 'Recording size (in bytes)',
|
|
negate: true,
|
|
def: "0"
|
|
},
|
|
hour: {
|
|
'class': 'all',
|
|
type: 'int',
|
|
desc: 'Hour in which the recording started',
|
|
negate: true,
|
|
def: "0"
|
|
},
|
|
age: {
|
|
'class': 'all',
|
|
type: 'int',
|
|
desc: 'Age (in hours)',
|
|
negate: true,
|
|
def: "0"
|
|
},
|
|
wage: {
|
|
'class': 'all',
|
|
type: 'int',
|
|
desc: 'Time since last watched, or recorded (in hours)',
|
|
negate: true,
|
|
def: "0"
|
|
},
|
|
bookmarks: {
|
|
'class': 'all',
|
|
type: 'int',
|
|
desc: 'Number of bookmarks',
|
|
negate: true,
|
|
def: "0"
|
|
},
|
|
now: {
|
|
'class': 'all',
|
|
type: 'int',
|
|
desc: 'Current time in 24-hour format (HHMM)',
|
|
negate: true,
|
|
def: "0"
|
|
},
|
|
title: {
|
|
'class': 'all',
|
|
type: 'substr',
|
|
desc: 'Recording Title contains',
|
|
idesc: 'Recording Title does not contain',
|
|
negate: true,
|
|
def: 'Enter text here...'
|
|
},
|
|
synopsis: {
|
|
'class': 'all',
|
|
type: 'substr',
|
|
desc: 'Synopsis contains',
|
|
idesc: 'Synopsis does not contain',
|
|
negate: true,
|
|
def: 'Enter text here...'
|
|
},
|
|
guidance: {
|
|
'class': 'all',
|
|
type: 'substr',
|
|
desc: 'Guidance Text contains',
|
|
idesc: 'Guidance Text does not contain',
|
|
negate: true,
|
|
def: 'Enter text here...'
|
|
},
|
|
genre: {
|
|
'class': 'all',
|
|
type: 'select',
|
|
desc: 'Recording Genre',
|
|
negate: true,
|
|
select: {
|
|
Unclassified: 'Unclassified',
|
|
Film: 'Film',
|
|
Children: 'Children',
|
|
'News & Factual': 'News & Factual',
|
|
Entertainment: 'Entertainment',
|
|
Sport: 'Sport',
|
|
Education: 'Education',
|
|
Lifestyle: 'Lifestyle',
|
|
Drama: 'Drama'
|
|
},
|
|
def: 'Unclassified'
|
|
},
|
|
definition: {
|
|
'class': 'all',
|
|
type: 'select',
|
|
desc: 'Recording Definition',
|
|
negate: true,
|
|
select: {
|
|
SD: 'Standard Definition',
|
|
HD: 'High Definition'
|
|
},
|
|
def: 'SD'
|
|
},
|
|
flag: {
|
|
'class': 'all',
|
|
type: 'select',
|
|
desc: 'Recording Flagged as',
|
|
idesc: 'Recording not Flagged as',
|
|
negate: true,
|
|
select: {
|
|
Locked: 'Locked',
|
|
New: 'New',
|
|
Encrypted: 'Protected (Enc)',
|
|
Guidance: 'Guidance',
|
|
ODEncrypted: 'Encrypted',
|
|
Shrunk: 'Shrunk',
|
|
Deduped: 'De-duplicated',
|
|
Radio: 'Radio Programme'
|
|
},
|
|
def: 'New'
|
|
},
|
|
queue: {
|
|
'class': 'all',
|
|
type: 'select',
|
|
desc: 'Recording Queued for',
|
|
idesc: 'Recording not Queued for',
|
|
negate: true,
|
|
select: $.extend({any: '-- Anything --'}, queueselect),
|
|
def: 'any'
|
|
},
|
|
lock: {
|
|
'class': 'all',
|
|
type: 'select',
|
|
desc: 'Change Recording Lock',
|
|
negate: true,
|
|
select: {
|
|
1: 'Lock Recording',
|
|
0: 'Unlock Recording'
|
|
},
|
|
def: 1,
|
|
deprecated: true
|
|
},
|
|
filename: {
|
|
'class': 'all',
|
|
type: 'substr',
|
|
desc: 'Filename contains',
|
|
idesc: 'Filename does not contain',
|
|
negate: true,
|
|
def: 'Enter text here...'
|
|
},
|
|
fflag: {
|
|
'class': 'all',
|
|
type: 'string',
|
|
desc: 'Folder flagged as',
|
|
idesc: 'Folder not flagged as',
|
|
negate: true,
|
|
def: 'nosweep'
|
|
},
|
|
foldername: {
|
|
'class': 'all',
|
|
type: 'string',
|
|
desc: 'Folder name contains',
|
|
idesc: 'Folder name does not contain',
|
|
negate: true,
|
|
def: 'Enter text here...'
|
|
},
|
|
lastrule: {
|
|
'class': 'all',
|
|
type: 'noarg',
|
|
desc: 'Previous Rule Matched',
|
|
idesc: "Previous Rule didn't match",
|
|
negate: true,
|
|
def: ""
|
|
},
|
|
series: {
|
|
'class': 'folder',
|
|
type: 'noarg',
|
|
desc: 'Folder was created by series recording',
|
|
idesc: 'Folder was not created by series recording',
|
|
negate: true,
|
|
def: ""
|
|
},
|
|
fileexists: {
|
|
'class': 'all',
|
|
type: 'string',
|
|
desc: 'File exists',
|
|
idesc: "File does not exist",
|
|
negate: true,
|
|
def: ""
|
|
},
|
|
direxists: {
|
|
'class': 'all',
|
|
type: 'string',
|
|
desc: 'Directory exists',
|
|
idesc: "Directory does not exist",
|
|
negate: true,
|
|
def: ""
|
|
},
|
|
textmatch: {
|
|
'class': 'all',
|
|
type: 'textmatch',
|
|
desc: 'Text comparison',
|
|
negate: true,
|
|
def: 'Enter text here...'
|
|
},
|
|
intmatch: {
|
|
'class': 'all',
|
|
type: 'intmatch',
|
|
desc: 'Numeric comparison',
|
|
negate: true,
|
|
def: "0"
|
|
},
|
|
varset: {
|
|
'class': 'all',
|
|
type: 'string',
|
|
desc: 'Variable is set',
|
|
idesc: 'Variable is not set',
|
|
negate: true,
|
|
def: ""
|
|
},
|
|
'or': {
|
|
'class': 'all',
|
|
type: 'composite',
|
|
label: 'Or',
|
|
desc: 'If any of...',
|
|
negate: false,
|
|
def: ''
|
|
},
|
|
'and': {
|
|
'class': 'all',
|
|
type: 'composite',
|
|
label: 'And',
|
|
desc: 'If all of...',
|
|
negate: false,
|
|
def: ''
|
|
}
|
|
},
|
|
action: {
|
|
'continue': {
|
|
'class': 'all',
|
|
argtype: 'none',
|
|
desc: 'Continue on to next rule',
|
|
continues: true
|
|
},
|
|
stop: {
|
|
'class': 'all',
|
|
argtype: 'none',
|
|
desc: 'Do nothing and stop processing rules',
|
|
continues: false
|
|
},
|
|
move: {
|
|
'class': 'all',
|
|
argtype: 'folder',
|
|
desc: 'Move recording to folder...',
|
|
continues: false
|
|
},
|
|
movecreate: {
|
|
'class': 'all',
|
|
argtype: 'folder',
|
|
desc: 'Move recording to folder (creating if necessary)',
|
|
continues: false
|
|
},
|
|
copy: {
|
|
'class': 'all',
|
|
argtype: 'folder',
|
|
desc: 'Copy recording to folder...',
|
|
continues: false
|
|
},
|
|
copycreate: {
|
|
'class': 'all',
|
|
argtype: 'folder',
|
|
desc: 'Copy recording to folder (creating if necessary)',
|
|
continues: false
|
|
},
|
|
fileunder: {
|
|
'class': 'folder',
|
|
argtype: 'folder',
|
|
desc: 'Merge into first folder of same name found under...',
|
|
continues: false
|
|
},
|
|
fileundercreate: {
|
|
'class': 'folder',
|
|
argtype: 'folder',
|
|
desc: 'Merge into or create folder of ' +
|
|
'same name found under...',
|
|
continues: false
|
|
},
|
|
renamefile: {
|
|
'class': 'all',
|
|
argtype: 'filenamebase',
|
|
desc: 'Rename recording files to...',
|
|
continues: true
|
|
},
|
|
settitle: {
|
|
'class': 'all',
|
|
argtype: 'string',
|
|
desc: 'Set recording title to...',
|
|
continues: true
|
|
},
|
|
setguidance: {
|
|
'class': 'all',
|
|
argtype: 'string',
|
|
desc: 'Set recording guidance to...',
|
|
continues: true
|
|
},
|
|
setsynopsis: {
|
|
'class': 'all',
|
|
argtype: 'string',
|
|
desc: 'Set recording synopsis to...',
|
|
continues: true
|
|
},
|
|
lock: {
|
|
'class': 'all',
|
|
argtype: 'none',
|
|
desc: 'Lock recording',
|
|
continues: true
|
|
},
|
|
unlock: {
|
|
'class': 'all',
|
|
argtype: 'none',
|
|
desc: 'Unlock recording',
|
|
continues: true
|
|
},
|
|
flag: {
|
|
'class': 'all',
|
|
argtype: 'select',
|
|
desc: 'Set recording flag...',
|
|
select: {
|
|
lock: 'Locked',
|
|
new: 'New',
|
|
protect: 'Protected (Enc)',
|
|
guidance: 'Guidance',
|
|
encrypted: 'Encrypted',
|
|
shrunk: 'Shrunk',
|
|
dedup: 'De-duplicated',
|
|
radio: 'Radio Programme'
|
|
},
|
|
continues: true
|
|
},
|
|
unflag: {
|
|
'class': 'all',
|
|
argtype: 'select',
|
|
desc: 'Unset recording flag...',
|
|
select: {
|
|
lock: 'Locked',
|
|
new: 'New',
|
|
protect: 'Protected (Enc)',
|
|
guidance: 'Guidance',
|
|
encrypted: 'Encrypted',
|
|
shrunk: 'Shrunk',
|
|
dedup: 'De-duplicated',
|
|
radio: 'Radio Programme'
|
|
},
|
|
continues: true
|
|
},
|
|
queue: {
|
|
'class': 'all',
|
|
argtype: 'selectx',
|
|
desc: 'Queue recording for',
|
|
select: queueselect,
|
|
continues: true
|
|
},
|
|
dequeue: {
|
|
'class': 'all',
|
|
argtype: 'select',
|
|
desc: 'De-queue recording for',
|
|
select: $.extend({any: '-- Everything --'}, queueselect),
|
|
continues: true
|
|
},
|
|
'delete': {
|
|
'class': 'all',
|
|
argtype: 'none',
|
|
desc: 'Delete recording',
|
|
continues: false
|
|
},
|
|
'log': {
|
|
'class': 'all',
|
|
argtype: 'string',
|
|
desc: 'Log...',
|
|
continues: true
|
|
},
|
|
'set': {
|
|
'class': 'all',
|
|
argtype: 'string',
|
|
desc: 'Set variable...',
|
|
continues: true
|
|
}
|
|
}
|
|
};
|
|
|
|
function register_queue(tag, descr)
|
|
{
|
|
schema.action.queue.select[tag] = descr;
|
|
schema.action.dequeue.select[tag] = descr;
|
|
schema.criterion.queue.select[tag] = descr;
|
|
}
|
|
|