refactor(tracks): make complete_track the one finish step for every track kind

This commit is contained in:
imSp4rky
2026-11-29 14:04:53 -07:00
parent dcbc9de7ba
commit e41760c2b3
14 changed files with 332 additions and 174 deletions
+3 -3
View File
@@ -449,9 +449,9 @@ process can use. For these, set no `drm` on the track and override two methods:
full-sample cbcs only, not pattern encryption.
When the download of the track ends, unshackle calls `unshackle.core.drm.cbcs.decrypt_file`, and
the progress row shows "Decrypting". Your `on_track_downloaded` runs before this and gets the
encrypted file. `decrypt_file` writes the plaintext back in place and removes the
protection boxes, so the muxer reads a clear file. In a remote session `get_sample_decrypter`
the progress row shows "Decrypting". `decrypt_file` writes the plaintext back in place and removes the
protection boxes, so the muxer reads a clear file. Then your `on_track_decrypted` runs with `drm` set
to `None`, and after it your `on_track_downloaded` runs and gets the clear file. In a remote session `get_sample_decrypter`
runs on the server: the client sends the samples through the `samples` route, so a decrypter
that needs a process on the server also works for a remote client.