Skip to content

Commit fa3ebfc

Browse files
committed
fix: Fire recording-ready callbacks every time
1 parent 5c1d109 commit fa3ebfc

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

bbblb/recordings.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -521,15 +521,17 @@ async def _process_one(self, metafile: Path):
521521
if not format_created:
522522
pass # TODO: Merge existing with new format?
523523

524-
# Each new format triggers the recording-ready callbacks again,
525-
# just like BBB does it. We never know when the last format
526-
# arrived, so we keep the callbacks around for a while.
527-
if format_created and "bbblb-uuid" in record.meta:
524+
# The recording-ready callbacks are triggered for each format,
525+
# and may be triggered again if a format is imported multiple
526+
# times. That#s the way BBB behaves and most front-ends expect.
527+
# We never know when the last import happend, so we keep the
528+
# callbacks around for a while. (TODO)
529+
if "bbblb-uuid" in record.meta:
528530
async with model.session() as session:
529531
stmt = model.Callback.select(
530532
uuid=record.meta["bbblb-uuid"], type=model.CALLBACK_TYPE_REC
531533
)
532-
callbacks = (await session.execute(stmt)).scalars()
534+
callbacks = (await session.execute(stmt)).scalars().all()
533535

534536
# Fire callbacks in the background, they may take a while to
535537
# complete if the front-end is unresponsive.

0 commit comments

Comments
 (0)