Prefer using our pick function
This commit is contained in:
parent
396f6f0140
commit
2ec349aa85
|
@ -1,6 +1,6 @@
|
||||||
import { FfmpegCommand } from 'fluent-ffmpeg'
|
import { FfmpegCommand } from 'fluent-ffmpeg'
|
||||||
import { pick } from 'lodash'
|
|
||||||
import { logger, loggerTagsFactory } from '@server/helpers/logger'
|
import { logger, loggerTagsFactory } from '@server/helpers/logger'
|
||||||
|
import { pick } from '@shared/core-utils'
|
||||||
import { AvailableEncoders, EncoderOptions } from '@shared/models'
|
import { AvailableEncoders, EncoderOptions } from '@shared/models'
|
||||||
import { buildStreamSuffix, getScaleFilter, StreamType } from './ffmpeg-commons'
|
import { buildStreamSuffix, getScaleFilter, StreamType } from './ffmpeg-commons'
|
||||||
import { getEncoderBuilderResult } from './ffmpeg-encoders'
|
import { getEncoderBuilderResult } from './ffmpeg-encoders'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { isArray } from 'lodash'
|
|
||||||
import { isPlaylistElementObjectValid, isPlaylistObjectValid } from '@server/helpers/custom-validators/activitypub/playlist'
|
import { isPlaylistElementObjectValid, isPlaylistObjectValid } from '@server/helpers/custom-validators/activitypub/playlist'
|
||||||
|
import { isArray } from '@server/helpers/custom-validators/misc'
|
||||||
import { logger, loggerTagsFactory } from '@server/helpers/logger'
|
import { logger, loggerTagsFactory } from '@server/helpers/logger'
|
||||||
import { doJSONRequest } from '@server/helpers/requests'
|
import { doJSONRequest } from '@server/helpers/requests'
|
||||||
import { PlaylistElementObject, PlaylistObject } from '@shared/models'
|
import { PlaylistElementObject, PlaylistObject } from '@shared/models'
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import { readFileSync } from 'fs-extra'
|
import { readFileSync } from 'fs-extra'
|
||||||
import { isArray, merge } from 'lodash'
|
import { merge } from 'lodash'
|
||||||
import { createTransport, Transporter } from 'nodemailer'
|
import { createTransport, Transporter } from 'nodemailer'
|
||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
|
import { toArray } from '@server/helpers/custom-validators/misc'
|
||||||
import { root } from '@shared/core-utils'
|
import { root } from '@shared/core-utils'
|
||||||
import { EmailPayload } from '@shared/models'
|
import { EmailPayload } from '@shared/models'
|
||||||
import { SendEmailDefaultOptions } from '../../shared/models/server/emailer.model'
|
import { SendEmailDefaultOptions } from '../../shared/models/server/emailer.model'
|
||||||
|
@ -158,9 +159,7 @@ class Emailer {
|
||||||
subjectPrefix: CONFIG.EMAIL.SUBJECT.PREFIX
|
subjectPrefix: CONFIG.EMAIL.SUBJECT.PREFIX
|
||||||
})
|
})
|
||||||
|
|
||||||
const toEmails = isArray(options.to)
|
const toEmails = toArray(options.to)
|
||||||
? options.to
|
|
||||||
: [ options.to ]
|
|
||||||
|
|
||||||
for (const to of toEmails) {
|
for (const to of toEmails) {
|
||||||
const baseOptions: SendEmailDefaultOptions = {
|
const baseOptions: SendEmailDefaultOptions = {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { pick } from 'lodash'
|
|
||||||
import { Sequelize, Transaction } from 'sequelize'
|
import { Sequelize, Transaction } from 'sequelize'
|
||||||
|
import { pick } from '@shared/core-utils'
|
||||||
import { AbstractVideoQueryBuilder } from './shared/abstract-video-query-builder'
|
import { AbstractVideoQueryBuilder } from './shared/abstract-video-query-builder'
|
||||||
import { VideoFileQueryBuilder } from './shared/video-file-query-builder'
|
import { VideoFileQueryBuilder } from './shared/video-file-query-builder'
|
||||||
import { VideoModelBuilder } from './shared/video-model-builder'
|
import { VideoModelBuilder } from './shared/video-model-builder'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Sequelize } from 'sequelize'
|
import { Sequelize, Transaction } from 'sequelize'
|
||||||
import validator from 'validator'
|
import validator from 'validator'
|
||||||
import { exists } from '@server/helpers/custom-validators/misc'
|
import { exists } from '@server/helpers/custom-validators/misc'
|
||||||
import { WEBSERVER } from '@server/initializers/constants'
|
import { WEBSERVER } from '@server/initializers/constants'
|
||||||
|
@ -73,6 +73,9 @@ export type BuildVideosListQueryOptions = {
|
||||||
|
|
||||||
group?: string
|
group?: string
|
||||||
having?: string
|
having?: string
|
||||||
|
|
||||||
|
transaction?: Transaction
|
||||||
|
logging?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export class VideosIdListQueryBuilder extends AbstractRunQuery {
|
export class VideosIdListQueryBuilder extends AbstractRunQuery {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { pick } from 'lodash'
|
|
||||||
import { Sequelize } from 'sequelize'
|
import { Sequelize } from 'sequelize'
|
||||||
|
import { pick } from '@shared/core-utils'
|
||||||
import { VideoInclude } from '@shared/models'
|
import { VideoInclude } from '@shared/models'
|
||||||
import { AbstractVideoQueryBuilder } from './shared/abstract-video-query-builder'
|
import { AbstractVideoQueryBuilder } from './shared/abstract-video-query-builder'
|
||||||
import { VideoFileQueryBuilder } from './shared/video-file-query-builder'
|
import { VideoFileQueryBuilder } from './shared/video-file-query-builder'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { pick } from 'lodash'
|
import { pick } from '@shared/core-utils'
|
||||||
import { HttpStatusCode, ResultList, VideoComment, VideoCommentThreads, VideoCommentThreadTree } from '@shared/models'
|
import { HttpStatusCode, ResultList, VideoComment, VideoCommentThreads, VideoCommentThreadTree } from '@shared/models'
|
||||||
import { unwrapBody } from '../requests'
|
import { unwrapBody } from '../requests'
|
||||||
import { AbstractCommand, OverrideCommandOptions } from '../shared'
|
import { AbstractCommand, OverrideCommandOptions } from '../shared'
|
||||||
|
|
Loading…
Reference in New Issue