mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-15 07:34:27 -04:00
re-arrange snapshot detail page preference and add opus support
This commit is contained in:
parent
5e0cc926f1
commit
3a87a7fb8c
1 changed files with 3 additions and 2 deletions
|
@ -104,12 +104,13 @@ class SnapshotView(View):
|
||||||
'webm',
|
'webm',
|
||||||
'mp4',
|
'mp4',
|
||||||
'mp3',
|
'mp3',
|
||||||
|
'opus',
|
||||||
'pdf',
|
'pdf',
|
||||||
'md',
|
'md',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# iterate through all the files in the snapshot dir and add the biggest ones to the result list
|
# iterate through all the files in the snapshot dir and add the biggest ones to1 the result list
|
||||||
snap_dir = Path(snapshot.link_dir)
|
snap_dir = Path(snapshot.link_dir)
|
||||||
for result_file in (*snap_dir.glob('*'), *snap_dir.glob('*/*')):
|
for result_file in (*snap_dir.glob('*'), *snap_dir.glob('*/*')):
|
||||||
extension = result_file.suffix.lstrip('.').lower()
|
extension = result_file.suffix.lstrip('.').lower()
|
||||||
|
@ -128,7 +129,7 @@ class SnapshotView(View):
|
||||||
'size': file_size,
|
'size': file_size,
|
||||||
}
|
}
|
||||||
|
|
||||||
preferred_types = ('singlefile', 'wget', 'screenshot', 'dom', 'media', 'pdf', 'readability', 'mercury')
|
preferred_types = ('singlefile', 'screenshot', 'wget', 'dom', 'media', 'pdf', 'readability', 'mercury')
|
||||||
all_types = preferred_types + tuple(result_type for result_type in archiveresults.keys() if result_type not in preferred_types)
|
all_types = preferred_types + tuple(result_type for result_type in archiveresults.keys() if result_type not in preferred_types)
|
||||||
|
|
||||||
best_result = {'path': 'None'}
|
best_result = {'path': 'None'}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue