fix(events): emit TRACK_DOWNLOADED once per track after decryption

This commit is contained in:
imSp4rky
2026-11-28 14:15:31 -07:00
parent 053d83874d
commit 4743e2f32c
7 changed files with 118 additions and 34 deletions
-3
View File
@@ -871,7 +871,6 @@ class HLS:
decrypt_output(track, ctx, session_drm, decrypt=not segment_decrypter)
progress(downloaded="Downloaded", completed=100, total=100)
track.path = save_path
events.emit(events.Types.TRACK_DOWNLOADED, track=track)
return
progress(total=total_segments, completed=0, downloaded="Merging")
@@ -1162,8 +1161,6 @@ class HLS:
if session_drm:
track.drm = None
events.emit(events.Types.TRACK_DOWNLOADED, track=track)
@staticmethod
def discontinuity_starts(wanted_segments: list[Any]) -> list[float]:
"""Start in seconds of each discontinuity block, counted as download_track numbers the blocks, then the end."""