From 51b30e8e63ce96e258b38ff0d3d08e5fea059ee9 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sun, 13 Aug 2023 07:19:54 +0800 Subject: [PATCH] fix bug --- app/plugins/iyuuautoseed/__init__.py | 3 ++- app/plugins/torrenttransfer/__init__.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/plugins/iyuuautoseed/__init__.py b/app/plugins/iyuuautoseed/__init__.py index 8b0b0b93..e6479d14 100644 --- a/app/plugins/iyuuautoseed/__init__.py +++ b/app/plugins/iyuuautoseed/__init__.py @@ -780,7 +780,8 @@ class IYUUAutoSeed(_PluginBase): 获取种子标签 """ try: - return torrent.get("tags") or [] if dl_type == "qbittorrent" else torrent.labels or [] + return [str(tag).strip() for tag in torrent.get("tags").split(',')] \ + if dl_type == "qbittorrent" else torrent.labels or [] except Exception as e: print(str(e)) return [] diff --git a/app/plugins/torrenttransfer/__init__.py b/app/plugins/torrenttransfer/__init__.py index 154ce07f..61df6015 100644 --- a/app/plugins/torrenttransfer/__init__.py +++ b/app/plugins/torrenttransfer/__init__.py @@ -700,7 +700,8 @@ class TorrentTransfer(_PluginBase): 获取种子标签 """ try: - return torrent.get("tags") or [] if dl_type == "qbittorrent" else torrent.labels or [] + return [str(tag).strip() for tag in torrent.get("tags").split(',')] \ + if dl_type == "qbittorrent" else torrent.labels or [] except Exception as e: print(str(e)) return []