Showing 1,292 of 3,313 total issues
Function generateVideoCommentsFeed
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function generateVideoCommentsFeed (req: express.Request, res: express.Response) {
const start = 0
const video = res.locals.videoAll
const account = res.locals.account
const videoChannel = res.locals.videoChannel
Function getFiles
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getFiles: async (id: number | string) => {
const video = await VideoModel.loadFull(id)
if (!video) return undefined
const webVideoFiles = (video.VideoFiles || []).map(f => ({
Function replaceLiveByReplay
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function replaceLiveByReplay (options: {
video: MVideo
liveSession: MVideoLiveSession
live: MVideoLive
permanentLive: boolean
Function addTags
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static async addTags (htmlStringPage: string, tagsValues: Tags, context: HookContext) {
const openGraphMetaTags = this.generateOpenGraphMetaTagsOptions(tagsValues)
const standardMetaTags = this.generateStandardMetaTagsOptions(tagsValues)
const twitterCardMetaTags = this.generateTwitterCardMetaTagsOptions(tagsValues)
const schemaTags = await this.generateSchemaTagsOptions(tagsValues, context)
Function generateHlsPlaylistCommon
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function generateHlsPlaylistCommon (options: {
type: 'hls' | 'hls-from-ts'
video: MVideo
videoInputPath: string
Function onHLSVideoFileTranscoding
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export async function onHLSVideoFileTranscoding (options: {
video: MVideo
videoOutputPath: string
m3u8OutputPath: string
filesLockedInParent?: boolean // default false
Function upload
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async upload (options: OverrideCommandOptions & {
attributes?: VideoEdit
mode?: 'legacy' | 'resumable' // default legacy
waitTorrentGeneration?: boolean // default true
completedExpectedStatus?: HttpStatusCodeType
Function up
has 41 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 processVideo
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function processVideo (videoId: number) {
const video = await VideoModel.loadWithFiles(videoId)
if (video.isLive) return
const files = await Promise.all(video.getAllFiles().map(f => VideoFileModel.loadWithMetadata(f.id)))
Function toActivityPubObject
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
toActivityPubObject (this: MCommentAP, threadParentComments: MCommentOwner[]): VideoCommentObject | ActivityTombstoneObject {
const inReplyTo = this.inReplyToCommentId === null
? this.Video.url // New thread, so we reply to the video
: this.InReplyToVideoComment.url
Function generatePodcastItem
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function generatePodcastItem (options: {
video: VideoModel
liveItem: boolean
media: PodcastMedia[]
}) {
Function makeResponseCacheable
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private makeResponseCacheable (res: express.Response, next: express.NextFunction, key: string, duration: number) {
const self = this
res.locals.apicache = {
write: res.write.bind(res),
Function init
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init (server: HTTPServer) {
const io = new SocketServer(server, {
cors: isDevInstance()
? { origin: 'http://localhost:5173', methods: [ 'GET', 'POST' ] }
: undefined
Function createEl
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createEl () {
this.menuItems = []
const menu = super.createEl('div', {
className: 'vjs-playlist-menu',
Function run
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function run () {
const excludeList = getContributorsExcludeList()
{
let contributors = await getGitContributors()
Function onVideoFetched
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private async onVideoFetched (options: {
video: VideoDetails
live: LiveVideo
videoCaptions: VideoCaption[]
videoChapters: VideoChapter[]
Function buildPlaylistOptions
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private buildPlaylistOptions (options?: {
playlistTracker: PlaylistTracker
playNext: () => any
playPrevious: () => any
onVideoUpdate: (uuid: string) => any
Function buildLibraryLinks
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
buildLibraryLinks (userCanSeeVideosLink: boolean): MenuSection {
let links: MenuLink[] = []
if (userCanSeeVideosLink) {
links.push({
Function buildConfig
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildConfig (suiteFile: string = undefined) {
const filename = basename(suiteFile)
if (filename === 'custom-server-defaults.e2e-spec.ts') {
return {
Function buildAdditionalAttributes
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildAdditionalAttributes (video: MVideoFormattable, options: VideoFormattingJSONOptions) {
const add = options.additionalAttributes
const result: Partial<VideoAdditionalAttributes> = {}