mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-01-03 09:25:42 +10:00
rename media plugin to ytdlp with backwards-compatible aliases
- Rename archivebox/plugins/media/ → archivebox/plugins/ytdlp/ - Rename hook script on_Snapshot__63_media.bg.py → on_Snapshot__63_ytdlp.bg.py - Update config.json: YTDLP_* as primary keys, MEDIA_* as x-aliases - Update templates CSS classes: media-* → ytdlp-* - Fix gallerydl bug: remove incorrect dependency on media plugin output - Update all codebase references to use YTDLP_* and SAVE_YTDLP - Add backwards compatibility test for MEDIA_ENABLED alias
This commit is contained in:
@@ -23,7 +23,7 @@ def disable_extractors_dict():
|
||||
"SAVE_DOM": "false",
|
||||
"SAVE_HEADERS": "false",
|
||||
"USE_GIT": "false",
|
||||
"SAVE_MEDIA": "false",
|
||||
"SAVE_YTDLP": "false",
|
||||
"SAVE_ARCHIVEDOTORG": "false",
|
||||
"SAVE_TITLE": "false",
|
||||
"SAVE_FAVICON": "false",
|
||||
|
||||
@@ -83,7 +83,7 @@ def test_config_set_multiple_values(tmp_path, process):
|
||||
os.chdir(tmp_path)
|
||||
|
||||
result = subprocess.run(
|
||||
['archivebox', 'config', '--set', 'TIMEOUT=111', 'MEDIA_TIMEOUT=222'],
|
||||
['archivebox', 'config', '--set', 'TIMEOUT=111', 'YTDLP_TIMEOUT=222'],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
)
|
||||
@@ -149,7 +149,7 @@ def test_config_preserves_existing_values(tmp_path, process):
|
||||
|
||||
# Set second value
|
||||
subprocess.run(
|
||||
['archivebox', 'config', '--set', 'MEDIA_TIMEOUT=200'],
|
||||
['archivebox', 'config', '--set', 'YTDLP_TIMEOUT=200'],
|
||||
capture_output=True,
|
||||
)
|
||||
|
||||
@@ -157,7 +157,7 @@ def test_config_preserves_existing_values(tmp_path, process):
|
||||
config_file = tmp_path / 'ArchiveBox.conf'
|
||||
content = config_file.read_text()
|
||||
assert 'TIMEOUT' in content
|
||||
assert 'MEDIA_TIMEOUT' in content
|
||||
assert 'YTDLP_TIMEOUT' in content
|
||||
|
||||
|
||||
def test_config_file_is_valid_toml(tmp_path, process):
|
||||
|
||||
@@ -32,7 +32,7 @@ def test_background_hooks_dont_block_parser_extractors(tmp_path, process):
|
||||
"SAVE_DOM": "false",
|
||||
"SAVE_HEADERS": "false",
|
||||
"USE_GIT": "false",
|
||||
"SAVE_MEDIA": "false",
|
||||
"SAVE_YTDLP": "false",
|
||||
"SAVE_ARCHIVEDOTORG": "false",
|
||||
"SAVE_TITLE": "false",
|
||||
"SAVE_FAVICON": "false",
|
||||
@@ -132,7 +132,7 @@ def test_parser_extractors_emit_snapshot_jsonl(tmp_path, process):
|
||||
"SAVE_DOM": "false",
|
||||
"SAVE_HEADERS": "false",
|
||||
"USE_GIT": "false",
|
||||
"SAVE_MEDIA": "false",
|
||||
"SAVE_YTDLP": "false",
|
||||
"SAVE_ARCHIVEDOTORG": "false",
|
||||
"SAVE_TITLE": "false",
|
||||
"SAVE_FAVICON": "false",
|
||||
|
||||
Reference in New Issue
Block a user