File count fixes.

This commit is contained in:
ccd0 2015-03-10 23:29:13 -07:00
parent 93fc37956b
commit a3dc18ce82
2 changed files with 4 additions and 2 deletions

View File

@ -38,6 +38,7 @@ ThreadStats =
node: ->
postCount = 0
fileCount = 0
fileCount++ if @board.ID is 'f'
@posts.forEach (post) ->
postCount++
fileCount++ if post.file

View File

@ -70,9 +70,10 @@ ThreadUpdater =
# as posts may be `kill`ed elsewhere.
ThreadUpdater.postIDs = []
ThreadUpdater.fileIDs = []
ThreadUpdater.fileIDs.push @ID if @board.ID is 'f'
@posts.forEach (post) ->
ThreadUpdater.postIDs.push post.ID
ThreadUpdater.fileIDs.push post.ID if post.file and not post.file.isDead
ThreadUpdater.fileIDs.push post.ID if post.file
ThreadUpdater.cb.interval.call $.el 'input', value: Conf['Interval']
@ -359,5 +360,5 @@ ThreadUpdater =
deletedPosts: deletedPosts
deletedFiles: deletedFiles
postCount: OP.replies + 1
fileCount: OP.images + (!!thread.OP.file and !thread.OP.file.isDead)
fileCount: OP.images + !!OP.fsize
ipCount: OP.unique_ips