1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Add channel collaborators feature

This commit is contained in:
Chocobozzz 2025-09-16 14:36:37 +02:00
parent 94e55dfc6c
commit 135d5c7363
No known key found for this signature in database
GPG key ID: 583A612D890159BE
185 changed files with 5457 additions and 2631 deletions

View file

@ -1,12 +1,11 @@
import { join } from 'path'
import { logger } from '@server/helpers/logger.js'
import { doRequestAndSaveToFile } from '@server/helpers/requests.js'
import { StoryboardModel } from '@server/models/video/storyboard.js'
import { join } from 'path'
import { FILES_CACHE } from '../../initializers/constants.js'
import { AbstractSimpleFileCache } from './shared/abstract-simple-file-cache.js'
class VideoStoryboardsSimpleFileCache extends AbstractSimpleFileCache <string> {
class VideoStoryboardsSimpleFileCache extends AbstractSimpleFileCache<string> {
private static instance: VideoStoryboardsSimpleFileCache
private constructor () {
@ -21,7 +20,7 @@ class VideoStoryboardsSimpleFileCache extends AbstractSimpleFileCache <string> {
const storyboard = await StoryboardModel.loadWithVideoByFilename(filename)
if (!storyboard) return undefined
if (storyboard.Video.isOwned()) return { isOwned: true, path: storyboard.getPath() }
if (storyboard.Video.isLocal()) return { isLocal: true, path: storyboard.getPath() }
return this.loadRemoteFile(storyboard.filename)
}
@ -39,7 +38,7 @@ class VideoStoryboardsSimpleFileCache extends AbstractSimpleFileCache <string> {
logger.debug('Fetched remote storyboard %s to %s.', remoteUrl, destPath)
return { isOwned: false, path: destPath }
return { isLocal: false, path: destPath }
} catch (err) {
logger.info('Cannot fetch remote storyboard file %s.', remoteUrl, { err })