This commit is contained in:
2026-01-19 06:24:09 -08:00
parent a961ac3ce7
commit 7ddf0065d1
45 changed files with 627 additions and 411 deletions

View File

@@ -245,7 +245,7 @@ class Soulseek(Provider):
return False
@classmethod
def config(cls) -> List[Dict[str, Any]]:
def config_schema(cls) -> List[Dict[str, Any]]:
return [
{
"key": "username",
@@ -325,6 +325,10 @@ class Soulseek(Provider):
)
return None
# Cast to str for Mypy
username = str(username)
filename = str(filename)
# Use tempfile directory as default if generic path elements were passed or None.
if output_dir is None:
import tempfile
@@ -363,10 +367,13 @@ class Soulseek(Provider):
target_dir = Path(tempfile.gettempdir()) / "Medios" / "Soulseek"
asyncio.set_event_loop(loop)
# Cast to str for Mypy
username_str = str(username)
filename_str = str(filename)
return loop.run_until_complete(
download_soulseek_file(
username=username,
filename=filename,
username=username_str,
filename=filename_str,
output_dir=target_dir,
timeout=self.MAX_WAIT_TRANSFER,
)