Showing 1,292 of 3,313 total issues
Function userImportRequestResumableInitValidator
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async (req: express.Request, res: express.Response, next: express.NextFunction) => {
if (areValidationErrors(req, res)) return
if (CONFIG.IMPORT.USERS.ENABLED !== true) {
return res.fail({
Function getUser
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function getUser (usernameOrEmail?: string, password?: string, bypassLogin?: BypassLogin) {
// Special treatment coming from a plugin
if (bypassLogin && bypassLogin.bypass === true) {
logger.info('Bypassing oauth login by plugin %s.', bypassLogin.pluginName)
Function buildPlaylistHTML
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static buildPlaylistHTML (options: {
html: string
playlist: MVideoPlaylistFull
addOG: boolean
Function updateVideoViewersCount
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private async updateVideoViewersCount () {
if (this.processingViewerCounters) return
this.processingViewerCounters = true
if (!isTestOrDevInstance()) {
Function handleHLSJob
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function handleHLSJob (job: Job, payload: HLSTranscodingPayload, videoArg: MVideoFullLight) {
logger.info('Handling HLS transcoding job for %s.', videoArg.uuid, lTags(videoArg.uuid), { payload })
const inputFileMutexReleaser = await VideoPathManager.Instance.lockFiles(videoArg.uuid)
let video: MVideoFullLight
Function processActivities
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export async function processActivities (
activities: Activity[],
options: {
signatureActor?: MActorSignature
inboxActor?: MActorDefault
Function checkLatestPluginsVersion
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private async checkLatestPluginsVersion () {
if (CONFIG.PLUGINS.INDEX.ENABLED === false) return
logger.info('Checking latest plugins version.')
Function createEl
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createEl () {
const el = super.createEl('div', { className: 'peertube-dock' })
if (this.options_.avatarUrl) {
const avatar = videojs.dom.createEl('img', {
Function update
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async update () {
const avatarsInfo = getImagesInfoFromObject(this.actorObject, ActorImageType.AVATAR)
const bannersInfo = getImagesInfoFromObject(this.actorObject, ActorImageType.BANNER)
try {
Function activityPubCollectionPagination
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export async function activityPubCollectionPagination (
baseUrl: string,
handler: ActivityPubCollectionPaginationHandler,
page?: any,
size = ACTIVITY_PUB.COLLECTION_ITEMS_PER_PAGE
Function buildOverviewItems
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private buildOverviewItems () {
const overviewItems: TopMenuDropdownParam = {
label: $localize`Overview`,
children: []
}
Function buildVODHandlers
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private buildVODHandlers () {
const handlers: KeyHandler[] = [
// Rewind
{
accept: e => this.isNaked(e, 'ArrowLeft') || this.isNaked(e, 'MediaRewind'),
Function ngOnInit
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ngOnInit () {
this.actions = [
[
{
label: $localize`Cancel this job`,
Function buildPeerTubePlayerConstructorOptions
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private buildPeerTubePlayerConstructorOptions (options: {
urlOptions: URLOptions
}): PeerTubePlayerContructorOptions {
const { urlOptions } = options
Function importVideo
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
importVideo (torrentfile?: Blob) {
this.isImportingVideo = true
const videoUpdate: VideoUpdate = {
privacy: this.highestPrivacy,
Function runTranscoding
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
runTranscoding (options: {
videos: Video[]
type: 'hls' | 'web-video'
forceTranscoding?: boolean
}): Observable<any> {
Function deleteSelectedVideos
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async deleteSelectedVideos () {
const toDeleteVideosIds = Object.entries(this.selection)
.filter(([ _k, v ]) => v === true)
.map(([ k, _v ]) => parseInt(k, 10))
Function askVideoPassword
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async askVideoPassword (options: { incorrectPassword: boolean, translations: Translations }): Promise<string> {
const { incorrectPassword, translations } = options
return new Promise((resolve) => {
this.wrapperElement.style.display = 'none'
Function run
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async run () {
logger.info('Running PeerTube runner in server mode')
const enabledJobsArray = this.enabledJobs
? Array.from(this.enabledJobs)
Function getVideoStreamCodec
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export async function getVideoStreamCodec (path: string, existingProbe?: FfprobeData) {
const videoStream = await getVideoStream(path, existingProbe)
if (!videoStream) return ''
const videoCodec = videoStream.codec_tag_string