Videos imported via yt-dlp are now automatically uploaded to PeerTube: - OAuth authentication using UCI-stored admin credentials - Video upload via PeerTube REST API - Real-time job status polling with import_job_status method - Progress indicator in LuCI UI - Automatic cleanup of temp files New RPCD method: import_job_status for polling job progress. Version bumped to 1.1.0. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
93 lines
1.5 KiB
JavaScript
93 lines
1.5 KiB
JavaScript
'use strict';
|
|
'require rpc';
|
|
|
|
return L.Class.extend({
|
|
status: rpc.declare({
|
|
object: 'luci.peertube',
|
|
method: 'status',
|
|
expect: { }
|
|
}),
|
|
|
|
start: rpc.declare({
|
|
object: 'luci.peertube',
|
|
method: 'start',
|
|
expect: { }
|
|
}),
|
|
|
|
stop: rpc.declare({
|
|
object: 'luci.peertube',
|
|
method: 'stop',
|
|
expect: { }
|
|
}),
|
|
|
|
install: rpc.declare({
|
|
object: 'luci.peertube',
|
|
method: 'install',
|
|
expect: { }
|
|
}),
|
|
|
|
uninstall: rpc.declare({
|
|
object: 'luci.peertube',
|
|
method: 'uninstall',
|
|
expect: { }
|
|
}),
|
|
|
|
update: rpc.declare({
|
|
object: 'luci.peertube',
|
|
method: 'update',
|
|
expect: { }
|
|
}),
|
|
|
|
logs: rpc.declare({
|
|
object: 'luci.peertube',
|
|
method: 'logs',
|
|
params: ['lines'],
|
|
expect: { }
|
|
}),
|
|
|
|
emancipate: rpc.declare({
|
|
object: 'luci.peertube',
|
|
method: 'emancipate',
|
|
params: ['domain'],
|
|
expect: { }
|
|
}),
|
|
|
|
liveEnable: rpc.declare({
|
|
object: 'luci.peertube',
|
|
method: 'live_enable',
|
|
expect: { }
|
|
}),
|
|
|
|
liveDisable: rpc.declare({
|
|
object: 'luci.peertube',
|
|
method: 'live_disable',
|
|
expect: { }
|
|
}),
|
|
|
|
configureHaproxy: rpc.declare({
|
|
object: 'luci.peertube',
|
|
method: 'configure_haproxy',
|
|
expect: { }
|
|
}),
|
|
|
|
importVideo: rpc.declare({
|
|
object: 'luci.peertube',
|
|
method: 'import_video',
|
|
params: ['url'],
|
|
expect: { }
|
|
}),
|
|
|
|
importStatus: rpc.declare({
|
|
object: 'luci.peertube',
|
|
method: 'import_status',
|
|
expect: { }
|
|
}),
|
|
|
|
importJobStatus: rpc.declare({
|
|
object: 'luci.peertube',
|
|
method: 'import_job_status',
|
|
params: ['job_id'],
|
|
expect: { }
|
|
})
|
|
});
|