HoloArchivists/twspace-dl

Overlapping/duplicate audio segments in final result

fireattack opened this issue · 2 comments

Describe the bug
When downloading ongoing Space, the final file would have duplicate audio segments at the place of merging.

If I understand the code correctly, twspace-dl works by downloading existing segments using master_playlist.m3u8, then downloading new parts using the dyn url, then merge them together at the end.

The issue here is that no attempt is made to make sure the two don't have overlapping. And in my observation, they do.

cut.m4a.zip

In this example (cut the very first 30s of a long space), one or two segments repeat at 17.7s and 23.7s.

This issue only happens with running Space so it's kinda hard to give a easy STR.

Desktop (please complete the following information):

  • OS: [e.g. Windows] Windows
  • Version [e.g. 2021.12.10.1]
  • Installation method (binary, pip, or other) pip

Hm I would have though I was missing segments rather than having duplicates, I don't really know how to fix this. I'd have to check if the segment returned by the dyn url was in the m3u8 playlist. To be honest, I think I should deprecate downloading running space or wait until they end to download like https://github.com/HoloArchivists/tslazer does

I will give it a try later to see if it is easy enough to compare the two, so I can come up with a patch.

Edit: let me check tslazer first to see how they implement it.