Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
Audionut committed Dec 19, 2024
2 parents 063c7d5 + 5850deb commit 2c50cf3
Show file tree
Hide file tree
Showing 36 changed files with 900 additions and 623 deletions.
5 changes: 5 additions & 0 deletions data/example-config.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@
# Needs a 5 second wait to ensure the API is updated
"get_permalink": False,

# How many trackers need to pass successfull checking to continue with the upload process
# Default = 1. If 1 (or more) tracker/s pass banned_group and dupe checking, uploading will continue
# If less than the number of trackers pass the checking, exit immediately.
"tracker_pass_checks": "1",

},

"TRACKERS": {
Expand Down
1 change: 1 addition & 0 deletions src/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def parse(self, args, meta):
parser.add_argument('--no-tag', dest='no_tag', action='store_true', required=False, help="Remove Group Tag from title")
parser.add_argument('--no-edition', dest='no_edition', action='store_true', required=False, help="Remove Edition from title")
parser.add_argument('--dual-audio', dest='dual_audio', action='store_true', required=False, help="Add Dual-Audio to the title")
parser.add_argument('-ol', '--original-language', dest='manual_language', nargs='*', required=False, help="Set original audio language")
parser.add_argument('-ns', '--no-seed', action='store_true', required=False, help="Do not add torrent to the client")
parser.add_argument('-year', '--year', dest='manual_year', nargs='?', required=False, help="Override the year found", type=int, default=0)
parser.add_argument('-ptp', '--ptp', nargs='*', required=False, help="PTP torrent id/permalink", type=str)
Expand Down
509 changes: 442 additions & 67 deletions src/prep.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/trackers/ACM.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ async def upload(self, meta, disctype):

async def search_existing(self, meta, disctype):
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on ACM...")
params = {
'api_token': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
'tmdb': meta['tmdb'],
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/AITHER.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ async def get_res_id(self, resolution):

async def search_existing(self, meta, disctype):
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on Aither...")
params = {
'api_token': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
'tmdbId': meta['tmdb'],
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/AL.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ async def upload(self, meta, disctype):

async def search_existing(self, meta, disctype):
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on AL...")
params = {
'api_token': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
'tmdbId': meta['tmdb'],
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/ANT.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ async def search_existing(self, meta, disctype):
meta['skipping'] = "ANT"
return
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on ANT...")
params = {
'apikey': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
't': 'search',
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/BHD.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ async def search_existing(self, meta, disctype):
meta['skipping'] = "BHD"
return
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on BHD...")
category = meta['category']
if category == 'MOVIE':
tmdbID = "movie"
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/BLU.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ async def derived_dv_layer(self, meta):

async def search_existing(self, meta, disctype):
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on BLU...")
params = {
'api_token': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
'tmdbId': meta['tmdb'],
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/FNP.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ async def upload(self, meta, disctype):

async def search_existing(self, meta, disctype):
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on FNP...")
params = {
'api_token': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
'tmdbId': meta['tmdb'],
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/HDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ async def upload(self, meta, disctype):

async def search_existing(self, meta, disctype):
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on HDB...")
url = "https://hdbits.org/api/torrents"
data = {
'username': self.username,
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/HP.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ async def upload(self, meta, disctype):

async def search_existing(self, meta, disctype):
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on HP...")
params = {
'api_token': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
'tmdbId': meta['tmdb'],
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/HUNO.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ async def search_existing(self, meta, disctype):
meta['skipping'] = "HUNO"
return
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on HUNO...")

params = {
'api_token': self.config['TRACKERS']['HUNO']['api_key'].strip(),
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/JPTV.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ async def upload(self, meta, disctype):

async def search_existing(self, meta, disctype):
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on JPTV...")
params = {
'api_token': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
'tmdb': meta['tmdb'],
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/LST.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ async def get_flag(self, meta, flag_name):

async def search_existing(self, meta, disctype):
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on LST...")
params = {
'api_token': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
'tmdbId': meta['tmdb'],
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/MTV.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ async def login(self, cookiefile):

async def search_existing(self, meta, disctype):
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on MTV...")
params = {
't': 'search',
'apikey': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/NBL.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ async def search_existing(self, meta, disctype):
meta['skipping'] = "NBL"
return
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on NBL...")
if int(meta.get('tvmaze_id', 0)) != 0:
search_term = {'tvmaze': int(meta['tvmaze_id'])}
elif int(meta.get('imdb_id', '0').replace('tt', '')) == 0:
Expand Down
3 changes: 1 addition & 2 deletions src/trackers/OE.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ def process_languages(tracks):
else:
console.print("[red]No media information available in meta.[/red]")

# Existing disc metadata handling
bbcode = BBCODE()
if meta.get('discs', []) != []:
discs = meta['discs']
Expand Down Expand Up @@ -322,7 +321,7 @@ async def search_existing(self, meta, disctype):
meta['skipping'] = "OE"
return
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on OE...")
params = {
'api_token': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
'tmdbId': meta['tmdb'],
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/OTW.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ async def upload(self, meta, disctype):

async def search_existing(self, meta, disctype):
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on OTW...")
params = {
'api_token': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
'tmdbId': meta['tmdb'],
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/PSS.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ async def upload(self, meta, disctype):

async def search_existing(self, meta, disctype):
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on PSS...")
params = {
'api_token': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
'tmdbId': meta['tmdb'],
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/R4E.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ async def is_docu(self, genres):

async def search_existing(self, meta, disctype):
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on R4E...")
url = "https://racing4everyone.eu/api/torrents/filter"
params = {
'api_token': self.config['TRACKERS']['R4E']['api_key'].strip(),
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/RF.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ async def search_existing(self, meta, disctype):
meta['skipping'] = "RF"
return
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on RF...")
params = {
'api_token': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
'tmdbId': meta['tmdb'],
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/RTF.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ async def search_existing(self, meta, disctype):
meta['skipping'] = "RTF"
return
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on RTF...")
headers = {
'accept': 'application/json',
'Authorization': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/SHRI.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ async def upload(self, meta, disctype):

async def search_existing(self, meta, disctype):
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on SHRI...")
params = {
'api_token': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
'tmdbId': meta['tmdb'],
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/SN.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ async def edit_desc(self, meta):

async def search_existing(self, meta, disctype):
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on SN...")

params = {
'api_key': self.config['TRACKERS'][self.tracker]['api_key'].strip()
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/SPD.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ async def get_cat_id(self, category_name):

async def search_existing(self, meta, disctype):
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on SPD...")
headers = {
'accept': 'application/json',
'Authorization': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/STC.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ async def get_res_id(self, resolution):

async def search_existing(self, meta, disctype):
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on STC...")
params = {
'api_token': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
'tmdbId': meta['tmdb'],
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/STT.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ async def get_res_id(self, resolution):

async def search_existing(self, meta, disctype):
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on STT...")
params = {
'api_token': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
'tmdbId': meta['tmdb'],
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/TIK.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ def country_code_to_name(self, code):

async def search_existing(self, meta, disctype):
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on TIK...")
disctype = meta.get('disctype', None)
params = {
'api_token': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/TVC.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ async def search_existing(self, meta, disctype):
# https://tvchaosuk.com/api/torrents/filter?api_token=<API_key>&tmdb=138108

dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on TVC...")
params = {
'api_token': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
'tmdb': meta['tmdb'],
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/ULCX.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ async def search_existing(self, meta, disctype):
meta['skipping'] = "ULCX"
return
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on ULCX...")
params = {
'api_token': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
'tmdbId': meta['tmdb'],
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/UTP.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ async def get_res_id(self, resolution):

async def search_existing(self, meta, disctype):
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on UTP...")
params = {
'api_token': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
'tmdbId': meta['tmdb'],
Expand Down
2 changes: 1 addition & 1 deletion src/trackers/YOINK.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ async def upload(self, meta, disctype):

async def search_existing(self, meta, disctype):
dupes = []
console.print("[yellow]Searching for existing torrents on site...")
console.print("[yellow]Searching for existing torrents on YOINK...")
params = {
'api_token': self.config['TRACKERS'][self.tracker]['api_key'].strip(),
'tmdbId': meta['tmdb'],
Expand Down
Loading

0 comments on commit 2c50cf3

Please sign in to comment.