0.12.0-1 Plugins und diverses
This commit is contained in:
@@ -449,6 +449,14 @@ export const api = {
|
||||
body: JSON.stringify(payload)
|
||||
});
|
||||
},
|
||||
async recoverMissingCoverArt(payload = {}) {
|
||||
const result = await request('/settings/coverart/recover', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(payload || {})
|
||||
});
|
||||
afterMutationInvalidate(['/history', '/settings']);
|
||||
return result;
|
||||
},
|
||||
getPipelineState() {
|
||||
return request('/pipeline/state');
|
||||
},
|
||||
@@ -594,23 +602,57 @@ export const api = {
|
||||
afterMutationInvalidate(['/history', '/pipeline/queue']);
|
||||
return result;
|
||||
},
|
||||
async reencodeJob(jobId) {
|
||||
async reencodeJob(jobId, options = {}) {
|
||||
const body = {};
|
||||
if (options.keepBoth) body.keepBoth = true;
|
||||
if (Array.isArray(options.deleteFolders) && options.deleteFolders.length > 0) body.deleteFolders = options.deleteFolders;
|
||||
const result = await request(`/pipeline/reencode/${jobId}`, {
|
||||
method: 'POST'
|
||||
method: 'POST',
|
||||
body: Object.keys(body).length > 0 ? JSON.stringify(body) : undefined
|
||||
});
|
||||
afterMutationInvalidate(['/history', '/pipeline/queue']);
|
||||
return result;
|
||||
},
|
||||
async restartReviewFromRaw(jobId) {
|
||||
async restartReviewFromRaw(jobId, options = {}) {
|
||||
const body = {};
|
||||
if (options.keepBoth) body.keepBoth = true;
|
||||
if (Array.isArray(options.deleteFolders) && options.deleteFolders.length > 0) body.deleteFolders = options.deleteFolders;
|
||||
const result = await request(`/pipeline/restart-review/${jobId}`, {
|
||||
method: 'POST'
|
||||
method: 'POST',
|
||||
body: Object.keys(body).length > 0 ? JSON.stringify(body) : undefined
|
||||
});
|
||||
afterMutationInvalidate(['/history', '/pipeline/queue']);
|
||||
return result;
|
||||
},
|
||||
async restartEncodeWithLastSettings(jobId) {
|
||||
async restartEncodeWithLastSettings(jobId, options = {}) {
|
||||
const body = {};
|
||||
if (options.keepBoth) body.keepBoth = true;
|
||||
if (Array.isArray(options.deleteFolders) && options.deleteFolders.length > 0) body.deleteFolders = options.deleteFolders;
|
||||
const result = await request(`/pipeline/restart-encode/${jobId}`, {
|
||||
method: 'POST'
|
||||
method: 'POST',
|
||||
body: Object.keys(body).length > 0 ? JSON.stringify(body) : undefined
|
||||
});
|
||||
afterMutationInvalidate(['/history', '/pipeline/queue']);
|
||||
return result;
|
||||
},
|
||||
getOutputFolders(jobId) {
|
||||
return request(`/pipeline/output-folders/${jobId}`);
|
||||
},
|
||||
async deleteOutputFolders(jobId, folderPaths = []) {
|
||||
const result = await request(`/pipeline/delete-output-folders/${jobId}`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ folderPaths })
|
||||
});
|
||||
afterMutationInvalidate(['/history']);
|
||||
return result;
|
||||
},
|
||||
async restartCdReviewFromRaw(jobId, options = {}) {
|
||||
const body = {};
|
||||
if (options.keepBoth) body.keepBoth = true;
|
||||
if (Array.isArray(options.deleteFolders) && options.deleteFolders.length > 0) body.deleteFolders = options.deleteFolders;
|
||||
const result = await request(`/pipeline/restart-cd-review/${jobId}`, {
|
||||
method: 'POST',
|
||||
body: Object.keys(body).length > 0 ? JSON.stringify(body) : undefined
|
||||
});
|
||||
afterMutationInvalidate(['/history', '/pipeline/queue']);
|
||||
return result;
|
||||
@@ -700,17 +742,30 @@ export const api = {
|
||||
},
|
||||
async deleteJobEntry(jobId, target = 'none', options = {}) {
|
||||
const includeRelated = Boolean(options?.includeRelated);
|
||||
const selectedMoviePaths = Array.isArray(options?.selectedMoviePaths)
|
||||
? options.selectedMoviePaths
|
||||
.map((item) => String(item || '').trim())
|
||||
.filter(Boolean)
|
||||
: null;
|
||||
const result = await request(`/history/${jobId}/delete`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ target, includeRelated })
|
||||
body: JSON.stringify({
|
||||
target,
|
||||
includeRelated,
|
||||
...(selectedMoviePaths ? { selectedMoviePaths } : {})
|
||||
})
|
||||
});
|
||||
afterMutationInvalidate(['/history', '/pipeline/queue']);
|
||||
return result;
|
||||
},
|
||||
requestJobArchive(jobId, target = 'raw') {
|
||||
requestJobArchive(jobId, target = 'raw', options = {}) {
|
||||
const outputPath = String(options?.outputPath || '').trim();
|
||||
return request(`/downloads/history/${jobId}`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ target })
|
||||
body: JSON.stringify({
|
||||
target,
|
||||
...(outputPath ? { outputPath } : {})
|
||||
})
|
||||
});
|
||||
},
|
||||
getDownloads() {
|
||||
|
||||
Reference in New Issue
Block a user