Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

Commit

Permalink
Remove per-license selection logic
Browse files Browse the repository at this point in the history
  • Loading branch information
AetherUnbound committed Oct 10, 2022
1 parent f587be1 commit 63fa109
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions openverse_catalog/dags/providers/provider_api_scripts/freesound.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,7 @@ def __init__(self, *args, **kwargs):
def get_media_type(self, record: dict) -> str:
return constants.AUDIO

def ingest_records(self, **kwargs):
for license_name in [
"Attribution",
"Attribution Noncommercial",
"Creative Commons 0",
]:
logger.info(f"Obtaining audio records under license '{license_name}'")
super().ingest_records(license_name=license_name, **kwargs)

def get_next_query_params(self, prev_query_params: dict | None, **kwargs) -> dict:
license_name = kwargs.get("license_name")
if not prev_query_params:
start_date = "*"
# Allow self.date to be undefined, necessary for the first full, successful
Expand Down Expand Up @@ -101,7 +91,6 @@ def get_next_query_params(self, prev_query_params: dict | None, **kwargs) -> dic
"previews",
]
),
"license": license_name,
"filter": f"created:[{start_date} TO NOW]",
"page": 1,
}
Expand Down

0 comments on commit 63fa109

Please sign in to comment.