154 lines
3.1 KiB
JavaScript
154 lines
3.1 KiB
JavaScript
const schema = {
|
|
type: 'object',
|
|
required: [],
|
|
properties: {
|
|
maloja: {
|
|
type: 'array',
|
|
items: {
|
|
type: 'object',
|
|
required: ['name', 'url', 'token'],
|
|
properties: {
|
|
name: {
|
|
type: 'string'
|
|
},
|
|
url: {
|
|
type: 'string'
|
|
},
|
|
token: {
|
|
type: 'string'
|
|
},
|
|
}
|
|
}
|
|
},
|
|
plex: {
|
|
type: 'array',
|
|
items: {
|
|
type: 'object',
|
|
required: ['name', 'url', 'token', 'scrobblers'],
|
|
properties: {
|
|
name: {
|
|
type: 'string'
|
|
},
|
|
url: {
|
|
type: 'string'
|
|
},
|
|
token: {
|
|
type: 'string'
|
|
},
|
|
filters: {
|
|
type: 'array',
|
|
minItems: 0,
|
|
items: {
|
|
type: 'object',
|
|
properties: {
|
|
library: {
|
|
type: 'array',
|
|
items: {
|
|
type: 'string'
|
|
},
|
|
minItems: 0,
|
|
},
|
|
ip: {
|
|
type: 'array',
|
|
items: {
|
|
type: 'string'
|
|
},
|
|
minItems: 0,
|
|
},
|
|
deviceId: {
|
|
type: 'array',
|
|
items: {
|
|
type: 'string'
|
|
},
|
|
minItems: 0,
|
|
},
|
|
platform: {
|
|
type: 'array',
|
|
items: {
|
|
type: 'string'
|
|
},
|
|
minItems: 0,
|
|
},
|
|
product: {
|
|
type: 'array',
|
|
items: {
|
|
type: 'string'
|
|
},
|
|
minItems: 0,
|
|
},
|
|
}
|
|
}
|
|
},
|
|
scrobblers: {
|
|
type: 'array',
|
|
items: {
|
|
type: 'string'
|
|
},
|
|
minItems: 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
scrobble: {
|
|
type: 'object',
|
|
properties: {
|
|
minimum: {
|
|
type: 'object',
|
|
properties: {
|
|
percent: {
|
|
type: 'number'
|
|
},
|
|
duration: {
|
|
type: 'number'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
spotify: {
|
|
type: 'array',
|
|
items: {
|
|
type: 'object',
|
|
required: ['name', 'client_id', 'client_secret', 'redirect_uri', 'scrobblers'],
|
|
properties: {
|
|
name: {
|
|
type: 'string'
|
|
},
|
|
client_id: {
|
|
type: 'string'
|
|
},
|
|
client_secret: {
|
|
type: 'string'
|
|
},
|
|
redirect_uri: {
|
|
type: 'string'
|
|
},
|
|
scrobblers: {
|
|
type: 'array',
|
|
items: {
|
|
type: 'string'
|
|
},
|
|
minItems: 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
web: {
|
|
type: 'object',
|
|
required: [],
|
|
properties: {
|
|
host: {
|
|
type: 'string'
|
|
},
|
|
port: {
|
|
type: 'number'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
module.exports = schema; |