Showing 1,292 of 3,313 total issues
Function getCoreProviders
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getCoreProviders () {
return [
AuthService,
ScopedTokensService,
ConfirmService,
Function checkEndMessage
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function checkEndMessage (options: {
message: string
requiresEmailVerification: boolean
requiresApproval: boolean
afterEmailVerification: boolean
Function buildPeerTubeHelpers
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private buildPeerTubeHelpers (options: {
pluginInfo: PluginInfo
translations?: Translations
}): RegisterClientHelpers {
const { pluginInfo, translations } = options
Function buildWatchPeakPromise
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const buildWatchPeakPromise = () => {
let watchPeakDateWhereStart = ''
let watchPeakDateWhereEnd = ''
if (startDate) {
Function buildMainGetQuery
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private buildMainGetQuery (options: BuildVideoGetQueryOptions) {
this.attributes = {
'"video".*': ''
}
Function up
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function up (utils: {
transaction: Sequelize.Transaction
queryInterface: Sequelize.QueryInterface
sequelize: Sequelize.Sequelize
}): Promise<void> {
Function up
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function up (utils: {
transaction: Sequelize.Transaction
queryInterface: Sequelize.QueryInterface
sequelize: Sequelize.Sequelize
db: any
Function updateYoutubeDLBinary
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static async updateYoutubeDLBinary () {
const url = CONFIG.IMPORT.VIDEOS.HTTP.YOUTUBE_DL_RELEASE.URL
logger.info('Updating youtubeDL binary from %s.', url, lTags())
Function addVideoJobsAfterUpload
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function addVideoJobsAfterUpload (video: MVideoFullLight, videoFile: MVideoFile) {
const jobs: (CreateJobArgument & CreateJobOptions)[] = [
{
type: 'manage-video-torrent' as 'manage-video-torrent',
payload: {
Function createLocalVideoComment
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export async function createLocalVideoComment (options: {
text: string
inReplyToComment: MComment | null
video: MVideoFullLight
user: MUserAccountId
Function buildAvailableVideo
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private buildAvailableVideo (li: HTMLElement, positionBlock: HTMLElement, options: PlaylistItemOptions) {
const videoElement = options.element
const player = super.createEl('div', {
className: 'item-player'
Function constructor
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor (vjs: typeof videojs, source: videojs.Tech.SourceObject, tech: videojs.Tech) {
this.vjs = vjs
this.source = source
this.tech = tech;
Function updateVideo
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateVideo (video: VideoEdit) {
const language = video.language || null
const licence = video.licence || null
const category = video.category || null
const description = video.description || null
Function updateSecondStep
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async updateSecondStep () {
if (!await this.isFormValid()) return
this.isUpdatingVideo = true
Function onUploadVideoOngoing
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
onUploadVideoOngoing (state: UploadState) {
switch (state.status) {
case 'error': {
if (!this.alreadyRefreshedToken && state.responseStatus === HttpStatusCode.UNAUTHORIZED_401) {
this.alreadyRefreshedToken = true
Function search
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
search () {
this.error = this.checkFieldsAndGetError()
if (this.error) return
this.isSearching = true
Function runServer
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function runServer (appInstance: number, config: any = {}) {
const env = Object.create(process.env)
env['NODE_OPTIONS'] = ''
env['NODE_ENV'] = 'test'
Function listRedundanciesCLI
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function listRedundanciesCLI (options: CommonProgramOptions & { target: VideoRedundanciesTarget }) {
const { target } = options
const { url, username, password } = await getServerCredentials(options)
const server = buildServer(url)
Function secondsToTime
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function secondsToTime (options: {
seconds: number
format: 'short' | 'full' | 'locale-string' // default 'short'
symbol?: string
} | number) {
Function sendPendingChunks
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private async sendPendingChunks (): Promise<any> {
if (this.ended) return Promise.resolve()
const parallelPromises: Promise<any>[] = []