From afc05bf7d342463209822aaf63e7be0ce7e37b53 Mon Sep 17 00:00:00 2001 From: Audionut Date: Thu, 29 Aug 2024 17:54:17 +1000 Subject: [PATCH] Use announce url --- src/trackers/HDB.py | 28 ---------------------------- src/trackers/PTP.py | 2 +- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/src/trackers/HDB.py b/src/trackers/HDB.py index 06cebce3c..c8530261f 100644 --- a/src/trackers/HDB.py +++ b/src/trackers/HDB.py @@ -198,11 +198,6 @@ async def edit_name(self, meta): return hdb_name - - ############################################################### - ###### STOP HERE UNLESS EXTRA MODIFICATION IS NEEDED ###### - ############################################################### - async def upload(self, meta): common = COMMON(config=self.config) await common.edit_torrent(meta, self.tracker, self.source_flag) @@ -220,22 +215,6 @@ async def upload(self, meta): if "Dual-Audio" in meta['audio'] and meta['is_disc'] not in ("BDMV", "HDDVD", "DVD"): console.print("[bold red]Dual-Audio Encodes are not allowed") return - # FORM - # file : .torent file (needs renaming) - # name : name - # type_category : get_type_category_id - # type_codec : get_type_codec_id - # type_medium : get_type_medium_id - # type_origin : 0 unless internal (1) - # descr : description - # techinfo : mediainfo only, no bdinfo - # tags[] : get_tags - # imdb : imdb link - # tvdb_id : tvdb id - # season : season number - # episode : episode number - # anidb_id - # POST > upload/upload # Download new .torrent from site hdb_desc = open(f"{meta['base_dir']}/tmp/{meta['uuid']}/[{self.tracker}]DESCRIPTION.txt", 'r').read() @@ -316,7 +295,6 @@ async def upload(self, meta): data['tvdb_episode'] = int(meta.get('episode_int', 1)) # aniDB - url = "https://hdbits.org/upload/upload" # Submit if meta['debug']: @@ -341,7 +319,6 @@ async def upload(self, meta): raise UploadException(f"Upload to HDB Failed: result URL {up.url} ({up.status_code}) was not expected", 'red') return - async def search_existing(self, meta): dupes = [] console.print("[yellow]Searching for existing torrents on site...") @@ -370,9 +347,6 @@ async def search_existing(self, meta): return dupes - - - async def validate_credentials(self, meta): vapi = await self.validate_api() vcookie = await self.validate_cookies(meta) @@ -514,8 +488,6 @@ async def hdbimg_upload(self, meta): image_bbcode = r.text return image_bbcode - - async def get_info_from_torrent_id(self, hdb_id): hdb_imdb = hdb_name = hdb_torrenthash = None url = "https://hdbits.org/api/torrents" diff --git a/src/trackers/PTP.py b/src/trackers/PTP.py index b3ca3b75e..c35a082e0 100644 --- a/src/trackers/PTP.py +++ b/src/trackers/PTP.py @@ -816,7 +816,7 @@ async def upload(self, meta, url, data): prep = Prep(screens=meta['screens'], img_host=meta['imghost'], config=self.config) new_torrent = prep.CustomTorrent( path=Path(meta['path']), - trackers=["https://fake.tracker"], + trackers=[self.announce_url], source="L4G", private=True, exclude_globs=exclude, # Ensure this is always a list