Chocobozzz/PeerTube

View on GitHub

Showing 1,292 of 3,313 total issues

Function getCoreProviders has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function getCoreProviders () {
  return [
    AuthService,
    ScopedTokensService,
    ConfirmService,
Severity: Minor
Found in client/src/app/core/core-providers.ts - About 1 hr to fix

    Function checkEndMessage has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function checkEndMessage (options: {
      message: string
      requiresEmailVerification: boolean
      requiresApproval: boolean
      afterEmailVerification: boolean
    Severity: Minor
    Found in client/e2e/src/suites-local/signup.e2e-spec.ts - About 1 hr to fix

      Function buildPeerTubeHelpers has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        private buildPeerTubeHelpers (options: {
          pluginInfo: PluginInfo
          translations?: Translations
        }): RegisterClientHelpers {
          const { pluginInfo, translations } = options
      Severity: Minor
      Found in client/src/standalone/videos/shared/peertube-plugin.ts - About 1 hr to fix

        Function buildWatchPeakPromise has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            const buildWatchPeakPromise = () => {
              let watchPeakDateWhereStart = ''
              let watchPeakDateWhereEnd = ''
        
              if (startDate) {
        Severity: Minor
        Found in server/core/models/view/local-video-viewer.ts - About 1 hr to fix

          Function buildMainGetQuery has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            private buildMainGetQuery (options: BuildVideoGetQueryOptions) {
              this.attributes = {
                '"video".*': ''
              }
          
          
          Severity: Minor
          Found in server/core/models/video/sql/video/video-model-get-query-builder.ts - About 1 hr to fix

            Function up has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            async function up (utils: {
              transaction: Sequelize.Transaction
              queryInterface: Sequelize.QueryInterface
              sequelize: Sequelize.Sequelize
            }): Promise<void> {
            Severity: Minor
            Found in server/core/initializers/migrations/0525-abuse-messages.ts - About 1 hr to fix

              Function up has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              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

                  static async updateYoutubeDLBinary () {
                    const url = CONFIG.IMPORT.VIDEOS.HTTP.YOUTUBE_DL_RELEASE.URL
                
                    logger.info('Updating youtubeDL binary from %s.', url, lTags())
                
                
                Severity: Minor
                Found in server/core/helpers/youtube-dl/youtube-dl-cli.ts - About 1 hr to fix

                  Function addVideoJobsAfterUpload has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  async function addVideoJobsAfterUpload (video: MVideoFullLight, videoFile: MVideoFile) {
                    const jobs: (CreateJobArgument & CreateJobOptions)[] = [
                      {
                        type: 'manage-video-torrent' as 'manage-video-torrent',
                        payload: {
                  Severity: Minor
                  Found in server/core/controllers/api/videos/source.ts - About 1 hr to fix

                    Function createLocalVideoComment has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export async function createLocalVideoComment (options: {
                      text: string
                      inReplyToComment: MComment | null
                      video: MVideoFullLight
                      user: MUserAccountId
                    Severity: Minor
                    Found in server/core/lib/video-comment.ts - About 1 hr to fix

                      Function buildAvailableVideo has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        private buildAvailableVideo (li: HTMLElement, positionBlock: HTMLElement, options: PlaylistItemOptions) {
                          const videoElement = options.element
                      
                          const player = super.createEl('div', {
                            className: 'item-player'
                      Severity: Minor
                      Found in client/src/assets/player/shared/playlist/playlist-menu-item.ts - About 1 hr to fix

                        Function constructor has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          constructor (vjs: typeof videojs, source: videojs.Tech.SourceObject, tech: videojs.Tech) {
                            this.vjs = vjs
                            this.source = source
                        
                            this.tech = tech;
                        Severity: Minor
                        Found in client/src/assets/player/shared/p2p-media-loader/hls-plugin.ts - About 1 hr to fix

                          Function updateVideo has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            updateVideo (video: VideoEdit) {
                              const language = video.language || null
                              const licence = video.licence || null
                              const category = video.category || null
                              const description = video.description || null
                          Severity: Minor
                          Found in client/src/app/shared/shared-main/video/video.service.ts - About 1 hr to fix

                            Function updateSecondStep has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              async updateSecondStep () {
                                if (!await this.isFormValid()) return
                            
                                this.isUpdatingVideo = true
                            
                            

                              Function onUploadVideoOngoing has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                              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

                                  search () {
                                    this.error = this.checkFieldsAndGetError()
                                    if (this.error) return
                                
                                    this.isSearching = true
                                Severity: Minor
                                Found in client/src/app/+search/search.component.ts - About 1 hr to fix

                                  Function runServer has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function runServer (appInstance: number, config: any = {}) {
                                    const env = Object.create(process.env)
                                  
                                    env['NODE_OPTIONS'] = ''
                                    env['NODE_ENV'] = 'test'
                                  Severity: Minor
                                  Found in client/e2e/src/utils/server.ts - About 1 hr to fix

                                    Function listRedundanciesCLI has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    async function listRedundanciesCLI (options: CommonProgramOptions & { target: VideoRedundanciesTarget }) {
                                      const { target } = options
                                    
                                      const { url, username, password } = await getServerCredentials(options)
                                      const server = buildServer(url)
                                    Severity: Minor
                                    Found in apps/peertube-cli/src/peertube-redundancy.ts - About 1 hr to fix

                                      Function secondsToTime has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export function secondsToTime (options: {
                                        seconds: number
                                        format: 'short' | 'full' | 'locale-string' // default 'short'
                                        symbol?: string
                                      } | number) {
                                      Severity: Minor
                                      Found in packages/core-utils/src/common/date.ts - About 1 hr to fix

                                        Function sendPendingChunks has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          private async sendPendingChunks (): Promise<any> {
                                            if (this.ended) return Promise.resolve()
                                        
                                            const parallelPromises: Promise<any>[] = []
                                        
                                        
                                        Severity: Minor
                                        Found in apps/peertube-runner/src/server/process/shared/process-live.ts - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language