This commit is contained in:
nose
2025-12-11 23:21:45 -08:00
parent 16d8a763cd
commit e2ffcab030
44 changed files with 3558 additions and 1793 deletions

16
CLI.py
View File

@@ -227,8 +227,8 @@ def _get_table_title_for_command(cmd_name: str, emitted_items: Optional[List[Any
'get_tag': 'Tags',
'get-file': 'Results',
'get_file': 'Results',
'add-tag': 'Results',
'add_tag': 'Results',
'add-tags': 'Results',
'add_tags': 'Results',
'delete-tag': 'Results',
'delete_tag': 'Results',
'add-url': 'Results',
@@ -1362,12 +1362,20 @@ def _execute_pipeline(tokens: list):
print(f"Auto-piping YouTube selection to .pipe")
stages.append(['.pipe'])
elif table_type == 'soulseek':
print(f"Auto-piping Soulseek selection to download-provider")
stages.append(['download-provider'])
print(f"Auto-piping Soulseek selection to download-file")
stages.append(['download-file'])
elif source_cmd == 'search-file' and source_args and 'youtube' in source_args:
# Legacy check
print(f"Auto-piping YouTube selection to .pipe")
stages.append(['.pipe'])
else:
# If the user is piping a provider selection into additional stages (e.g. add-file),
# automatically insert the appropriate download stage so @N is "logical".
# This prevents add-file from receiving an unreachable provider path like "share\...".
first_cmd = stages[0][0] if stages and stages[0] else None
if table_type == 'soulseek' and first_cmd not in ('download-file', 'download-media', 'download_media', '.pipe'):
print(f"Auto-inserting download-file after Soulseek selection")
stages.insert(0, ['download-file'])
else:
print(f"No items matched selection in pipeline\n")