diff --git a/src/trackers/ACM.py b/src/trackers/ACM.py index cbf19147..67ba285f 100644 --- a/src/trackers/ACM.py +++ b/src/trackers/ACM.py @@ -186,7 +186,7 @@ def get_subs_tag(self, subs): return ' [No Eng subs]' return f" [{subs[0]} subs only]" - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) cat_id = await self.get_cat_id(meta['category']) @@ -266,7 +266,7 @@ async def upload(self, meta): console.print(data) open_torrent.close() - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") params = { diff --git a/src/trackers/AITHER.py b/src/trackers/AITHER.py index b0d219aa..ba954b83 100644 --- a/src/trackers/AITHER.py +++ b/src/trackers/AITHER.py @@ -31,7 +31,7 @@ def __init__(self, config): 'Will1869', 'x0r', 'YIFY'] pass - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) await common.unit3d_edit_desc(meta, self.tracker, self.signature, comparison=True) @@ -199,7 +199,7 @@ async def get_res_id(self, resolution): }.get(resolution, '10') return resolution_id - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") params = { diff --git a/src/trackers/AL.py b/src/trackers/AL.py index cadd0dbc..28f4f76b 100644 --- a/src/trackers/AL.py +++ b/src/trackers/AL.py @@ -69,7 +69,7 @@ async def get_res_id(self, resolution): }.get(resolution, '10') return resolution_id - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) await common.unit3d_edit_desc(meta, self.tracker, self.signature) @@ -148,7 +148,7 @@ async def upload(self, meta): console.print(data) open_torrent.close() - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") params = { diff --git a/src/trackers/ANT.py b/src/trackers/ANT.py index 1929172a..9e06f931 100644 --- a/src/trackers/ANT.py +++ b/src/trackers/ANT.py @@ -63,7 +63,7 @@ async def get_flags(self, meta): flags.append('Remux') return flags - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) torrent_filename = "BASE" torrent = Torrent.read(f"{meta['base_dir']}/tmp/{meta['uuid']}/BASE.torrent") @@ -173,7 +173,7 @@ def calculate_pieces_and_file_size(total_size, pathname_bytes, piece_size): async def edit_desc(self, meta): return - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") params = { diff --git a/src/trackers/BHD.py b/src/trackers/BHD.py index 25bea57c..77c8efd6 100644 --- a/src/trackers/BHD.py +++ b/src/trackers/BHD.py @@ -28,7 +28,7 @@ def __init__(self, config): self.banned_groups = ['Sicario', 'TOMMY', 'x0r', 'nikt0', 'FGT', 'd3g', 'MeGusta', 'YIFY', 'tigole', 'TEKNO3D', 'C4K', 'RARBG', '4K4U', 'EASports', 'ReaLHD'] pass - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) cat_id = await self.get_cat_id(meta['category']) @@ -213,7 +213,7 @@ async def edit_desc(self, meta): desc.close() return - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") category = meta['category'] diff --git a/src/trackers/BHDTV.py b/src/trackers/BHDTV.py index d675fdaa..e53788fb 100644 --- a/src/trackers/BHDTV.py +++ b/src/trackers/BHDTV.py @@ -30,7 +30,7 @@ def __init__(self, config): self.banned_groups = [] pass - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) await self.edit_desc(meta) @@ -198,7 +198,7 @@ async def edit_desc(self, meta): desc.close() return - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): console.print("[red]Dupes must be checked Manually") return ['Dupes must be checked Manually'] # hopefully someone else has the time to implement this. diff --git a/src/trackers/BLU.py b/src/trackers/BLU.py index 9af559cf..6a7d1ba0 100644 --- a/src/trackers/BLU.py +++ b/src/trackers/BLU.py @@ -35,7 +35,7 @@ def __init__(self, config): pass - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) blu_name = meta['name'] desc_header = "" @@ -190,7 +190,7 @@ async def derived_dv_layer(self, meta): name = name.replace(meta['resolution'], f"Hybrid {meta['resolution']}") return name, desc_header - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") params = { diff --git a/src/trackers/CBR.py b/src/trackers/CBR.py index 8a58fd0b..b6d8938a 100644 --- a/src/trackers/CBR.py +++ b/src/trackers/CBR.py @@ -28,7 +28,7 @@ def __init__(self, config): self.banned_groups = [""] pass - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) await common.unit3d_edit_desc(meta, self.tracker, self.signature) @@ -143,7 +143,7 @@ async def get_res_id(self, resolution): }.get(resolution, '10') return resolution_id - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Buscando por duplicatas no tracker...") params = { diff --git a/src/trackers/FL.py b/src/trackers/FL.py index a7c67d02..f3356dfd 100644 --- a/src/trackers/FL.py +++ b/src/trackers/FL.py @@ -100,11 +100,7 @@ async def edit_name(self, meta): fl_name = fl_name.replace(' ', '.').replace('..', '.') return fl_name - ############################################################### - ###### STOP HERE UNLESS EXTRA MODIFICATION IS NEEDED ###### # noqa E266 - ############################################################### - - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) await self.edit_desc(meta) @@ -194,7 +190,7 @@ async def upload(self, meta): raise UploadException(f"Upload to FL Failed: result URL {up.url} ({up.status_code}) was not expected", 'red') # noqa F405 return - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] with requests.Session() as session: cookiefile = os.path.abspath(f"{meta['base_dir']}/data/cookies/FL.pkl") diff --git a/src/trackers/FNP.py b/src/trackers/FNP.py index 4608925c..1a16141c 100644 --- a/src/trackers/FNP.py +++ b/src/trackers/FNP.py @@ -62,7 +62,7 @@ async def get_res_id(self, resolution): }.get(resolution, '10') return resolution_id - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) cat_id = await self.get_cat_id(meta['category']) @@ -140,7 +140,7 @@ async def upload(self, meta): console.print(data) open_torrent.close() - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") params = { diff --git a/src/trackers/HDB.py b/src/trackers/HDB.py index 9a4777a9..7e454f1d 100644 --- a/src/trackers/HDB.py +++ b/src/trackers/HDB.py @@ -196,7 +196,7 @@ async def edit_name(self, meta): return hdb_name - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) await self.edit_desc(meta) @@ -317,7 +317,7 @@ async def upload(self, meta): raise UploadException(f"Upload to HDB Failed: result URL {up.url} ({up.status_code}) was not expected", 'red') # noqa F405 return - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") url = "https://hdbits.org/api/torrents" diff --git a/src/trackers/HDT.py b/src/trackers/HDT.py index a46abb83..a30975c1 100644 --- a/src/trackers/HDT.py +++ b/src/trackers/HDT.py @@ -102,11 +102,7 @@ async def edit_name(self, meta): hdt_name = hdt_name.replace(':', '').replace('..', ' ').replace(' ', ' ') return hdt_name - ############################################################### - ###### STOP HERE UNLESS EXTRA MODIFICATION IS NEEDED ###### # noqa E266 - ############################################################### - - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) await self.edit_desc(meta) @@ -196,7 +192,7 @@ async def upload(self, meta): raise UploadException(f"Upload to HDT Failed: result URL {up.url} ({up.status_code}) was not expected", 'red') # noqa F405 return - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] with requests.Session() as session: common = COMMON(config=self.config) diff --git a/src/trackers/HP.py b/src/trackers/HP.py index 3250213b..32b62236 100644 --- a/src/trackers/HP.py +++ b/src/trackers/HP.py @@ -62,7 +62,7 @@ async def get_res_id(self, resolution): }.get(resolution, '10') return resolution_id - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) cat_id = await self.get_cat_id(meta['category']) @@ -140,7 +140,7 @@ async def upload(self, meta): console.print(data) open_torrent.close() - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") params = { diff --git a/src/trackers/HUNO.py b/src/trackers/HUNO.py index 9d80b2c2..77057e5b 100644 --- a/src/trackers/HUNO.py +++ b/src/trackers/HUNO.py @@ -29,7 +29,7 @@ def __init__(self, config): self.banned_groups = ["4K4U, Bearfish, BiTOR, BONE, D3FiL3R, d3g, DTR, ELiTE, EVO, eztv, EzzRips, FGT, HashMiner, HETeam, HEVCBay, HiQVE, HR-DR, iFT, ION265, iVy, JATT, Joy, LAMA, m3th, MeGusta, MRN, Musafirboy, OEPlus, Pahe.in, PHOCiS, PSA, RARBG, RMTeam, ShieldBearer, SiQ, TBD, Telly, TSP, VXT, WKS, YAWNiX, YIFY, YTS"] pass - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.unit3d_edit_desc(meta, self.tracker, self.signature) await common.edit_torrent(meta, self.tracker, self.source_flag) @@ -256,7 +256,7 @@ async def is_plex_friendly(self, meta): return 0 - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") diff --git a/src/trackers/JPTV.py b/src/trackers/JPTV.py index 1502d878..9252aa08 100644 --- a/src/trackers/JPTV.py +++ b/src/trackers/JPTV.py @@ -67,7 +67,7 @@ async def get_res_id(self, resolution): }.get(resolution, '10') return resolution_id - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) cat_id = await self.get_cat_id(meta) @@ -147,7 +147,7 @@ async def upload(self, meta): console.print(data) open_torrent.close() - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") params = { diff --git a/src/trackers/LCD.py b/src/trackers/LCD.py index 6ca5cac6..3ddec7fb 100644 --- a/src/trackers/LCD.py +++ b/src/trackers/LCD.py @@ -28,7 +28,7 @@ def __init__(self, config): self.banned_groups = [""] pass - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) await common.unit3d_edit_desc(meta, self.tracker, self.signature) @@ -145,7 +145,7 @@ async def get_res_id(self, resolution): }.get(resolution, '10') return resolution_id - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Buscando por duplicatas no tracker...") params = { diff --git a/src/trackers/LST.py b/src/trackers/LST.py index 7278f7ed..e7145749 100644 --- a/src/trackers/LST.py +++ b/src/trackers/LST.py @@ -70,7 +70,7 @@ async def get_res_id(self, resolution): }.get(resolution, '10') return resolution_id - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) cat_id = await self.get_cat_id(meta['category'], meta.get('keywords', ''), meta.get('service', '')) @@ -164,7 +164,7 @@ async def get_flag(self, meta, flag_name): return 1 if meta.get(flag_name, False) else 0 - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") params = { diff --git a/src/trackers/LT.py b/src/trackers/LT.py index 36742863..fdabb917 100644 --- a/src/trackers/LT.py +++ b/src/trackers/LT.py @@ -86,7 +86,7 @@ async def edit_name(self, meta): lt_name = lt_name.replace(meta['tag'], f" [SUBS]{meta['tag']}") return lt_name - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) cat_id = await self.get_cat_id(meta['category'], meta) @@ -163,7 +163,7 @@ async def upload(self, meta): console.print(data) open_torrent.close() - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") params = { diff --git a/src/trackers/MTV.py b/src/trackers/MTV.py index 656a59f0..07d2133c 100644 --- a/src/trackers/MTV.py +++ b/src/trackers/MTV.py @@ -37,7 +37,7 @@ def __init__(self, config): ] pass - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) cookiefile = os.path.abspath(f"{meta['base_dir']}/data/cookies/MTV.pkl") @@ -540,7 +540,7 @@ async def login(self, cookiefile): console.print(resp.url) return - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") params = { diff --git a/src/trackers/NBL.py b/src/trackers/NBL.py index 35dd0fc5..3711c54c 100644 --- a/src/trackers/NBL.py +++ b/src/trackers/NBL.py @@ -43,7 +43,7 @@ async def edit_desc(self, meta): # Leave this in so manual works return - async def upload(self, meta): + async def upload(self, meta, disctype): if meta['category'] != 'TV': console.print("[red]Only TV Is allowed at NBL") return @@ -82,7 +82,7 @@ async def upload(self, meta): console.print(data) open_torrent.close() - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") if int(meta.get('tvmaze_id', 0)) != 0: diff --git a/src/trackers/OE.py b/src/trackers/OE.py index e1b7453e..055cab4d 100644 --- a/src/trackers/OE.py +++ b/src/trackers/OE.py @@ -38,7 +38,7 @@ def __init__(self, config): 'YTS', 'YuiSubs', 'ZKBL', 'ZmN', 'ZMNT'] pass - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) await common.unit3d_edit_desc(meta, self.tracker, self.signature) @@ -167,7 +167,7 @@ async def get_res_id(self, resolution): }.get(resolution, '10') return resolution_id - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") params = { diff --git a/src/trackers/OTW.py b/src/trackers/OTW.py index 8c12ccd2..b0219dfc 100644 --- a/src/trackers/OTW.py +++ b/src/trackers/OTW.py @@ -62,7 +62,7 @@ async def get_res_id(self, resolution): }.get(resolution, '10') return resolution_id - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) cat_id = await self.get_cat_id(meta['category']) @@ -140,7 +140,7 @@ async def upload(self, meta): console.print(data) open_torrent.close() - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") params = { diff --git a/src/trackers/PSS.py b/src/trackers/PSS.py index b19a594a..f0a2ade0 100644 --- a/src/trackers/PSS.py +++ b/src/trackers/PSS.py @@ -64,7 +64,7 @@ async def get_res_id(self, resolution): }.get(resolution, '10') return resolution_id - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) cat_id = await self.get_cat_id(meta['category']) @@ -142,7 +142,7 @@ async def upload(self, meta): console.print(data) open_torrent.close() - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") params = { diff --git a/src/trackers/PTER.py b/src/trackers/PTER.py index 50e44367..cc4868a3 100644 --- a/src/trackers/PTER.py +++ b/src/trackers/PTER.py @@ -59,7 +59,7 @@ async def validate_cookies(self, meta): console.print("[bold red]Missing Cookie File. (data/cookies/PTER.txt)") return False - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] common = COMMON(config=self.config) cookiefile = f"{meta['base_dir']}/data/cookies/PTER.txt" @@ -317,7 +317,7 @@ async def is_zhongzi(self, meta): return 'yes' return None - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) diff --git a/src/trackers/PTP.py b/src/trackers/PTP.py index f13e5d39..da629077 100644 --- a/src/trackers/PTP.py +++ b/src/trackers/PTP.py @@ -306,7 +306,7 @@ async def get_tags(self, check_against): tags.append(each) return tags - async def search_existing(self, groupID, meta): + async def search_existing(self, groupID, meta, disctype): # Map resolutions to SD / HD / UHD quality = None if meta.get('sd', 0) == 1: # 1 is SD @@ -841,7 +841,7 @@ async def fill_upload_form(self, groupID, meta): return url, data - async def upload(self, meta, url, data): + async def upload(self, meta, url, data, disctype): torrent_filename = f"[{self.tracker}]{meta['clean_name']}.torrent" torrent_path = f"{meta['base_dir']}/tmp/{meta['uuid']}/{torrent_filename}" torrent = Torrent.read(torrent_path) diff --git a/src/trackers/R4E.py b/src/trackers/R4E.py index c3ba5abe..c57f18a4 100644 --- a/src/trackers/R4E.py +++ b/src/trackers/R4E.py @@ -27,7 +27,7 @@ def __init__(self, config): self.banned_groups = [""] pass - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) cat_id = await self.get_cat_id(meta['category'], meta['tmdb']) @@ -136,7 +136,7 @@ async def is_docu(self, genres): is_docu = True return is_docu - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") url = "https://racing4everyone.eu/api/torrents/filter" diff --git a/src/trackers/RF.py b/src/trackers/RF.py index 1019c225..c6fedad8 100644 --- a/src/trackers/RF.py +++ b/src/trackers/RF.py @@ -28,7 +28,7 @@ def __init__(self, config): self.banned_groups = [""] pass - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) await common.unit3d_edit_desc(meta, self.tracker, self.forum_link) @@ -142,7 +142,7 @@ async def get_res_id(self, resolution): }.get(resolution, '10') return resolution_id - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") params = { diff --git a/src/trackers/RTF.py b/src/trackers/RTF.py index 07b78d7e..b5ddf485 100644 --- a/src/trackers/RTF.py +++ b/src/trackers/RTF.py @@ -29,7 +29,7 @@ def __init__(self, config): self.banned_groups = [] pass - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) await common.unit3d_edit_desc(meta, self.tracker, self.forum_link) @@ -93,7 +93,7 @@ async def upload(self, meta): console.print("[cyan]Request Data:") console.print(json_data) - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") headers = { diff --git a/src/trackers/SHRI.py b/src/trackers/SHRI.py index 689bfc62..ff9d7cd9 100644 --- a/src/trackers/SHRI.py +++ b/src/trackers/SHRI.py @@ -18,12 +18,6 @@ class SHRI(): Upload """ - ############################################################### - ######## EDIT ME ######## # noqa #E266 - ############################################################### - - # ALSO EDIT CLASS NAME ABOVE - def __init__(self, config): self.config = config self.tracker = 'SHRI' @@ -68,11 +62,7 @@ async def get_res_id(self, resolution): }.get(resolution, '10') return resolution_id - ############################################################### - ###### STOP HERE UNLESS EXTRA MODIFICATION IS NEEDED ###### # noqa #E266 - ############################################################### - - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) cat_id = await self.get_cat_id(meta['category']) @@ -150,7 +140,7 @@ async def upload(self, meta): console.print(data) open_torrent.close() - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") params = { diff --git a/src/trackers/SN.py b/src/trackers/SN.py index 04547ce8..74484b6f 100644 --- a/src/trackers/SN.py +++ b/src/trackers/SN.py @@ -34,7 +34,7 @@ async def get_type_id(self, type): }.get(type, '0') return type_id - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) # await common.unit3d_edit_desc(meta, self.tracker, self.forum_link) @@ -121,7 +121,7 @@ async def edit_desc(self, meta): desc.close() return - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") diff --git a/src/trackers/STC.py b/src/trackers/STC.py index 8e8c9ef5..e93bb263 100644 --- a/src/trackers/STC.py +++ b/src/trackers/STC.py @@ -26,7 +26,7 @@ def __init__(self, config): self.banned_groups = [""] pass - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) await common.unit3d_edit_desc(meta, self.tracker, self.signature) @@ -156,7 +156,7 @@ async def get_res_id(self, resolution): }.get(resolution, '10') return resolution_id - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") params = { diff --git a/src/trackers/STT.py b/src/trackers/STT.py index 8117e144..2029c4cb 100644 --- a/src/trackers/STT.py +++ b/src/trackers/STT.py @@ -27,7 +27,7 @@ def __init__(self, config): self.banned_groups = [""] pass - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) await common.unit3d_edit_desc(meta, self.tracker, self.signature) @@ -134,7 +134,7 @@ async def get_res_id(self, resolution): }.get(resolution, '11') return resolution_id - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") params = { diff --git a/src/trackers/TDC.py b/src/trackers/TDC.py index cd795249..6c68ca4d 100644 --- a/src/trackers/TDC.py +++ b/src/trackers/TDC.py @@ -61,7 +61,7 @@ async def get_res_id(self, resolution): }.get(resolution, '10') return resolution_id - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) cat_id = await self.get_cat_id(meta['category']) @@ -139,7 +139,7 @@ async def upload(self, meta): console.print(data) open_torrent.close() - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") params = { diff --git a/src/trackers/THR.py b/src/trackers/THR.py index 84a97ad3..9ff29506 100644 --- a/src/trackers/THR.py +++ b/src/trackers/THR.py @@ -28,7 +28,7 @@ def __init__(self, config): self.banned_groups = [""] pass - async def upload(self, session, meta): + async def upload(self, session, meta, disctype): await self.edit_torrent(meta) cat_id = await self.get_cat_id(meta) subs = self.get_subtitles(meta) @@ -257,7 +257,7 @@ async def edit_desc(self, meta): desc.close() return pronfo - def search_existing(self, session, imdb_id): + def search_existing(self, session, imdb_id, disctype): from bs4 import BeautifulSoup imdb_id = imdb_id.replace('tt', '') search_url = f"https://www.torrenthr.org/browse.php?search={imdb_id}&blah=2&incldead=1" diff --git a/src/trackers/TIK.py b/src/trackers/TIK.py index a3f2b36f..2702233a 100644 --- a/src/trackers/TIK.py +++ b/src/trackers/TIK.py @@ -451,7 +451,7 @@ async def edit_desc(self, meta): desc_text.append(f" Source.............: {meta.get('disctype', 'Unknown')}\n") else: desc_text.append(f" Source.............: {meta.get('dvd_size', 'Unknown')}\n") - desc_text.append(f" Film Distributor...: [url={meta.get('distributor_link', '')}]{meta.get('distributor', 'Unknown')}[url]\n") + desc_text.append(f" Film Distributor...: [url={meta.get('distributor_link', '')}]{meta.get('distributor', 'Unknown')}[url] [color=red]Don't forget the actual distributor link\n") desc_text.append(f" Average Bitrate....: {total_bitrate}\n") desc_text.append(" Ripping Program....: [color=red]Specify - if it's your rip or custom version, otherwise 'Not my rip'[/color]\n") desc_text.append("\n") diff --git a/src/trackers/TL.py b/src/trackers/TL.py index 15d6935b..67e66298 100644 --- a/src/trackers/TL.py +++ b/src/trackers/TL.py @@ -75,7 +75,7 @@ async def get_cat_id(self, common, meta): raise NotImplementedError('Failed to determine TL category!') - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) cat_id = await self.get_cat_id(common, meta) diff --git a/src/trackers/TTG.py b/src/trackers/TTG.py index 94b27bc7..6ed31de1 100644 --- a/src/trackers/TTG.py +++ b/src/trackers/TTG.py @@ -105,7 +105,7 @@ async def get_anon(self, anon): anon = 'yes' return anon - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) await self.edit_desc(meta) @@ -177,7 +177,7 @@ async def upload(self, meta): raise UploadException(f"Upload to TTG Failed: result URL {up.url} ({up.status_code}) was not expected", 'red') # noqa #F405 return - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] with requests.Session() as session: cookiefile = os.path.abspath(f"{meta['base_dir']}/data/cookies/TTG.pkl") diff --git a/src/trackers/UNIT3D_TEMPLATE.py b/src/trackers/UNIT3D_TEMPLATE.py index e778b6df..435b30bd 100644 --- a/src/trackers/UNIT3D_TEMPLATE.py +++ b/src/trackers/UNIT3D_TEMPLATE.py @@ -72,7 +72,7 @@ async def get_res_id(self, resolution): ###### STOP HERE UNLESS EXTRA MODIFICATION IS NEEDED ###### noqa E266 ############################################################### - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) cat_id = await self.get_cat_id(meta['category']) @@ -150,7 +150,7 @@ async def upload(self, meta): console.print(data) open_torrent.close() - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") params = { diff --git a/src/trackers/UTP.py b/src/trackers/UTP.py index d6bf86d6..eeaf552f 100644 --- a/src/trackers/UTP.py +++ b/src/trackers/UTP.py @@ -28,7 +28,7 @@ def __init__(self, config): self.banned_groups = [] pass - async def upload(self, meta): + async def upload(self, meta, disctype): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) await common.unit3d_edit_desc(meta, self.tracker, self.signature, comparison=True) @@ -137,7 +137,7 @@ async def get_res_id(self, resolution): }.get(resolution, '1') return resolution_id - async def search_existing(self, meta): + async def search_existing(self, meta, disctype): dupes = [] console.print("[yellow]Searching for existing torrents on site...") params = {