Let the reader have the captured pictures taken again
A frame taken out of a video is kept for good: that is what makes a dead favorite cheap to scroll past, and it is also the one thing that can go wrong with no way out. A picture from the wrong moment, or one kept by a version of this that would keep a frame with nothing in it, stays on the card for the life of the item. So Settings grows a Captured Thumbnails section: what is kept and how much room it takes, and a button that throws the lot away. The cards on screen go back to the start of the thumbnail ladder rather than waiting to be scrolled out of the window and back, which is where a fresh capture comes from, and the session's memory of which items there was no point asking about goes with the pictures -- otherwise "take them again" would quietly skip every item that failed once. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MPZFnNdHbPGDTqQUNiE4ZN
This commit is contained in:
@@ -278,6 +278,26 @@ def main():
|
||||
c.ok("the bar card is the captured frame as well",
|
||||
bar is not None and bar.startswith("data:image/jpeg"), str(bar))
|
||||
|
||||
print("\nand the reader can have them taken again")
|
||||
streamed.clear()
|
||||
page.click(".settings-toggle")
|
||||
c.ok("the setting says what is being kept",
|
||||
"1 picture kept" in page.inner_text("#clear-posters-status"),
|
||||
page.inner_text("#clear-posters-status"))
|
||||
page.click("#clear-posters-btn")
|
||||
c.ok("nothing is kept any more", page.evaluate(CACHE) == [], str(page.evaluate(CACHE)))
|
||||
c.ok("and it says what it threw away",
|
||||
"Threw away 1 picture" in page.inner_text("#clear-posters-status"),
|
||||
page.inner_text("#clear-posters-status"))
|
||||
page.wait_for_function(CAPTURED, arg="vid-0", timeout=40000)
|
||||
shot = page.evaluate(SHOT, "vid-0")
|
||||
c.ok("the card has a frame out of the video again",
|
||||
shot and shot["src"].startswith("data:image/jpeg"), str(shot))
|
||||
c.ok("which was fetched for it, this being the point of the setting",
|
||||
any("/api/stream" in url for url in streamed), str(streamed[:2]))
|
||||
c.ok("and kept again, as one picture",
|
||||
len(page.evaluate(CACHE)) == 1, str(page.evaluate(CACHE)))
|
||||
|
||||
c.ok("nothing threw along the way", not crashes, str(crashes[:2]))
|
||||
browser.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user