Skip to content

Commit

Permalink
Update COMMON.py
Browse files Browse the repository at this point in the history
Unit3d API fix
  • Loading branch information
edge20200 committed Oct 8, 2024
1 parent f85b52e commit 3699111
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/trackers/COMMON.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,10 @@ async def unit3d_torrent_info(self, tracker, torrent_url, search_url, id=None, f
try:
# Handle response when searching by file name (which might return a 'data' array)
data = json_response.get('data', [])
if data:
if data == "404":
console.print("[yellow]No data found (404). Returning None.[/yellow]")
return None, None, None, None, None, None, None, None, None
if data and isinstance(data, list): # Ensure data is a list before accessing it
attributes = data[0].get('attributes', {})

# Extract data from the attributes
Expand Down

0 comments on commit 3699111

Please sign in to comment.