secubox-openwrt/package/secubox/luci-app-peertube/htdocs/luci-static/resources/peertube/api.js
CyberMind-FR 3150c65e99 feat(peertube): Add yt-dlp video import to LuCI dashboard
- Install yt-dlp in PeerTube LXC container for video downloads
- Add RPCD methods: import_video, import_status
- Add UI section with URL input and download button
- Support YouTube, Vimeo, and 1000+ video sites
- Download videos to import folder for PeerTube admin upload
- Show download status and video count

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 16:20:50 +01:00

86 lines
1.3 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: { }
})
});