Showing 3,313 of 3,313 total issues
Function up
has 31 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 createOAuthAdminIfNotExist
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function createOAuthAdminIfNotExist () {
const exist = await usersExist()
// Nothing to do, users already exist
if (exist === true) return undefined
Function buildPlayerURLQuery
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildPlayerURLQuery (inputQueryUrl: string) {
const allowedParameters = new Set([
'start',
'stop',
'loop',
Function getPluginValidator
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getPluginValidator = (pluginType: PluginType_Type, withVersion = true) => {
const validators: (ValidationChain | express.Handler)[] = [
param('pluginName')
.custom(isPluginNameValid)
]
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> {