Skip to content

Commit

Permalink
Use announce url
Browse files Browse the repository at this point in the history
  • Loading branch information
Audionut committed Aug 29, 2024
1 parent 8625f91 commit afc05bf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
28 changes: 0 additions & 28 deletions src/trackers/HDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
Expand Down Expand Up @@ -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']:
Expand All @@ -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...")
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/PTP.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit afc05bf

Please sign in to comment.