diff --git a/VERSION b/VERSION index 4fa40af..171afb3 100755 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.0.9-develop8 +4.0.9-develop9 diff --git a/modules/core/cross_seed.py b/modules/core/cross_seed.py index c508c56..2913076 100644 --- a/modules/core/cross_seed.py +++ b/modules/core/cross_seed.py @@ -3,7 +3,6 @@ from collections import Counter from modules import util from modules.torrent_hash_generator import TorrentHashGenerator -from modules.util import remove_extension logger = util.logger @@ -111,7 +110,7 @@ class CrossSeed: self.notify_attr = [] # Tag missing cross-seed torrents tags for torrent in self.qbt.torrent_list: - t_name = remove_extension(torrent.name) + t_name = torrent.name t_cat = torrent.category if ( not util.is_tag_in_torrent(self.cross_seed_tag, torrent.tags) diff --git a/modules/core/recheck.py b/modules/core/recheck.py index 4794b05..3f83625 100644 --- a/modules/core/recheck.py +++ b/modules/core/recheck.py @@ -1,7 +1,6 @@ from datetime import timedelta from modules import util -from modules.util import remove_extension logger = util.logger @@ -106,7 +105,7 @@ class ReCheck: # Recheck elif ( torrent.progress == 0 - and self.qbt.torrentinfo[remove_extension(t_name)]["is_complete"] + and self.qbt.torrentinfo[t_name]["is_complete"] and not torrent.state_enum.is_checking ): self.stats_rechecked += 1 diff --git a/modules/core/remove_unregistered.py b/modules/core/remove_unregistered.py index 8661e3a..e123de0 100644 --- a/modules/core/remove_unregistered.py +++ b/modules/core/remove_unregistered.py @@ -4,7 +4,6 @@ from qbittorrentapi import TrackerStatus from modules import util from modules.util import TorrentMessages from modules.util import list_in_text -from modules.util import remove_extension logger = util.logger @@ -97,7 +96,7 @@ class RemoveUnregistered: self.notify_attr_unreg = [] # List of single torrent attributes to send to notifiarr for torrent in self.qbt.torrentissue: - self.t_name = remove_extension(torrent.name) + self.t_name = torrent.name self.t_cat = self.qbt.torrentinfo[self.t_name]["Category"] self.t_msg = self.qbt.torrentinfo[self.t_name]["msg"] self.t_status = self.qbt.torrentinfo[self.t_name]["status"] diff --git a/modules/core/share_limits.py b/modules/core/share_limits.py index 758868d..fef0fcb 100644 --- a/modules/core/share_limits.py +++ b/modules/core/share_limits.py @@ -4,7 +4,6 @@ from time import time from modules import util from modules.util import is_tag_in_torrent -from modules.util import remove_extension from modules.webhooks import GROUP_NOTIFICATION_LIMIT logger = util.logger @@ -80,7 +79,7 @@ class ShareLimits: t_deleted_and_contents = set() for torrent_hash, torrent_dict in self.tdel_dict.items(): torrent = torrent_dict["torrent"] - t_name = remove_extension(torrent.name) + t_name = torrent.name t_count = self.qbt.torrentinfo[t_name]["count"] t_msg = self.qbt.torrentinfo[t_name]["msg"] t_status = self.qbt.torrentinfo[t_name]["status"] diff --git a/modules/qbittorrent.py b/modules/qbittorrent.py index 04d6404..204ce07 100755 --- a/modules/qbittorrent.py +++ b/modules/qbittorrent.py @@ -13,7 +13,6 @@ from modules import util from modules.util import Failed from modules.util import TorrentMessages from modules.util import list_in_text -from modules.util import remove_extension logger = util.logger @@ -136,7 +135,7 @@ class Qbt: if torrent.auto_tmm is False and settings["force_auto_tmm"] and torrent.category != "" and not self.config.dry_run: torrent.set_auto_management(True) try: - torrent_name = remove_extension(torrent.name) + torrent_name = torrent.name torrent_hash = torrent.hash torrent_is_complete = torrent.state_enum.is_complete save_path = torrent.save_path diff --git a/modules/util.py b/modules/util.py index 66f2763..7a6784e 100755 --- a/modules/util.py +++ b/modules/util.py @@ -14,63 +14,6 @@ import ruamel.yaml logger = logging.getLogger("qBit Manage") -def remove_extension(filename): - video_extensions = [ - ".3gp", - ".3g2", - ".asf", - ".avi", - ".divx", - ".flv", - ".m2ts", - ".m4v", - ".mkv", - ".mov", - ".mp2", - ".mp4", - ".mpe", - ".mpeg", - ".mpg", - ".mpv", - ".mts", - ".mxf", - ".ogg", - ".ogv", - ".qt", - ".rm", - ".rmvb", - ".ts", - ".vob", - ".webm", - ".wmv", - ] - audio_extensions = [ - ".aac", - ".aiff", - ".ape", - ".au", - ".flac", - ".m4a", - ".m4b", - ".mka", - ".mp3", - ".ogg", - ".opus", - ".ra", - ".rm", - ".wav", - ".wma", - ] - all_extensions = video_extensions + audio_extensions - # Split the filename into base and extension parts - base, extension = os.path.splitext(filename) - # If there's an extension, return the base part - if extension in all_extensions: - return base - else: - return filename - - def get_list(data, lower=False, split=True, int_list=False): """Return a list from a string or list.""" if data is None: