From ca9e14748626cc24f38c81d174650e6458ae3b22 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Wed, 5 Feb 2014 09:32:01 +0100 Subject: [PATCH] Remove Cooldown Prediction. Conflicts: src/General/Config.coffee src/Posting/QR.cooldown.coffee --- src/General/Config.coffee | 4 ---- src/Posting/QR.cooldown.coffee | 11 +---------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/General/Config.coffee b/src/General/Config.coffee index 6f5e3c2da..6d6fcdd13 100755 --- a/src/General/Config.coffee +++ b/src/General/Config.coffee @@ -327,10 +327,6 @@ Config = true 'Indicate the remaining time before posting again.' ] - 'Cooldown Prediction': [ - true - 'Decrease the cooldown time by taking into account upload speed. Disable it if it\'s inaccurate for you.' - ] 'Posting Success Notifications': [ true 'Show notifications on successful post creation or file uploading.' diff --git a/src/Posting/QR.cooldown.coffee b/src/Posting/QR.cooldown.coffee index 3c91e5a8b..7a988d501 100644 --- a/src/Posting/QR.cooldown.coffee +++ b/src/Posting/QR.cooldown.coffee @@ -7,8 +7,6 @@ QR.cooldown = $.off window, 'cooldown:timers', setTimers for type of QR.cooldown.types QR.cooldown.types[type] = +QR.cooldown.types[type] - QR.cooldown.upSpd = 0 - QR.cooldown.upSpdAccuracy = .5 key = "cooldown.#{g.BOARD}" $.get key, {}, (item) -> QR.cooldown.cooldowns = item[key] @@ -33,10 +31,6 @@ QR.cooldown = if delay cooldown = {delay} else - if post.file - upSpd = post.file.size / ((start - req.uploadStartTime) / $.SECOND) - QR.cooldown.upSpdAccuracy = ((upSpd > QR.cooldown.upSpd * .9) + QR.cooldown.upSpdAccuracy) / 2 - QR.cooldown.upSpd = upSpd cooldown = {isReply, threadID} QR.cooldown.cooldowns[start] = cooldown $.set "cooldown.#{g.BOARD}", QR.cooldown.cooldowns @@ -65,7 +59,7 @@ QR.cooldown = isReply = post.thread isnt 'new' hasFile = !!post.file seconds = null - {types, cooldowns, upSpd, upSpdAccuracy} = QR.cooldown + {types, cooldowns} = QR.cooldown for start, cooldown of cooldowns start = +start @@ -96,9 +90,6 @@ QR.cooldown = type += '_intra' if isReply and +post.thread is cooldown.threadID seconds = Math.max seconds, types[type] - elapsed - if seconds and Conf['Cooldown Prediction'] and hasFile and upSpd - seconds -= Math.floor post.file.size / upSpd * upSpdAccuracy - seconds = if seconds > 0 then seconds else 0 # Update the status when we change posting type. # Don't get stuck at some random number. # Don't interfere with progress status updates.