Skip to content

Commit

Permalink
Don't auto_search discs at UNIT3D sites
Browse files Browse the repository at this point in the history
is pointless until folder searching is added to their api
  • Loading branch information
Audionut committed Oct 28, 2024
1 parent bd77d9c commit f0e30da
Showing 1 changed file with 35 additions and 34 deletions.
69 changes: 35 additions & 34 deletions src/prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,40 +562,41 @@ async def gather_prep(self, meta, mode):
if match:
found_match = True

if "BLU" in default_trackers and not found_match:
if str(self.config['TRACKERS'].get('BLU', {}).get('useAPI')).lower() == "true":
blu = BLU(config=self.config)
meta, match = await self.update_metadata_from_tracker('BLU', blu, meta, search_term, search_file_folder)
if match:
found_match = True

if "AITHER" in default_trackers and not found_match:
if str(self.config['TRACKERS'].get('AITHER', {}).get('useAPI')).lower() == "true":
aither = AITHER(config=self.config)
meta, match = await self.update_metadata_from_tracker('AITHER', aither, meta, search_term, search_file_folder)
if match:
found_match = True

if "LST" in default_trackers and not found_match:
if str(self.config['TRACKERS'].get('LST', {}).get('useAPI')).lower() == "true":
lst = LST(config=self.config)
meta, match = await self.update_metadata_from_tracker('LST', lst, meta, search_term, search_file_folder)
if match:
found_match = True

if "OE" in default_trackers and not found_match:
if str(self.config['TRACKERS'].get('OE', {}).get('useAPI')).lower() == "true":
oe = OE(config=self.config)
meta, match = await self.update_metadata_from_tracker('OE', oe, meta, search_term, search_file_folder)
if match:
found_match = True

if "TIK" in default_trackers and not found_match:
if str(self.config['TRACKERS'].get('TIK', {}).get('useAPI')).lower() == "true":
tik = TIK(config=self.config)
meta, match = await self.update_metadata_from_tracker('TIK', tik, meta, search_term, search_file_folder)
if match:
found_match = True
if not meta['is_disc']:
if "BLU" in default_trackers and not found_match:
if str(self.config['TRACKERS'].get('BLU', {}).get('useAPI')).lower() == "true":
blu = BLU(config=self.config)
meta, match = await self.update_metadata_from_tracker('BLU', blu, meta, search_term, search_file_folder)
if match:
found_match = True

if "AITHER" in default_trackers and not found_match:
if str(self.config['TRACKERS'].get('AITHER', {}).get('useAPI')).lower() == "true":
aither = AITHER(config=self.config)
meta, match = await self.update_metadata_from_tracker('AITHER', aither, meta, search_term, search_file_folder)
if match:
found_match = True

if "LST" in default_trackers and not found_match:
if str(self.config['TRACKERS'].get('LST', {}).get('useAPI')).lower() == "true":
lst = LST(config=self.config)
meta, match = await self.update_metadata_from_tracker('LST', lst, meta, search_term, search_file_folder)
if match:
found_match = True

if "OE" in default_trackers and not found_match:
if str(self.config['TRACKERS'].get('OE', {}).get('useAPI')).lower() == "true":
oe = OE(config=self.config)
meta, match = await self.update_metadata_from_tracker('OE', oe, meta, search_term, search_file_folder)
if match:
found_match = True

if "TIK" in default_trackers and not found_match:
if str(self.config['TRACKERS'].get('TIK', {}).get('useAPI')).lower() == "true":
tik = TIK(config=self.config)
meta, match = await self.update_metadata_from_tracker('TIK', tik, meta, search_term, search_file_folder)
if match:
found_match = True

if "HDB" in default_trackers and not found_match:
if str(self.config['TRACKERS'].get('HDB', {}).get('useAPI')).lower() == "true":
Expand Down

0 comments on commit f0e30da

Please sign in to comment.