mirror of
https://github.com/YusufB5/ASCILINE.git
synced 2026-06-23 22:48:06 +02:00
feat: make hover thumbnails optional (--no-thumbnails)
Thumbnails stay on by default. --no-thumbnails skips building the preview sprite, so the server does no extra work and the rest of the player still works. The frontend already shows no preview when the sprite is unavailable.
This commit is contained in:
parent
41f430d46d
commit
c230c6b7d7
3 changed files with 21 additions and 0 deletions
|
|
@ -78,6 +78,14 @@ class ScrubTests(unittest.TestCase):
|
|||
finally:
|
||||
ss.app.state.queue = [_entry(self.video)]
|
||||
|
||||
def test_thumbnails_can_be_disabled(self):
|
||||
ss.app.state.thumbnails = False
|
||||
try:
|
||||
body = json.loads(asyncio.run(ss.scrub_meta(0)).body)
|
||||
self.assertFalse(body["available"])
|
||||
finally:
|
||||
ss.app.state.thumbnails = True
|
||||
|
||||
def test_sprite_404_before_it_is_built(self):
|
||||
from fastapi import HTTPException
|
||||
ss._scrub_cache.clear()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue