Showing 1,292 of 3,313 total issues
Function refreshVideoIfNeeded
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function refreshVideoIfNeeded (options: {
video: MVideoThumbnail
fetchedType: VideoLoadByUrlType
syncParam: SyncParam
}): Promise<MVideoThumbnail> {
Function generateCaption
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private generateCaption (videos: Video[]) {
this.videoCaptionService.generateCaption({ videos })
.subscribe({
next: result => {
if (result.success) {
Function requestNewArchive
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
requestNewArchive () {
if (this.requestingArchive) return
this.requestingArchive = true
let baseObs = of<any>(true)
Function ngOnInit
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ngOnInit () {
this.buildActions()
this.user = this.authService.getUser()
Function formatUser
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private formatUser (user: UserServerModel, translations: { [ id: string ]: string } = {}) {
let videoQuota
if (user.videoQuota === -1) {
videoQuota = '∞'
} else {
Function before
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
before: function () {
require('./src/commands/upload')
// Force keep alive: https://www.browserstack.com/docs/automate/selenium/error-codes/keep-alive-not-used#Node_JS
const http = require('http')
Function transcribe
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async transcribe ({
mediaFilePath,
model = new WhisperBuiltinModel('tiny'),
language,
format,
Function getStats
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static async getStats (strategy: VideoRedundancyStrategyWithManual) {
const actor = await getServerActor()
const sql = `WITH "tmp" AS ` +
`(` +
Function toActivityPubObject
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
toActivityPubObject (this: MVideoRedundancyAP): CacheFileObject {
if (this.VideoStreamingPlaylist) {
return {
id: this.url,
type: 'CacheFile' as 'CacheFile',
Function acceptRegistration
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function acceptRegistration (req: express.Request, res: express.Response) {
const registration = res.locals.userRegistration
const body: UserRegistrationUpdateState = req.body
const userToCreate = buildUser({
Function areValidationErrors
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function areValidationErrors (
req: express.Request,
res: express.Response,
options: {
omitLog?: boolean
Function onExternalUserAuthenticated
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function onExternalUserAuthenticated (options: {
npmName: string
authName: string
authResult: RegisterServerExternalAuthenticatedResult
}) {
Function autoBlacklistVideoIfNeeded
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function autoBlacklistVideoIfNeeded (parameters: {
video: MVideoWithBlacklistLight
user?: MUser
isRemote: boolean
isNew: boolean
Function updateUserFromExternal
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function updateUserFromExternal (
user: MUserDefault,
userOptions: ExternalUser,
userUpdater: RegisterServerAuthenticatedResult['userUpdater']
) {
Function init
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init () {
const events = this.getContext().nodeEvent
events.on('postPublish', (sessionId: string, streamPath: string) => {
logger.debug('RTMP received stream', { id: sessionId, streamPath, ...lTags(sessionId) })
Function cacheFileActivityObjectToDBAttributes
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function cacheFileActivityObjectToDBAttributes (cacheFileObject: CacheFileObject, video: MVideoWithAllFiles, byActor: MActorId) {
if (cacheFileObject.url.mediaType === 'application/x-mpegURL') {
const url = cacheFileObject.url
Function create
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async create (options: CreateOptions) {
const { video, resolution, fps, priority, dependsOnRunnerJob } = options
const jobUUID = buildUUID()
const { separatedAudioFile } = video.getMaxQualityAudioAndVideoFiles()
Function createTranscodingJobs
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async createTranscodingJobs (options: {
transcodingType: 'hls' | 'webtorrent' | 'web-video' // TODO: remove webtorrent in v7
video: MVideoFullLight
resolutions: number[]
isNewVideo: boolean
Function optimizeOriginalVideofile
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export async function optimizeOriginalVideofile (options: {
video: MVideoFullLight
quickTranscode: boolean
job: Job
}) {
Function displayFatalError
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
displayFatalError () {
// Already displayed an error
if (this.errorModal) return
debugLogger('Display fatal error')