mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
refactor: merge video/audio FilePond pools into TFE input
- Remove separate video/audio/peertube_video/peertube_audio pools from UI - TFE pool now accepts all file types including video/audio - When PeerTube is enabled, video/audio dropped into TFE pool auto-upload to PeerTube (process.php detects MIME and uploads immediately) - PeerTube return IDs now encode type: peertube:video:UUID or peertube:audio:UUID - load.php returns placeholder SVG for PeerTube files so they appear in FilePond - Edit mode: all existing files (including PeerTube) shown in TFE FilePond pool - Remove legacy video/audio/peertube_* handling from both controllers - Remove unused vide/audio/peertube_* entries from JS QUEUE_CONFIG
This commit is contained in:
@@ -1001,16 +1001,18 @@ trait ThesisFileHandler
|
||||
}
|
||||
|
||||
// PeerTube files have been uploaded already; just insert DB row
|
||||
// Format: peertube:video:UUID or peertube:audio:UUID
|
||||
if (str_starts_with($fileId, 'peertube:')) {
|
||||
$uuid = substr($fileId, strlen('peertube:'));
|
||||
$fileType = ($queueKey === 'peertube_video') ? 'video' : 'audio';
|
||||
$parts = explode(':', $fileId, 3);
|
||||
$fileType = ($parts[1] ?? '') === 'video' ? 'video' : 'audio';
|
||||
$uuid = $parts[2] ?? '';
|
||||
$storedPath = 'peertube_ids:' . $uuid;
|
||||
$this->db->insertThesisFile(
|
||||
$thesisId, $fileType,
|
||||
$storedPath,
|
||||
$uuid . ' (PeerTube)',
|
||||
0,
|
||||
($queueKey === 'peertube_video') ? 'video/mp4' : 'audio/mpeg',
|
||||
$fileType === 'video' ? 'video/mp4' : 'audio/mpeg',
|
||||
null, null
|
||||
);
|
||||
error_log("ThesisFileHandler: PeerTube file associated → $uuid");
|
||||
|
||||
Reference in New Issue
Block a user