- Added support for Faster Whisper transcription via Jigasi and Skynet. - Updated .env.example to include new environment variables for transcription settings. - Enhanced Jitsi Docker Compose configuration to include Skynet and Jigasi services. - Introduced new API endpoints for managing organizational folders in the drive service. - Updated Nextcloud initialization script to enable external file mounting. - Improved error handling and response structures in the drive API. - Added new properties for organization settings related to transcription and agenda management.
46 lines
1.4 KiB
Go
46 lines
1.4 KiB
Go
package drive
|
|
|
|
import (
|
|
"github.com/ultisuite/ulti-backend/internal/driveroot"
|
|
)
|
|
|
|
func pathRefFromParts(rootKind, rootID, path string) (driveroot.Ref, error) {
|
|
kind, err := driveroot.ParseKind(rootKind)
|
|
if err != nil {
|
|
return driveroot.Ref{}, ErrInvalid
|
|
}
|
|
return driveroot.Ref{Kind: kind, RootID: rootID, Path: path}, nil
|
|
}
|
|
|
|
func pathRefFromMoveSource(req *moveRequest) (driveroot.Ref, error) {
|
|
return pathRefFromParts(req.SourceRoot, req.SourceRootID, req.Source)
|
|
}
|
|
|
|
func pathRefFromMoveDestination(req *moveRequest) (driveroot.Ref, error) {
|
|
return pathRefFromParts(req.DestinationRoot, req.DestinationRootID, req.Destination)
|
|
}
|
|
|
|
func pathRefFromCopySource(req *copyRequest) (driveroot.Ref, error) {
|
|
return pathRefFromParts(req.SourceRoot, req.SourceRootID, req.Source)
|
|
}
|
|
|
|
func pathRefFromCopyDestination(req *copyRequest) (driveroot.Ref, error) {
|
|
return pathRefFromParts(req.DestinationRoot, req.DestinationRootID, req.Destination)
|
|
}
|
|
|
|
func pathRefFromRename(req *renameRequest) (driveroot.Ref, error) {
|
|
return pathRefFromParts(req.Root, req.RootID, req.Path)
|
|
}
|
|
|
|
func pathRefFromFavorite(req *favoriteRequest) (driveroot.Ref, error) {
|
|
return pathRefFromParts(req.Root, req.RootID, req.Path)
|
|
}
|
|
|
|
func pathRefFromShare(req *createShareRequest) (driveroot.Ref, error) {
|
|
return pathRefFromParts(req.Root, req.RootID, req.Path)
|
|
}
|
|
|
|
func usesAlternateRoot(ref driveroot.Ref) bool {
|
|
return ref.Kind != driveroot.KindPersonal && ref.Kind != ""
|
|
}
|