mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Refactor video formatter
This commit is contained in:
parent
638a295021
commit
d896fef7e2
14 changed files with 631 additions and 581 deletions
|
@ -2,7 +2,6 @@ import express from 'express'
|
|||
import { pickCommonVideoQuery } from '@server/helpers/query'
|
||||
import { ActorFollowModel } from '@server/models/actor/actor-follow'
|
||||
import { getServerActor } from '@server/models/application/application'
|
||||
import { guessAdditionalAttributesFromQuery } from '@server/models/video/formatter/video-format-utils'
|
||||
import { VideoChannelSyncModel } from '@server/models/video/video-channel-sync'
|
||||
import { buildNSFWFilter, getCountVideos, isUserAbleToSearchRemoteURI } from '../../helpers/express-utils'
|
||||
import { getFormattedObjects } from '../../helpers/utils'
|
||||
|
@ -36,6 +35,7 @@ import {
|
|||
import { commonVideoPlaylistFiltersValidator, videoPlaylistsSearchValidator } from '../../middlewares/validators/videos/video-playlists'
|
||||
import { AccountModel } from '../../models/account/account'
|
||||
import { AccountVideoRateModel } from '../../models/account/account-video-rate'
|
||||
import { guessAdditionalAttributesFromQuery } from '../../models/video/formatter'
|
||||
import { VideoModel } from '../../models/video/video'
|
||||
import { VideoChannelModel } from '../../models/video/video-channel'
|
||||
import { VideoPlaylistModel } from '../../models/video/video-playlist'
|
||||
|
|
|
@ -8,7 +8,6 @@ import { getOrCreateAPVideo } from '@server/lib/activitypub/videos'
|
|||
import { Hooks } from '@server/lib/plugins/hooks'
|
||||
import { buildMutedForSearchIndex, isSearchIndexSearch, isURISearch } from '@server/lib/search'
|
||||
import { getServerActor } from '@server/models/application/application'
|
||||
import { guessAdditionalAttributesFromQuery } from '@server/models/video/formatter/video-format-utils'
|
||||
import { HttpStatusCode, ResultList, Video } from '@shared/models'
|
||||
import { VideosSearchQueryAfterSanitize } from '../../../../shared/models/search'
|
||||
import { buildNSFWFilter, isUserAbleToSearchRemoteURI } from '../../../helpers/express-utils'
|
||||
|
@ -25,6 +24,7 @@ import {
|
|||
videosSearchSortValidator,
|
||||
videosSearchValidator
|
||||
} from '../../../middlewares'
|
||||
import { guessAdditionalAttributesFromQuery } from '../../../models/video/formatter'
|
||||
import { VideoModel } from '../../../models/video/video'
|
||||
import { MVideoAccountLightBlacklistAllFiles } from '../../../types/models'
|
||||
import { searchLocalUrl } from './shared'
|
||||
|
|
|
@ -3,7 +3,7 @@ import express from 'express'
|
|||
import { handlesToNameAndHost } from '@server/helpers/actors'
|
||||
import { pickCommonVideoQuery } from '@server/helpers/query'
|
||||
import { sendUndoFollow } from '@server/lib/activitypub/send'
|
||||
import { guessAdditionalAttributesFromQuery } from '@server/models/video/formatter/video-format-utils'
|
||||
import { Hooks } from '@server/lib/plugins/hooks'
|
||||
import { VideoChannelModel } from '@server/models/video/video-channel'
|
||||
import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes'
|
||||
import { buildNSFWFilter, getCountVideos } from '../../../helpers/express-utils'
|
||||
|
@ -29,8 +29,8 @@ import {
|
|||
videosSortValidator
|
||||
} from '../../../middlewares/validators'
|
||||
import { ActorFollowModel } from '../../../models/actor/actor-follow'
|
||||
import { guessAdditionalAttributesFromQuery } from '../../../models/video/formatter'
|
||||
import { VideoModel } from '../../../models/video/video'
|
||||
import { Hooks } from '@server/lib/plugins/hooks'
|
||||
|
||||
const mySubscriptionsRouter = express.Router()
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import { getBiggestActorImage } from '@server/lib/actor-image'
|
|||
import { Hooks } from '@server/lib/plugins/hooks'
|
||||
import { ActorFollowModel } from '@server/models/actor/actor-follow'
|
||||
import { getServerActor } from '@server/models/application/application'
|
||||
import { guessAdditionalAttributesFromQuery } from '@server/models/video/formatter/video-format-utils'
|
||||
import { MChannelBannerAccountDefault } from '@server/types/models'
|
||||
import { ActorImageType, HttpStatusCode, VideoChannelCreate, VideoChannelUpdate, VideosImportInChannelCreate } from '@shared/models'
|
||||
import { auditLoggerFactory, getAuditIdFromRes, VideoChannelAuditView } from '../../helpers/audit-logger'
|
||||
|
@ -48,6 +47,7 @@ import {
|
|||
import { updateAvatarValidator, updateBannerValidator } from '../../middlewares/validators/actor-image'
|
||||
import { commonVideoPlaylistFiltersValidator } from '../../middlewares/validators/videos/video-playlists'
|
||||
import { AccountModel } from '../../models/account/account'
|
||||
import { guessAdditionalAttributesFromQuery } from '../../models/video/formatter'
|
||||
import { VideoModel } from '../../models/video/video'
|
||||
import { VideoChannelModel } from '../../models/video/video-channel'
|
||||
import { VideoPlaylistModel } from '../../models/video/video-playlist'
|
||||
|
|
|
@ -3,7 +3,6 @@ import { pickCommonVideoQuery } from '@server/helpers/query'
|
|||
import { doJSONRequest } from '@server/helpers/requests'
|
||||
import { openapiOperationDoc } from '@server/middlewares/doc'
|
||||
import { getServerActor } from '@server/models/application/application'
|
||||
import { guessAdditionalAttributesFromQuery } from '@server/models/video/formatter/video-format-utils'
|
||||
import { MVideoAccountLight } from '@server/types/models'
|
||||
import { HttpStatusCode } from '../../../../shared/models'
|
||||
import { auditLoggerFactory, getAuditIdFromRes, VideoAuditView } from '../../../helpers/audit-logger'
|
||||
|
@ -31,6 +30,7 @@ import {
|
|||
videosRemoveValidator,
|
||||
videosSortValidator
|
||||
} from '../../../middlewares'
|
||||
import { guessAdditionalAttributesFromQuery } from '../../../models/video/formatter'
|
||||
import { VideoModel } from '../../../models/video/video'
|
||||
import { blacklistRouter } from './blacklist'
|
||||
import { videoCaptionsRouter } from './captions'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue