Fix shared imports

This commit is contained in:
Chocobozzz
2021-12-24 10:14:47 +01:00
parent 1e9c1b1b44
commit d17c7b4e8c
41 changed files with 78 additions and 96 deletions

View File

@@ -1,7 +1,6 @@
import { Transaction } from 'sequelize'
import { MActorId, MVideoRedundancy, MVideoWithAllFiles } from '@server/types/models'
import { CacheFileObject } from '../../../shared/index'
import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type'
import { CacheFileObject, VideoStreamingPlaylistType } from '@shared/models'
import { VideoRedundancyModel } from '../../models/redundancy/video-redundancy'
async function createOrUpdateCacheFile (cacheFileObject: CacheFileObject, video: MVideoWithAllFiles, byActor: MActorId, t: Transaction) {

View File

@@ -1,8 +1,6 @@
import { isBlockedByServerOrAccount } from '@server/lib/blocklist'
import { isRedundancyAccepted } from '@server/lib/redundancy'
import { ActivityCreate, CacheFileObject, VideoObject } from '../../../../shared'
import { PlaylistObject } from '../../../../shared/models/activitypub/objects/playlist-object'
import { VideoCommentObject } from '../../../../shared/models/activitypub/objects/video-comment-object'
import { ActivityCreate, CacheFileObject, PlaylistObject, VideoCommentObject, VideoObject } from '@shared/models'
import { retryTransactionWrapper } from '../../../helpers/database-utils'
import { logger } from '../../../helpers/logger'
import { sequelizeTypescript } from '../../../initializers/database'

View File

@@ -1,5 +1,4 @@
import { ActivityCreate, ActivityDislike } from '../../../../shared'
import { DislikeObject } from '../../../../shared/models/activitypub/objects'
import { ActivityCreate, ActivityDislike, DislikeObject } from '@shared/models'
import { retryTransactionWrapper } from '../../../helpers/database-utils'
import { sequelizeTypescript } from '../../../initializers/database'
import { AccountVideoRateModel } from '../../../models/account/account-video-rate'

View File

@@ -3,7 +3,7 @@ import { AccountModel } from '@server/models/account/account'
import { VideoModel } from '@server/models/video/video'
import { VideoCommentModel } from '@server/models/video/video-comment'
import { abusePredefinedReasonsMap } from '@shared/core-utils/abuse'
import { AbuseObject, AbuseState, ActivityCreate, ActivityFlag } from '../../../../shared'
import { AbuseObject, AbuseState, ActivityCreate, ActivityFlag } from '@shared/models'
import { getAPId } from '../../../helpers/activitypub'
import { retryTransactionWrapper } from '../../../helpers/database-utils'
import { logger } from '../../../helpers/logger'

View File

@@ -11,7 +11,7 @@ import { moveToFailedMoveToObjectStorageState, moveToNextState } from '@server/l
import { VideoModel } from '@server/models/video/video'
import { VideoJobInfoModel } from '@server/models/video/video-job-info'
import { MStreamingPlaylistVideo, MVideo, MVideoFile, MVideoWithAllFiles } from '@server/types/models'
import { MoveObjectStoragePayload, VideoStorage } from '../../../../shared'
import { MoveObjectStoragePayload, VideoStorage } from '@shared/models'
export async function processMoveToObjectStorage (job: Job) {
const payload = job.data as MoveObjectStoragePayload

View File

@@ -1,6 +1,5 @@
import { Job } from 'bull'
import { move, remove, stat } from 'fs-extra'
import { getLowercaseExtension } from '@shared/core-utils'
import { retryTransactionWrapper } from '@server/helpers/database-utils'
import { YoutubeDLWrapper } from '@server/helpers/youtube-dl'
import { isPostImportVideoAccepted } from '@server/lib/moderation'
@@ -13,16 +12,19 @@ import { VideoPathManager } from '@server/lib/video-path-manager'
import { buildNextVideoState } from '@server/lib/video-state'
import { ThumbnailModel } from '@server/models/video/thumbnail'
import { MVideoImportDefault, MVideoImportDefaultFiles, MVideoImportVideo } from '@server/types/models/video/video-import'
import { getLowercaseExtension } from '@shared/core-utils'
import { isAudioFile } from '@shared/extra-utils'
import {
ThumbnailType,
VideoImportPayload,
VideoImportState,
VideoImportTorrentPayload,
VideoImportTorrentPayloadType,
VideoImportYoutubeDLPayload,
VideoImportYoutubeDLPayloadType,
VideoResolution,
VideoState
} from '../../../../shared'
import { VideoImportState, VideoResolution } from '../../../../shared/models/videos'
import { ThumbnailType } from '../../../../shared/models/videos/thumbnail.type'
} from '@shared/models'
import { ffprobePromise, getDurationFromVideoFile, getVideoFileFPS, getVideoFileResolution } from '../../../helpers/ffprobe-utils'
import { logger } from '../../../helpers/logger'
import { getSecureTorrentName } from '../../../helpers/utils'
@@ -36,7 +38,6 @@ import { MThumbnail } from '../../../types/models/video/thumbnail'
import { federateVideoIfNeeded } from '../../activitypub/videos'
import { Notifier } from '../../notifier'
import { generateVideoMiniature } from '../../thumbnail'
import { isAudioFile } from '@shared/extra-utils'
async function processVideoImport (job: Job) {
const payload = job.data as VideoImportPayload

View File

@@ -12,7 +12,7 @@ import {
NewResolutionTranscodingPayload,
OptimizeTranscodingPayload,
VideoTranscodingPayload
} from '../../../../shared'
} from '@shared/models'
import { retryTransactionWrapper } from '../../../helpers/database-utils'
import { computeLowerResolutionsToTranscode } from '../../../helpers/ffprobe-utils'
import { logger, loggerTagsFactory } from '../../../helpers/logger'