From 8b243e23ab45179d6309e4f2530e2a0e2c29f1cb Mon Sep 17 00:00:00 2001 From: thsrite Date: Mon, 11 Sep 2023 11:39:39 +0800 Subject: [PATCH 1/5] =?UTF-8?q?feat=20=E8=87=AA=E5=8A=A8=E7=94=9F=E6=88=90?= =?UTF-8?q?=E9=BB=98=E8=AE=A4rss=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chain/cookiecloud.py | 94 ++++++++++++++++++++++++++++++++++++++++ app/db/site_oper.py | 12 +++++ 2 files changed, 106 insertions(+) diff --git a/app/chain/cookiecloud.py b/app/chain/cookiecloud.py index da6cdccd..3a620fb5 100644 --- a/app/chain/cookiecloud.py +++ b/app/chain/cookiecloud.py @@ -10,6 +10,7 @@ from app.chain.site import SiteChain from app.core.config import settings from app.db.site_oper import SiteOper from app.db.siteicon_oper import SiteIconOper +from app.helper.browser import PlaywrightHelper from app.helper.cloudflare import under_challenge from app.helper.cookiecloud import CookieCloudHelper from app.helper.message import MessageHelper @@ -75,9 +76,15 @@ class CookieCloudChain(ChainBase): if site_info: # 检查站点连通性 status, msg = self.sitechain.test(domain) + # 更新站点Cookie if status: logger.info(f"站点【{site_info.name}】连通性正常,不同步CookieCloud数据") + if not site_info.public and not site_info.rss: + # 自动生成rss地址 + rss_url = self.__get_rss(url=site_info.url, cookie=cookie, ua=settings.USER_AGENT) + # 更新站点rss地址 + self.siteoper.update_rss(domain=domain, rss=rss_url) continue # 更新站点Cookie self.siteoper.update_cookie(domain=domain, cookies=cookie) @@ -104,10 +111,15 @@ class CookieCloudChain(ChainBase): _fail_count += 1 logger.warn(f"站点 {indexer.get('name')} 连接失败,无法添加站点") continue + rss_url = None + if not indexer.get("public") and indexer.get("domain"): + # 自动生成rss地址 + rss_url = self.__get_rss(url=indexer.get("domain"), cookie=cookie, ua=settings.USER_AGENT) self.siteoper.add(name=indexer.get("name"), url=indexer.get("domain"), domain=domain, cookie=cookie, + rss=rss_url, public=1 if indexer.get("public") else 0) _add_count += 1 # 保存站点图标 @@ -135,6 +147,88 @@ class CookieCloudChain(ChainBase): logger.info(f"CookieCloud同步成功:{ret_msg}") return True, ret_msg + def __get_rss(self, url: str, cookie: str, ua: str) -> str: + """ + 获取站点rss地址 + """ + if "ourbits.club" in url: + return self.__get_rss_ourbits(url=url, cookie=cookie, ua=ua) + + return self.__get_rss_base(url=url, cookie=cookie, ua=ua) + + def __get_rss_base(self, url: str, cookie: str, ua: str) -> str: + """ + 默认获取站点rss地址 + """ + try: + get_rss_url = urljoin(url, "getrss.php") + rss_data = self.__get_rss_data(url) + res = RequestUtils(cookies=cookie, timeout=60, ua=ua).post_res(url=get_rss_url, data=rss_data) + if res: + html_text = res.text + else: + logger.error(f"获取rss失败:{url}") + return "" + html = etree.HTML(html_text) + if html: + rss_link = html.xpath("//a[@class='faqlink']/@href") + if rss_link: + return str(rss_link[-1]) + return "" + except Exception as e: + print(str(e)) + return "" + + def __get_rss_ourbits(self, url: str, cookie: str, ua: str) -> str: + """ + 获取我堡rss地址 + """ + try: + get_rss_url = urljoin(url, "getrss.php") + html_text = PlaywrightHelper().get_page_source(url=get_rss_url, + cookies=cookie, + ua=ua) + if html_text: + html = etree.HTML(html_text) + if html: + rss_link = html.xpath("//a[@class='gen_rsslink']/@href") + if rss_link: + return str(rss_link[-1]) + return "" + except Exception as e: + print(str(e)) + return "" + + @staticmethod + def __get_rss_data(url: str) -> dict: + """ + 获取请求rss的参数,有的站不太一样,后续不断维护 + """ + _rss_data = { + "inclbookmarked": 0, + "itemsmalldescr": 1, + "showrows": 50, + "search_mode": 1, + } + + if 'audiences.me' in url: + # 种子类型 1新种与重置顶旧种 0只包含新种 + _rss_data['torrent_type'] = 1 + # RSS链接有效期: 180天 + _rss_data['exp'] = 180 + + if 'leaves.red' in url: + # 下载需扣除魔力 0不需要 1需要 2全部 + _rss_data['paid'] = 2 + + if 'u2.dmhy.org' in url: + # 显示自动通过的种子 0不显示自动通过的种子 1全部 + _rss_data['inclautochecked'] = 1 + # Tracker SSL 0不使用SSL 1使用SSL + _rss_data['trackerssl'] = 1 + + return _rss_data + @staticmethod def __parse_favicon(url: str, cookie: str, ua: str) -> Tuple[str, Optional[str]]: """ diff --git a/app/db/site_oper.py b/app/db/site_oper.py index f332dc8b..cf27b180 100644 --- a/app/db/site_oper.py +++ b/app/db/site_oper.py @@ -74,3 +74,15 @@ class SiteOper(DbOper): "cookie": cookies }) return True, "更新站点Cookie成功" + + def update_rss(self, domain: str, rss: str) -> Tuple[bool, str]: + """ + 更新站点rss + """ + site = Site.get_by_domain(self._db, domain) + if not site: + return False, "站点不存在" + site.update(self._db, { + "rss": rss + }) + return True, "更新站点rss成功" \ No newline at end of file From 1034caa9fd40deb050ccdfe2192bb4fe522a4168 Mon Sep 17 00:00:00 2001 From: thsrite Date: Mon, 11 Sep 2023 12:26:23 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix=20ttg=E3=80=81zhuque=E7=AD=89=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E8=8E=B7=E5=8F=96rss?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chain/cookiecloud.py | 113 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) diff --git a/app/chain/cookiecloud.py b/app/chain/cookiecloud.py index 3a620fb5..65eeb6c7 100644 --- a/app/chain/cookiecloud.py +++ b/app/chain/cookiecloud.py @@ -83,6 +83,7 @@ class CookieCloudChain(ChainBase): if not site_info.public and not site_info.rss: # 自动生成rss地址 rss_url = self.__get_rss(url=site_info.url, cookie=cookie, ua=settings.USER_AGENT) + logger.info(f"自动生成站点【{site_info.name}】 rss【{rss_url}】") # 更新站点rss地址 self.siteoper.update_rss(domain=domain, rss=rss_url) continue @@ -153,6 +154,14 @@ class CookieCloudChain(ChainBase): """ if "ourbits.club" in url: return self.__get_rss_ourbits(url=url, cookie=cookie, ua=ua) + if "totheglory.im" in url: + return self.__get_rss_ttg(url=url, cookie=cookie, ua=ua) + if "monikadesign.uk" in url: + return self.__get_rss_monika(url=url, cookie=cookie, ua=ua) + if "zhuque.in" in url: + return self.__get_rss_zhuque(url=url, cookie=cookie, ua=ua) + if "et8.org" in url or "club.hares.top" in url: + return self.__get_rss_tccf(url=url, cookie=cookie, ua=ua) return self.__get_rss_base(url=url, cookie=cookie, ua=ua) @@ -179,6 +188,74 @@ class CookieCloudChain(ChainBase): print(str(e)) return "" + def __get_rss_tccf(self, url: str, cookie: str, ua: str) -> str: + """ + 默认tccf rss地址 + """ + try: + get_rss_url = urljoin(url, "getrss.php") + rss_data = self.__get_rss_data(url) + res = RequestUtils(cookies=cookie, timeout=60, ua=ua).post_res(url=get_rss_url, data=rss_data) + if res: + html_text = res.text + else: + logger.error(f"获取rss失败:{url}") + return "" + html = etree.HTML(html_text) + if html: + rss_link = html.xpath("//a/@href") + if rss_link: + return str(rss_link[-1]) + return "" + except Exception as e: + print(str(e)) + return "" + + def __get_rss_ttg(self, url: str, cookie: str, ua: str) -> str: + """ + 获取ttg rss地址 + """ + try: + get_rss_url = urljoin(url, + "rsstools.php?c51=51&c52=52&c53=53&c54=54&c108=108&c109=109&c62=62&c63=63&c67=67&c69=69&c70=70&c73=73&c76=76&c75=75&c74=74&c87=87&c88=88&c99=99&c90=90&c58=58&c103=103&c101=101&c60=60") + res = RequestUtils(cookies=cookie, timeout=60, ua=ua).get_res(url=get_rss_url) + if res: + html_text = res.text + else: + logger.error(f"获取rss失败:{url}") + return "" + html = etree.HTML(html_text) + if html: + rss_link = html.xpath("//textarea/text()") + if rss_link: + return str(rss_link[-1]) + return "" + except Exception as e: + print(str(e)) + return "" + + def __get_rss_monika(self, url: str, cookie: str, ua: str) -> str: + """ + 获取monikadesign rss地址 + """ + try: + get_rss_url = urljoin(url, "rss") + res = RequestUtils(cookies=cookie, timeout=60, ua=ua).get_res(url=get_rss_url) + if res: + html_text = res.text + else: + logger.error(f"获取rss失败:{url}") + return "" + html = etree.HTML(html_text) + if html: + rss_link = html.xpath("//a/@href") + if rss_link: + return str(rss_link[0]) + return "" + except Exception as e: + print(str(e)) + return "" + def __get_rss_ourbits(self, url: str, cookie: str, ua: str) -> str: """ 获取我堡rss地址 @@ -199,6 +276,26 @@ class CookieCloudChain(ChainBase): print(str(e)) return "" + def __get_rss_zhuque(self, url: str, cookie: str, ua: str) -> str: + """ + 获取zhuque rss地址 + """ + try: + get_rss_url = urljoin(url, "user/rss") + html_text = PlaywrightHelper().get_page_source(url=get_rss_url, + cookies=cookie, + ua=ua) + if html_text: + html = etree.HTML(html_text) + if html: + rss_link = html.xpath("//a/@href") + if rss_link: + return str(rss_link[-1]) + return "" + except Exception as e: + print(str(e)) + return "" + @staticmethod def __get_rss_data(url: str) -> dict: """ @@ -211,12 +308,28 @@ class CookieCloudChain(ChainBase): "search_mode": 1, } + if 'hdchina.org' in url: + # 显示下载框 0全部 1仅下载框 + _rss_data['rsscart'] = 0 + if 'audiences.me' in url: # 种子类型 1新种与重置顶旧种 0只包含新种 _rss_data['torrent_type'] = 1 # RSS链接有效期: 180天 _rss_data['exp'] = 180 + if 'shadowflow.org' in url: + # 下载需扣除魔力 0不需要 1需要 2全部 + _rss_data['paid'] = 0 + + if 'hddolby.com' in url: + # RSS链接有效期: 180天 + _rss_data['exp'] = 180 + + if 'hdhome.org' in url: + # RSS链接有效期: 180天 + _rss_data['exp'] = 180 + if 'leaves.red' in url: # 下载需扣除魔力 0不需要 1需要 2全部 _rss_data['paid'] = 2 From 3a2fba04225f49b0c1284072833cd45caf5a45ba Mon Sep 17 00:00:00 2001 From: thsrite Date: Mon, 11 Sep 2023 12:43:27 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fix=20=E8=87=AA=E5=8A=A8=E8=8E=B7=E5=8F=96r?= =?UTF-8?q?ss=20data?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chain/cookiecloud.py | 51 +++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/app/chain/cookiecloud.py b/app/chain/cookiecloud.py index 65eeb6c7..10cb7b23 100644 --- a/app/chain/cookiecloud.py +++ b/app/chain/cookiecloud.py @@ -160,12 +160,16 @@ class CookieCloudChain(ChainBase): return self.__get_rss_monika(url=url, cookie=cookie, ua=ua) if "zhuque.in" in url: return self.__get_rss_zhuque(url=url, cookie=cookie, ua=ua) + + xpath = "//a[@class='faqlink']/@href" if "et8.org" in url or "club.hares.top" in url: - return self.__get_rss_tccf(url=url, cookie=cookie, ua=ua) + xpath = "//a/@href" + if "pttime.org" in url: + xpath = "//*[@id='outer']/table/tbody/tr/td/table/tbody/tr/td/text()[5]" - return self.__get_rss_base(url=url, cookie=cookie, ua=ua) + return self.__get_rss_base(url=url, cookie=cookie, ua=ua, xpath=xpath) - def __get_rss_base(self, url: str, cookie: str, ua: str) -> str: + def __get_rss_base(self, url: str, cookie: str, ua: str, xpath: str) -> str: """ 默认获取站点rss地址 """ @@ -180,30 +184,7 @@ class CookieCloudChain(ChainBase): return "" html = etree.HTML(html_text) if html: - rss_link = html.xpath("//a[@class='faqlink']/@href") - if rss_link: - return str(rss_link[-1]) - return "" - except Exception as e: - print(str(e)) - return "" - - def __get_rss_tccf(self, url: str, cookie: str, ua: str) -> str: - """ - 默认tccf rss地址 - """ - try: - get_rss_url = urljoin(url, "getrss.php") - rss_data = self.__get_rss_data(url) - res = RequestUtils(cookies=cookie, timeout=60, ua=ua).post_res(url=get_rss_url, data=rss_data) - if res: - html_text = res.text - else: - logger.error(f"获取rss失败:{url}") - return "" - html = etree.HTML(html_text) - if html: - rss_link = html.xpath("//a/@href") + rss_link = html.xpath(xpath) if rss_link: return str(rss_link[-1]) return "" @@ -321,6 +302,7 @@ class CookieCloudChain(ChainBase): if 'shadowflow.org' in url: # 下载需扣除魔力 0不需要 1需要 2全部 _rss_data['paid'] = 0 + _rss_data['search_mode'] = 0 if 'hddolby.com' in url: # RSS链接有效期: 180天 @@ -330,9 +312,17 @@ class CookieCloudChain(ChainBase): # RSS链接有效期: 180天 _rss_data['exp'] = 180 + if 'pthome.net' in url: + # RSS链接有效期: 180天 + _rss_data['exp'] = 180 + if 'leaves.red' in url: # 下载需扣除魔力 0不需要 1需要 2全部 _rss_data['paid'] = 2 + _rss_data['search_mode'] = 0 + + if 'hdtime.org' in url: + _rss_data['search_mode'] = 0 if 'u2.dmhy.org' in url: # 显示自动通过的种子 0不显示自动通过的种子 1全部 @@ -340,6 +330,13 @@ class CookieCloudChain(ChainBase): # Tracker SSL 0不使用SSL 1使用SSL _rss_data['trackerssl'] = 1 + if 'www.pttime.org' in url: + _rss_data = { + "showrows": 10, + "inclbookmarked": 0, + "itemsmalldescr": 1 + } + return _rss_data @staticmethod From b2eb952cd05382a8bf1406f9f13d42ff115ccbcf Mon Sep 17 00:00:00 2001 From: thsrite Date: Mon, 11 Sep 2023 13:15:15 +0800 Subject: [PATCH 4/5] =?UTF-8?q?fix=20=E8=87=AA=E5=8A=A8=E8=8E=B7=E5=8F=96r?= =?UTF-8?q?ss=E4=BD=BF=E7=94=A8=E4=BB=A3=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chain/cookiecloud.py | 66 ++++++++++++++++++++++++++++------------ 1 file changed, 46 insertions(+), 20 deletions(-) diff --git a/app/chain/cookiecloud.py b/app/chain/cookiecloud.py index 10cb7b23..e06d5eee 100644 --- a/app/chain/cookiecloud.py +++ b/app/chain/cookiecloud.py @@ -82,8 +82,8 @@ class CookieCloudChain(ChainBase): logger.info(f"站点【{site_info.name}】连通性正常,不同步CookieCloud数据") if not site_info.public and not site_info.rss: # 自动生成rss地址 - rss_url = self.__get_rss(url=site_info.url, cookie=cookie, ua=settings.USER_AGENT) - logger.info(f"自动生成站点【{site_info.name}】 rss【{rss_url}】") + rss_url = self.__get_rss(url=site_info.url, cookie=cookie, ua=settings.USER_AGENT, + proxy=site_info.proxy) # 更新站点rss地址 self.siteoper.update_rss(domain=domain, rss=rss_url) continue @@ -148,35 +148,41 @@ class CookieCloudChain(ChainBase): logger.info(f"CookieCloud同步成功:{ret_msg}") return True, ret_msg - def __get_rss(self, url: str, cookie: str, ua: str) -> str: + def __get_rss(self, url: str, cookie: str, ua: str, proxy: int) -> str: """ 获取站点rss地址 """ if "ourbits.club" in url: - return self.__get_rss_ourbits(url=url, cookie=cookie, ua=ua) + return self.__get_rss_ourbits(url=url, cookie=cookie, ua=ua, proxy=proxy) if "totheglory.im" in url: - return self.__get_rss_ttg(url=url, cookie=cookie, ua=ua) + return self.__get_rss_ttg(url=url, cookie=cookie, ua=ua, proxy=proxy) if "monikadesign.uk" in url: - return self.__get_rss_monika(url=url, cookie=cookie, ua=ua) + return self.__get_rss_monika(url=url, cookie=cookie, ua=ua, proxy=proxy) if "zhuque.in" in url: - return self.__get_rss_zhuque(url=url, cookie=cookie, ua=ua) + return self.__get_rss_zhuque(url=url, cookie=cookie, ua=ua, proxy=proxy) xpath = "//a[@class='faqlink']/@href" - if "et8.org" in url or "club.hares.top" in url: - xpath = "//a/@href" + if "club.hares.top" in url: + xpath = "//*[@id='layui-layer100001']/div[2]/div/p[4]/a/@href" + if "et8.org" in url: + xpath = "//*[@id='outer']/table/tbody/tr/td/table/tbody/tr/td/a[2]/@href" if "pttime.org" in url: xpath = "//*[@id='outer']/table/tbody/tr/td/table/tbody/tr/td/text()[5]" - return self.__get_rss_base(url=url, cookie=cookie, ua=ua, xpath=xpath) + return self.__get_rss_base(url=url, cookie=cookie, ua=ua, xpath=xpath, proxy=proxy) - def __get_rss_base(self, url: str, cookie: str, ua: str, xpath: str) -> str: + def __get_rss_base(self, url: str, cookie: str, ua: str, xpath: str, proxy: int) -> str: """ 默认获取站点rss地址 """ try: get_rss_url = urljoin(url, "getrss.php") rss_data = self.__get_rss_data(url) - res = RequestUtils(cookies=cookie, timeout=60, ua=ua).post_res(url=get_rss_url, data=rss_data) + res = RequestUtils(cookies=cookie, + timeout=60, + ua=ua, + proxies=settings.PROXY if proxy else None).post_res( + url=get_rss_url, data=rss_data) if res: html_text = res.text else: @@ -192,14 +198,17 @@ class CookieCloudChain(ChainBase): print(str(e)) return "" - def __get_rss_ttg(self, url: str, cookie: str, ua: str) -> str: + def __get_rss_ttg(self, url: str, cookie: str, ua: str, proxy: int) -> str: """ 获取ttg rss地址 """ try: get_rss_url = urljoin(url, "rsstools.php?c51=51&c52=52&c53=53&c54=54&c108=108&c109=109&c62=62&c63=63&c67=67&c69=69&c70=70&c73=73&c76=76&c75=75&c74=74&c87=87&c88=88&c99=99&c90=90&c58=58&c103=103&c101=101&c60=60") - res = RequestUtils(cookies=cookie, timeout=60, ua=ua).get_res(url=get_rss_url) + res = RequestUtils(cookies=cookie, + timeout=60, + ua=ua, + proxies=settings.PROXY if proxy else None).get_res(url=get_rss_url) if res: html_text = res.text else: @@ -215,13 +224,16 @@ class CookieCloudChain(ChainBase): print(str(e)) return "" - def __get_rss_monika(self, url: str, cookie: str, ua: str) -> str: + def __get_rss_monika(self, url: str, cookie: str, ua: str, proxy: int) -> str: """ 获取monikadesign rss地址 """ try: get_rss_url = urljoin(url, "rss") - res = RequestUtils(cookies=cookie, timeout=60, ua=ua).get_res(url=get_rss_url) + res = RequestUtils(cookies=cookie, + timeout=60, + ua=ua, + proxies=settings.PROXY if proxy else None).get_res(url=get_rss_url) if res: html_text = res.text else: @@ -237,7 +249,7 @@ class CookieCloudChain(ChainBase): print(str(e)) return "" - def __get_rss_ourbits(self, url: str, cookie: str, ua: str) -> str: + def __get_rss_ourbits(self, url: str, cookie: str, ua: str, proxy: int) -> str: """ 获取我堡rss地址 """ @@ -245,7 +257,8 @@ class CookieCloudChain(ChainBase): get_rss_url = urljoin(url, "getrss.php") html_text = PlaywrightHelper().get_page_source(url=get_rss_url, cookies=cookie, - ua=ua) + ua=ua, + proxies=settings.PROXY if proxy else None) if html_text: html = etree.HTML(html_text) if html: @@ -257,7 +270,7 @@ class CookieCloudChain(ChainBase): print(str(e)) return "" - def __get_rss_zhuque(self, url: str, cookie: str, ua: str) -> str: + def __get_rss_zhuque(self, url: str, cookie: str, ua: str, proxy: int) -> str: """ 获取zhuque rss地址 """ @@ -265,7 +278,8 @@ class CookieCloudChain(ChainBase): get_rss_url = urljoin(url, "user/rss") html_text = PlaywrightHelper().get_page_source(url=get_rss_url, cookies=cookie, - ua=ua) + ua=ua, + proxies=settings.PROXY if proxy else None) if html_text: html = etree.HTML(html_text) if html: @@ -303,6 +317,7 @@ class CookieCloudChain(ChainBase): # 下载需扣除魔力 0不需要 1需要 2全部 _rss_data['paid'] = 0 _rss_data['search_mode'] = 0 + _rss_data['showrows'] = 30 if 'hddolby.com' in url: # RSS链接有效期: 180天 @@ -316,6 +331,9 @@ class CookieCloudChain(ChainBase): # RSS链接有效期: 180天 _rss_data['exp'] = 180 + if 'ptsbao.club' in url: + _rss_data['size'] = 0 + if 'leaves.red' in url: # 下载需扣除魔力 0不需要 1需要 2全部 _rss_data['paid'] = 2 @@ -324,6 +342,14 @@ class CookieCloudChain(ChainBase): if 'hdtime.org' in url: _rss_data['search_mode'] = 0 + if 'kp.m-team.cc' in url: + _rss_data = { + "showrows": 50, + "inclbookmarked": 0, + "itemsmalldescr": 1, + "https": 1 + } + if 'u2.dmhy.org' in url: # 显示自动通过的种子 0不显示自动通过的种子 1全部 _rss_data['inclautochecked'] = 1 From f239cede07a3b59f990a262155f583a281bae500 Mon Sep 17 00:00:00 2001 From: thsrite Date: Mon, 11 Sep 2023 16:14:15 +0800 Subject: [PATCH 5/5] =?UTF-8?q?fix=20speedlimit=20=E6=9C=AA=E5=BC=80?= =?UTF-8?q?=E5=90=AF=E6=97=B6return?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/plugins/speedlimiter/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/plugins/speedlimiter/__init__.py b/app/plugins/speedlimiter/__init__.py index 390d43a4..47cb72a1 100644 --- a/app/plugins/speedlimiter/__init__.py +++ b/app/plugins/speedlimiter/__init__.py @@ -375,6 +375,8 @@ class SpeedLimiter(_PluginBase): """ if not self._qb and not self._tr: return + if not self._enabled: + return if event: event_data: WebhookEventInfo = event.event_data if event_data.event not in ["playback.start", "PlaybackStart", "media.play"]: