From 89189adb24321c3db6bfa816ec557d7d8367ba24 Mon Sep 17 00:00:00 2001 From: iczero Date: Fri, 30 Jul 2021 23:23:49 -0700 Subject: [Core] Stop using removed disk.num_blocks_cache_hits stat Removed in libtorrent v2.0.0: https://github.com/arvidn/libtorrent/commit/569d47c3914d1f4a8672b92166ee461b4ae33aef --- .gitignore | 2 ++ deluge/core/core.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 66826bbde..70988729d 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ deluge/ui/web/js/extjs/ext-extensions*.js osx/app RELEASE-VERSION .venv* +# used by setuptools to cache downloaded eggs +/.eggs diff --git a/deluge/core/core.py b/deluge/core/core.py index ff1aed022..881f0065d 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -358,8 +358,8 @@ class Core(component.Component): if blocks_read: self.session_status['read_hit_ratio'] = ( - self.session_status['disk.num_blocks_cache_hits'] / blocks_read - ) + blocks_read - self.session_status['disk.num_read_ops'] + ) / blocks_read else: self.session_status['read_hit_ratio'] = 0.0 -- cgit